From 8798c3aff5eef552540922e21ca001ee5253fd35 Mon Sep 17 00:00:00 2001 From: ArduinoBot Date: Wed, 3 Jul 2024 08:20:40 +0000 Subject: [PATCH] Regenerate client from commit 647c963 of spec repo --- .apigentools-info | 4 +- .openapi-generator/FILES | 33 +++ package.json | 2 +- src/ApiClient.js | 2 +- src/api/DashboardsV2Api.js | 2 +- src/api/DevicesV2Api.js | 2 +- src/api/DevicesV2CertsApi.js | 2 +- src/api/DevicesV2OtaApi.js | 2 +- src/api/DevicesV2PassApi.js | 2 +- src/api/DevicesV2TagsApi.js | 2 +- src/api/LoraDevicesV1Api.js | 2 +- src/api/LoraFreqPlanV1Api.js | 2 +- src/api/NetworkCredentialsV1Api.js | 140 +++++++++++ src/api/PropertiesV2Api.js | 2 +- src/api/SeriesV2Api.js | 51 +++- src/api/TemplatesApi.js | 93 ++++++++ src/api/ThingsV2Api.js | 2 +- src/api/ThingsV2TagsApi.js | 2 +- src/index.js | 79 ++++++- src/model/ArduinoCompressedv2.js | 2 +- src/model/ArduinoCredentialsv1.js | 134 +++++++++++ src/model/ArduinoDashboardowner.js | 2 +- src/model/ArduinoDashboardshare.js | 2 +- src/model/ArduinoDashboardv2.js | 2 +- src/model/ArduinoDashboardv2template.js | 15 +- src/model/ArduinoDevicev2.js | 16 +- src/model/ArduinoDevicev2Cert.js | 2 +- src/model/ArduinoDevicev2EventProperties.js | 2 +- src/model/ArduinoDevicev2Otaupload.js | 2 +- src/model/ArduinoDevicev2Pass.js | 2 +- src/model/ArduinoDevicev2SimpleProperties.js | 2 +- src/model/ArduinoDevicev2StatusEvent.js | 2 +- src/model/ArduinoDevicev2StatusEvents.js | 2 +- src/model/ArduinoDevicev2Webhook.js | 2 +- src/model/ArduinoDevicev2properties.js | 2 +- src/model/ArduinoDevicev2propertyvalue.js | 2 +- .../ArduinoDevicev2propertyvalueValue.js | 2 +- ...inoDevicev2propertyvalueValueStatistics.js | 2 +- src/model/ArduinoDevicev2propertyvalues.js | 2 +- ...oDevicev2propertyvaluesLastEvaluatedKey.js | 2 +- src/model/ArduinoDevicev2templatedevice.js | 102 ++++++++ src/model/ArduinoLinkedvariable.js | 2 +- src/model/ArduinoLoradevicev1.js | 2 +- src/model/ArduinoLorafreqplansv1.js | 2 +- src/model/ArduinoLorafreqplanv1.js | 2 +- src/model/ArduinoProperty.js | 2 +- src/model/ArduinoSeriesBatch.js | 2 +- src/model/ArduinoSeriesBatchSampled.js | 115 +++++++++ src/model/ArduinoSeriesRawBatch.js | 2 +- src/model/ArduinoSeriesRawBatchLastvalue.js | 2 +- .../ArduinoSeriesRawLastValueResponse.js | 2 +- src/model/ArduinoSeriesRawResponse.js | 2 +- src/model/ArduinoSeriesResponse.js | 2 +- src/model/ArduinoSeriesSampledResponse.js | 220 ++++++++++++++++++ src/model/ArduinoTags.js | 2 +- src/model/ArduinoTemplate.js | 128 ++++++++++ src/model/ArduinoTemplateproperty.js | 15 +- src/model/ArduinoTemplatevariable.js | 2 +- src/model/ArduinoThing.js | 42 +++- src/model/ArduinoThingresult.js | 125 ++++++++++ src/model/ArduinoThingtemplate.js | 69 ++++-- src/model/ArduinoTimeseriesmedia.js | 2 +- src/model/ArduinoTimezone.js | 2 +- src/model/ArduinoVariableslinks.js | 2 +- src/model/ArduinoWidgetv2.js | 21 +- src/model/ArduinoWidgetv2template.js | 2 +- src/model/BatchLastValueRequestsMediaV1.js | 2 +- .../BatchQueryRawLastValueRequestMediaV1.js | 2 +- src/model/BatchQueryRawRequestMediaV1.js | 2 +- src/model/BatchQueryRawRequestsMediaV1.js | 2 +- .../BatchQueryRawResponseSeriesMediaV1.js | 2 +- src/model/BatchQueryRequestMediaV1.js | 2 +- src/model/BatchQueryRequestsMediaV1.js | 2 +- src/model/BatchQuerySampledRequestMediaV1.js | 133 +++++++++++ src/model/BatchQuerySampledRequestsMediaV1.js | 114 +++++++++ src/model/CheckDevicesV2PassPayload.js | 2 +- src/model/Clone.js | 2 +- src/model/CreateDevicesV2CertsPayload.js | 2 +- src/model/CreateDevicesV2Payload.js | 16 +- src/model/CreateLoraDevicesV1Payload.js | 2 +- src/model/Dashboardshare.js | 2 +- src/model/Dashboardv2.js | 2 +- src/model/Devicev2.js | 16 +- src/model/Devicev2Cert.js | 2 +- src/model/Devicev2Otabinaryurl.js | 2 +- src/model/Devicev2Otaurlpyalod.js | 2 +- src/model/Devicev2Pass.js | 2 +- src/model/Error.js | 2 +- src/model/HistoricDataRequest.js | 2 +- src/model/Override.js | 2 +- src/model/PropertiesValue.js | 2 +- src/model/PropertiesValues.js | 2 +- src/model/Property.js | 2 +- src/model/PropertyValue.js | 2 +- src/model/Sharerequest.js | 2 +- src/model/Tag.js | 2 +- src/model/Template.js | 131 +++++++++++ src/model/ThingClone.js | 2 +- src/model/ThingCreate.js | 42 +++- src/model/ThingSketch.js | 2 +- src/model/ThingUpdate.js | 42 +++- src/model/TimeseriesDataPoint.js | 2 +- src/model/UpdateSketch.js | 2 +- src/model/Widget.js | 2 +- src/model/Widgetlink.js | 2 +- 105 files changed, 1928 insertions(+), 128 deletions(-) create mode 100644 src/api/NetworkCredentialsV1Api.js create mode 100644 src/api/TemplatesApi.js create mode 100644 src/model/ArduinoCredentialsv1.js create mode 100644 src/model/ArduinoDevicev2templatedevice.js create mode 100644 src/model/ArduinoSeriesBatchSampled.js create mode 100644 src/model/ArduinoSeriesSampledResponse.js create mode 100644 src/model/ArduinoTemplate.js create mode 100644 src/model/ArduinoThingresult.js create mode 100644 src/model/BatchQuerySampledRequestMediaV1.js create mode 100644 src/model/BatchQuerySampledRequestsMediaV1.js create mode 100644 src/model/Template.js diff --git a/.apigentools-info b/.apigentools-info index efc770b..1525bef 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,8 +4,8 @@ "spec_versions": { "v2": { "apigentools_version": "1.1.0", - "regenerated": "2024-04-16 08:17:19.461374", - "spec_repo_commit": "28842c9" + "regenerated": "2024-07-03 08:18:58.329658", + "spec_repo_commit": "647c963" } } } \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 104b62b..d9cc3ca 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -3,6 +3,7 @@ .travis.yml README.md docs/ArduinoCompressedv2.md +docs/ArduinoCredentialsv1.md docs/ArduinoDashboardowner.md docs/ArduinoDashboardshare.md docs/ArduinoDashboardv2.md @@ -22,21 +23,26 @@ docs/ArduinoDevicev2propertyvalueValue.md docs/ArduinoDevicev2propertyvalueValueStatistics.md docs/ArduinoDevicev2propertyvalues.md docs/ArduinoDevicev2propertyvaluesLastEvaluatedKey.md +docs/ArduinoDevicev2templatedevice.md docs/ArduinoLinkedvariable.md docs/ArduinoLoradevicev1.md docs/ArduinoLorafreqplansv1.md docs/ArduinoLorafreqplanv1.md docs/ArduinoProperty.md docs/ArduinoSeriesBatch.md +docs/ArduinoSeriesBatchSampled.md docs/ArduinoSeriesRawBatch.md docs/ArduinoSeriesRawBatchLastvalue.md docs/ArduinoSeriesRawLastValueResponse.md docs/ArduinoSeriesRawResponse.md docs/ArduinoSeriesResponse.md +docs/ArduinoSeriesSampledResponse.md docs/ArduinoTags.md +docs/ArduinoTemplate.md docs/ArduinoTemplateproperty.md docs/ArduinoTemplatevariable.md docs/ArduinoThing.md +docs/ArduinoThingresult.md docs/ArduinoThingtemplate.md docs/ArduinoTimeseriesmedia.md docs/ArduinoTimezone.md @@ -50,6 +56,8 @@ docs/BatchQueryRawRequestsMediaV1.md docs/BatchQueryRawResponseSeriesMediaV1.md docs/BatchQueryRequestMediaV1.md docs/BatchQueryRequestsMediaV1.md +docs/BatchQuerySampledRequestMediaV1.md +docs/BatchQuerySampledRequestsMediaV1.md docs/CheckDevicesV2PassPayload.md docs/Clone.md docs/CreateDevicesV2CertsPayload.md @@ -72,6 +80,7 @@ docs/Error.md docs/HistoricDataRequest.md docs/LoraDevicesV1Api.md docs/LoraFreqPlanV1Api.md +docs/NetworkCredentialsV1Api.md docs/Override.md docs/PropertiesV2Api.md docs/PropertiesValue.md @@ -81,6 +90,8 @@ docs/PropertyValue.md docs/SeriesV2Api.md docs/Sharerequest.md docs/Tag.md +docs/Template.md +docs/TemplatesApi.md docs/ThingClone.md docs/ThingCreate.md docs/ThingSketch.md @@ -103,12 +114,15 @@ src/api/DevicesV2PassApi.js src/api/DevicesV2TagsApi.js src/api/LoraDevicesV1Api.js src/api/LoraFreqPlanV1Api.js +src/api/NetworkCredentialsV1Api.js src/api/PropertiesV2Api.js src/api/SeriesV2Api.js +src/api/TemplatesApi.js src/api/ThingsV2Api.js src/api/ThingsV2TagsApi.js src/index.js src/model/ArduinoCompressedv2.js +src/model/ArduinoCredentialsv1.js src/model/ArduinoDashboardowner.js src/model/ArduinoDashboardshare.js src/model/ArduinoDashboardv2.js @@ -128,21 +142,26 @@ src/model/ArduinoDevicev2propertyvalueValue.js src/model/ArduinoDevicev2propertyvalueValueStatistics.js src/model/ArduinoDevicev2propertyvalues.js src/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.js +src/model/ArduinoDevicev2templatedevice.js src/model/ArduinoLinkedvariable.js src/model/ArduinoLoradevicev1.js src/model/ArduinoLorafreqplansv1.js src/model/ArduinoLorafreqplanv1.js src/model/ArduinoProperty.js src/model/ArduinoSeriesBatch.js +src/model/ArduinoSeriesBatchSampled.js src/model/ArduinoSeriesRawBatch.js src/model/ArduinoSeriesRawBatchLastvalue.js src/model/ArduinoSeriesRawLastValueResponse.js src/model/ArduinoSeriesRawResponse.js src/model/ArduinoSeriesResponse.js +src/model/ArduinoSeriesSampledResponse.js src/model/ArduinoTags.js +src/model/ArduinoTemplate.js src/model/ArduinoTemplateproperty.js src/model/ArduinoTemplatevariable.js src/model/ArduinoThing.js +src/model/ArduinoThingresult.js src/model/ArduinoThingtemplate.js src/model/ArduinoTimeseriesmedia.js src/model/ArduinoTimezone.js @@ -156,6 +175,8 @@ src/model/BatchQueryRawRequestsMediaV1.js src/model/BatchQueryRawResponseSeriesMediaV1.js src/model/BatchQueryRequestMediaV1.js src/model/BatchQueryRequestsMediaV1.js +src/model/BatchQuerySampledRequestMediaV1.js +src/model/BatchQuerySampledRequestsMediaV1.js src/model/CheckDevicesV2PassPayload.js src/model/Clone.js src/model/CreateDevicesV2CertsPayload.js @@ -177,6 +198,7 @@ src/model/Property.js src/model/PropertyValue.js src/model/Sharerequest.js src/model/Tag.js +src/model/Template.js src/model/ThingClone.js src/model/ThingCreate.js src/model/ThingSketch.js @@ -193,11 +215,14 @@ test/api/DevicesV2PassApi.spec.js test/api/DevicesV2TagsApi.spec.js test/api/LoraDevicesV1Api.spec.js test/api/LoraFreqPlanV1Api.spec.js +test/api/NetworkCredentialsV1Api.spec.js test/api/PropertiesV2Api.spec.js test/api/SeriesV2Api.spec.js +test/api/TemplatesApi.spec.js test/api/ThingsV2Api.spec.js test/api/ThingsV2TagsApi.spec.js test/model/ArduinoCompressedv2.spec.js +test/model/ArduinoCredentialsv1.spec.js test/model/ArduinoDashboardowner.spec.js test/model/ArduinoDashboardshare.spec.js test/model/ArduinoDashboardv2.spec.js @@ -217,21 +242,26 @@ test/model/ArduinoDevicev2propertyvalueValue.spec.js test/model/ArduinoDevicev2propertyvalueValueStatistics.spec.js test/model/ArduinoDevicev2propertyvalues.spec.js test/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.spec.js +test/model/ArduinoDevicev2templatedevice.spec.js test/model/ArduinoLinkedvariable.spec.js test/model/ArduinoLoradevicev1.spec.js test/model/ArduinoLorafreqplansv1.spec.js test/model/ArduinoLorafreqplanv1.spec.js test/model/ArduinoProperty.spec.js test/model/ArduinoSeriesBatch.spec.js +test/model/ArduinoSeriesBatchSampled.spec.js test/model/ArduinoSeriesRawBatch.spec.js test/model/ArduinoSeriesRawBatchLastvalue.spec.js test/model/ArduinoSeriesRawLastValueResponse.spec.js test/model/ArduinoSeriesRawResponse.spec.js test/model/ArduinoSeriesResponse.spec.js +test/model/ArduinoSeriesSampledResponse.spec.js test/model/ArduinoTags.spec.js +test/model/ArduinoTemplate.spec.js test/model/ArduinoTemplateproperty.spec.js test/model/ArduinoTemplatevariable.spec.js test/model/ArduinoThing.spec.js +test/model/ArduinoThingresult.spec.js test/model/ArduinoThingtemplate.spec.js test/model/ArduinoTimeseriesmedia.spec.js test/model/ArduinoTimezone.spec.js @@ -245,6 +275,8 @@ test/model/BatchQueryRawRequestsMediaV1.spec.js test/model/BatchQueryRawResponseSeriesMediaV1.spec.js test/model/BatchQueryRequestMediaV1.spec.js test/model/BatchQueryRequestsMediaV1.spec.js +test/model/BatchQuerySampledRequestMediaV1.spec.js +test/model/BatchQuerySampledRequestsMediaV1.spec.js test/model/CheckDevicesV2PassPayload.spec.js test/model/Clone.spec.js test/model/CreateDevicesV2CertsPayload.spec.js @@ -266,6 +298,7 @@ test/model/Property.spec.js test/model/PropertyValue.spec.js test/model/Sharerequest.spec.js test/model/Tag.spec.js +test/model/Template.spec.js test/model/ThingClone.spec.js test/model/ThingCreate.spec.js test/model/ThingSketch.spec.js diff --git a/package.json b/package.json index bd4fef6..c037b89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@arduino/arduino-iot-client", - "version": "2.0.2", + "version": "2.0.4", "description": " Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go)", "license": "GPLv3", "main": "dist/index.js", diff --git a/src/ApiClient.js b/src/ApiClient.js index 16c99e8..da16b37 100644 --- a/src/ApiClient.js +++ b/src/ApiClient.js @@ -17,7 +17,7 @@ import querystring from "querystring"; /** * @module ApiClient -* @version 2.0.2 +* @version 2.0.4 */ /** diff --git a/src/api/DashboardsV2Api.js b/src/api/DashboardsV2Api.js index 72f5d8c..5a312c7 100644 --- a/src/api/DashboardsV2Api.js +++ b/src/api/DashboardsV2Api.js @@ -27,7 +27,7 @@ import Widgetlink from '../model/Widgetlink'; /** * DashboardsV2 service. * @module api/DashboardsV2Api -* @version 2.0.2 +* @version 2.0.4 */ export default class DashboardsV2Api { diff --git a/src/api/DevicesV2Api.js b/src/api/DevicesV2Api.js index 25214ba..e81e574 100644 --- a/src/api/DevicesV2Api.js +++ b/src/api/DevicesV2Api.js @@ -26,7 +26,7 @@ import PropertiesValues from '../model/PropertiesValues'; /** * DevicesV2 service. * @module api/DevicesV2Api -* @version 2.0.2 +* @version 2.0.4 */ export default class DevicesV2Api { diff --git a/src/api/DevicesV2CertsApi.js b/src/api/DevicesV2CertsApi.js index d7f1bd7..2ff8d4f 100644 --- a/src/api/DevicesV2CertsApi.js +++ b/src/api/DevicesV2CertsApi.js @@ -21,7 +21,7 @@ import Error from '../model/Error'; /** * DevicesV2Certs service. * @module api/DevicesV2CertsApi -* @version 2.0.2 +* @version 2.0.4 */ export default class DevicesV2CertsApi { diff --git a/src/api/DevicesV2OtaApi.js b/src/api/DevicesV2OtaApi.js index 9a7f42e..3b32b28 100644 --- a/src/api/DevicesV2OtaApi.js +++ b/src/api/DevicesV2OtaApi.js @@ -21,7 +21,7 @@ import Error from '../model/Error'; /** * DevicesV2Ota service. * @module api/DevicesV2OtaApi -* @version 2.0.2 +* @version 2.0.4 */ export default class DevicesV2OtaApi { diff --git a/src/api/DevicesV2PassApi.js b/src/api/DevicesV2PassApi.js index 96c42c1..b2ab470 100644 --- a/src/api/DevicesV2PassApi.js +++ b/src/api/DevicesV2PassApi.js @@ -21,7 +21,7 @@ import Error from '../model/Error'; /** * DevicesV2Pass service. * @module api/DevicesV2PassApi -* @version 2.0.2 +* @version 2.0.4 */ export default class DevicesV2PassApi { diff --git a/src/api/DevicesV2TagsApi.js b/src/api/DevicesV2TagsApi.js index 1f43a26..916240d 100644 --- a/src/api/DevicesV2TagsApi.js +++ b/src/api/DevicesV2TagsApi.js @@ -20,7 +20,7 @@ import Tag from '../model/Tag'; /** * DevicesV2Tags service. * @module api/DevicesV2TagsApi -* @version 2.0.2 +* @version 2.0.4 */ export default class DevicesV2TagsApi { diff --git a/src/api/LoraDevicesV1Api.js b/src/api/LoraDevicesV1Api.js index ee914b6..8c42c70 100644 --- a/src/api/LoraDevicesV1Api.js +++ b/src/api/LoraDevicesV1Api.js @@ -19,7 +19,7 @@ import CreateLoraDevicesV1Payload from '../model/CreateLoraDevicesV1Payload'; /** * LoraDevicesV1 service. * @module api/LoraDevicesV1Api -* @version 2.0.2 +* @version 2.0.4 */ export default class LoraDevicesV1Api { diff --git a/src/api/LoraFreqPlanV1Api.js b/src/api/LoraFreqPlanV1Api.js index a206539..1ecf7f8 100644 --- a/src/api/LoraFreqPlanV1Api.js +++ b/src/api/LoraFreqPlanV1Api.js @@ -19,7 +19,7 @@ import Error from '../model/Error'; /** * LoraFreqPlanV1 service. * @module api/LoraFreqPlanV1Api -* @version 2.0.2 +* @version 2.0.4 */ export default class LoraFreqPlanV1Api { diff --git a/src/api/NetworkCredentialsV1Api.js b/src/api/NetworkCredentialsV1Api.js new file mode 100644 index 0000000..bf7ecdd --- /dev/null +++ b/src/api/NetworkCredentialsV1Api.js @@ -0,0 +1,140 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import ArduinoCredentialsv1 from '../model/ArduinoCredentialsv1'; + +/** +* NetworkCredentialsV1 service. +* @module api/NetworkCredentialsV1Api +* @version 2.0.4 +*/ +export default class NetworkCredentialsV1Api { + + /** + * Constructs a new NetworkCredentialsV1Api. + * @alias module:api/NetworkCredentialsV1Api + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * show network_credentials_v1 + * Show required network credentials depending on device type + * @param {module:model/String} type Device type + * @param {Object} opts Optional parameters + * @param {module:model/String} [connection] Connection used by the device + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link Array.} and HTTP response + */ + networkCredentialsV1ShowWithHttpInfo(type, opts) { + opts = opts || {}; + let postBody = null; + // verify the required parameter 'type' is set + if (type === undefined || type === null) { + throw new Error("Missing the required parameter 'type' when calling networkCredentialsV1Show"); + } + + let pathParams = { + 'type': type + }; + let queryParams = { + 'connection': opts['connection'] + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = ['application/vnd.arduino.credentialsv1+json; type=collection']; + let returnType = [ArduinoCredentialsv1]; + return this.apiClient.callApi( + '/v1/network_credentials/{type}', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * show network_credentials_v1 + * Show required network credentials depending on device type + * @param {module:model/String} type Device type + * @param {Object} opts Optional parameters + * @param {module:model/String} opts.connection Connection used by the device + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link Array.} + */ + networkCredentialsV1Show(type, opts) { + return this.networkCredentialsV1ShowWithHttpInfo(type, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + + /** + * showByDevice network_credentials_v1 + * Show available connection types depending on device type + * @param {module:model/String} type Device type + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response + */ + networkCredentialsV1ShowByDeviceWithHttpInfo(type) { + let postBody = null; + // verify the required parameter 'type' is set + if (type === undefined || type === null) { + throw new Error("Missing the required parameter 'type' when calling networkCredentialsV1ShowByDevice"); + } + + let pathParams = { + 'type': type + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = []; + let accepts = []; + let returnType = null; + return this.apiClient.callApi( + '/v1/network_credentials/{type}/connections', 'GET', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * showByDevice network_credentials_v1 + * Show available connection types depending on device type + * @param {module:model/String} type Device type + * @return {Promise} a {@link https://www.promisejs.org/|Promise} + */ + networkCredentialsV1ShowByDevice(type) { + return this.networkCredentialsV1ShowByDeviceWithHttpInfo(type) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/src/api/PropertiesV2Api.js b/src/api/PropertiesV2Api.js index c6f4774..737a9ab 100644 --- a/src/api/PropertiesV2Api.js +++ b/src/api/PropertiesV2Api.js @@ -22,7 +22,7 @@ import PropertyValue from '../model/PropertyValue'; /** * PropertiesV2 service. * @module api/PropertiesV2Api -* @version 2.0.2 +* @version 2.0.4 */ export default class PropertiesV2Api { diff --git a/src/api/SeriesV2Api.js b/src/api/SeriesV2Api.js index 83c0c23..6d82e73 100644 --- a/src/api/SeriesV2Api.js +++ b/src/api/SeriesV2Api.js @@ -14,18 +14,20 @@ import ApiClient from "../ApiClient"; import ArduinoSeriesBatch from '../model/ArduinoSeriesBatch'; +import ArduinoSeriesBatchSampled from '../model/ArduinoSeriesBatchSampled'; import ArduinoSeriesRawBatch from '../model/ArduinoSeriesRawBatch'; import ArduinoSeriesRawBatchLastvalue from '../model/ArduinoSeriesRawBatchLastvalue'; import BatchLastValueRequestsMediaV1 from '../model/BatchLastValueRequestsMediaV1'; import BatchQueryRawRequestsMediaV1 from '../model/BatchQueryRawRequestsMediaV1'; import BatchQueryRequestsMediaV1 from '../model/BatchQueryRequestsMediaV1'; +import BatchQuerySampledRequestsMediaV1 from '../model/BatchQuerySampledRequestsMediaV1'; import Error from '../model/Error'; import HistoricDataRequest from '../model/HistoricDataRequest'; /** * SeriesV2 service. * @module api/SeriesV2Api -* @version 2.0.2 +* @version 2.0.4 */ export default class SeriesV2Api { @@ -183,6 +185,53 @@ export default class SeriesV2Api { } + /** + * batch_query_sampling series_v2 + * Returns a batch of time-series sampled samples. To be used for types that does not support mathematic aggregation. Types supported: strings, complex types. + * @param {module:model/BatchQuerySampledRequestsMediaV1} batchQuerySampledRequestsMediaV1 + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoSeriesBatchSampled} and HTTP response + */ + seriesV2BatchQuerySamplingWithHttpInfo(batchQuerySampledRequestsMediaV1) { + let postBody = batchQuerySampledRequestsMediaV1; + // verify the required parameter 'batchQuerySampledRequestsMediaV1' is set + if (batchQuerySampledRequestsMediaV1 === undefined || batchQuerySampledRequestsMediaV1 === null) { + throw new Error("Missing the required parameter 'batchQuerySampledRequestsMediaV1' when calling seriesV2BatchQuerySampling"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + }; + let formParams = { + }; + + let authNames = ['oauth2']; + let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let accepts = ['application/vnd.arduino.series.batch.sampled+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoSeriesBatchSampled; + return this.apiClient.callApi( + '/v2/series/batch_query_sampling', 'POST', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * batch_query_sampling series_v2 + * Returns a batch of time-series sampled samples. To be used for types that does not support mathematic aggregation. Types supported: strings, complex types. + * @param {module:model/BatchQuerySampledRequestsMediaV1} batchQuerySampledRequestsMediaV1 + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoSeriesBatchSampled} + */ + seriesV2BatchQuerySampling(batchQuerySampledRequestsMediaV1) { + return this.seriesV2BatchQuerySamplingWithHttpInfo(batchQuerySampledRequestsMediaV1) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + /** * historic_data series_v2 * Request sending of historical data of properties by email diff --git a/src/api/TemplatesApi.js b/src/api/TemplatesApi.js new file mode 100644 index 0000000..9b9d250 --- /dev/null +++ b/src/api/TemplatesApi.js @@ -0,0 +1,93 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + + +import ApiClient from "../ApiClient"; +import ArduinoTemplate from '../model/ArduinoTemplate'; +import Error from '../model/Error'; +import Template from '../model/Template'; + +/** +* Templates service. +* @module api/TemplatesApi +* @version 2.0.4 +*/ +export default class TemplatesApi { + + /** + * Constructs a new TemplatesApi. + * @alias module:api/TemplatesApi + * @class + * @param {module:ApiClient} [apiClient] Optional API client implementation to use, + * default to {@link module:ApiClient#instance} if unspecified. + */ + constructor(apiClient) { + this.apiClient = apiClient || ApiClient.instance; + } + + + + /** + * apply templates + * Apply an existing cloud template and generate all the needed resources + * @param {module:model/Template} template TemplatePayload describes the needed attribute to apply a template + * @param {Object} opts Optional parameters + * @param {String} [xOrganization] + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ArduinoTemplate} and HTTP response + */ + templatesApplyWithHttpInfo(template, opts) { + opts = opts || {}; + let postBody = template; + // verify the required parameter 'template' is set + if (template === undefined || template === null) { + throw new Error("Missing the required parameter 'template' when calling templatesApply"); + } + + let pathParams = { + }; + let queryParams = { + }; + let headerParams = { + 'X-Organization': opts['xOrganization'] + }; + let formParams = { + }; + + let authNames = []; + let contentTypes = ['application/json', 'application/x-www-form-urlencoded']; + let accepts = ['application/vnd.arduino.template+json', 'application/vnd.goa.error+json']; + let returnType = ArduinoTemplate; + return this.apiClient.callApi( + '/v1/templates', 'PUT', + pathParams, queryParams, headerParams, formParams, postBody, + authNames, contentTypes, accepts, returnType, null + ); + } + + /** + * apply templates + * Apply an existing cloud template and generate all the needed resources + * @param {module:model/Template} template TemplatePayload describes the needed attribute to apply a template + * @param {Object} opts Optional parameters + * @param {String} opts.xOrganization + * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ArduinoTemplate} + */ + templatesApply(template, opts) { + return this.templatesApplyWithHttpInfo(template, opts) + .then(function(response_and_data) { + return response_and_data.data; + }); + } + + +} diff --git a/src/api/ThingsV2Api.js b/src/api/ThingsV2Api.js index 8436a25..56acacc 100644 --- a/src/api/ThingsV2Api.js +++ b/src/api/ThingsV2Api.js @@ -25,7 +25,7 @@ import UpdateSketch from '../model/UpdateSketch'; /** * ThingsV2 service. * @module api/ThingsV2Api -* @version 2.0.2 +* @version 2.0.4 */ export default class ThingsV2Api { diff --git a/src/api/ThingsV2TagsApi.js b/src/api/ThingsV2TagsApi.js index 8806245..c4cc7ba 100644 --- a/src/api/ThingsV2TagsApi.js +++ b/src/api/ThingsV2TagsApi.js @@ -20,7 +20,7 @@ import Tag from '../model/Tag'; /** * ThingsV2Tags service. * @module api/ThingsV2TagsApi -* @version 2.0.2 +* @version 2.0.4 */ export default class ThingsV2TagsApi { diff --git a/src/index.js b/src/index.js index 6bd548f..c87c1fb 100644 --- a/src/index.js +++ b/src/index.js @@ -14,6 +14,7 @@ import ApiClient from './ApiClient'; import ArduinoCompressedv2 from './model/ArduinoCompressedv2'; +import ArduinoCredentialsv1 from './model/ArduinoCredentialsv1'; import ArduinoDashboardowner from './model/ArduinoDashboardowner'; import ArduinoDashboardshare from './model/ArduinoDashboardshare'; import ArduinoDashboardv2 from './model/ArduinoDashboardv2'; @@ -33,21 +34,26 @@ import ArduinoDevicev2propertyvalueValue from './model/ArduinoDevicev2propertyva import ArduinoDevicev2propertyvalueValueStatistics from './model/ArduinoDevicev2propertyvalueValueStatistics'; import ArduinoDevicev2propertyvalues from './model/ArduinoDevicev2propertyvalues'; import ArduinoDevicev2propertyvaluesLastEvaluatedKey from './model/ArduinoDevicev2propertyvaluesLastEvaluatedKey'; +import ArduinoDevicev2templatedevice from './model/ArduinoDevicev2templatedevice'; import ArduinoLinkedvariable from './model/ArduinoLinkedvariable'; import ArduinoLoradevicev1 from './model/ArduinoLoradevicev1'; import ArduinoLorafreqplansv1 from './model/ArduinoLorafreqplansv1'; import ArduinoLorafreqplanv1 from './model/ArduinoLorafreqplanv1'; import ArduinoProperty from './model/ArduinoProperty'; import ArduinoSeriesBatch from './model/ArduinoSeriesBatch'; +import ArduinoSeriesBatchSampled from './model/ArduinoSeriesBatchSampled'; import ArduinoSeriesRawBatch from './model/ArduinoSeriesRawBatch'; import ArduinoSeriesRawBatchLastvalue from './model/ArduinoSeriesRawBatchLastvalue'; import ArduinoSeriesRawLastValueResponse from './model/ArduinoSeriesRawLastValueResponse'; import ArduinoSeriesRawResponse from './model/ArduinoSeriesRawResponse'; import ArduinoSeriesResponse from './model/ArduinoSeriesResponse'; +import ArduinoSeriesSampledResponse from './model/ArduinoSeriesSampledResponse'; import ArduinoTags from './model/ArduinoTags'; +import ArduinoTemplate from './model/ArduinoTemplate'; import ArduinoTemplateproperty from './model/ArduinoTemplateproperty'; import ArduinoTemplatevariable from './model/ArduinoTemplatevariable'; import ArduinoThing from './model/ArduinoThing'; +import ArduinoThingresult from './model/ArduinoThingresult'; import ArduinoThingtemplate from './model/ArduinoThingtemplate'; import ArduinoTimeseriesmedia from './model/ArduinoTimeseriesmedia'; import ArduinoTimezone from './model/ArduinoTimezone'; @@ -61,6 +67,8 @@ import BatchQueryRawRequestsMediaV1 from './model/BatchQueryRawRequestsMediaV1'; import BatchQueryRawResponseSeriesMediaV1 from './model/BatchQueryRawResponseSeriesMediaV1'; import BatchQueryRequestMediaV1 from './model/BatchQueryRequestMediaV1'; import BatchQueryRequestsMediaV1 from './model/BatchQueryRequestsMediaV1'; +import BatchQuerySampledRequestMediaV1 from './model/BatchQuerySampledRequestMediaV1'; +import BatchQuerySampledRequestsMediaV1 from './model/BatchQuerySampledRequestsMediaV1'; import CheckDevicesV2PassPayload from './model/CheckDevicesV2PassPayload'; import Clone from './model/Clone'; import CreateDevicesV2CertsPayload from './model/CreateDevicesV2CertsPayload'; @@ -82,6 +90,7 @@ import Property from './model/Property'; import PropertyValue from './model/PropertyValue'; import Sharerequest from './model/Sharerequest'; import Tag from './model/Tag'; +import Template from './model/Template'; import ThingClone from './model/ThingClone'; import ThingCreate from './model/ThingCreate'; import ThingSketch from './model/ThingSketch'; @@ -98,8 +107,10 @@ import DevicesV2PassApi from './api/DevicesV2PassApi'; import DevicesV2TagsApi from './api/DevicesV2TagsApi'; import LoraDevicesV1Api from './api/LoraDevicesV1Api'; import LoraFreqPlanV1Api from './api/LoraFreqPlanV1Api'; +import NetworkCredentialsV1Api from './api/NetworkCredentialsV1Api'; import PropertiesV2Api from './api/PropertiesV2Api'; import SeriesV2Api from './api/SeriesV2Api'; +import TemplatesApi from './api/TemplatesApi'; import ThingsV2Api from './api/ThingsV2Api'; import ThingsV2TagsApi from './api/ThingsV2TagsApi'; @@ -133,7 +144,7 @@ import ThingsV2TagsApi from './api/ThingsV2TagsApi'; * *

* @module index -* @version 2.0.2 +* @version 2.0.4 */ export { /** @@ -148,6 +159,12 @@ export { */ ArduinoCompressedv2, + /** + * The ArduinoCredentialsv1 model constructor. + * @property {module:model/ArduinoCredentialsv1} + */ + ArduinoCredentialsv1, + /** * The ArduinoDashboardowner model constructor. * @property {module:model/ArduinoDashboardowner} @@ -262,6 +279,12 @@ export { */ ArduinoDevicev2propertyvaluesLastEvaluatedKey, + /** + * The ArduinoDevicev2templatedevice model constructor. + * @property {module:model/ArduinoDevicev2templatedevice} + */ + ArduinoDevicev2templatedevice, + /** * The ArduinoLinkedvariable model constructor. * @property {module:model/ArduinoLinkedvariable} @@ -298,6 +321,12 @@ export { */ ArduinoSeriesBatch, + /** + * The ArduinoSeriesBatchSampled model constructor. + * @property {module:model/ArduinoSeriesBatchSampled} + */ + ArduinoSeriesBatchSampled, + /** * The ArduinoSeriesRawBatch model constructor. * @property {module:model/ArduinoSeriesRawBatch} @@ -328,12 +357,24 @@ export { */ ArduinoSeriesResponse, + /** + * The ArduinoSeriesSampledResponse model constructor. + * @property {module:model/ArduinoSeriesSampledResponse} + */ + ArduinoSeriesSampledResponse, + /** * The ArduinoTags model constructor. * @property {module:model/ArduinoTags} */ ArduinoTags, + /** + * The ArduinoTemplate model constructor. + * @property {module:model/ArduinoTemplate} + */ + ArduinoTemplate, + /** * The ArduinoTemplateproperty model constructor. * @property {module:model/ArduinoTemplateproperty} @@ -352,6 +393,12 @@ export { */ ArduinoThing, + /** + * The ArduinoThingresult model constructor. + * @property {module:model/ArduinoThingresult} + */ + ArduinoThingresult, + /** * The ArduinoThingtemplate model constructor. * @property {module:model/ArduinoThingtemplate} @@ -430,6 +477,18 @@ export { */ BatchQueryRequestsMediaV1, + /** + * The BatchQuerySampledRequestMediaV1 model constructor. + * @property {module:model/BatchQuerySampledRequestMediaV1} + */ + BatchQuerySampledRequestMediaV1, + + /** + * The BatchQuerySampledRequestsMediaV1 model constructor. + * @property {module:model/BatchQuerySampledRequestsMediaV1} + */ + BatchQuerySampledRequestsMediaV1, + /** * The CheckDevicesV2PassPayload model constructor. * @property {module:model/CheckDevicesV2PassPayload} @@ -556,6 +615,12 @@ export { */ Tag, + /** + * The Template model constructor. + * @property {module:model/Template} + */ + Template, + /** * The ThingClone model constructor. * @property {module:model/ThingClone} @@ -652,6 +717,12 @@ export { */ LoraFreqPlanV1Api, + /** + * The NetworkCredentialsV1Api service constructor. + * @property {module:api/NetworkCredentialsV1Api} + */ + NetworkCredentialsV1Api, + /** * The PropertiesV2Api service constructor. * @property {module:api/PropertiesV2Api} @@ -664,6 +735,12 @@ export { */ SeriesV2Api, + /** + * The TemplatesApi service constructor. + * @property {module:api/TemplatesApi} + */ + TemplatesApi, + /** * The ThingsV2Api service constructor. * @property {module:api/ThingsV2Api} diff --git a/src/model/ArduinoCompressedv2.js b/src/model/ArduinoCompressedv2.js index c55b7e4..df8e5d8 100644 --- a/src/model/ArduinoCompressedv2.js +++ b/src/model/ArduinoCompressedv2.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoCompressedv2 model module. * @module model/ArduinoCompressedv2 - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoCompressedv2 { /** diff --git a/src/model/ArduinoCredentialsv1.js b/src/model/ArduinoCredentialsv1.js new file mode 100644 index 0000000..6d227b8 --- /dev/null +++ b/src/model/ArduinoCredentialsv1.js @@ -0,0 +1,134 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArduinoCredentialsv1 model module. + * @module model/ArduinoCredentialsv1 + * @version 2.0.4 + */ +class ArduinoCredentialsv1 { + /** + * Constructs a new ArduinoCredentialsv1. + * ArduinoCredentialsv1 media type (default view) + * @alias module:model/ArduinoCredentialsv1 + * @param friendlyName {String} Friendly name + * @param required {Boolean} Tell if the parameter is required or not + * @param secretName {String} The secret parameter name + * @param sensitive {Boolean} Tell if the field is sensitive + */ + constructor(friendlyName, required, secretName, sensitive) { + + ArduinoCredentialsv1.initialize(this, friendlyName, required, secretName, sensitive); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, friendlyName, required, secretName, sensitive) { + obj['friendly_name'] = friendlyName; + obj['required'] = required; + obj['secret_name'] = secretName; + obj['sensitive'] = sensitive; + } + + /** + * Constructs a ArduinoCredentialsv1 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoCredentialsv1} obj Optional instance to populate. + * @return {module:model/ArduinoCredentialsv1} The populated ArduinoCredentialsv1 instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoCredentialsv1(); + + if (data.hasOwnProperty('friendly_name')) { + obj['friendly_name'] = ApiClient.convertToType(data['friendly_name'], 'String'); + } + if (data.hasOwnProperty('required')) { + obj['required'] = ApiClient.convertToType(data['required'], 'Boolean'); + } + if (data.hasOwnProperty('secret_name')) { + obj['secret_name'] = ApiClient.convertToType(data['secret_name'], 'String'); + } + if (data.hasOwnProperty('sensitive')) { + obj['sensitive'] = ApiClient.convertToType(data['sensitive'], 'Boolean'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoCredentialsv1. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoCredentialsv1. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoCredentialsv1.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['friendly_name'] && !(typeof data['friendly_name'] === 'string' || data['friendly_name'] instanceof String)) { + throw new Error("Expected the field `friendly_name` to be a primitive type in the JSON string but got " + data['friendly_name']); + } + // ensure the json data is a string + if (data['secret_name'] && !(typeof data['secret_name'] === 'string' || data['secret_name'] instanceof String)) { + throw new Error("Expected the field `secret_name` to be a primitive type in the JSON string but got " + data['secret_name']); + } + + return true; + } + + +} + +ArduinoCredentialsv1.RequiredProperties = ["friendly_name", "required", "secret_name", "sensitive"]; + +/** + * Friendly name + * @member {String} friendly_name + */ +ArduinoCredentialsv1.prototype['friendly_name'] = undefined; + +/** + * Tell if the parameter is required or not + * @member {Boolean} required + */ +ArduinoCredentialsv1.prototype['required'] = undefined; + +/** + * The secret parameter name + * @member {String} secret_name + */ +ArduinoCredentialsv1.prototype['secret_name'] = undefined; + +/** + * Tell if the field is sensitive + * @member {Boolean} sensitive + */ +ArduinoCredentialsv1.prototype['sensitive'] = undefined; + + + + + + +export default ArduinoCredentialsv1; + diff --git a/src/model/ArduinoDashboardowner.js b/src/model/ArduinoDashboardowner.js index 4cccf26..b9c1635 100644 --- a/src/model/ArduinoDashboardowner.js +++ b/src/model/ArduinoDashboardowner.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDashboardowner model module. * @module model/ArduinoDashboardowner - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDashboardowner { /** diff --git a/src/model/ArduinoDashboardshare.js b/src/model/ArduinoDashboardshare.js index c5c0081..8453243 100644 --- a/src/model/ArduinoDashboardshare.js +++ b/src/model/ArduinoDashboardshare.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDashboardshare model module. * @module model/ArduinoDashboardshare - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDashboardshare { /** diff --git a/src/model/ArduinoDashboardv2.js b/src/model/ArduinoDashboardv2.js index 5d2a9be..2c73d30 100644 --- a/src/model/ArduinoDashboardv2.js +++ b/src/model/ArduinoDashboardv2.js @@ -19,7 +19,7 @@ import ArduinoWidgetv2 from './ArduinoWidgetv2'; /** * The ArduinoDashboardv2 model module. * @module model/ArduinoDashboardv2 - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDashboardv2 { /** diff --git a/src/model/ArduinoDashboardv2template.js b/src/model/ArduinoDashboardv2template.js index e195dcc..863cf21 100644 --- a/src/model/ArduinoDashboardv2template.js +++ b/src/model/ArduinoDashboardv2template.js @@ -17,7 +17,7 @@ import ArduinoWidgetv2template from './ArduinoWidgetv2template'; /** * The ArduinoDashboardv2template model module. * @module model/ArduinoDashboardv2template - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDashboardv2template { /** @@ -51,6 +51,9 @@ class ArduinoDashboardv2template { if (data) { obj = obj || new ArduinoDashboardv2template(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } @@ -74,6 +77,10 @@ class ArduinoDashboardv2template { } } // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); } @@ -96,6 +103,12 @@ class ArduinoDashboardv2template { ArduinoDashboardv2template.RequiredProperties = ["name"]; +/** + * The friendly ID of the dashboard + * @member {String} id + */ +ArduinoDashboardv2template.prototype['id'] = undefined; + /** * The friendly name of the dashboard * @member {String} name diff --git a/src/model/ArduinoDevicev2.js b/src/model/ArduinoDevicev2.js index e524a31..e08c4f0 100644 --- a/src/model/ArduinoDevicev2.js +++ b/src/model/ArduinoDevicev2.js @@ -19,7 +19,7 @@ import ArduinoThing from './ArduinoThing'; /** * The ArduinoDevicev2 model module. * @module model/ArduinoDevicev2 - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2 { /** @@ -430,7 +430,19 @@ ArduinoDevicev2['ConnectionTypeEnum'] = { * value: "lora" * @const */ - "lora": "lora" + "lora": "lora", + + /** + * value: "catm1" + * @const + */ + "catm1": "catm1", + + /** + * value: "cellular" + * @const + */ + "cellular": "cellular" }; diff --git a/src/model/ArduinoDevicev2Cert.js b/src/model/ArduinoDevicev2Cert.js index 0f4316f..acc92a5 100644 --- a/src/model/ArduinoDevicev2Cert.js +++ b/src/model/ArduinoDevicev2Cert.js @@ -17,7 +17,7 @@ import ArduinoCompressedv2 from './ArduinoCompressedv2'; /** * The ArduinoDevicev2Cert model module. * @module model/ArduinoDevicev2Cert - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2Cert { /** diff --git a/src/model/ArduinoDevicev2EventProperties.js b/src/model/ArduinoDevicev2EventProperties.js index e4dd151..8933f40 100644 --- a/src/model/ArduinoDevicev2EventProperties.js +++ b/src/model/ArduinoDevicev2EventProperties.js @@ -17,7 +17,7 @@ import ArduinoDevicev2SimpleProperties from './ArduinoDevicev2SimpleProperties'; /** * The ArduinoDevicev2EventProperties model module. * @module model/ArduinoDevicev2EventProperties - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2EventProperties { /** diff --git a/src/model/ArduinoDevicev2Otaupload.js b/src/model/ArduinoDevicev2Otaupload.js index d088e56..92877fb 100644 --- a/src/model/ArduinoDevicev2Otaupload.js +++ b/src/model/ArduinoDevicev2Otaupload.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDevicev2Otaupload model module. * @module model/ArduinoDevicev2Otaupload - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2Otaupload { /** diff --git a/src/model/ArduinoDevicev2Pass.js b/src/model/ArduinoDevicev2Pass.js index 64d6ef6..9d48f26 100644 --- a/src/model/ArduinoDevicev2Pass.js +++ b/src/model/ArduinoDevicev2Pass.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDevicev2Pass model module. * @module model/ArduinoDevicev2Pass - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2Pass { /** diff --git a/src/model/ArduinoDevicev2SimpleProperties.js b/src/model/ArduinoDevicev2SimpleProperties.js index 3139d11..675399f 100644 --- a/src/model/ArduinoDevicev2SimpleProperties.js +++ b/src/model/ArduinoDevicev2SimpleProperties.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDevicev2SimpleProperties model module. * @module model/ArduinoDevicev2SimpleProperties - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2SimpleProperties { /** diff --git a/src/model/ArduinoDevicev2StatusEvent.js b/src/model/ArduinoDevicev2StatusEvent.js index 511d6d9..afb7180 100644 --- a/src/model/ArduinoDevicev2StatusEvent.js +++ b/src/model/ArduinoDevicev2StatusEvent.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDevicev2StatusEvent model module. * @module model/ArduinoDevicev2StatusEvent - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2StatusEvent { /** diff --git a/src/model/ArduinoDevicev2StatusEvents.js b/src/model/ArduinoDevicev2StatusEvents.js index 4318abd..feadd95 100644 --- a/src/model/ArduinoDevicev2StatusEvents.js +++ b/src/model/ArduinoDevicev2StatusEvents.js @@ -17,7 +17,7 @@ import ArduinoDevicev2StatusEvent from './ArduinoDevicev2StatusEvent'; /** * The ArduinoDevicev2StatusEvents model module. * @module model/ArduinoDevicev2StatusEvents - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2StatusEvents { /** diff --git a/src/model/ArduinoDevicev2Webhook.js b/src/model/ArduinoDevicev2Webhook.js index e25f584..afc4aac 100644 --- a/src/model/ArduinoDevicev2Webhook.js +++ b/src/model/ArduinoDevicev2Webhook.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDevicev2Webhook model module. * @module model/ArduinoDevicev2Webhook - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2Webhook { /** diff --git a/src/model/ArduinoDevicev2properties.js b/src/model/ArduinoDevicev2properties.js index 3c775f8..a63cc81 100644 --- a/src/model/ArduinoDevicev2properties.js +++ b/src/model/ArduinoDevicev2properties.js @@ -17,7 +17,7 @@ import ArduinoProperty from './ArduinoProperty'; /** * The ArduinoDevicev2properties model module. * @module model/ArduinoDevicev2properties - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2properties { /** diff --git a/src/model/ArduinoDevicev2propertyvalue.js b/src/model/ArduinoDevicev2propertyvalue.js index e2f3641..747fc6b 100644 --- a/src/model/ArduinoDevicev2propertyvalue.js +++ b/src/model/ArduinoDevicev2propertyvalue.js @@ -17,7 +17,7 @@ import ArduinoDevicev2propertyvalueValue from './ArduinoDevicev2propertyvalueVal /** * The ArduinoDevicev2propertyvalue model module. * @module model/ArduinoDevicev2propertyvalue - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2propertyvalue { /** diff --git a/src/model/ArduinoDevicev2propertyvalueValue.js b/src/model/ArduinoDevicev2propertyvalueValue.js index 0aa574b..9f4df23 100644 --- a/src/model/ArduinoDevicev2propertyvalueValue.js +++ b/src/model/ArduinoDevicev2propertyvalueValue.js @@ -17,7 +17,7 @@ import ArduinoDevicev2propertyvalueValueStatistics from './ArduinoDevicev2proper /** * The ArduinoDevicev2propertyvalueValue model module. * @module model/ArduinoDevicev2propertyvalueValue - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2propertyvalueValue { /** diff --git a/src/model/ArduinoDevicev2propertyvalueValueStatistics.js b/src/model/ArduinoDevicev2propertyvalueValueStatistics.js index 31e3ad6..62d1796 100644 --- a/src/model/ArduinoDevicev2propertyvalueValueStatistics.js +++ b/src/model/ArduinoDevicev2propertyvalueValueStatistics.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDevicev2propertyvalueValueStatistics model module. * @module model/ArduinoDevicev2propertyvalueValueStatistics - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2propertyvalueValueStatistics { /** diff --git a/src/model/ArduinoDevicev2propertyvalues.js b/src/model/ArduinoDevicev2propertyvalues.js index 5c7ec21..9e75d65 100644 --- a/src/model/ArduinoDevicev2propertyvalues.js +++ b/src/model/ArduinoDevicev2propertyvalues.js @@ -18,7 +18,7 @@ import ArduinoDevicev2propertyvaluesLastEvaluatedKey from './ArduinoDevicev2prop /** * The ArduinoDevicev2propertyvalues model module. * @module model/ArduinoDevicev2propertyvalues - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2propertyvalues { /** diff --git a/src/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.js b/src/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.js index e906de3..e7525bf 100644 --- a/src/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.js +++ b/src/model/ArduinoDevicev2propertyvaluesLastEvaluatedKey.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoDevicev2propertyvaluesLastEvaluatedKey model module. * @module model/ArduinoDevicev2propertyvaluesLastEvaluatedKey - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoDevicev2propertyvaluesLastEvaluatedKey { /** diff --git a/src/model/ArduinoDevicev2templatedevice.js b/src/model/ArduinoDevicev2templatedevice.js new file mode 100644 index 0000000..8de2948 --- /dev/null +++ b/src/model/ArduinoDevicev2templatedevice.js @@ -0,0 +1,102 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArduinoDevicev2templatedevice model module. + * @module model/ArduinoDevicev2templatedevice + * @version 2.0.4 + */ +class ArduinoDevicev2templatedevice { + /** + * Constructs a new ArduinoDevicev2templatedevice. + * ArduinoDevicev2templatedevice media type (default view) + * @alias module:model/ArduinoDevicev2templatedevice + */ + constructor() { + + ArduinoDevicev2templatedevice.initialize(this); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj) { + } + + /** + * Constructs a ArduinoDevicev2templatedevice from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoDevicev2templatedevice} obj Optional instance to populate. + * @return {module:model/ArduinoDevicev2templatedevice} The populated ArduinoDevicev2templatedevice instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoDevicev2templatedevice(); + + if (data.hasOwnProperty('fqbn')) { + obj['fqbn'] = ApiClient.convertToType(data['fqbn'], 'String'); + } + if (data.hasOwnProperty('name')) { + obj['name'] = ApiClient.convertToType(data['name'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoDevicev2templatedevice. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoDevicev2templatedevice. + */ + static validateJSON(data) { + // ensure the json data is a string + if (data['fqbn'] && !(typeof data['fqbn'] === 'string' || data['fqbn'] instanceof String)) { + throw new Error("Expected the field `fqbn` to be a primitive type in the JSON string but got " + data['fqbn']); + } + // ensure the json data is a string + if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { + throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); + } + + return true; + } + + +} + + + +/** + * The device fqbn + * @member {String} fqbn + */ +ArduinoDevicev2templatedevice.prototype['fqbn'] = undefined; + +/** + * The device type name + * @member {String} name + */ +ArduinoDevicev2templatedevice.prototype['name'] = undefined; + + + + + + +export default ArduinoDevicev2templatedevice; + diff --git a/src/model/ArduinoLinkedvariable.js b/src/model/ArduinoLinkedvariable.js index c73928a..46a3cb1 100644 --- a/src/model/ArduinoLinkedvariable.js +++ b/src/model/ArduinoLinkedvariable.js @@ -17,7 +17,7 @@ import ArduinoTimezone from './ArduinoTimezone'; /** * The ArduinoLinkedvariable model module. * @module model/ArduinoLinkedvariable - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoLinkedvariable { /** diff --git a/src/model/ArduinoLoradevicev1.js b/src/model/ArduinoLoradevicev1.js index 246375b..82c61a4 100644 --- a/src/model/ArduinoLoradevicev1.js +++ b/src/model/ArduinoLoradevicev1.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoLoradevicev1 model module. * @module model/ArduinoLoradevicev1 - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoLoradevicev1 { /** diff --git a/src/model/ArduinoLorafreqplansv1.js b/src/model/ArduinoLorafreqplansv1.js index fe10f1e..3815da4 100644 --- a/src/model/ArduinoLorafreqplansv1.js +++ b/src/model/ArduinoLorafreqplansv1.js @@ -17,7 +17,7 @@ import ArduinoLorafreqplanv1 from './ArduinoLorafreqplanv1'; /** * The ArduinoLorafreqplansv1 model module. * @module model/ArduinoLorafreqplansv1 - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoLorafreqplansv1 { /** diff --git a/src/model/ArduinoLorafreqplanv1.js b/src/model/ArduinoLorafreqplanv1.js index 02f0ece..ddbf646 100644 --- a/src/model/ArduinoLorafreqplanv1.js +++ b/src/model/ArduinoLorafreqplanv1.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoLorafreqplanv1 model module. * @module model/ArduinoLorafreqplanv1 - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoLorafreqplanv1 { /** diff --git a/src/model/ArduinoProperty.js b/src/model/ArduinoProperty.js index a90b0db..b7c2471 100644 --- a/src/model/ArduinoProperty.js +++ b/src/model/ArduinoProperty.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoProperty model module. * @module model/ArduinoProperty - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoProperty { /** diff --git a/src/model/ArduinoSeriesBatch.js b/src/model/ArduinoSeriesBatch.js index e6219cc..1d7f716 100644 --- a/src/model/ArduinoSeriesBatch.js +++ b/src/model/ArduinoSeriesBatch.js @@ -17,7 +17,7 @@ import ArduinoSeriesResponse from './ArduinoSeriesResponse'; /** * The ArduinoSeriesBatch model module. * @module model/ArduinoSeriesBatch - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoSeriesBatch { /** diff --git a/src/model/ArduinoSeriesBatchSampled.js b/src/model/ArduinoSeriesBatchSampled.js new file mode 100644 index 0000000..d5c02bb --- /dev/null +++ b/src/model/ArduinoSeriesBatchSampled.js @@ -0,0 +1,115 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoSeriesSampledResponse from './ArduinoSeriesSampledResponse'; + +/** + * The ArduinoSeriesBatchSampled model module. + * @module model/ArduinoSeriesBatchSampled + * @version 2.0.4 + */ +class ArduinoSeriesBatchSampled { + /** + * Constructs a new ArduinoSeriesBatchSampled. + * ArduinoSeriesBatchSampled media type (default view) + * @alias module:model/ArduinoSeriesBatchSampled + * @param respVersion {Number} Response version + * @param responses {Array.} Responses of the request + */ + constructor(respVersion, responses) { + + ArduinoSeriesBatchSampled.initialize(this, respVersion, responses); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, respVersion, responses) { + obj['resp_version'] = respVersion; + obj['responses'] = responses; + } + + /** + * Constructs a ArduinoSeriesBatchSampled from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoSeriesBatchSampled} obj Optional instance to populate. + * @return {module:model/ArduinoSeriesBatchSampled} The populated ArduinoSeriesBatchSampled instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoSeriesBatchSampled(); + + if (data.hasOwnProperty('resp_version')) { + obj['resp_version'] = ApiClient.convertToType(data['resp_version'], 'Number'); + } + if (data.hasOwnProperty('responses')) { + obj['responses'] = ApiClient.convertToType(data['responses'], [ArduinoSeriesSampledResponse]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoSeriesBatchSampled. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoSeriesBatchSampled. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoSeriesBatchSampled.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + if (data['responses']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['responses'])) { + throw new Error("Expected the field `responses` to be an array in the JSON data but got " + data['responses']); + } + // validate the optional field `responses` (array) + for (const item of data['responses']) { + ArduinoSeriesSampledResponse.validateJSON(item); + }; + } + + return true; + } + + +} + +ArduinoSeriesBatchSampled.RequiredProperties = ["resp_version", "responses"]; + +/** + * Response version + * @member {Number} resp_version + */ +ArduinoSeriesBatchSampled.prototype['resp_version'] = undefined; + +/** + * Responses of the request + * @member {Array.} responses + */ +ArduinoSeriesBatchSampled.prototype['responses'] = undefined; + + + + + + +export default ArduinoSeriesBatchSampled; + diff --git a/src/model/ArduinoSeriesRawBatch.js b/src/model/ArduinoSeriesRawBatch.js index 77f92e6..da4016b 100644 --- a/src/model/ArduinoSeriesRawBatch.js +++ b/src/model/ArduinoSeriesRawBatch.js @@ -17,7 +17,7 @@ import ArduinoSeriesRawResponse from './ArduinoSeriesRawResponse'; /** * The ArduinoSeriesRawBatch model module. * @module model/ArduinoSeriesRawBatch - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoSeriesRawBatch { /** diff --git a/src/model/ArduinoSeriesRawBatchLastvalue.js b/src/model/ArduinoSeriesRawBatchLastvalue.js index 7f923f6..3875127 100644 --- a/src/model/ArduinoSeriesRawBatchLastvalue.js +++ b/src/model/ArduinoSeriesRawBatchLastvalue.js @@ -17,7 +17,7 @@ import ArduinoSeriesRawLastValueResponse from './ArduinoSeriesRawLastValueRespon /** * The ArduinoSeriesRawBatchLastvalue model module. * @module model/ArduinoSeriesRawBatchLastvalue - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoSeriesRawBatchLastvalue { /** diff --git a/src/model/ArduinoSeriesRawLastValueResponse.js b/src/model/ArduinoSeriesRawLastValueResponse.js index 990fa0a..346733d 100644 --- a/src/model/ArduinoSeriesRawLastValueResponse.js +++ b/src/model/ArduinoSeriesRawLastValueResponse.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoSeriesRawLastValueResponse model module. * @module model/ArduinoSeriesRawLastValueResponse - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoSeriesRawLastValueResponse { /** diff --git a/src/model/ArduinoSeriesRawResponse.js b/src/model/ArduinoSeriesRawResponse.js index 3f2752a..50051ea 100644 --- a/src/model/ArduinoSeriesRawResponse.js +++ b/src/model/ArduinoSeriesRawResponse.js @@ -17,7 +17,7 @@ import BatchQueryRawResponseSeriesMediaV1 from './BatchQueryRawResponseSeriesMed /** * The ArduinoSeriesRawResponse model module. * @module model/ArduinoSeriesRawResponse - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoSeriesRawResponse { /** diff --git a/src/model/ArduinoSeriesResponse.js b/src/model/ArduinoSeriesResponse.js index 36b009f..f1fec3a 100644 --- a/src/model/ArduinoSeriesResponse.js +++ b/src/model/ArduinoSeriesResponse.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoSeriesResponse model module. * @module model/ArduinoSeriesResponse - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoSeriesResponse { /** diff --git a/src/model/ArduinoSeriesSampledResponse.js b/src/model/ArduinoSeriesSampledResponse.js new file mode 100644 index 0000000..121aa91 --- /dev/null +++ b/src/model/ArduinoSeriesSampledResponse.js @@ -0,0 +1,220 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArduinoSeriesSampledResponse model module. + * @module model/ArduinoSeriesSampledResponse + * @version 2.0.4 + */ +class ArduinoSeriesSampledResponse { + /** + * Constructs a new ArduinoSeriesSampledResponse. + * ArduinoSeriesSampledResponse media type (default view) + * @alias module:model/ArduinoSeriesSampledResponse + * @param countValues {Number} Total number of values in the array 'values' + * @param fromDate {Date} From date + * @param interval {Number} Resolution in seconds + * @param query {String} Query of for the data + * @param respVersion {Number} Response version + * @param status {String} Status of the response + * @param times {Array.} Timestamp in RFC3339 + * @param toDate {Date} To date + * @param values {Array.} Values in Float + */ + constructor(countValues, fromDate, interval, query, respVersion, status, times, toDate, values) { + + ArduinoSeriesSampledResponse.initialize(this, countValues, fromDate, interval, query, respVersion, status, times, toDate, values); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, countValues, fromDate, interval, query, respVersion, status, times, toDate, values) { + obj['count_values'] = countValues; + obj['from_date'] = fromDate; + obj['interval'] = interval; + obj['query'] = query; + obj['resp_version'] = respVersion; + obj['status'] = status; + obj['times'] = times; + obj['to_date'] = toDate; + obj['values'] = values; + } + + /** + * Constructs a ArduinoSeriesSampledResponse from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoSeriesSampledResponse} obj Optional instance to populate. + * @return {module:model/ArduinoSeriesSampledResponse} The populated ArduinoSeriesSampledResponse instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoSeriesSampledResponse(); + + if (data.hasOwnProperty('count_values')) { + obj['count_values'] = ApiClient.convertToType(data['count_values'], 'Number'); + } + if (data.hasOwnProperty('from_date')) { + obj['from_date'] = ApiClient.convertToType(data['from_date'], 'Date'); + } + if (data.hasOwnProperty('interval')) { + obj['interval'] = ApiClient.convertToType(data['interval'], 'Number'); + } + if (data.hasOwnProperty('message')) { + obj['message'] = ApiClient.convertToType(data['message'], 'String'); + } + if (data.hasOwnProperty('query')) { + obj['query'] = ApiClient.convertToType(data['query'], 'String'); + } + if (data.hasOwnProperty('resp_version')) { + obj['resp_version'] = ApiClient.convertToType(data['resp_version'], 'Number'); + } + if (data.hasOwnProperty('series_limit')) { + obj['series_limit'] = ApiClient.convertToType(data['series_limit'], 'Number'); + } + if (data.hasOwnProperty('status')) { + obj['status'] = ApiClient.convertToType(data['status'], 'String'); + } + if (data.hasOwnProperty('times')) { + obj['times'] = ApiClient.convertToType(data['times'], ['Date']); + } + if (data.hasOwnProperty('to_date')) { + obj['to_date'] = ApiClient.convertToType(data['to_date'], 'Date'); + } + if (data.hasOwnProperty('values')) { + obj['values'] = ApiClient.convertToType(data['values'], [Object]); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoSeriesSampledResponse. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoSeriesSampledResponse. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoSeriesSampledResponse.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['message'] && !(typeof data['message'] === 'string' || data['message'] instanceof String)) { + throw new Error("Expected the field `message` to be a primitive type in the JSON string but got " + data['message']); + } + // ensure the json data is a string + if (data['query'] && !(typeof data['query'] === 'string' || data['query'] instanceof String)) { + throw new Error("Expected the field `query` to be a primitive type in the JSON string but got " + data['query']); + } + // ensure the json data is a string + if (data['status'] && !(typeof data['status'] === 'string' || data['status'] instanceof String)) { + throw new Error("Expected the field `status` to be a primitive type in the JSON string but got " + data['status']); + } + // ensure the json data is an array + if (!Array.isArray(data['times'])) { + throw new Error("Expected the field `times` to be an array in the JSON data but got " + data['times']); + } + // ensure the json data is an array + if (!Array.isArray(data['values'])) { + throw new Error("Expected the field `values` to be an array in the JSON data but got " + data['values']); + } + + return true; + } + + +} + +ArduinoSeriesSampledResponse.RequiredProperties = ["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values"]; + +/** + * Total number of values in the array 'values' + * @member {Number} count_values + */ +ArduinoSeriesSampledResponse.prototype['count_values'] = undefined; + +/** + * From date + * @member {Date} from_date + */ +ArduinoSeriesSampledResponse.prototype['from_date'] = undefined; + +/** + * Resolution in seconds + * @member {Number} interval + */ +ArduinoSeriesSampledResponse.prototype['interval'] = undefined; + +/** + * If the response is different than 'ok' + * @member {String} message + * @default '' + */ +ArduinoSeriesSampledResponse.prototype['message'] = ''; + +/** + * Query of for the data + * @member {String} query + */ +ArduinoSeriesSampledResponse.prototype['query'] = undefined; + +/** + * Response version + * @member {Number} resp_version + */ +ArduinoSeriesSampledResponse.prototype['resp_version'] = undefined; + +/** + * Maximum number of values returned after data aggregation, if any + * @member {Number} series_limit + */ +ArduinoSeriesSampledResponse.prototype['series_limit'] = undefined; + +/** + * Status of the response + * @member {String} status + */ +ArduinoSeriesSampledResponse.prototype['status'] = undefined; + +/** + * Timestamp in RFC3339 + * @member {Array.} times + */ +ArduinoSeriesSampledResponse.prototype['times'] = undefined; + +/** + * To date + * @member {Date} to_date + */ +ArduinoSeriesSampledResponse.prototype['to_date'] = undefined; + +/** + * Values in Float + * @member {Array.} values + */ +ArduinoSeriesSampledResponse.prototype['values'] = undefined; + + + + + + +export default ArduinoSeriesSampledResponse; + diff --git a/src/model/ArduinoTags.js b/src/model/ArduinoTags.js index 0874e2d..ad73c6c 100644 --- a/src/model/ArduinoTags.js +++ b/src/model/ArduinoTags.js @@ -17,7 +17,7 @@ import Tag from './Tag'; /** * The ArduinoTags model module. * @module model/ArduinoTags - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoTags { /** diff --git a/src/model/ArduinoTemplate.js b/src/model/ArduinoTemplate.js new file mode 100644 index 0000000..4a3d8c9 --- /dev/null +++ b/src/model/ArduinoTemplate.js @@ -0,0 +1,128 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import ArduinoThingresult from './ArduinoThingresult'; + +/** + * The ArduinoTemplate model module. + * @module model/ArduinoTemplate + * @version 2.0.4 + */ +class ArduinoTemplate { + /** + * Constructs a new ArduinoTemplate. + * ArduinoTemplate media type (default view) + * @alias module:model/ArduinoTemplate + * @param things {Array.} ArduinoThingresultCollection is the media type for an array of ArduinoThingresult (default view) + */ + constructor(things) { + + ArduinoTemplate.initialize(this, things); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, things) { + obj['things'] = things; + } + + /** + * Constructs a ArduinoTemplate from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoTemplate} obj Optional instance to populate. + * @return {module:model/ArduinoTemplate} The populated ArduinoTemplate instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoTemplate(); + + if (data.hasOwnProperty('dashboards')) { + obj['dashboards'] = ApiClient.convertToType(data['dashboards'], ['String']); + } + if (data.hasOwnProperty('things')) { + obj['things'] = ApiClient.convertToType(data['things'], [ArduinoThingresult]); + } + if (data.hasOwnProperty('triggers')) { + obj['triggers'] = ApiClient.convertToType(data['triggers'], ['String']); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoTemplate. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoTemplate. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoTemplate.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is an array + if (!Array.isArray(data['dashboards'])) { + throw new Error("Expected the field `dashboards` to be an array in the JSON data but got " + data['dashboards']); + } + if (data['things']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['things'])) { + throw new Error("Expected the field `things` to be an array in the JSON data but got " + data['things']); + } + // validate the optional field `things` (array) + for (const item of data['things']) { + ArduinoThingresult.validateJSON(item); + }; + } + // ensure the json data is an array + if (!Array.isArray(data['triggers'])) { + throw new Error("Expected the field `triggers` to be an array in the JSON data but got " + data['triggers']); + } + + return true; + } + + +} + +ArduinoTemplate.RequiredProperties = ["things"]; + +/** + * @member {Array.} dashboards + */ +ArduinoTemplate.prototype['dashboards'] = undefined; + +/** + * ArduinoThingresultCollection is the media type for an array of ArduinoThingresult (default view) + * @member {Array.} things + */ +ArduinoTemplate.prototype['things'] = undefined; + +/** + * @member {Array.} triggers + */ +ArduinoTemplate.prototype['triggers'] = undefined; + + + + + + +export default ArduinoTemplate; + diff --git a/src/model/ArduinoTemplateproperty.js b/src/model/ArduinoTemplateproperty.js index 3676334..8f1ee7c 100644 --- a/src/model/ArduinoTemplateproperty.js +++ b/src/model/ArduinoTemplateproperty.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoTemplateproperty model module. * @module model/ArduinoTemplateproperty - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoTemplateproperty { /** @@ -56,6 +56,9 @@ class ArduinoTemplateproperty { if (data) { obj = obj || new ArduinoTemplateproperty(); + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } @@ -91,6 +94,10 @@ class ArduinoTemplateproperty { } } // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); } @@ -119,6 +126,12 @@ class ArduinoTemplateproperty { ArduinoTemplateproperty.RequiredProperties = ["name", "permission", "type", "update_strategy"]; +/** + * The friendly id of the property + * @member {String} id + */ +ArduinoTemplateproperty.prototype['id'] = undefined; + /** * The friendly name of the property * @member {String} name diff --git a/src/model/ArduinoTemplatevariable.js b/src/model/ArduinoTemplatevariable.js index ebe1bbb..49b9374 100644 --- a/src/model/ArduinoTemplatevariable.js +++ b/src/model/ArduinoTemplatevariable.js @@ -17,7 +17,7 @@ import ArduinoTimezone from './ArduinoTimezone'; /** * The ArduinoTemplatevariable model module. * @module model/ArduinoTemplatevariable - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoTemplatevariable { /** diff --git a/src/model/ArduinoThing.js b/src/model/ArduinoThing.js index 42547f5..1e21356 100644 --- a/src/model/ArduinoThing.js +++ b/src/model/ArduinoThing.js @@ -17,7 +17,7 @@ import ArduinoProperty from './ArduinoProperty'; /** * The ArduinoThing model module. * @module model/ArduinoThing - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoThing { /** @@ -59,6 +59,9 @@ class ArduinoThing { if (data) { obj = obj || new ArduinoThing(); + if (data.hasOwnProperty('assistant')) { + obj['assistant'] = ApiClient.convertToType(data['assistant'], 'String'); + } if (data.hasOwnProperty('created_at')) { obj['created_at'] = ApiClient.convertToType(data['created_at'], 'Date'); } @@ -133,6 +136,10 @@ class ArduinoThing { } } // ensure the json data is a string + if (data['assistant'] && !(typeof data['assistant'] === 'string' || data['assistant'] instanceof String)) { + throw new Error("Expected the field `assistant` to be a primitive type in the JSON string but got " + data['assistant']); + } + // ensure the json data is a string if (data['device_fqbn'] && !(typeof data['device_fqbn'] === 'string' || data['device_fqbn'] instanceof String)) { throw new Error("Expected the field `device_fqbn` to be a primitive type in the JSON string but got " + data['device_fqbn']); } @@ -199,6 +206,12 @@ class ArduinoThing { ArduinoThing.RequiredProperties = ["href", "id", "name", "timezone", "user_id"]; +/** + * The kind of voice assistant the thing is connected to, it can be ALEXA | GOOGLE | NONE + * @member {module:model/ArduinoThing.AssistantEnum} assistant + */ +ArduinoThing.prototype['assistant'] = undefined; + /** * Creation date of the thing * @member {Date} created_at @@ -317,6 +330,33 @@ ArduinoThing.prototype['webhook_uri'] = undefined; +/** + * Allowed values for the assistant property. + * @enum {String} + * @readonly + */ +ArduinoThing['AssistantEnum'] = { + + /** + * value: "ALEXA" + * @const + */ + "ALEXA": "ALEXA", + + /** + * value: "GOOGLE" + * @const + */ + "GOOGLE": "GOOGLE", + + /** + * value: "NONE" + * @const + */ + "NONE": "NONE" +}; + + export default ArduinoThing; diff --git a/src/model/ArduinoThingresult.js b/src/model/ArduinoThingresult.js new file mode 100644 index 0000000..f189ed5 --- /dev/null +++ b/src/model/ArduinoThingresult.js @@ -0,0 +1,125 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The ArduinoThingresult model module. + * @module model/ArduinoThingresult + * @version 2.0.4 + */ +class ArduinoThingresult { + /** + * Constructs a new ArduinoThingresult. + * ArduinoThingresult media type (default view) + * @alias module:model/ArduinoThingresult + * @param id {String} UUID of the created Thing + * @param sketchId {String} UUID of the created Sketch + */ + constructor(id, sketchId) { + + ArduinoThingresult.initialize(this, id, sketchId); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, id, sketchId) { + obj['id'] = id; + obj['sketch_id'] = sketchId; + } + + /** + * Constructs a ArduinoThingresult from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/ArduinoThingresult} obj Optional instance to populate. + * @return {module:model/ArduinoThingresult} The populated ArduinoThingresult instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new ArduinoThingresult(); + + if (data.hasOwnProperty('device_id')) { + obj['device_id'] = ApiClient.convertToType(data['device_id'], 'String'); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } + if (data.hasOwnProperty('sketch_id')) { + obj['sketch_id'] = ApiClient.convertToType(data['sketch_id'], 'String'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to ArduinoThingresult. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to ArduinoThingresult. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of ArduinoThingresult.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['device_id'] && !(typeof data['device_id'] === 'string' || data['device_id'] instanceof String)) { + throw new Error("Expected the field `device_id` to be a primitive type in the JSON string but got " + data['device_id']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } + // ensure the json data is a string + if (data['sketch_id'] && !(typeof data['sketch_id'] === 'string' || data['sketch_id'] instanceof String)) { + throw new Error("Expected the field `sketch_id` to be a primitive type in the JSON string but got " + data['sketch_id']); + } + + return true; + } + + +} + +ArduinoThingresult.RequiredProperties = ["id", "sketch_id"]; + +/** + * UUID of the attached device + * @member {String} device_id + */ +ArduinoThingresult.prototype['device_id'] = undefined; + +/** + * UUID of the created Thing + * @member {String} id + */ +ArduinoThingresult.prototype['id'] = undefined; + +/** + * UUID of the created Sketch + * @member {String} sketch_id + */ +ArduinoThingresult.prototype['sketch_id'] = undefined; + + + + + + +export default ArduinoThingresult; + diff --git a/src/model/ArduinoThingtemplate.js b/src/model/ArduinoThingtemplate.js index c0fa846..8f1bf86 100644 --- a/src/model/ArduinoThingtemplate.js +++ b/src/model/ArduinoThingtemplate.js @@ -12,13 +12,14 @@ */ import ApiClient from '../ApiClient'; +import ArduinoDevicev2templatedevice from './ArduinoDevicev2templatedevice'; import ArduinoTemplateproperty from './ArduinoTemplateproperty'; import Tag from './Tag'; /** * The ArduinoThingtemplate model module. * @module model/ArduinoThingtemplate - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoThingtemplate { /** @@ -54,14 +55,20 @@ class ArduinoThingtemplate { if (data) { obj = obj || new ArduinoThingtemplate(); + if (data.hasOwnProperty('device_metadata')) { + obj['device_metadata'] = ArduinoDevicev2templatedevice.constructFromObject(data['device_metadata']); + } + if (data.hasOwnProperty('id')) { + obj['id'] = ApiClient.convertToType(data['id'], 'String'); + } if (data.hasOwnProperty('name')) { obj['name'] = ApiClient.convertToType(data['name'], 'String'); } if (data.hasOwnProperty('organization_id')) { obj['organization_id'] = ApiClient.convertToType(data['organization_id'], 'String'); } - if (data.hasOwnProperty('properties')) { - obj['properties'] = ApiClient.convertToType(data['properties'], [ArduinoTemplateproperty]); + if (data.hasOwnProperty('sketch_template')) { + obj['sketch_template'] = ApiClient.convertToType(data['sketch_template'], 'String'); } if (data.hasOwnProperty('tags')) { obj['tags'] = ApiClient.convertToType(data['tags'], [Tag]); @@ -69,6 +76,9 @@ class ArduinoThingtemplate { if (data.hasOwnProperty('timezone')) { obj['timezone'] = ApiClient.convertToType(data['timezone'], 'String'); } + if (data.hasOwnProperty('variables')) { + obj['variables'] = ApiClient.convertToType(data['variables'], [ArduinoTemplateproperty]); + } if (data.hasOwnProperty('webhook_uri')) { obj['webhook_uri'] = ApiClient.convertToType(data['webhook_uri'], 'String'); } @@ -88,6 +98,14 @@ class ArduinoThingtemplate { throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); } } + // validate the optional field `device_metadata` + if (data['device_metadata']) { // data not null + ArduinoDevicev2templatedevice.validateJSON(data['device_metadata']); + } + // ensure the json data is a string + if (data['id'] && !(typeof data['id'] === 'string' || data['id'] instanceof String)) { + throw new Error("Expected the field `id` to be a primitive type in the JSON string but got " + data['id']); + } // ensure the json data is a string if (data['name'] && !(typeof data['name'] === 'string' || data['name'] instanceof String)) { throw new Error("Expected the field `name` to be a primitive type in the JSON string but got " + data['name']); @@ -96,15 +114,9 @@ class ArduinoThingtemplate { if (data['organization_id'] && !(typeof data['organization_id'] === 'string' || data['organization_id'] instanceof String)) { throw new Error("Expected the field `organization_id` to be a primitive type in the JSON string but got " + data['organization_id']); } - if (data['properties']) { // data not null - // ensure the json data is an array - if (!Array.isArray(data['properties'])) { - throw new Error("Expected the field `properties` to be an array in the JSON data but got " + data['properties']); - } - // validate the optional field `properties` (array) - for (const item of data['properties']) { - ArduinoTemplateproperty.validateJSON(item); - }; + // ensure the json data is a string + if (data['sketch_template'] && !(typeof data['sketch_template'] === 'string' || data['sketch_template'] instanceof String)) { + throw new Error("Expected the field `sketch_template` to be a primitive type in the JSON string but got " + data['sketch_template']); } if (data['tags']) { // data not null // ensure the json data is an array @@ -120,6 +132,16 @@ class ArduinoThingtemplate { if (data['timezone'] && !(typeof data['timezone'] === 'string' || data['timezone'] instanceof String)) { throw new Error("Expected the field `timezone` to be a primitive type in the JSON string but got " + data['timezone']); } + if (data['variables']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['variables'])) { + throw new Error("Expected the field `variables` to be an array in the JSON data but got " + data['variables']); + } + // validate the optional field `variables` (array) + for (const item of data['variables']) { + ArduinoTemplateproperty.validateJSON(item); + }; + } // ensure the json data is a string if (data['webhook_uri'] && !(typeof data['webhook_uri'] === 'string' || data['webhook_uri'] instanceof String)) { throw new Error("Expected the field `webhook_uri` to be a primitive type in the JSON string but got " + data['webhook_uri']); @@ -133,6 +155,17 @@ class ArduinoThingtemplate { ArduinoThingtemplate.RequiredProperties = ["name", "timezone"]; +/** + * @member {module:model/ArduinoDevicev2templatedevice} device_metadata + */ +ArduinoThingtemplate.prototype['device_metadata'] = undefined; + +/** + * The friendly id of the thing + * @member {String} id + */ +ArduinoThingtemplate.prototype['id'] = undefined; + /** * The friendly name of the thing * @member {String} name @@ -146,10 +179,10 @@ ArduinoThingtemplate.prototype['name'] = undefined; ArduinoThingtemplate.prototype['organization_id'] = undefined; /** - * ArduinoTemplatepropertyCollection is the media type for an array of ArduinoTemplateproperty (default view) - * @member {Array.} properties + * The ID of the template's sketch + * @member {String} sketch_template */ -ArduinoThingtemplate.prototype['properties'] = undefined; +ArduinoThingtemplate.prototype['sketch_template'] = undefined; /** * Tags of the thing @@ -163,6 +196,12 @@ ArduinoThingtemplate.prototype['tags'] = undefined; */ ArduinoThingtemplate.prototype['timezone'] = undefined; +/** + * ArduinoTemplatepropertyCollection is the media type for an array of ArduinoTemplateproperty (default view) + * @member {Array.} variables + */ +ArduinoThingtemplate.prototype['variables'] = undefined; + /** * Webhook uri * @member {String} webhook_uri diff --git a/src/model/ArduinoTimeseriesmedia.js b/src/model/ArduinoTimeseriesmedia.js index 277db5f..5ebe65f 100644 --- a/src/model/ArduinoTimeseriesmedia.js +++ b/src/model/ArduinoTimeseriesmedia.js @@ -17,7 +17,7 @@ import TimeseriesDataPoint from './TimeseriesDataPoint'; /** * The ArduinoTimeseriesmedia model module. * @module model/ArduinoTimeseriesmedia - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoTimeseriesmedia { /** diff --git a/src/model/ArduinoTimezone.js b/src/model/ArduinoTimezone.js index 7bcb294..b771e64 100644 --- a/src/model/ArduinoTimezone.js +++ b/src/model/ArduinoTimezone.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoTimezone model module. * @module model/ArduinoTimezone - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoTimezone { /** diff --git a/src/model/ArduinoVariableslinks.js b/src/model/ArduinoVariableslinks.js index 98a9aaa..7500209 100644 --- a/src/model/ArduinoVariableslinks.js +++ b/src/model/ArduinoVariableslinks.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ArduinoVariableslinks model module. * @module model/ArduinoVariableslinks - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoVariableslinks { /** diff --git a/src/model/ArduinoWidgetv2.js b/src/model/ArduinoWidgetv2.js index 1733b08..128e658 100644 --- a/src/model/ArduinoWidgetv2.js +++ b/src/model/ArduinoWidgetv2.js @@ -17,7 +17,7 @@ import ArduinoLinkedvariable from './ArduinoLinkedvariable'; /** * The ArduinoWidgetv2 model module. * @module model/ArduinoWidgetv2 - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoWidgetv2 { /** @@ -27,7 +27,7 @@ class ArduinoWidgetv2 { * @param height {Number} Widget current height for desktop * @param id {String} The UUID of the widget, set by client * @param options {Object.} Widget options - * @param type {module:model/ArduinoWidgetv2.TypeEnum} The type of the widget + * @param type {String} The type of the widget * @param width {Number} Widget current width for desktop * @param x {Number} Widget x position for desktop * @param y {Number} Widget y position for desktop @@ -208,7 +208,7 @@ ArduinoWidgetv2.prototype['options'] = undefined; /** * The type of the widget - * @member {module:model/ArduinoWidgetv2.TypeEnum} type + * @member {String} type */ ArduinoWidgetv2.prototype['type'] = undefined; @@ -258,21 +258,6 @@ ArduinoWidgetv2.prototype['y_mobile'] = undefined; -/** - * Allowed values for the type property. - * @enum {String} - * @readonly - */ -ArduinoWidgetv2['TypeEnum'] = { - - /** - * value: "slider, gauge" - * @const - */ - "slider, gauge": "slider, gauge" -}; - - export default ArduinoWidgetv2; diff --git a/src/model/ArduinoWidgetv2template.js b/src/model/ArduinoWidgetv2template.js index e22f1a2..0ca8896 100644 --- a/src/model/ArduinoWidgetv2template.js +++ b/src/model/ArduinoWidgetv2template.js @@ -17,7 +17,7 @@ import ArduinoTemplatevariable from './ArduinoTemplatevariable'; /** * The ArduinoWidgetv2template model module. * @module model/ArduinoWidgetv2template - * @version 2.0.2 + * @version 2.0.4 */ class ArduinoWidgetv2template { /** diff --git a/src/model/BatchLastValueRequestsMediaV1.js b/src/model/BatchLastValueRequestsMediaV1.js index 3e1948d..f39f7ba 100644 --- a/src/model/BatchLastValueRequestsMediaV1.js +++ b/src/model/BatchLastValueRequestsMediaV1.js @@ -17,7 +17,7 @@ import BatchQueryRawLastValueRequestMediaV1 from './BatchQueryRawLastValueReques /** * The BatchLastValueRequestsMediaV1 model module. * @module model/BatchLastValueRequestsMediaV1 - * @version 2.0.2 + * @version 2.0.4 */ class BatchLastValueRequestsMediaV1 { /** diff --git a/src/model/BatchQueryRawLastValueRequestMediaV1.js b/src/model/BatchQueryRawLastValueRequestMediaV1.js index 7a4e27b..4c966da 100644 --- a/src/model/BatchQueryRawLastValueRequestMediaV1.js +++ b/src/model/BatchQueryRawLastValueRequestMediaV1.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The BatchQueryRawLastValueRequestMediaV1 model module. * @module model/BatchQueryRawLastValueRequestMediaV1 - * @version 2.0.2 + * @version 2.0.4 */ class BatchQueryRawLastValueRequestMediaV1 { /** diff --git a/src/model/BatchQueryRawRequestMediaV1.js b/src/model/BatchQueryRawRequestMediaV1.js index af36d8f..4cc86a7 100644 --- a/src/model/BatchQueryRawRequestMediaV1.js +++ b/src/model/BatchQueryRawRequestMediaV1.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The BatchQueryRawRequestMediaV1 model module. * @module model/BatchQueryRawRequestMediaV1 - * @version 2.0.2 + * @version 2.0.4 */ class BatchQueryRawRequestMediaV1 { /** diff --git a/src/model/BatchQueryRawRequestsMediaV1.js b/src/model/BatchQueryRawRequestsMediaV1.js index 8ab2493..e7ceb73 100644 --- a/src/model/BatchQueryRawRequestsMediaV1.js +++ b/src/model/BatchQueryRawRequestsMediaV1.js @@ -17,7 +17,7 @@ import BatchQueryRawRequestMediaV1 from './BatchQueryRawRequestMediaV1'; /** * The BatchQueryRawRequestsMediaV1 model module. * @module model/BatchQueryRawRequestsMediaV1 - * @version 2.0.2 + * @version 2.0.4 */ class BatchQueryRawRequestsMediaV1 { /** diff --git a/src/model/BatchQueryRawResponseSeriesMediaV1.js b/src/model/BatchQueryRawResponseSeriesMediaV1.js index e829467..1afaed4 100644 --- a/src/model/BatchQueryRawResponseSeriesMediaV1.js +++ b/src/model/BatchQueryRawResponseSeriesMediaV1.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The BatchQueryRawResponseSeriesMediaV1 model module. * @module model/BatchQueryRawResponseSeriesMediaV1 - * @version 2.0.2 + * @version 2.0.4 */ class BatchQueryRawResponseSeriesMediaV1 { /** diff --git a/src/model/BatchQueryRequestMediaV1.js b/src/model/BatchQueryRequestMediaV1.js index ad602bb..79982bd 100644 --- a/src/model/BatchQueryRequestMediaV1.js +++ b/src/model/BatchQueryRequestMediaV1.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The BatchQueryRequestMediaV1 model module. * @module model/BatchQueryRequestMediaV1 - * @version 2.0.2 + * @version 2.0.4 */ class BatchQueryRequestMediaV1 { /** diff --git a/src/model/BatchQueryRequestsMediaV1.js b/src/model/BatchQueryRequestsMediaV1.js index a0fcabe..c850959 100644 --- a/src/model/BatchQueryRequestsMediaV1.js +++ b/src/model/BatchQueryRequestsMediaV1.js @@ -17,7 +17,7 @@ import BatchQueryRequestMediaV1 from './BatchQueryRequestMediaV1'; /** * The BatchQueryRequestsMediaV1 model module. * @module model/BatchQueryRequestsMediaV1 - * @version 2.0.2 + * @version 2.0.4 */ class BatchQueryRequestsMediaV1 { /** diff --git a/src/model/BatchQuerySampledRequestMediaV1.js b/src/model/BatchQuerySampledRequestMediaV1.js new file mode 100644 index 0000000..aeb114d --- /dev/null +++ b/src/model/BatchQuerySampledRequestMediaV1.js @@ -0,0 +1,133 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The BatchQuerySampledRequestMediaV1 model module. + * @module model/BatchQuerySampledRequestMediaV1 + * @version 2.0.4 + */ +class BatchQuerySampledRequestMediaV1 { + /** + * Constructs a new BatchQuerySampledRequestMediaV1. + * @alias module:model/BatchQuerySampledRequestMediaV1 + * @param q {String} Data selection query (e.g. property.2a99729d-2556-4220-a139-023348a1e6b5) + */ + constructor(q) { + + BatchQuerySampledRequestMediaV1.initialize(this, q); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, q) { + obj['q'] = q; + } + + /** + * Constructs a BatchQuerySampledRequestMediaV1 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/BatchQuerySampledRequestMediaV1} obj Optional instance to populate. + * @return {module:model/BatchQuerySampledRequestMediaV1} The populated BatchQuerySampledRequestMediaV1 instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new BatchQuerySampledRequestMediaV1(); + + if (data.hasOwnProperty('from')) { + obj['from'] = ApiClient.convertToType(data['from'], 'Date'); + } + if (data.hasOwnProperty('interval')) { + obj['interval'] = ApiClient.convertToType(data['interval'], 'Number'); + } + if (data.hasOwnProperty('q')) { + obj['q'] = ApiClient.convertToType(data['q'], 'String'); + } + if (data.hasOwnProperty('series_limit')) { + obj['series_limit'] = ApiClient.convertToType(data['series_limit'], 'Number'); + } + if (data.hasOwnProperty('to')) { + obj['to'] = ApiClient.convertToType(data['to'], 'Date'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to BatchQuerySampledRequestMediaV1. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to BatchQuerySampledRequestMediaV1. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of BatchQuerySampledRequestMediaV1.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['q'] && !(typeof data['q'] === 'string' || data['q'] instanceof String)) { + throw new Error("Expected the field `q` to be a primitive type in the JSON string but got " + data['q']); + } + + return true; + } + + +} + +BatchQuerySampledRequestMediaV1.RequiredProperties = ["q"]; + +/** + * From timestamp (default: now UTC - 24h) + * @member {Date} from + */ +BatchQuerySampledRequestMediaV1.prototype['from'] = undefined; + +/** + * Resolution in seconds (allowed min:60, max:86400) + * @member {Number} interval + * @default 300 + */ +BatchQuerySampledRequestMediaV1.prototype['interval'] = 300; + +/** + * Data selection query (e.g. property.2a99729d-2556-4220-a139-023348a1e6b5) + * @member {String} q + */ +BatchQuerySampledRequestMediaV1.prototype['q'] = undefined; + +/** + * Maximum number of values returned after data aggregation, if any (default: 300, limit: 1000) + * @member {Number} series_limit + */ +BatchQuerySampledRequestMediaV1.prototype['series_limit'] = undefined; + +/** + * To timestamp (default: now UTC) + * @member {Date} to + */ +BatchQuerySampledRequestMediaV1.prototype['to'] = undefined; + + + + + + +export default BatchQuerySampledRequestMediaV1; + diff --git a/src/model/BatchQuerySampledRequestsMediaV1.js b/src/model/BatchQuerySampledRequestsMediaV1.js new file mode 100644 index 0000000..bde86de --- /dev/null +++ b/src/model/BatchQuerySampledRequestsMediaV1.js @@ -0,0 +1,114 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; +import BatchQuerySampledRequestMediaV1 from './BatchQuerySampledRequestMediaV1'; + +/** + * The BatchQuerySampledRequestsMediaV1 model module. + * @module model/BatchQuerySampledRequestsMediaV1 + * @version 2.0.4 + */ +class BatchQuerySampledRequestsMediaV1 { + /** + * Constructs a new BatchQuerySampledRequestsMediaV1. + * @alias module:model/BatchQuerySampledRequestsMediaV1 + * @param requests {Array.} Requests + * @param respVersion {Number} Response version + */ + constructor(requests, respVersion) { + + BatchQuerySampledRequestsMediaV1.initialize(this, requests, respVersion); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, requests, respVersion) { + obj['requests'] = requests; + obj['resp_version'] = respVersion; + } + + /** + * Constructs a BatchQuerySampledRequestsMediaV1 from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/BatchQuerySampledRequestsMediaV1} obj Optional instance to populate. + * @return {module:model/BatchQuerySampledRequestsMediaV1} The populated BatchQuerySampledRequestsMediaV1 instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new BatchQuerySampledRequestsMediaV1(); + + if (data.hasOwnProperty('requests')) { + obj['requests'] = ApiClient.convertToType(data['requests'], [BatchQuerySampledRequestMediaV1]); + } + if (data.hasOwnProperty('resp_version')) { + obj['resp_version'] = ApiClient.convertToType(data['resp_version'], 'Number'); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to BatchQuerySampledRequestsMediaV1. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to BatchQuerySampledRequestsMediaV1. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of BatchQuerySampledRequestsMediaV1.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + if (data['requests']) { // data not null + // ensure the json data is an array + if (!Array.isArray(data['requests'])) { + throw new Error("Expected the field `requests` to be an array in the JSON data but got " + data['requests']); + } + // validate the optional field `requests` (array) + for (const item of data['requests']) { + BatchQuerySampledRequestMediaV1.validateJSON(item); + }; + } + + return true; + } + + +} + +BatchQuerySampledRequestsMediaV1.RequiredProperties = ["requests", "resp_version"]; + +/** + * Requests + * @member {Array.} requests + */ +BatchQuerySampledRequestsMediaV1.prototype['requests'] = undefined; + +/** + * Response version + * @member {Number} resp_version + */ +BatchQuerySampledRequestsMediaV1.prototype['resp_version'] = undefined; + + + + + + +export default BatchQuerySampledRequestsMediaV1; + diff --git a/src/model/CheckDevicesV2PassPayload.js b/src/model/CheckDevicesV2PassPayload.js index 992e27e..ff505f9 100644 --- a/src/model/CheckDevicesV2PassPayload.js +++ b/src/model/CheckDevicesV2PassPayload.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The CheckDevicesV2PassPayload model module. * @module model/CheckDevicesV2PassPayload - * @version 2.0.2 + * @version 2.0.4 */ class CheckDevicesV2PassPayload { /** diff --git a/src/model/Clone.js b/src/model/Clone.js index 62b2a29..858925d 100644 --- a/src/model/Clone.js +++ b/src/model/Clone.js @@ -17,7 +17,7 @@ import Override from './Override'; /** * The Clone model module. * @module model/Clone - * @version 2.0.2 + * @version 2.0.4 */ class Clone { /** diff --git a/src/model/CreateDevicesV2CertsPayload.js b/src/model/CreateDevicesV2CertsPayload.js index 7f25fc3..3944cc8 100644 --- a/src/model/CreateDevicesV2CertsPayload.js +++ b/src/model/CreateDevicesV2CertsPayload.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The CreateDevicesV2CertsPayload model module. * @module model/CreateDevicesV2CertsPayload - * @version 2.0.2 + * @version 2.0.4 */ class CreateDevicesV2CertsPayload { /** diff --git a/src/model/CreateDevicesV2Payload.js b/src/model/CreateDevicesV2Payload.js index d343546..74b7e00 100644 --- a/src/model/CreateDevicesV2Payload.js +++ b/src/model/CreateDevicesV2Payload.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The CreateDevicesV2Payload model module. * @module model/CreateDevicesV2Payload - * @version 2.0.2 + * @version 2.0.4 */ class CreateDevicesV2Payload { /** @@ -211,7 +211,19 @@ CreateDevicesV2Payload['ConnectionTypeEnum'] = { * value: "lora" * @const */ - "lora": "lora" + "lora": "lora", + + /** + * value: "catm1" + * @const + */ + "catm1": "catm1", + + /** + * value: "cellular" + * @const + */ + "cellular": "cellular" }; diff --git a/src/model/CreateLoraDevicesV1Payload.js b/src/model/CreateLoraDevicesV1Payload.js index 74a62d7..8fbe246 100644 --- a/src/model/CreateLoraDevicesV1Payload.js +++ b/src/model/CreateLoraDevicesV1Payload.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The CreateLoraDevicesV1Payload model module. * @module model/CreateLoraDevicesV1Payload - * @version 2.0.2 + * @version 2.0.4 */ class CreateLoraDevicesV1Payload { /** diff --git a/src/model/Dashboardshare.js b/src/model/Dashboardshare.js index 966fe5b..67df968 100644 --- a/src/model/Dashboardshare.js +++ b/src/model/Dashboardshare.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Dashboardshare model module. * @module model/Dashboardshare - * @version 2.0.2 + * @version 2.0.4 */ class Dashboardshare { /** diff --git a/src/model/Dashboardv2.js b/src/model/Dashboardv2.js index 9ae7095..fe0fd14 100644 --- a/src/model/Dashboardv2.js +++ b/src/model/Dashboardv2.js @@ -17,7 +17,7 @@ import Widget from './Widget'; /** * The Dashboardv2 model module. * @module model/Dashboardv2 - * @version 2.0.2 + * @version 2.0.4 */ class Dashboardv2 { /** diff --git a/src/model/Devicev2.js b/src/model/Devicev2.js index 640b1b4..bfc2e78 100644 --- a/src/model/Devicev2.js +++ b/src/model/Devicev2.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Devicev2 model module. * @module model/Devicev2 - * @version 2.0.2 + * @version 2.0.4 */ class Devicev2 { /** @@ -203,7 +203,19 @@ Devicev2['ConnectionTypeEnum'] = { * value: "lora" * @const */ - "lora": "lora" + "lora": "lora", + + /** + * value: "catm1" + * @const + */ + "catm1": "catm1", + + /** + * value: "cellular" + * @const + */ + "cellular": "cellular" }; diff --git a/src/model/Devicev2Cert.js b/src/model/Devicev2Cert.js index 3b15d5d..07d6289 100644 --- a/src/model/Devicev2Cert.js +++ b/src/model/Devicev2Cert.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Devicev2Cert model module. * @module model/Devicev2Cert - * @version 2.0.2 + * @version 2.0.4 */ class Devicev2Cert { /** diff --git a/src/model/Devicev2Otabinaryurl.js b/src/model/Devicev2Otabinaryurl.js index d3a6f68..6feda7a 100644 --- a/src/model/Devicev2Otabinaryurl.js +++ b/src/model/Devicev2Otabinaryurl.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Devicev2Otabinaryurl model module. * @module model/Devicev2Otabinaryurl - * @version 2.0.2 + * @version 2.0.4 */ class Devicev2Otabinaryurl { /** diff --git a/src/model/Devicev2Otaurlpyalod.js b/src/model/Devicev2Otaurlpyalod.js index d929648..34b2afe 100644 --- a/src/model/Devicev2Otaurlpyalod.js +++ b/src/model/Devicev2Otaurlpyalod.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Devicev2Otaurlpyalod model module. * @module model/Devicev2Otaurlpyalod - * @version 2.0.2 + * @version 2.0.4 */ class Devicev2Otaurlpyalod { /** diff --git a/src/model/Devicev2Pass.js b/src/model/Devicev2Pass.js index 4f0bab1..aa4e4c9 100644 --- a/src/model/Devicev2Pass.js +++ b/src/model/Devicev2Pass.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Devicev2Pass model module. * @module model/Devicev2Pass - * @version 2.0.2 + * @version 2.0.4 */ class Devicev2Pass { /** diff --git a/src/model/Error.js b/src/model/Error.js index 06259bf..bdc37f2 100644 --- a/src/model/Error.js +++ b/src/model/Error.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Error model module. * @module model/Error - * @version 2.0.2 + * @version 2.0.4 */ class Error { /** diff --git a/src/model/HistoricDataRequest.js b/src/model/HistoricDataRequest.js index a0972e0..4fc0d22 100644 --- a/src/model/HistoricDataRequest.js +++ b/src/model/HistoricDataRequest.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The HistoricDataRequest model module. * @module model/HistoricDataRequest - * @version 2.0.2 + * @version 2.0.4 */ class HistoricDataRequest { /** diff --git a/src/model/Override.js b/src/model/Override.js index 61eb80f..10b6040 100644 --- a/src/model/Override.js +++ b/src/model/Override.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Override model module. * @module model/Override - * @version 2.0.2 + * @version 2.0.4 */ class Override { /** diff --git a/src/model/PropertiesValue.js b/src/model/PropertiesValue.js index 8ac7e2e..b420aa2 100644 --- a/src/model/PropertiesValue.js +++ b/src/model/PropertiesValue.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The PropertiesValue model module. * @module model/PropertiesValue - * @version 2.0.2 + * @version 2.0.4 */ class PropertiesValue { /** diff --git a/src/model/PropertiesValues.js b/src/model/PropertiesValues.js index 130d3dd..9d04ebd 100644 --- a/src/model/PropertiesValues.js +++ b/src/model/PropertiesValues.js @@ -17,7 +17,7 @@ import PropertiesValue from './PropertiesValue'; /** * The PropertiesValues model module. * @module model/PropertiesValues - * @version 2.0.2 + * @version 2.0.4 */ class PropertiesValues { /** diff --git a/src/model/Property.js b/src/model/Property.js index 278f965..806cc6c 100644 --- a/src/model/Property.js +++ b/src/model/Property.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Property model module. * @module model/Property - * @version 2.0.2 + * @version 2.0.4 */ class Property { /** diff --git a/src/model/PropertyValue.js b/src/model/PropertyValue.js index 12bdd55..5cb52f2 100644 --- a/src/model/PropertyValue.js +++ b/src/model/PropertyValue.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The PropertyValue model module. * @module model/PropertyValue - * @version 2.0.2 + * @version 2.0.4 */ class PropertyValue { /** diff --git a/src/model/Sharerequest.js b/src/model/Sharerequest.js index bf10270..97a59c6 100644 --- a/src/model/Sharerequest.js +++ b/src/model/Sharerequest.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Sharerequest model module. * @module model/Sharerequest - * @version 2.0.2 + * @version 2.0.4 */ class Sharerequest { /** diff --git a/src/model/Tag.js b/src/model/Tag.js index 46fba38..f7cac35 100644 --- a/src/model/Tag.js +++ b/src/model/Tag.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Tag model module. * @module model/Tag - * @version 2.0.2 + * @version 2.0.4 */ class Tag { /** diff --git a/src/model/Template.js b/src/model/Template.js new file mode 100644 index 0000000..084d9a1 --- /dev/null +++ b/src/model/Template.js @@ -0,0 +1,131 @@ +/** + * Arduino IoT Cloud API + * Provides a set of endpoints to manage Arduino IoT Cloud **Devices**, **Things**, **Properties** and **Timeseries**. This API can be called just with any HTTP Client, or using one of these clients: * [Javascript NPM package](https://www.npmjs.com/package/@arduino/arduino-iot-client) * [Python PYPI Package](https://pypi.org/project/arduino-iot-client/) * [Golang Module](https://github.com/arduino/iot-client-go) + * + * The version of the OpenAPI document: 2.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + * + */ + +import ApiClient from '../ApiClient'; + +/** + * The Template model module. + * @module model/Template + * @version 2.0.4 + */ +class Template { + /** + * Constructs a new Template. + * TemplatePayload describes the needed attribute to apply a template + * @alias module:model/Template + * @param templateName {String} The name of the directory on S3 bucket containing the template + */ + constructor(templateName) { + + Template.initialize(this, templateName); + } + + /** + * Initializes the fields of this object. + * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins). + * Only for internal use. + */ + static initialize(obj, templateName) { + obj['template_name'] = templateName; + } + + /** + * Constructs a Template from a plain JavaScript object, optionally creating a new instance. + * Copies all relevant properties from data to obj if supplied or a new instance if not. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @param {module:model/Template} obj Optional instance to populate. + * @return {module:model/Template} The populated Template instance. + */ + static constructFromObject(data, obj) { + if (data) { + obj = obj || new Template(); + + if (data.hasOwnProperty('custom_template_id')) { + obj['custom_template_id'] = ApiClient.convertToType(data['custom_template_id'], 'String'); + } + if (data.hasOwnProperty('prefix_name')) { + obj['prefix_name'] = ApiClient.convertToType(data['prefix_name'], 'String'); + } + if (data.hasOwnProperty('template_name')) { + obj['template_name'] = ApiClient.convertToType(data['template_name'], 'String'); + } + if (data.hasOwnProperty('things_options')) { + obj['things_options'] = ApiClient.convertToType(data['things_options'], {'String': Object}); + } + } + return obj; + } + + /** + * Validates the JSON data with respect to Template. + * @param {Object} data The plain JavaScript object bearing properties of interest. + * @return {boolean} to indicate whether the JSON data is valid with respect to Template. + */ + static validateJSON(data) { + // check to make sure all required properties are present in the JSON string + for (const property of Template.RequiredProperties) { + if (!data[property]) { + throw new Error("The required field `" + property + "` is not found in the JSON data: " + JSON.stringify(data)); + } + } + // ensure the json data is a string + if (data['custom_template_id'] && !(typeof data['custom_template_id'] === 'string' || data['custom_template_id'] instanceof String)) { + throw new Error("Expected the field `custom_template_id` to be a primitive type in the JSON string but got " + data['custom_template_id']); + } + // ensure the json data is a string + if (data['prefix_name'] && !(typeof data['prefix_name'] === 'string' || data['prefix_name'] instanceof String)) { + throw new Error("Expected the field `prefix_name` to be a primitive type in the JSON string but got " + data['prefix_name']); + } + // ensure the json data is a string + if (data['template_name'] && !(typeof data['template_name'] === 'string' || data['template_name'] instanceof String)) { + throw new Error("Expected the field `template_name` to be a primitive type in the JSON string but got " + data['template_name']); + } + + return true; + } + + +} + +Template.RequiredProperties = ["template_name"]; + +/** + * The name of the directory on S3 bucket containing the user's template + * @member {String} custom_template_id + */ +Template.prototype['custom_template_id'] = undefined; + +/** + * The prefix to apply to the names of the generated resources + * @member {String} prefix_name + */ +Template.prototype['prefix_name'] = undefined; + +/** + * The name of the directory on S3 bucket containing the template + * @member {String} template_name + */ +Template.prototype['template_name'] = undefined; + +/** + * @member {Object.} things_options + */ +Template.prototype['things_options'] = undefined; + + + + + + +export default Template; + diff --git a/src/model/ThingClone.js b/src/model/ThingClone.js index fd29a8a..1bae668 100644 --- a/src/model/ThingClone.js +++ b/src/model/ThingClone.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ThingClone model module. * @module model/ThingClone - * @version 2.0.2 + * @version 2.0.4 */ class ThingClone { /** diff --git a/src/model/ThingCreate.js b/src/model/ThingCreate.js index b3ef146..8696510 100644 --- a/src/model/ThingCreate.js +++ b/src/model/ThingCreate.js @@ -18,7 +18,7 @@ import Tag from './Tag'; /** * The ThingCreate model module. * @module model/ThingCreate - * @version 2.0.2 + * @version 2.0.4 */ class ThingCreate { /** @@ -50,6 +50,9 @@ class ThingCreate { if (data) { obj = obj || new ThingCreate(); + if (data.hasOwnProperty('assistant')) { + obj['assistant'] = ApiClient.convertToType(data['assistant'], 'String'); + } if (data.hasOwnProperty('device_id')) { obj['device_id'] = ApiClient.convertToType(data['device_id'], 'String'); } @@ -84,6 +87,10 @@ class ThingCreate { * @return {boolean} to indicate whether the JSON data is valid with respect to ThingCreate. */ static validateJSON(data) { + // ensure the json data is a string + if (data['assistant'] && !(typeof data['assistant'] === 'string' || data['assistant'] instanceof String)) { + throw new Error("Expected the field `assistant` to be a primitive type in the JSON string but got " + data['assistant']); + } // ensure the json data is a string if (data['device_id'] && !(typeof data['device_id'] === 'string' || data['device_id'] instanceof String)) { throw new Error("Expected the field `device_id` to be a primitive type in the JSON string but got " + data['device_id']); @@ -133,6 +140,12 @@ class ThingCreate { +/** + * The kind of voice assistant the thing is connected to, it can be ALEXA | GOOGLE | NONE + * @member {module:model/ThingCreate.AssistantEnum} assistant + */ +ThingCreate.prototype['assistant'] = undefined; + /** * The arn of the associated device * @member {String} device_id @@ -186,6 +199,33 @@ ThingCreate.prototype['webhook_uri'] = undefined; +/** + * Allowed values for the assistant property. + * @enum {String} + * @readonly + */ +ThingCreate['AssistantEnum'] = { + + /** + * value: "ALEXA" + * @const + */ + "ALEXA": "ALEXA", + + /** + * value: "GOOGLE" + * @const + */ + "GOOGLE": "GOOGLE", + + /** + * value: "NONE" + * @const + */ + "NONE": "NONE" +}; + + export default ThingCreate; diff --git a/src/model/ThingSketch.js b/src/model/ThingSketch.js index 3d5e37f..f6c8a0b 100644 --- a/src/model/ThingSketch.js +++ b/src/model/ThingSketch.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The ThingSketch model module. * @module model/ThingSketch - * @version 2.0.2 + * @version 2.0.4 */ class ThingSketch { /** diff --git a/src/model/ThingUpdate.js b/src/model/ThingUpdate.js index 36f8572..7c41dee 100644 --- a/src/model/ThingUpdate.js +++ b/src/model/ThingUpdate.js @@ -17,7 +17,7 @@ import Property from './Property'; /** * The ThingUpdate model module. * @module model/ThingUpdate - * @version 2.0.2 + * @version 2.0.4 */ class ThingUpdate { /** @@ -49,6 +49,9 @@ class ThingUpdate { if (data) { obj = obj || new ThingUpdate(); + if (data.hasOwnProperty('assistant')) { + obj['assistant'] = ApiClient.convertToType(data['assistant'], 'String'); + } if (data.hasOwnProperty('device_id')) { obj['device_id'] = ApiClient.convertToType(data['device_id'], 'String'); } @@ -80,6 +83,10 @@ class ThingUpdate { * @return {boolean} to indicate whether the JSON data is valid with respect to ThingUpdate. */ static validateJSON(data) { + // ensure the json data is a string + if (data['assistant'] && !(typeof data['assistant'] === 'string' || data['assistant'] instanceof String)) { + throw new Error("Expected the field `assistant` to be a primitive type in the JSON string but got " + data['assistant']); + } // ensure the json data is a string if (data['device_id'] && !(typeof data['device_id'] === 'string' || data['device_id'] instanceof String)) { throw new Error("Expected the field `device_id` to be a primitive type in the JSON string but got " + data['device_id']); @@ -119,6 +126,12 @@ class ThingUpdate { +/** + * The kind of voice assistant the thing is connected to, it can be ALEXA | GOOGLE | NONE + * @member {module:model/ThingUpdate.AssistantEnum} assistant + */ +ThingUpdate.prototype['assistant'] = undefined; + /** * The arn of the associated device * @member {String} device_id @@ -165,6 +178,33 @@ ThingUpdate.prototype['webhook_uri'] = undefined; +/** + * Allowed values for the assistant property. + * @enum {String} + * @readonly + */ +ThingUpdate['AssistantEnum'] = { + + /** + * value: "ALEXA" + * @const + */ + "ALEXA": "ALEXA", + + /** + * value: "GOOGLE" + * @const + */ + "GOOGLE": "GOOGLE", + + /** + * value: "NONE" + * @const + */ + "NONE": "NONE" +}; + + export default ThingUpdate; diff --git a/src/model/TimeseriesDataPoint.js b/src/model/TimeseriesDataPoint.js index f6eab69..be2747d 100644 --- a/src/model/TimeseriesDataPoint.js +++ b/src/model/TimeseriesDataPoint.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The TimeseriesDataPoint model module. * @module model/TimeseriesDataPoint - * @version 2.0.2 + * @version 2.0.4 */ class TimeseriesDataPoint { /** diff --git a/src/model/UpdateSketch.js b/src/model/UpdateSketch.js index ab89fe2..f72bd65 100644 --- a/src/model/UpdateSketch.js +++ b/src/model/UpdateSketch.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The UpdateSketch model module. * @module model/UpdateSketch - * @version 2.0.2 + * @version 2.0.4 */ class UpdateSketch { /** diff --git a/src/model/Widget.js b/src/model/Widget.js index 003a137..9f6137c 100644 --- a/src/model/Widget.js +++ b/src/model/Widget.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Widget model module. * @module model/Widget - * @version 2.0.2 + * @version 2.0.4 */ class Widget { /** diff --git a/src/model/Widgetlink.js b/src/model/Widgetlink.js index b4227d9..0308f16 100644 --- a/src/model/Widgetlink.js +++ b/src/model/Widgetlink.js @@ -16,7 +16,7 @@ import ApiClient from '../ApiClient'; /** * The Widgetlink model module. * @module model/Widgetlink - * @version 2.0.2 + * @version 2.0.4 */ class Widgetlink { /**