From d73d4b9a9dc4ad8e996a2ec410b5c1e866ff5b0f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 31 Jan 2024 15:31:00 +0100 Subject: [PATCH] Regenerate client from commit 138c42b of spec repo (#71) Co-authored-by: ArduinoBot --- .apigentools-info | 4 +- .openapi-generator/FILES | 56 ++ docs/apis/tags/DashboardsV2Api.md | 477 ++++++++++++++ docs/apis/tags/DevicesV2Api.md | 255 ++++++++ docs/apis/tags/PropertiesV2Api.md | 238 ++++++- docs/apis/tags/SeriesV2Api.md | 5 +- docs/apis/tags/ThingsV2Api.md | 425 ++++++++++++- docs/models/ArduinoDashboardv2template.md | 18 + docs/models/ArduinoDevicev2.md | 1 + docs/models/ArduinoDevicev2StatusEvent.md | 18 + .../ArduinoDevicev2StatusEventCollection.md | 16 + docs/models/ArduinoDevicev2StatusEvents.md | 18 + docs/models/ArduinoProperty.md | 2 +- docs/models/ArduinoSeriesResponse.md | 3 +- docs/models/ArduinoTemplateproperty.md | 22 + .../ArduinoTemplatepropertyCollection.md | 16 + docs/models/ArduinoTemplatevariable.md | 22 + .../ArduinoTemplatevariableCollection.md | 16 + docs/models/ArduinoThingtemplate.md | 36 ++ docs/models/ArduinoTimezone.md | 2 +- docs/models/ArduinoWidgetv2.md | 4 +- docs/models/ArduinoWidgetv2template.md | 42 ++ .../ArduinoWidgetv2templateCollection.md | 16 + docs/models/BatchQueryRawRequestMediaV1.md | 2 +- docs/models/BatchQueryRequestMediaV1.md | 7 +- docs/models/Clone.md | 29 + docs/models/ModelProperty.md | 4 +- docs/models/Override.md | 16 + docs/models/ThingClone.md | 18 + docs/models/ThingCreate.md | 15 + iot_api_client/__init__.py | 2 +- iot_api_client/apis/path_to_api.py | 15 + .../apis/paths/v2_dashboards_id_clone.py | 7 + .../apis/paths/v2_dashboards_id_template.py | 7 + .../apis/paths/v2_devices_id_status.py | 7 + .../apis/paths/v2_things_id_clone.py | 7 + .../apis/paths/v2_things_id_template.py | 7 + iot_api_client/apis/tags/dashboards_v2_api.py | 4 + iot_api_client/apis/tags/devices_v2_api.py | 2 + iot_api_client/apis/tags/things_v2_api.py | 4 + iot_api_client/configuration.py | 2 +- .../model/arduino_dashboardv2template.py | 100 +++ .../model/arduino_dashboardv2template.pyi | 100 +++ iot_api_client/model/arduino_devicev2.py | 39 +- iot_api_client/model/arduino_devicev2.pyi | 31 +- .../model/arduino_devicev2_status_event.py | 117 ++++ .../model/arduino_devicev2_status_event.pyi | 110 ++++ ...rduino_devicev2_status_event_collection.py | 58 ++ ...duino_devicev2_status_event_collection.pyi | 58 ++ .../model/arduino_devicev2_status_events.py | 102 +++ .../model/arduino_devicev2_status_events.pyi | 102 +++ iot_api_client/model/arduino_property.py | 4 +- iot_api_client/model/arduino_property.pyi | 4 +- .../model/arduino_series_response.py | 94 ++- .../model/arduino_series_response.pyi | 75 ++- .../model/arduino_templateproperty.py | 141 +++++ .../model/arduino_templateproperty.pyi | 141 +++++ .../arduino_templateproperty_collection.py | 58 ++ .../arduino_templateproperty_collection.pyi | 58 ++ .../model/arduino_templatevariable.py | 148 +++++ .../model/arduino_templatevariable.pyi | 148 +++++ .../arduino_templatevariable_collection.py | 58 ++ .../arduino_templatevariable_collection.pyi | 58 ++ iot_api_client/model/arduino_thingtemplate.py | 168 +++++ .../model/arduino_thingtemplate.pyi | 168 +++++ iot_api_client/model/arduino_timezone.py | 6 +- iot_api_client/model/arduino_timezone.pyi | 6 +- iot_api_client/model/arduino_widgetv2.py | 2 +- iot_api_client/model/arduino_widgetv2.pyi | 2 +- .../model/arduino_widgetv2template.py | 238 +++++++ .../model/arduino_widgetv2template.pyi | 238 +++++++ .../arduino_widgetv2template_collection.py | 58 ++ .../arduino_widgetv2template_collection.pyi | 58 ++ .../model/batch_query_request_media_v1.py | 94 ++- .../model/batch_query_request_media_v1.pyi | 75 ++- iot_api_client/model/clone.py | 105 ++++ iot_api_client/model/clone.pyi | 105 ++++ iot_api_client/model/model_property.py | 109 +++- iot_api_client/model/model_property.pyi | 88 ++- iot_api_client/model/override.py | 95 +++ iot_api_client/model/override.pyi | 95 +++ iot_api_client/model/thing_clone.py | 106 ++++ iot_api_client/model/thing_clone.pyi | 100 +++ iot_api_client/model/thing_create.py | 40 +- iot_api_client/model/thing_create.pyi | 40 +- iot_api_client/models/__init__.py | 14 + iot_api_client/paths/__init__.py | 5 + iot_api_client/paths/v2_dashboards_id/get.py | 24 + iot_api_client/paths/v2_dashboards_id/get.pyi | 23 + .../paths/v2_dashboards_id_clone/__init__.py | 7 + .../paths/v2_dashboards_id_clone/put.py | 585 ++++++++++++++++++ .../paths/v2_dashboards_id_clone/put.pyi | 573 +++++++++++++++++ .../v2_dashboards_id_template/__init__.py | 7 + .../paths/v2_dashboards_id_template/get.py | 436 +++++++++++++ .../paths/v2_dashboards_id_template/get.pyi | 424 +++++++++++++ .../paths/v2_devices_id_status/__init__.py | 7 + .../paths/v2_devices_id_status/get.py | 510 +++++++++++++++ .../paths/v2_devices_id_status/get.pyi | 498 +++++++++++++++ .../paths/v2_things_id_clone/__init__.py | 7 + .../paths/v2_things_id_clone/put.py | 574 +++++++++++++++++ .../paths/v2_things_id_clone/put.pyi | 562 +++++++++++++++++ .../paths/v2_things_id_properties/get.py | 48 ++ .../paths/v2_things_id_properties/get.pyi | 48 ++ .../paths/v2_things_id_properties/put.py | 54 ++ .../paths/v2_things_id_properties/put.pyi | 54 ++ .../v2_things_id_properties_pid/delete.py | 48 ++ .../v2_things_id_properties_pid/delete.pyi | 48 ++ .../paths/v2_things_id_properties_pid/get.py | 48 ++ .../paths/v2_things_id_properties_pid/get.pyi | 48 ++ .../paths/v2_things_id_properties_pid/post.py | 54 ++ .../v2_things_id_properties_pid/post.pyi | 54 ++ .../put.py | 54 ++ .../put.pyi | 54 ++ .../get.py | 127 ++++ .../get.pyi | 110 ++++ .../paths/v2_things_id_template/__init__.py | 7 + .../paths/v2_things_id_template/get.py | 401 ++++++++++++ .../paths/v2_things_id_template/get.pyi | 390 ++++++++++++ .../test_arduino_dashboardv2template.py | 25 + .../test_arduino_devicev2_status_event.py | 25 + ...rduino_devicev2_status_event_collection.py | 25 + .../test_arduino_devicev2_status_events.py | 25 + .../test_arduino_templateproperty.py | 25 + ...est_arduino_templateproperty_collection.py | 25 + .../test_arduino_templatevariable.py | 25 + ...est_arduino_templatevariable_collection.py | 25 + .../test_models/test_arduino_thingtemplate.py | 25 + .../test_arduino_widgetv2template.py | 25 + ...est_arduino_widgetv2template_collection.py | 25 + test/test_models/test_clone.py | 25 + test/test_models/test_override.py | 25 + test/test_models/test_thing_clone.py | 25 + .../test_v2_dashboards_id_clone/__init__.py | 0 .../test_v2_dashboards_id_clone/test_put.py | 47 ++ .../__init__.py | 0 .../test_get.py | 43 ++ .../test_v2_devices_id_status/__init__.py | 0 .../test_v2_devices_id_status/test_get.py | 43 ++ .../test_v2_things_id_clone/__init__.py | 0 .../test_v2_things_id_clone/test_put.py | 47 ++ .../test_v2_things_id_template/__init__.py | 0 .../test_v2_things_id_template/test_get.py | 43 ++ 142 files changed, 12090 insertions(+), 53 deletions(-) create mode 100644 docs/models/ArduinoDashboardv2template.md create mode 100644 docs/models/ArduinoDevicev2StatusEvent.md create mode 100644 docs/models/ArduinoDevicev2StatusEventCollection.md create mode 100644 docs/models/ArduinoDevicev2StatusEvents.md create mode 100644 docs/models/ArduinoTemplateproperty.md create mode 100644 docs/models/ArduinoTemplatepropertyCollection.md create mode 100644 docs/models/ArduinoTemplatevariable.md create mode 100644 docs/models/ArduinoTemplatevariableCollection.md create mode 100644 docs/models/ArduinoThingtemplate.md create mode 100644 docs/models/ArduinoWidgetv2template.md create mode 100644 docs/models/ArduinoWidgetv2templateCollection.md create mode 100644 docs/models/Clone.md create mode 100644 docs/models/Override.md create mode 100644 docs/models/ThingClone.md create mode 100644 iot_api_client/apis/paths/v2_dashboards_id_clone.py create mode 100644 iot_api_client/apis/paths/v2_dashboards_id_template.py create mode 100644 iot_api_client/apis/paths/v2_devices_id_status.py create mode 100644 iot_api_client/apis/paths/v2_things_id_clone.py create mode 100644 iot_api_client/apis/paths/v2_things_id_template.py create mode 100644 iot_api_client/model/arduino_dashboardv2template.py create mode 100644 iot_api_client/model/arduino_dashboardv2template.pyi create mode 100644 iot_api_client/model/arduino_devicev2_status_event.py create mode 100644 iot_api_client/model/arduino_devicev2_status_event.pyi create mode 100644 iot_api_client/model/arduino_devicev2_status_event_collection.py create mode 100644 iot_api_client/model/arduino_devicev2_status_event_collection.pyi create mode 100644 iot_api_client/model/arduino_devicev2_status_events.py create mode 100644 iot_api_client/model/arduino_devicev2_status_events.pyi create mode 100644 iot_api_client/model/arduino_templateproperty.py create mode 100644 iot_api_client/model/arduino_templateproperty.pyi create mode 100644 iot_api_client/model/arduino_templateproperty_collection.py create mode 100644 iot_api_client/model/arduino_templateproperty_collection.pyi create mode 100644 iot_api_client/model/arduino_templatevariable.py create mode 100644 iot_api_client/model/arduino_templatevariable.pyi create mode 100644 iot_api_client/model/arduino_templatevariable_collection.py create mode 100644 iot_api_client/model/arduino_templatevariable_collection.pyi create mode 100644 iot_api_client/model/arduino_thingtemplate.py create mode 100644 iot_api_client/model/arduino_thingtemplate.pyi create mode 100644 iot_api_client/model/arduino_widgetv2template.py create mode 100644 iot_api_client/model/arduino_widgetv2template.pyi create mode 100644 iot_api_client/model/arduino_widgetv2template_collection.py create mode 100644 iot_api_client/model/arduino_widgetv2template_collection.pyi create mode 100644 iot_api_client/model/clone.py create mode 100644 iot_api_client/model/clone.pyi create mode 100644 iot_api_client/model/override.py create mode 100644 iot_api_client/model/override.pyi create mode 100644 iot_api_client/model/thing_clone.py create mode 100644 iot_api_client/model/thing_clone.pyi create mode 100644 iot_api_client/paths/v2_dashboards_id_clone/__init__.py create mode 100644 iot_api_client/paths/v2_dashboards_id_clone/put.py create mode 100644 iot_api_client/paths/v2_dashboards_id_clone/put.pyi create mode 100644 iot_api_client/paths/v2_dashboards_id_template/__init__.py create mode 100644 iot_api_client/paths/v2_dashboards_id_template/get.py create mode 100644 iot_api_client/paths/v2_dashboards_id_template/get.pyi create mode 100644 iot_api_client/paths/v2_devices_id_status/__init__.py create mode 100644 iot_api_client/paths/v2_devices_id_status/get.py create mode 100644 iot_api_client/paths/v2_devices_id_status/get.pyi create mode 100644 iot_api_client/paths/v2_things_id_clone/__init__.py create mode 100644 iot_api_client/paths/v2_things_id_clone/put.py create mode 100644 iot_api_client/paths/v2_things_id_clone/put.pyi create mode 100644 iot_api_client/paths/v2_things_id_template/__init__.py create mode 100644 iot_api_client/paths/v2_things_id_template/get.py create mode 100644 iot_api_client/paths/v2_things_id_template/get.pyi create mode 100644 test/test_models/test_arduino_dashboardv2template.py create mode 100644 test/test_models/test_arduino_devicev2_status_event.py create mode 100644 test/test_models/test_arduino_devicev2_status_event_collection.py create mode 100644 test/test_models/test_arduino_devicev2_status_events.py create mode 100644 test/test_models/test_arduino_templateproperty.py create mode 100644 test/test_models/test_arduino_templateproperty_collection.py create mode 100644 test/test_models/test_arduino_templatevariable.py create mode 100644 test/test_models/test_arduino_templatevariable_collection.py create mode 100644 test/test_models/test_arduino_thingtemplate.py create mode 100644 test/test_models/test_arduino_widgetv2template.py create mode 100644 test/test_models/test_arduino_widgetv2template_collection.py create mode 100644 test/test_models/test_clone.py create mode 100644 test/test_models/test_override.py create mode 100644 test/test_models/test_thing_clone.py create mode 100644 test/test_paths/test_v2_dashboards_id_clone/__init__.py create mode 100644 test/test_paths/test_v2_dashboards_id_clone/test_put.py create mode 100644 test/test_paths/test_v2_dashboards_id_template/__init__.py create mode 100644 test/test_paths/test_v2_dashboards_id_template/test_get.py create mode 100644 test/test_paths/test_v2_devices_id_status/__init__.py create mode 100644 test/test_paths/test_v2_devices_id_status/test_get.py create mode 100644 test/test_paths/test_v2_things_id_clone/__init__.py create mode 100644 test/test_paths/test_v2_things_id_clone/test_put.py create mode 100644 test/test_paths/test_v2_things_id_template/__init__.py create mode 100644 test/test_paths/test_v2_things_id_template/test_get.py diff --git a/.apigentools-info b/.apigentools-info index 827dde7..e53306a 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,8 +4,8 @@ "spec_versions": { "v2": { "apigentools_version": "1.1.0", - "regenerated": "2023-09-22 12:44:54.011243", - "spec_repo_commit": "4c87660" + "regenerated": "2024-01-31 14:26:59.779559", + "spec_repo_commit": "138c42b" } } } \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 782b66e..8c4f141 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -20,6 +20,7 @@ docs/models/ArduinoDashboardshare.md docs/models/ArduinoDashboardshareCollection.md docs/models/ArduinoDashboardv2.md docs/models/ArduinoDashboardv2Collection.md +docs/models/ArduinoDashboardv2template.md docs/models/ArduinoDevicev2.md docs/models/ArduinoDevicev2Cert.md docs/models/ArduinoDevicev2CertCollection.md @@ -28,6 +29,9 @@ docs/models/ArduinoDevicev2EventProperties.md docs/models/ArduinoDevicev2Pass.md docs/models/ArduinoDevicev2SimpleProperties.md docs/models/ArduinoDevicev2SimplePropertiesCollection.md +docs/models/ArduinoDevicev2StatusEvent.md +docs/models/ArduinoDevicev2StatusEventCollection.md +docs/models/ArduinoDevicev2StatusEvents.md docs/models/ArduinoDevicev2Webhook.md docs/models/ArduinoDevicev2WebhookCollection.md docs/models/ArduinoDevicev2properties.md @@ -48,13 +52,20 @@ docs/models/ArduinoSeriesRawLastValueResponse.md docs/models/ArduinoSeriesRawResponse.md docs/models/ArduinoSeriesResponse.md docs/models/ArduinoTags.md +docs/models/ArduinoTemplateproperty.md +docs/models/ArduinoTemplatepropertyCollection.md +docs/models/ArduinoTemplatevariable.md +docs/models/ArduinoTemplatevariableCollection.md docs/models/ArduinoThing.md docs/models/ArduinoThingCollection.md +docs/models/ArduinoThingtemplate.md docs/models/ArduinoTimeseriesmedia.md docs/models/ArduinoTimezone.md docs/models/ArduinoVariableslinks.md docs/models/ArduinoWidgetv2.md docs/models/ArduinoWidgetv2Collection.md +docs/models/ArduinoWidgetv2template.md +docs/models/ArduinoWidgetv2templateCollection.md docs/models/BatchLastValueRequestsMediaV1.md docs/models/BatchQueryRawLastValueRequestMediaV1.md docs/models/BatchQueryRawRequestMediaV1.md @@ -63,6 +74,7 @@ docs/models/BatchQueryRawResponseSeriesMediaV1.md docs/models/BatchQueryRequestMediaV1.md docs/models/BatchQueryRequestsMediaV1.md docs/models/CheckDevicesV2PassPayload.md +docs/models/Clone.md docs/models/CreateDevicesV2CertsPayload.md docs/models/CreateDevicesV2Payload.md docs/models/CreateLoraDevicesV1Payload.md @@ -75,11 +87,13 @@ docs/models/Devicev2Pass.md docs/models/Error.md docs/models/HistoricDataRequest.md docs/models/ModelProperty.md +docs/models/Override.md docs/models/PropertiesValue.md docs/models/PropertiesValues.md docs/models/PropertyValue.md docs/models/Sharerequest.md docs/models/Tag.md +docs/models/ThingClone.md docs/models/ThingCreate.md docs/models/ThingSketch.md docs/models/ThingUpdate.md @@ -118,6 +132,8 @@ iot_api_client/model/arduino_dashboardv2.py iot_api_client/model/arduino_dashboardv2.pyi iot_api_client/model/arduino_dashboardv2_collection.py iot_api_client/model/arduino_dashboardv2_collection.pyi +iot_api_client/model/arduino_dashboardv2template.py +iot_api_client/model/arduino_dashboardv2template.pyi iot_api_client/model/arduino_devicev2.py iot_api_client/model/arduino_devicev2.pyi iot_api_client/model/arduino_devicev2_cert.py @@ -134,6 +150,12 @@ iot_api_client/model/arduino_devicev2_simple_properties.py iot_api_client/model/arduino_devicev2_simple_properties.pyi iot_api_client/model/arduino_devicev2_simple_properties_collection.py iot_api_client/model/arduino_devicev2_simple_properties_collection.pyi +iot_api_client/model/arduino_devicev2_status_event.py +iot_api_client/model/arduino_devicev2_status_event.pyi +iot_api_client/model/arduino_devicev2_status_event_collection.py +iot_api_client/model/arduino_devicev2_status_event_collection.pyi +iot_api_client/model/arduino_devicev2_status_events.py +iot_api_client/model/arduino_devicev2_status_events.pyi iot_api_client/model/arduino_devicev2_webhook.py iot_api_client/model/arduino_devicev2_webhook.pyi iot_api_client/model/arduino_devicev2_webhook_collection.py @@ -174,10 +196,20 @@ iot_api_client/model/arduino_series_response.py iot_api_client/model/arduino_series_response.pyi iot_api_client/model/arduino_tags.py iot_api_client/model/arduino_tags.pyi +iot_api_client/model/arduino_templateproperty.py +iot_api_client/model/arduino_templateproperty.pyi +iot_api_client/model/arduino_templateproperty_collection.py +iot_api_client/model/arduino_templateproperty_collection.pyi +iot_api_client/model/arduino_templatevariable.py +iot_api_client/model/arduino_templatevariable.pyi +iot_api_client/model/arduino_templatevariable_collection.py +iot_api_client/model/arduino_templatevariable_collection.pyi iot_api_client/model/arduino_thing.py iot_api_client/model/arduino_thing.pyi iot_api_client/model/arduino_thing_collection.py iot_api_client/model/arduino_thing_collection.pyi +iot_api_client/model/arduino_thingtemplate.py +iot_api_client/model/arduino_thingtemplate.pyi iot_api_client/model/arduino_timeseriesmedia.py iot_api_client/model/arduino_timeseriesmedia.pyi iot_api_client/model/arduino_timezone.py @@ -188,6 +220,10 @@ iot_api_client/model/arduino_widgetv2.py iot_api_client/model/arduino_widgetv2.pyi iot_api_client/model/arduino_widgetv2_collection.py iot_api_client/model/arduino_widgetv2_collection.pyi +iot_api_client/model/arduino_widgetv2template.py +iot_api_client/model/arduino_widgetv2template.pyi +iot_api_client/model/arduino_widgetv2template_collection.py +iot_api_client/model/arduino_widgetv2template_collection.pyi iot_api_client/model/batch_last_value_requests_media_v1.py iot_api_client/model/batch_last_value_requests_media_v1.pyi iot_api_client/model/batch_query_raw_last_value_request_media_v1.py @@ -204,6 +240,8 @@ iot_api_client/model/batch_query_requests_media_v1.py iot_api_client/model/batch_query_requests_media_v1.pyi iot_api_client/model/check_devices_v2_pass_payload.py iot_api_client/model/check_devices_v2_pass_payload.pyi +iot_api_client/model/clone.py +iot_api_client/model/clone.pyi iot_api_client/model/create_devices_v2_certs_payload.py iot_api_client/model/create_devices_v2_certs_payload.pyi iot_api_client/model/create_devices_v2_payload.py @@ -228,6 +266,8 @@ iot_api_client/model/historic_data_request.py iot_api_client/model/historic_data_request.pyi iot_api_client/model/model_property.py iot_api_client/model/model_property.pyi +iot_api_client/model/override.py +iot_api_client/model/override.pyi iot_api_client/model/properties_value.py iot_api_client/model/properties_value.pyi iot_api_client/model/properties_values.py @@ -238,6 +278,8 @@ iot_api_client/model/sharerequest.py iot_api_client/model/sharerequest.pyi iot_api_client/model/tag.py iot_api_client/model/tag.pyi +iot_api_client/model/thing_clone.py +iot_api_client/model/thing_clone.pyi iot_api_client/model/thing_create.py iot_api_client/model/thing_create.pyi iot_api_client/model/thing_sketch.py @@ -261,4 +303,18 @@ setup.py test-requirements.txt test/__init__.py test/test_models/__init__.py +test/test_models/test_arduino_dashboardv2template.py +test/test_models/test_arduino_devicev2_status_event.py +test/test_models/test_arduino_devicev2_status_event_collection.py +test/test_models/test_arduino_devicev2_status_events.py +test/test_models/test_arduino_templateproperty.py +test/test_models/test_arduino_templateproperty_collection.py +test/test_models/test_arduino_templatevariable.py +test/test_models/test_arduino_templatevariable_collection.py +test/test_models/test_arduino_thingtemplate.py +test/test_models/test_arduino_widgetv2template.py +test/test_models/test_arduino_widgetv2template_collection.py +test/test_models/test_clone.py +test/test_models/test_override.py +test/test_models/test_thing_clone.py tox.ini diff --git a/docs/apis/tags/DashboardsV2Api.md b/docs/apis/tags/DashboardsV2Api.md index 03afeb4..e5d8377 100644 --- a/docs/apis/tags/DashboardsV2Api.md +++ b/docs/apis/tags/DashboardsV2Api.md @@ -5,6 +5,7 @@ All URIs are relative to *https://api2.arduino.cc/iot* Method | HTTP request | Description ------------- | ------------- | ------------- +[**dashboards_v2_clone**](#dashboards_v2_clone) | **put** /v2/dashboards/{id}/clone | clone dashboards_v2 [**dashboards_v2_create**](#dashboards_v2_create) | **post** /v2/dashboards | create dashboards_v2 [**dashboards_v2_delete**](#dashboards_v2_delete) | **delete** /v2/dashboards/{id} | delete dashboards_v2 [**dashboards_v2_delete_share**](#dashboards_v2_delete_share) | **delete** /v2/dashboards/{id}/shares/{user_id} | deleteShare dashboards_v2 @@ -14,8 +15,254 @@ Method | HTTP request | Description [**dashboards_v2_request_access**](#dashboards_v2_request_access) | **put** /v2/dashboards/{id}/share_request | requestAccess dashboards_v2 [**dashboards_v2_share**](#dashboards_v2_share) | **put** /v2/dashboards/{id}/shares | share dashboards_v2 [**dashboards_v2_show**](#dashboards_v2_show) | **get** /v2/dashboards/{id} | show dashboards_v2 +[**dashboards_v2_template**](#dashboards_v2_template) | **get** /v2/dashboards/{id}/template | template dashboards_v2 [**dashboards_v2_update**](#dashboards_v2_update) | **put** /v2/dashboards/{id} | update dashboards_v2 +# **dashboards_v2_clone** + +> ArduinoDashboardv2 dashboards_v2_clone(idclone) + +clone dashboards_v2 + +Clone an existing dashboard + +### Example + +* OAuth Authentication (oauth2): +```python +import iot_api_client +from iot_api_client.apis.tags import dashboards_v2_api +from iot_api_client.model.clone import Clone +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_dashboardv2 import ArduinoDashboardv2 +from pprint import pprint +# Defining the host is optional and defaults to https://api2.arduino.cc/iot +# See configuration.py for a list of all supported configuration parameters. +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: oauth2 +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with iot_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dashboards_v2_api.DashboardsV2Api(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'id': "id_example", + } + header_params = { + } + body = Clone( + overrides=[ + Override( + new_thing_id="new_thing_id_example", + old_thing_id="old_thing_id_example", + ) + ], + ) + try: + # clone dashboards_v2 + api_response = api_instance.dashboards_v2_clone( + path_params=path_params, + header_params=header_params, + body=body, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling DashboardsV2Api->dashboards_v2_clone: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } + body = Clone( + overrides=[ + Override( + new_thing_id="new_thing_id_example", + old_thing_id="old_thing_id_example", + ) + ], + ) + try: + # clone dashboards_v2 + api_response = api_instance.dashboards_v2_clone( + path_params=path_params, + header_params=header_params, + body=body, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling DashboardsV2Api->dashboards_v2_clone: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXWwwFormUrlencoded] | required | +header_params | RequestHeaderParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.dashboardv2+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**Clone**](../../models/Clone.md) | | + + +# SchemaForRequestBodyApplicationXWwwFormUrlencoded +Type | Description | Notes +------------- | ------------- | ------------- +[**Clone**](../../models/Clone.md) | | + + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +id | IdSchema | | + +# IdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +201 | [ApiResponseFor201](#dashboards_v2_clone.ApiResponseFor201) | Created +400 | [ApiResponseFor400](#dashboards_v2_clone.ApiResponseFor400) | Bad Request +401 | [ApiResponseFor401](#dashboards_v2_clone.ApiResponseFor401) | Unauthorized +404 | [ApiResponseFor404](#dashboards_v2_clone.ApiResponseFor404) | Not Found +500 | [ApiResponseFor500](#dashboards_v2_clone.ApiResponseFor500) | Internal Server Error + +#### dashboards_v2_clone.ApiResponseFor201 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json, SchemaFor201ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoDashboardv2**](../../models/ArduinoDashboardv2.md) | | + + +# SchemaFor201ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoDashboardv2**](../../models/ArduinoDashboardv2.md) | | + + +#### dashboards_v2_clone.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json, SchemaFor400ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor400ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### dashboards_v2_clone.ApiResponseFor401 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json, SchemaFor401ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor401ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### dashboards_v2_clone.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### dashboards_v2_clone.ApiResponseFor500 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json, SchemaFor500ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor500ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +### Authorization + +[oauth2](../../../README.md#oauth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + # **dashboards_v2_create** > ArduinoDashboardv2 dashboards_v2_create(dashboardv2) @@ -1852,6 +2099,7 @@ Code | Class | Description n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned 200 | [ApiResponseFor200](#dashboards_v2_show.ApiResponseFor200) | OK 401 | [ApiResponseFor401](#dashboards_v2_show.ApiResponseFor401) | Unauthorized +403 | [ApiResponseFor403](#dashboards_v2_show.ApiResponseFor403) | Forbidden 404 | [ApiResponseFor404](#dashboards_v2_show.ApiResponseFor404) | Not Found 500 | [ApiResponseFor500](#dashboards_v2_show.ApiResponseFor500) | Internal Server Error @@ -1893,6 +2141,25 @@ Type | Description | Notes [**Error**](../../models/Error.md) | | +#### dashboards_v2_show.ApiResponseFor403 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json, SchemaFor403ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor403ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + #### dashboards_v2_show.ApiResponseFor404 Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- @@ -1919,6 +2186,216 @@ Type | Description | Notes [**Error**](../../models/Error.md) | | +### Authorization + +[oauth2](../../../README.md#oauth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **dashboards_v2_template** + +> ArduinoDashboardv2template dashboards_v2_template(id) + +template dashboards_v2 + +Get a template of the dashboard + +### Example + +* OAuth Authentication (oauth2): +```python +import iot_api_client +from iot_api_client.apis.tags import dashboards_v2_api +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_dashboardv2template import ArduinoDashboardv2template +from pprint import pprint +# Defining the host is optional and defaults to https://api2.arduino.cc/iot +# See configuration.py for a list of all supported configuration parameters. +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: oauth2 +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with iot_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = dashboards_v2_api.DashboardsV2Api(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'id': "id_example", + } + header_params = { + } + try: + # template dashboards_v2 + api_response = api_instance.dashboards_v2_template( + path_params=path_params, + header_params=header_params, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling DashboardsV2Api->dashboards_v2_template: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } + try: + # template dashboards_v2 + api_response = api_instance.dashboards_v2_template( + path_params=path_params, + header_params=header_params, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling DashboardsV2Api->dashboards_v2_template: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +header_params | RequestHeaderParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.dashboardv2template+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +id | IdSchema | | + +# IdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#dashboards_v2_template.ApiResponseFor200) | OK +400 | [ApiResponseFor400](#dashboards_v2_template.ApiResponseFor400) | Bad Request +401 | [ApiResponseFor401](#dashboards_v2_template.ApiResponseFor401) | Unauthorized +404 | [ApiResponseFor404](#dashboards_v2_template.ApiResponseFor404) | Not Found +500 | [ApiResponseFor500](#dashboards_v2_template.ApiResponseFor500) | Internal Server Error + +#### dashboards_v2_template.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson, SchemaFor200ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoDashboardv2template**](../../models/ArduinoDashboardv2template.md) | | + + +# SchemaFor200ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoDashboardv2template**](../../models/ArduinoDashboardv2template.md) | | + + +#### dashboards_v2_template.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson, SchemaFor400ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor400ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### dashboards_v2_template.ApiResponseFor401 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson, SchemaFor401ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor401ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### dashboards_v2_template.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### dashboards_v2_template.ApiResponseFor500 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson, SchemaFor500ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor500ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + ### Authorization [oauth2](../../../README.md#oauth2) diff --git a/docs/apis/tags/DevicesV2Api.md b/docs/apis/tags/DevicesV2Api.md index 6a21d9f..54fb44d 100644 --- a/docs/apis/tags/DevicesV2Api.md +++ b/docs/apis/tags/DevicesV2Api.md @@ -9,6 +9,7 @@ Method | HTTP request | Description [**devices_v2_delete**](#devices_v2_delete) | **delete** /v2/devices/{id} | delete devices_v2 [**devices_v2_get_events**](#devices_v2_get_events) | **get** /v2/devices/{id}/events | getEvents devices_v2 [**devices_v2_get_properties**](#devices_v2_get_properties) | **get** /v2/devices/{id}/properties | getProperties devices_v2 +[**devices_v2_get_status_events**](#devices_v2_get_status_events) | **get** /v2/devices/{id}/status | GetStatusEvents devices_v2 [**devices_v2_list**](#devices_v2_list) | **get** /v2/devices | list devices_v2 [**devices_v2_show**](#devices_v2_show) | **get** /v2/devices/{id} | show devices_v2 [**devices_v2_timeseries**](#devices_v2_timeseries) | **get** /v2/devices/{id}/properties/{pid} | timeseries devices_v2 @@ -831,6 +832,260 @@ Type | Description | Notes [**Error**](../../models/Error.md) | | +### Authorization + +[oauth2](../../../README.md#oauth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **devices_v2_get_status_events** + +> ArduinoDevicev2StatusEvents devices_v2_get_status_events(id) + +GetStatusEvents devices_v2 + +GET connection status events + +### Example + +* OAuth Authentication (oauth2): +```python +import iot_api_client +from iot_api_client.apis.tags import devices_v2_api +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_devicev2_status_events import ArduinoDevicev2StatusEvents +from pprint import pprint +# Defining the host is optional and defaults to https://api2.arduino.cc/iot +# See configuration.py for a list of all supported configuration parameters. +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: oauth2 +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with iot_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = devices_v2_api.DevicesV2Api(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'id': "id_example", + } + query_params = { + } + header_params = { + } + try: + # GetStatusEvents devices_v2 + api_response = api_instance.devices_v2_get_status_events( + path_params=path_params, + query_params=query_params, + header_params=header_params, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling DevicesV2Api->devices_v2_get_status_events: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + } + query_params = { + 'limit': 30, + 'start': "start_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } + try: + # GetStatusEvents devices_v2 + api_response = api_instance.devices_v2_get_status_events( + path_params=path_params, + query_params=query_params, + header_params=header_params, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling DevicesV2Api->devices_v2_get_status_events: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +query_params | RequestQueryParams | | +header_params | RequestHeaderParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.devicev2.status.events+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### query_params +#### RequestQueryParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +limit | LimitSchema | | optional +start | StartSchema | | optional + + +# LimitSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +decimal.Decimal, int, | decimal.Decimal, | | if omitted the server will use the default value of 30 + +# StartSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +id | IdSchema | | + +# IdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#devices_v2_get_status_events.ApiResponseFor200) | OK +400 | [ApiResponseFor400](#devices_v2_get_status_events.ApiResponseFor400) | Bad Request +401 | [ApiResponseFor401](#devices_v2_get_status_events.ApiResponseFor401) | Unauthorized +500 | [ApiResponseFor500](#devices_v2_get_status_events.ApiResponseFor500) | Internal Server Error +503 | [ApiResponseFor503](#devices_v2_get_status_events.ApiResponseFor503) | Service Unavailable + +#### devices_v2_get_status_events.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, SchemaFor200ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoDevicev2StatusEvents**](../../models/ArduinoDevicev2StatusEvents.md) | | + + +# SchemaFor200ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoDevicev2StatusEvents**](../../models/ArduinoDevicev2StatusEvents.md) | | + + +#### devices_v2_get_status_events.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, SchemaFor400ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor400ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### devices_v2_get_status_events.ApiResponseFor401 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, SchemaFor401ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor401ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### devices_v2_get_status_events.ApiResponseFor500 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, SchemaFor500ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor500ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### devices_v2_get_status_events.ApiResponseFor503 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, SchemaFor503ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor503ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + ### Authorization [oauth2](../../../README.md#oauth2) diff --git a/docs/apis/tags/PropertiesV2Api.md b/docs/apis/tags/PropertiesV2Api.md index bbafef6..2ce1593 100644 --- a/docs/apis/tags/PropertiesV2Api.md +++ b/docs/apis/tags/PropertiesV2Api.md @@ -56,13 +56,45 @@ with iot_api_client.ApiClient(configuration) as api_client: path_params = { 'id': "id_example", } + header_params = { + } + body = ModelProperty( + max_value=3.14, + min_value=3.14, + name="name_example", + permission="READ_ONLY", + persist=True, + tag=1, + type="ANALOG", + update_parameter=3.14, + update_strategy="ON_CHANGE", + variable_name="MqXzyCBw3_uufVPIPFhB9JcGRYnua", + ) + try: + # create properties_v2 + api_response = api_instance.properties_v2_create( + path_params=path_params, + header_params=header_params, + body=body, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling PropertiesV2Api->properties_v2_create: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } body = ModelProperty( max_value=3.14, min_value=3.14, name="name_example", permission="READ_ONLY", persist=True, - tag=3.14, + tag=1, type="ANALOG", update_parameter=3.14, update_strategy="ON_CHANGE", @@ -72,6 +104,7 @@ with iot_api_client.ApiClient(configuration) as api_client: # create properties_v2 api_response = api_instance.properties_v2_create( path_params=path_params, + header_params=header_params, body=body, ) pprint(api_response) @@ -83,6 +116,7 @@ with iot_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXWwwFormUrlencoded] | required | +header_params | RequestHeaderParams | | path_params | RequestPathParams | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.property+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client @@ -104,6 +138,20 @@ Type | Description | Notes [**ModelProperty**](../../models/ModelProperty.md) | | +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -282,11 +330,14 @@ with iot_api_client.ApiClient(configuration) as api_client: } query_params = { } + header_params = { + } try: # delete properties_v2 api_response = api_instance.properties_v2_delete( path_params=path_params, query_params=query_params, + header_params=header_params, ) except iot_api_client.ApiException as e: print("Exception when calling PropertiesV2Api->properties_v2_delete: %s\n" % e) @@ -299,11 +350,15 @@ with iot_api_client.ApiClient(configuration) as api_client: query_params = { 'force': False, } + header_params = { + 'X-Organization': "X-Organization_example", + } try: # delete properties_v2 api_response = api_instance.properties_v2_delete( path_params=path_params, query_params=query_params, + header_params=header_params, ) except iot_api_client.ApiException as e: print("Exception when calling PropertiesV2Api->properties_v2_delete: %s\n" % e) @@ -313,6 +368,7 @@ with iot_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | +header_params | RequestHeaderParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/vnd.goa.error+json', 'text/plain', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file @@ -334,6 +390,20 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | if omitted the server will use the default value of False +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -468,11 +538,14 @@ with iot_api_client.ApiClient(configuration) as api_client: } query_params = { } + header_params = { + } try: # list properties_v2 api_response = api_instance.properties_v2_list( path_params=path_params, query_params=query_params, + header_params=header_params, ) pprint(api_response) except iot_api_client.ApiException as e: @@ -485,11 +558,15 @@ with iot_api_client.ApiClient(configuration) as api_client: query_params = { 'show_deleted': False, } + header_params = { + 'X-Organization': "X-Organization_example", + } try: # list properties_v2 api_response = api_instance.properties_v2_list( path_params=path_params, query_params=query_params, + header_params=header_params, ) pprint(api_response) except iot_api_client.ApiException as e: @@ -500,6 +577,7 @@ with iot_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | +header_params | RequestHeaderParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.property+json; type=collection', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file @@ -521,6 +599,20 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | if omitted the server will use the default value of False +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -670,6 +762,30 @@ with iot_api_client.ApiClient(configuration) as api_client: 'id': "id_example", 'pid': "pid_example", } + header_params = { + } + body = PropertyValue( + device_id="device_id_example", + value=None, + ) + try: + # publish properties_v2 + api_response = api_instance.properties_v2_publish( + path_params=path_params, + header_params=header_params, + body=body, + ) + except iot_api_client.ApiException as e: + print("Exception when calling PropertiesV2Api->properties_v2_publish: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + 'pid': "pid_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } body = PropertyValue( device_id="device_id_example", value=None, @@ -678,6 +794,7 @@ with iot_api_client.ApiClient(configuration) as api_client: # publish properties_v2 api_response = api_instance.properties_v2_publish( path_params=path_params, + header_params=header_params, body=body, ) except iot_api_client.ApiException as e: @@ -688,6 +805,7 @@ with iot_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXWwwFormUrlencoded] | required | +header_params | RequestHeaderParams | | path_params | RequestPathParams | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body accept_content_types | typing.Tuple[str] | default is ('application/vnd.goa.error+json', 'text/plain', ) | Tells the server the content type(s) that are accepted by the client @@ -709,6 +827,20 @@ Type | Description | Notes [**PropertyValue**](../../models/PropertyValue.md) | | +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -864,11 +996,14 @@ with iot_api_client.ApiClient(configuration) as api_client: } query_params = { } + header_params = { + } try: # show properties_v2 api_response = api_instance.properties_v2_show( path_params=path_params, query_params=query_params, + header_params=header_params, ) pprint(api_response) except iot_api_client.ApiException as e: @@ -882,11 +1017,15 @@ with iot_api_client.ApiClient(configuration) as api_client: query_params = { 'show_deleted': False, } + header_params = { + 'X-Organization': "X-Organization_example", + } try: # show properties_v2 api_response = api_instance.properties_v2_show( path_params=path_params, query_params=query_params, + header_params=header_params, ) pprint(api_response) except iot_api_client.ApiException as e: @@ -897,6 +1036,7 @@ with iot_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | +header_params | RequestHeaderParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.property+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file @@ -918,6 +1058,20 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- bool, | BoolClass, | | if omitted the server will use the default value of False +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -1077,11 +1231,14 @@ with iot_api_client.ApiClient(configuration) as api_client: } query_params = { } + header_params = { + } try: # timeseries properties_v2 api_response = api_instance.properties_v2_timeseries( path_params=path_params, query_params=query_params, + header_params=header_params, ) pprint(api_response) except iot_api_client.ApiException as e: @@ -1093,16 +1250,21 @@ with iot_api_client.ApiClient(configuration) as api_client: 'pid': "pid_example", } query_params = { + 'aggregation': "AVG", 'desc': False, 'from': "from_example", 'interval': 1, 'to': "to_example", } + header_params = { + 'X-Organization': "X-Organization_example", + } try: # timeseries properties_v2 api_response = api_instance.properties_v2_timeseries( path_params=path_params, query_params=query_params, + header_params=header_params, ) pprint(api_response) except iot_api_client.ApiException as e: @@ -1113,6 +1275,7 @@ with iot_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- query_params | RequestQueryParams | | +header_params | RequestHeaderParams | | path_params | RequestPathParams | | accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.timeseriesmedia+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file @@ -1124,12 +1287,20 @@ skip_deserialization | bool | default is False | when True, headers and body wil Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- +aggregation | AggregationSchema | | optional desc | DescSchema | | optional from | ModelFromSchema | | optional interval | IntervalSchema | | optional to | ToSchema | | optional +# AggregationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | must be one of ["AVG", "MIN", "MAX", "SUM", "COUNT", "PCT_99", "PCT_95", "PCT_90", "PCT_75", "PCT_50", "PCT_15", "PCT_5", ] + # DescSchema ## Model Type Info @@ -1158,6 +1329,20 @@ Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- str, | str, | | +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams @@ -1312,13 +1497,15 @@ with iot_api_client.ApiClient(configuration) as api_client: 'id': "id_example", 'pid': "pid_example", } + header_params = { + } body = ModelProperty( max_value=3.14, min_value=3.14, name="name_example", permission="READ_ONLY", persist=True, - tag=3.14, + tag=1, type="ANALOG", update_parameter=3.14, update_strategy="ON_CHANGE", @@ -1328,6 +1515,38 @@ with iot_api_client.ApiClient(configuration) as api_client: # update properties_v2 api_response = api_instance.properties_v2_update( path_params=path_params, + header_params=header_params, + body=body, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling PropertiesV2Api->properties_v2_update: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + 'pid': "pid_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } + body = ModelProperty( + max_value=3.14, + min_value=3.14, + name="name_example", + permission="READ_ONLY", + persist=True, + tag=1, + type="ANALOG", + update_parameter=3.14, + update_strategy="ON_CHANGE", + variable_name="MqXzyCBw3_uufVPIPFhB9JcGRYnua", + ) + try: + # update properties_v2 + api_response = api_instance.properties_v2_update( + path_params=path_params, + header_params=header_params, body=body, ) pprint(api_response) @@ -1339,6 +1558,7 @@ with iot_api_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXWwwFormUrlencoded] | required | +header_params | RequestHeaderParams | | path_params | RequestPathParams | | content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.property+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client @@ -1360,6 +1580,20 @@ Type | Description | Notes [**ModelProperty**](../../models/ModelProperty.md) | | +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + ### path_params #### RequestPathParams diff --git a/docs/apis/tags/SeriesV2Api.md b/docs/apis/tags/SeriesV2Api.md index 1bfd224..d6924f3 100644 --- a/docs/apis/tags/SeriesV2Api.md +++ b/docs/apis/tags/SeriesV2Api.md @@ -16,7 +16,7 @@ Method | HTTP request | Description batch_query series_v2 -Returns the batch of time-series data +Returns the batch of time-series aggregated samples ### Example @@ -53,6 +53,7 @@ with iot_api_client.ApiClient(configuration) as api_client: body = BatchQueryRequestsMediaV1( requests=[ BatchQueryRequestMediaV1( + aggregation="AVG", _from="1970-01-01T00:00:00.00Z", interval=1, q="q_example", @@ -210,7 +211,7 @@ Type | Description | Notes batch_query_raw series_v2 -Returns the batch of time-series data raw +Returns the batch of time-series raw samples ### Example diff --git a/docs/apis/tags/ThingsV2Api.md b/docs/apis/tags/ThingsV2Api.md index 8ef55f7..013e591 100644 --- a/docs/apis/tags/ThingsV2Api.md +++ b/docs/apis/tags/ThingsV2Api.md @@ -5,15 +5,242 @@ All URIs are relative to *https://api2.arduino.cc/iot* Method | HTTP request | Description ------------- | ------------- | ------------- +[**things_v2_clone**](#things_v2_clone) | **put** /v2/things/{id}/clone | clone things_v2 [**things_v2_create**](#things_v2_create) | **put** /v2/things | create things_v2 [**things_v2_create_sketch**](#things_v2_create_sketch) | **put** /v2/things/{id}/sketch | createSketch things_v2 [**things_v2_delete**](#things_v2_delete) | **delete** /v2/things/{id} | delete things_v2 [**things_v2_delete_sketch**](#things_v2_delete_sketch) | **delete** /v2/things/{id}/sketch | deleteSketch things_v2 [**things_v2_list**](#things_v2_list) | **get** /v2/things | list things_v2 [**things_v2_show**](#things_v2_show) | **get** /v2/things/{id} | show things_v2 +[**things_v2_template**](#things_v2_template) | **get** /v2/things/{id}/template | template things_v2 [**things_v2_update**](#things_v2_update) | **post** /v2/things/{id} | update things_v2 [**things_v2_update_sketch**](#things_v2_update_sketch) | **put** /v2/things/{id}/sketch/{sketchId} | updateSketch things_v2 +# **things_v2_clone** + +> ArduinoThing things_v2_clone(idthing_clone) + +clone things_v2 + +Clone a given thing + +### Example + +* OAuth Authentication (oauth2): +```python +import iot_api_client +from iot_api_client.apis.tags import things_v2_api +from iot_api_client.model.thing_clone import ThingClone +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_thing import ArduinoThing +from pprint import pprint +# Defining the host is optional and defaults to https://api2.arduino.cc/iot +# See configuration.py for a list of all supported configuration parameters. +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: oauth2 +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with iot_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = things_v2_api.ThingsV2Api(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'id': "id_example", + } + header_params = { + } + body = ThingClone( + include_tags=True, + name="A", + ) + try: + # clone things_v2 + api_response = api_instance.things_v2_clone( + path_params=path_params, + header_params=header_params, + body=body, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling ThingsV2Api->things_v2_clone: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } + body = ThingClone( + include_tags=True, + name="A", + ) + try: + # clone things_v2 + api_response = api_instance.things_v2_clone( + path_params=path_params, + header_params=header_params, + body=body, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling ThingsV2Api->things_v2_clone: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +body | typing.Union[SchemaForRequestBodyApplicationJson, SchemaForRequestBodyApplicationXWwwFormUrlencoded] | required | +header_params | RequestHeaderParams | | +path_params | RequestPathParams | | +content_type | str | optional, default is 'application/json' | Selects the schema and serialization of the request body +accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.thing+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### body + +# SchemaForRequestBodyApplicationJson +Type | Description | Notes +------------- | ------------- | ------------- +[**ThingClone**](../../models/ThingClone.md) | | + + +# SchemaForRequestBodyApplicationXWwwFormUrlencoded +Type | Description | Notes +------------- | ------------- | ------------- +[**ThingClone**](../../models/ThingClone.md) | | + + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +id | IdSchema | | + +# IdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +201 | [ApiResponseFor201](#things_v2_clone.ApiResponseFor201) | OK +400 | [ApiResponseFor400](#things_v2_clone.ApiResponseFor400) | Bad Request +401 | [ApiResponseFor401](#things_v2_clone.ApiResponseFor401) | Unauthorized +404 | [ApiResponseFor404](#things_v2_clone.ApiResponseFor404) | Not Found +500 | [ApiResponseFor500](#things_v2_clone.ApiResponseFor500) | Internal Server Error + +#### things_v2_clone.ApiResponseFor201 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor201ResponseBodyApplicationVndArduinoThingjson, SchemaFor201ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor201ResponseBodyApplicationVndArduinoThingjson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoThing**](../../models/ArduinoThing.md) | | + + +# SchemaFor201ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoThing**](../../models/ArduinoThing.md) | | + + +#### things_v2_clone.ApiResponseFor400 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor400ResponseBodyApplicationVndArduinoThingjson, SchemaFor400ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor400ResponseBodyApplicationVndArduinoThingjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor400ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +#### things_v2_clone.ApiResponseFor401 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### things_v2_clone.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### things_v2_clone.ApiResponseFor500 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor500ResponseBodyApplicationVndArduinoThingjson, SchemaFor500ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor500ResponseBodyApplicationVndArduinoThingjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor500ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +### Authorization + +[oauth2](../../../README.md#oauth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + # **things_v2_create** > ArduinoThing things_v2_create(thing_create) @@ -69,13 +296,19 @@ with iot_api_client.ApiClient(configuration) as api_client: name="name_example", permission="READ_ONLY", persist=True, - tag=3.14, + tag=1, type="ANALOG", update_parameter=3.14, update_strategy="ON_CHANGE", variable_name="MqXzyCBw3_uufVPIPFhB9JcGRYnua", ) ], + tags=[ + Tag( + key="0", + value="0", + ) + ], timezone="America/New_York", webhook_active=True, webhook_uri="webhook_uri_example", @@ -109,13 +342,19 @@ with iot_api_client.ApiClient(configuration) as api_client: name="name_example", permission="READ_ONLY", persist=True, - tag=3.14, + tag=1, type="ANALOG", update_parameter=3.14, update_strategy="ON_CHANGE", variable_name="MqXzyCBw3_uufVPIPFhB9JcGRYnua", ) ], + tags=[ + Tag( + key="0", + value="0", + ) + ], timezone="America/New_York", webhook_active=True, webhook_uri="webhook_uri_example", @@ -1373,6 +1612,184 @@ Type | Description | Notes [**Error**](../../models/Error.md) | | +### Authorization + +[oauth2](../../../README.md#oauth2) + +[[Back to top]](#__pageTop) [[Back to API list]](../../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../../README.md#documentation-for-models) [[Back to README]](../../../README.md) + +# **things_v2_template** + +> ArduinoThingtemplate things_v2_template(id) + +template things_v2 + +Extract template from the given thing + +### Example + +* OAuth Authentication (oauth2): +```python +import iot_api_client +from iot_api_client.apis.tags import things_v2_api +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_thingtemplate import ArduinoThingtemplate +from pprint import pprint +# Defining the host is optional and defaults to https://api2.arduino.cc/iot +# See configuration.py for a list of all supported configuration parameters. +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure OAuth2 access token for authorization: oauth2 +configuration = iot_api_client.Configuration( + host = "https://api2.arduino.cc/iot", + access_token = 'YOUR_ACCESS_TOKEN' +) +# Enter a context with an instance of the API client +with iot_api_client.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = things_v2_api.ThingsV2Api(api_client) + + # example passing only required values which don't have defaults set + path_params = { + 'id': "id_example", + } + header_params = { + } + try: + # template things_v2 + api_response = api_instance.things_v2_template( + path_params=path_params, + header_params=header_params, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling ThingsV2Api->things_v2_template: %s\n" % e) + + # example passing only optional values + path_params = { + 'id': "id_example", + } + header_params = { + 'X-Organization': "X-Organization_example", + } + try: + # template things_v2 + api_response = api_instance.things_v2_template( + path_params=path_params, + header_params=header_params, + ) + pprint(api_response) + except iot_api_client.ApiException as e: + print("Exception when calling ThingsV2Api->things_v2_template: %s\n" % e) +``` +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +header_params | RequestHeaderParams | | +path_params | RequestPathParams | | +accept_content_types | typing.Tuple[str] | default is ('application/vnd.arduino.thingtemplate+json', 'application/vnd.goa.error+json', ) | Tells the server the content type(s) that are accepted by the client +stream | bool | default is False | if True then the response.content will be streamed and loaded from a file like object. When downloading a file, set this to True to force the code to deserialize the content to a FileSchema file +timeout | typing.Optional[typing.Union[int, typing.Tuple]] | default is None | the timeout used by the rest client +skip_deserialization | bool | default is False | when True, headers and body will be unset and an instance of api_client.ApiResponseWithoutDeserialization will be returned + +### header_params +#### RequestHeaderParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +X-Organization | XOrganizationSchema | | optional + +# XOrganizationSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### path_params +#### RequestPathParams + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +id | IdSchema | | + +# IdSchema + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +str, | str, | | + +### Return Types, Responses + +Code | Class | Description +------------- | ------------- | ------------- +n/a | api_client.ApiResponseWithoutDeserialization | When skip_deserialization is True this response is returned +200 | [ApiResponseFor200](#things_v2_template.ApiResponseFor200) | OK +401 | [ApiResponseFor401](#things_v2_template.ApiResponseFor401) | Unauthorized +404 | [ApiResponseFor404](#things_v2_template.ApiResponseFor404) | Not Found +500 | [ApiResponseFor500](#things_v2_template.ApiResponseFor500) | Internal Server Error + +#### things_v2_template.ApiResponseFor200 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson, SchemaFor200ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoThingtemplate**](../../models/ArduinoThingtemplate.md) | | + + +# SchemaFor200ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**ArduinoThingtemplate**](../../models/ArduinoThingtemplate.md) | | + + +#### things_v2_template.ApiResponseFor401 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### things_v2_template.ApiResponseFor404 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | Unset | body was not defined | +headers | Unset | headers were not defined | + +#### things_v2_template.ApiResponseFor500 +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- +response | urllib3.HTTPResponse | Raw response | +body | typing.Union[SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson, SchemaFor500ResponseBodyApplicationVndGoaErrorjson, ] | | +headers | Unset | headers were not defined | + +# SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + +# SchemaFor500ResponseBodyApplicationVndGoaErrorjson +Type | Description | Notes +------------- | ------------- | ------------- +[**Error**](../../models/Error.md) | | + + ### Authorization [oauth2](../../../README.md#oauth2) @@ -1437,7 +1854,7 @@ with iot_api_client.ApiClient(configuration) as api_client: name="name_example", permission="READ_ONLY", persist=True, - tag=3.14, + tag=1, type="ANALOG", update_parameter=3.14, update_strategy="ON_CHANGE", @@ -1481,7 +1898,7 @@ with iot_api_client.ApiClient(configuration) as api_client: name="name_example", permission="READ_ONLY", persist=True, - tag=3.14, + tag=1, type="ANALOG", update_parameter=3.14, update_strategy="ON_CHANGE", diff --git a/docs/models/ArduinoDashboardv2template.md b/docs/models/ArduinoDashboardv2template.md new file mode 100644 index 0000000..d22c783 --- /dev/null +++ b/docs/models/ArduinoDashboardv2template.md @@ -0,0 +1,18 @@ +# iot_api_client.model.arduino_dashboardv2template.ArduinoDashboardv2template + +ArduinoDashboardv2template media type (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoDashboardv2template media type (default view) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**name** | str, | str, | The friendly name of the dashboard | +**widgets** | [**ArduinoWidgetv2templateCollection**](ArduinoWidgetv2templateCollection.md) | [**ArduinoWidgetv2templateCollection**](ArduinoWidgetv2templateCollection.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoDevicev2.md b/docs/models/ArduinoDevicev2.md index 6d6a8f7..69ac49c 100644 --- a/docs/models/ArduinoDevicev2.md +++ b/docs/models/ArduinoDevicev2.md @@ -19,6 +19,7 @@ Key | Input Type | Accessed Type | Description | Notes **type** | str, | str, | The type of the device | **connection_type** | str, | str, | The type of the connections selected by the user when multiple connections are available | [optional] must be one of ["wifi", "eth", "wifiandsecret", "gsm", "nb", "lora", ] **created_at** | str, datetime, | str, | Creation date of the device | [optional] value must conform to RFC-3339 date-time +**device_status** | str, | str, | The connection status of the device | [optional] must be one of ["ONLINE", "OFFLINE", "UNKNOWN", ] **events** | [**ArduinoDevicev2SimplePropertiesCollection**](ArduinoDevicev2SimplePropertiesCollection.md) | [**ArduinoDevicev2SimplePropertiesCollection**](ArduinoDevicev2SimplePropertiesCollection.md) | | [optional] **fqbn** | str, | str, | The fully qualified board name | [optional] **last_activity_at** | str, datetime, | str, | Last activity date | [optional] value must conform to RFC-3339 date-time diff --git a/docs/models/ArduinoDevicev2StatusEvent.md b/docs/models/ArduinoDevicev2StatusEvent.md new file mode 100644 index 0000000..94969e3 --- /dev/null +++ b/docs/models/ArduinoDevicev2StatusEvent.md @@ -0,0 +1,18 @@ +# iot_api_client.model.arduino_devicev2_status_event.ArduinoDevicev2StatusEvent + +ArduinoDevicev2StatusEvent media type (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoDevicev2StatusEvent media type (default view) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**updated_at** | str, datetime, | str, | Update timestamp of the status event | value must conform to RFC-3339 date-time +**value** | str, | str, | The status event of the device | must be one of ["CONNECTED", "DISCONNECTED", ] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoDevicev2StatusEventCollection.md b/docs/models/ArduinoDevicev2StatusEventCollection.md new file mode 100644 index 0000000..64529d6 --- /dev/null +++ b/docs/models/ArduinoDevicev2StatusEventCollection.md @@ -0,0 +1,16 @@ +# iot_api_client.model.arduino_devicev2_status_event_collection.ArduinoDevicev2StatusEventCollection + +ArduinoDevicev2StatusEventCollection is the media type for an array of ArduinoDevicev2StatusEvent (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | ArduinoDevicev2StatusEventCollection is the media type for an array of ArduinoDevicev2StatusEvent (default view) | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ArduinoDevicev2StatusEvent**](ArduinoDevicev2StatusEvent.md) | [**ArduinoDevicev2StatusEvent**](ArduinoDevicev2StatusEvent.md) | [**ArduinoDevicev2StatusEvent**](ArduinoDevicev2StatusEvent.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoDevicev2StatusEvents.md b/docs/models/ArduinoDevicev2StatusEvents.md new file mode 100644 index 0000000..d7153a1 --- /dev/null +++ b/docs/models/ArduinoDevicev2StatusEvents.md @@ -0,0 +1,18 @@ +# iot_api_client.model.arduino_devicev2_status_events.ArduinoDevicev2StatusEvents + +ArduinoDevicev2StatusEvents media type (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoDevicev2StatusEvents media type (default view) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**id** | str, uuid.UUID, | str, | The id of the device | value must be a uuid +**events** | [**ArduinoDevicev2StatusEventCollection**](ArduinoDevicev2StatusEventCollection.md) | [**ArduinoDevicev2StatusEventCollection**](ArduinoDevicev2StatusEventCollection.md) | | +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoProperty.md b/docs/models/ArduinoProperty.md index fd84591..e41d338 100644 --- a/docs/models/ArduinoProperty.md +++ b/docs/models/ArduinoProperty.md @@ -25,7 +25,7 @@ Key | Input Type | Accessed Type | Description | Notes **min_value** | decimal.Decimal, int, float, | decimal.Decimal, | Minimum value of this property | [optional] value must be a 64 bit float **persist** | bool, | BoolClass, | If true, data will persist into a timeseries database | [optional] **sync_id** | str, uuid.UUID, | str, | The id of the sync pool | [optional] value must be a uuid -**tag** | decimal.Decimal, int, float, | decimal.Decimal, | The integer id of the property | [optional] value must be a 64 bit float +**tag** | decimal.Decimal, int, | decimal.Decimal, | The integer id of the property | [optional] value must be a 64 bit integer **thing_name** | str, | str, | The name of the associated thing | [optional] **update_parameter** | decimal.Decimal, int, float, | decimal.Decimal, | The update frequency in seconds, or the amount of the property has to change in order to trigger an update | [optional] value must be a 64 bit float **updated_at** | str, datetime, | str, | Update date of the property | [optional] value must conform to RFC-3339 date-time diff --git a/docs/models/ArduinoSeriesResponse.md b/docs/models/ArduinoSeriesResponse.md index a952882..c71e606 100644 --- a/docs/models/ArduinoSeriesResponse.md +++ b/docs/models/ArduinoSeriesResponse.md @@ -19,8 +19,9 @@ Key | Input Type | Accessed Type | Description | Notes **[values](#values)** | list, tuple, | tuple, | Values in Float | **interval** | decimal.Decimal, int, | decimal.Decimal, | Resolution in seconds | value must be a 64 bit integer **status** | str, | str, | Status of the response | +**aggregation** | str, | str, | Aggregation statistic function. For numeric values, AVG statistic is used by default. PCT_X compute the Xth approximate percentile (e.g. PCT_95 is the 95th approximate percentile). For boolean, BOOL_OR statistic is used as default. | [optional] must be one of ["AVG", "MIN", "MAX", "SUM", "COUNT", "PCT_99", "PCT_95", "PCT_90", "PCT_75", "PCT_50", "PCT_15", "PCT_5", "BOOL_OR", "BOOL_AND", ] **message** | str, | str, | If the response is different than 'ok' | [optional] if omitted the server will use the default value of "" -**series_limit** | decimal.Decimal, int, | decimal.Decimal, | Max of values | [optional] value must be a 64 bit integer +**series_limit** | decimal.Decimal, int, | decimal.Decimal, | Maximum number of values returned after data aggregation, if any | [optional] value must be a 64 bit integer **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] # times diff --git a/docs/models/ArduinoTemplateproperty.md b/docs/models/ArduinoTemplateproperty.md new file mode 100644 index 0000000..86c42cc --- /dev/null +++ b/docs/models/ArduinoTemplateproperty.md @@ -0,0 +1,22 @@ +# iot_api_client.model.arduino_templateproperty.ArduinoTemplateproperty + +ArduinoTemplateproperty media type (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoTemplateproperty media type (default view) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**update_strategy** | str, | str, | The update strategy for the property value | +**name** | str, | str, | The friendly name of the property | +**permission** | str, | str, | The permission of the property | +**type** | str, | str, | The type of the property | +**update_parameter** | decimal.Decimal, int, float, | decimal.Decimal, | The update frequency in seconds, or the amount of the property has to change in order to trigger an update | [optional] value must be a 64 bit float +**variable_name** | str, | str, | The sketch variable name of the property | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoTemplatepropertyCollection.md b/docs/models/ArduinoTemplatepropertyCollection.md new file mode 100644 index 0000000..0960506 --- /dev/null +++ b/docs/models/ArduinoTemplatepropertyCollection.md @@ -0,0 +1,16 @@ +# iot_api_client.model.arduino_templateproperty_collection.ArduinoTemplatepropertyCollection + +ArduinoTemplatepropertyCollection is the media type for an array of ArduinoTemplateproperty (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | ArduinoTemplatepropertyCollection is the media type for an array of ArduinoTemplateproperty (default view) | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ArduinoTemplateproperty**](ArduinoTemplateproperty.md) | [**ArduinoTemplateproperty**](ArduinoTemplateproperty.md) | [**ArduinoTemplateproperty**](ArduinoTemplateproperty.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoTemplatevariable.md b/docs/models/ArduinoTemplatevariable.md new file mode 100644 index 0000000..e7f14b8 --- /dev/null +++ b/docs/models/ArduinoTemplatevariable.md @@ -0,0 +1,22 @@ +# iot_api_client.model.arduino_templatevariable.ArduinoTemplatevariable + +ArduinoTemplatevariable media type (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoTemplatevariable media type (default view) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**variable_id** | str, | str, | The name of the variable in the code | +**thing_id** | str, | str, | The name of the related thing | +**name** | str, | str, | The name of the variable | +**permission** | str, | str, | The permission of the linked variable | +**type** | str, | str, | The type of the variable | +**thing_timezone** | [**ArduinoTimezone**](ArduinoTimezone.md) | [**ArduinoTimezone**](ArduinoTimezone.md) | | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoTemplatevariableCollection.md b/docs/models/ArduinoTemplatevariableCollection.md new file mode 100644 index 0000000..3f6beed --- /dev/null +++ b/docs/models/ArduinoTemplatevariableCollection.md @@ -0,0 +1,16 @@ +# iot_api_client.model.arduino_templatevariable_collection.ArduinoTemplatevariableCollection + +ArduinoTemplatevariableCollection is the media type for an array of ArduinoTemplatevariable (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | ArduinoTemplatevariableCollection is the media type for an array of ArduinoTemplatevariable (default view) | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ArduinoTemplatevariable**](ArduinoTemplatevariable.md) | [**ArduinoTemplatevariable**](ArduinoTemplatevariable.md) | [**ArduinoTemplatevariable**](ArduinoTemplatevariable.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoThingtemplate.md b/docs/models/ArduinoThingtemplate.md new file mode 100644 index 0000000..dbc5183 --- /dev/null +++ b/docs/models/ArduinoThingtemplate.md @@ -0,0 +1,36 @@ +# iot_api_client.model.arduino_thingtemplate.ArduinoThingtemplate + +ArduinoThingtemplate media type (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoThingtemplate media type (default view) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**timezone** | str, | str, | Time zone of the thing | +**name** | str, | str, | The friendly name of the thing | +**organization_id** | str, uuid.UUID, | str, | Id of the organization the thing belongs to | [optional] value must be a uuid +**properties** | [**ArduinoTemplatepropertyCollection**](ArduinoTemplatepropertyCollection.md) | [**ArduinoTemplatepropertyCollection**](ArduinoTemplatepropertyCollection.md) | | [optional] +**[tags](#tags)** | list, tuple, | tuple, | Tags of the thing | [optional] +**webhook_uri** | str, | str, | Webhook uri | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# tags + +Tags of the thing + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Tags of the thing | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**Tag**](Tag.md) | [**Tag**](Tag.md) | [**Tag**](Tag.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoTimezone.md b/docs/models/ArduinoTimezone.md index c5a0e27..5aa6548 100644 --- a/docs/models/ArduinoTimezone.md +++ b/docs/models/ArduinoTimezone.md @@ -12,7 +12,7 @@ Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- **offset** | decimal.Decimal, int, | decimal.Decimal, | Current UTC DST offset in seconds. | value must be a 64 bit integer **name** | str, | str, | Name of the time zone. | -**until** | str, datetime, | str, | Date until the offset is valid. | [optional] value must conform to RFC-3339 date-time +**until** | str, datetime, | str, | Date until the offset is valid. | value must conform to RFC-3339 date-time **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/models/ArduinoWidgetv2.md b/docs/models/ArduinoWidgetv2.md index 056b707..97af3fd 100644 --- a/docs/models/ArduinoWidgetv2.md +++ b/docs/models/ArduinoWidgetv2.md @@ -1,11 +1,11 @@ # iot_api_client.model.arduino_widgetv2.ArduinoWidgetv2 -Widget describes a dashboard widget (default view) +ArduinoWidgetv2 media type (default view) ## Model Type Info Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- -dict, frozendict.frozendict, | frozendict.frozendict, | Widget describes a dashboard widget (default view) | +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoWidgetv2 media type (default view) | ### Dictionary Keys Key | Input Type | Accessed Type | Description | Notes diff --git a/docs/models/ArduinoWidgetv2template.md b/docs/models/ArduinoWidgetv2template.md new file mode 100644 index 0000000..5e652c1 --- /dev/null +++ b/docs/models/ArduinoWidgetv2template.md @@ -0,0 +1,42 @@ +# iot_api_client.model.arduino_widgetv2template.ArduinoWidgetv2template + +ArduinoWidgetv2template media type (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | ArduinoWidgetv2template media type (default view) | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[options](#options)** | dict, frozendict.frozendict, | frozendict.frozendict, | Widget options | +**width** | decimal.Decimal, int, | decimal.Decimal, | Widget current width for desktop | value must be a 64 bit integer +**x** | decimal.Decimal, int, | decimal.Decimal, | Widget x position for desktop | value must be a 64 bit integer +**y** | decimal.Decimal, int, | decimal.Decimal, | Widget y position for desktop | value must be a 64 bit integer +**type** | str, | str, | The type of the widget | +**height** | decimal.Decimal, int, | decimal.Decimal, | Widget current height for desktop | value must be a 64 bit integer +**height_mobile** | decimal.Decimal, int, | decimal.Decimal, | Widget current height for mobile | [optional] value must be a 64 bit integer +**name** | str, | str, | The name of the widget | [optional] +**variables** | [**ArduinoTemplatevariableCollection**](ArduinoTemplatevariableCollection.md) | [**ArduinoTemplatevariableCollection**](ArduinoTemplatevariableCollection.md) | | [optional] +**width_mobile** | decimal.Decimal, int, | decimal.Decimal, | Widget current width for mobile | [optional] value must be a 64 bit integer +**x_mobile** | decimal.Decimal, int, | decimal.Decimal, | Widget x position for mobile | [optional] value must be a 64 bit integer +**y_mobile** | decimal.Decimal, int, | decimal.Decimal, | Widget y position for mobile | [optional] value must be a 64 bit integer +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# options + +Widget options + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Widget options | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, | frozendict.frozendict, str, decimal.Decimal, BoolClass, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ArduinoWidgetv2templateCollection.md b/docs/models/ArduinoWidgetv2templateCollection.md new file mode 100644 index 0000000..0708571 --- /dev/null +++ b/docs/models/ArduinoWidgetv2templateCollection.md @@ -0,0 +1,16 @@ +# iot_api_client.model.arduino_widgetv2template_collection.ArduinoWidgetv2templateCollection + +ArduinoWidgetv2templateCollection is the media type for an array of ArduinoWidgetv2template (default view) + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | ArduinoWidgetv2templateCollection is the media type for an array of ArduinoWidgetv2template (default view) | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**ArduinoWidgetv2template**](ArduinoWidgetv2template.md) | [**ArduinoWidgetv2template**](ArduinoWidgetv2template.md) | [**ArduinoWidgetv2template**](ArduinoWidgetv2template.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/BatchQueryRawRequestMediaV1.md b/docs/models/BatchQueryRawRequestMediaV1.md index 73ae70b..156c36b 100644 --- a/docs/models/BatchQueryRawRequestMediaV1.md +++ b/docs/models/BatchQueryRawRequestMediaV1.md @@ -8,7 +8,7 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | ### Dictionary Keys Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- -**q** | str, | str, | Query | +**q** | str, | str, | Data selection query (e.g. property.2a99729d-2556-4220-a139-023348a1e6b5) | **from** | str, datetime, | str, | From timestamp | [optional] value must conform to RFC-3339 date-time **series_limit** | decimal.Decimal, int, | decimal.Decimal, | Max of values | [optional] value must be a 64 bit integer **sort** | str, | str, | Sorting | [optional] must be one of ["ASC", "DESC", ] if omitted the server will use the default value of "DESC" diff --git a/docs/models/BatchQueryRequestMediaV1.md b/docs/models/BatchQueryRequestMediaV1.md index b6cdd3b..28f22e7 100644 --- a/docs/models/BatchQueryRequestMediaV1.md +++ b/docs/models/BatchQueryRequestMediaV1.md @@ -8,11 +8,12 @@ dict, frozendict.frozendict, | frozendict.frozendict, | | ### Dictionary Keys Key | Input Type | Accessed Type | Description | Notes ------------ | ------------- | ------------- | ------------- | ------------- -**q** | str, | str, | Query | +**q** | str, | str, | Data selection query (e.g. property.2a99729d-2556-4220-a139-023348a1e6b5) | **from** | str, datetime, | str, | From timestamp | value must conform to RFC-3339 date-time **to** | str, datetime, | str, | To timestamp | value must conform to RFC-3339 date-time -**interval** | decimal.Decimal, int, | decimal.Decimal, | Resolution in seconds | [optional] value must be a 64 bit integer -**series_limit** | decimal.Decimal, int, | decimal.Decimal, | Max of values | [optional] value must be a 64 bit integer +**aggregation** | str, | str, | Aggregation statistic function. For numeric values, AVG statistic is used by default. PCT_X compute the Xth approximate percentile (e.g. PCT_95 is the 95th approximate percentile). For boolean, BOOL_OR statistic is used as default. | [optional] must be one of ["AVG", "MIN", "MAX", "SUM", "COUNT", "PCT_99", "PCT_95", "PCT_90", "PCT_75", "PCT_50", "PCT_15", "PCT_5", "BOOL_OR", "BOOL_AND", ] +**interval** | decimal.Decimal, int, | decimal.Decimal, | Resolution in seconds (max allowed: 86400) | [optional] value must be a 64 bit integer +**series_limit** | decimal.Decimal, int, | decimal.Decimal, | Maximum number of values returned after data aggregation, if any (default: 300, limit: 1000) | [optional] value must be a 64 bit integer **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/docs/models/Clone.md b/docs/models/Clone.md new file mode 100644 index 0000000..8591564 --- /dev/null +++ b/docs/models/Clone.md @@ -0,0 +1,29 @@ +# iot_api_client.model.clone.Clone + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**[overrides](#overrides)** | list, tuple, | tuple, | The overrides to apply to the cloned dashboard. An override is a tuple of ids: the id of the thing to override and the id of the new thing to link | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +# overrides + +The overrides to apply to the cloned dashboard. An override is a tuple of ids: the id of the thing to override and the id of the new thing to link + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | The overrides to apply to the cloned dashboard. An override is a tuple of ids: the id of the thing to override and the id of the new thing to link | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**Override**](Override.md) | [**Override**](Override.md) | [**Override**](Override.md) | | + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ModelProperty.md b/docs/models/ModelProperty.md index 9bbbdda..67f7645 100644 --- a/docs/models/ModelProperty.md +++ b/docs/models/ModelProperty.md @@ -13,11 +13,11 @@ Key | Input Type | Accessed Type | Description | Notes **update_strategy** | str, | str, | The update strategy for the property value | must be one of ["ON_CHANGE", "TIMED", ] **name** | str, | str, | The friendly name of the property | **permission** | str, | str, | The permission of the property | must be one of ["READ_ONLY", "READ_WRITE", ] -**type** | str, | str, | The type of the property | must be one of ["ANALOG", "CHARSTRING", "FLOAT", "INT", "LENGHT_C", "LENGHT_I", "LENGHT_M", "PERCENTAGE", "STATUS", "TEMPERATURE_C", "TEMPERATURE_F", "METER", "KILOGRAM", "GRAM", "SECOND", "AMPERE", "KELVIN", "CANDELA", "MOLE", "HERTZ", "RADIAN", "STERADIAN", "NEWTON", "PASCAL", "JOULE", "WATT", "COULOMB", "VOLT", "FARAD", "OHM", "SIEMENS", "WEBER", "TESLA", "HENRY", "DEGREES_CELSIUS", "LUMEN", "LUX", "BECQUEREL", "GRAY", "SIEVERT", "KATAL", "SQUARE_METER", "CUBIC_METER", "LITER", "METER_PER_SECOND", "METER_PER_SQUARE_SECOND", "CUBIC_METER_PER_SECOND", "LITER_PER_SECOND", "WATT_PER_SQUARE_METER", "CANDELA_PER_SQUARE_METER", "BIT", "BIT_PER_SECOND", "DEGREES_LATITUDE", "DEGREES_LONGITUDE", "PH_VALUE", "DECIBEL", "DECIBEL_1W", "BEL", "COUNT", "RATIO_DIV", "RATIO_MOD", "PERCENTAGE_RELATIVE_HUMIDITY", "PERCENTAGE_BATTERY_LEVEL", "SECONDS_BATTERY_LEVEL", "EVENT_RATE_SECOND", "EVENT_RATE_MINUTE", "HEART_RATE", "HEART_BEATS", "SIEMENS_PER_METER", "LOCATION", "COLOR_HSB", "COLOR_RGB", "GENERIC_COMPLEX_PROPERTY", "HOME_COLORED_LIGHT", "HOME_DIMMED_LIGHT", "HOME_LIGHT", "HOME_CONTACT_SENSOR", "HOME_MOTION_SENSOR", "HOME_SMART_PLUG", "HOME_TEMPERATURE", "HOME_TEMPERATURE_C", "HOME_TEMPERATURE_F", "HOME_SWITCH", "HOME_TELEVISION", "ENERGY", "FORCE", "TEMPERATURE", "POWER", "ELECTRIC_CURRENT", "ELECTRIC_POTENTIAL", "ELECTRICAL_RESISTANCE", "CAPACITANCE", "TIME", "FREQUENCY", "DATA_RATE", "ACCELERATION", "AREA", "LENGTH", "VELOCITY", "MASS", "VOLUME", "FLOW_RATE", "ANGLE", "ILLUMINANCE", "LUMINOUS_FLUX", "LUMINANCE", "LUMINOUS_INTENSITY", "LOGARITHMIC_QUANTITY", "PRESSURE", "INFORMATION_CONTENT", "SCHEDULE", ] +**type** | str, | str, | The type of the property | must be one of ["ANALOG", "CHARSTRING", "FLOAT", "INT", "LENGHT_C", "LENGHT_I", "LENGHT_M", "PERCENTAGE", "STATUS", "TEMPERATURE_C", "TEMPERATURE_F", "METER", "KILOGRAM", "GRAM", "SECOND", "AMPERE", "KELVIN", "CANDELA", "MOLE", "HERTZ", "RADIAN", "STERADIAN", "NEWTON", "PASCAL", "JOULE", "WATT", "COULOMB", "VOLT", "FARAD", "OHM", "SIEMENS", "WEBER", "TESLA", "HENRY", "DEGREES_CELSIUS", "LUMEN", "LUX", "BECQUEREL", "GRAY", "SIEVERT", "KATAL", "SQUARE_METER", "CUBIC_METER", "LITER", "METER_PER_SECOND", "METER_PER_SQUARE_SECOND", "CUBIC_METER_PER_SECOND", "LITER_PER_SECOND", "WATT_PER_SQUARE_METER", "CANDELA_PER_SQUARE_METER", "BIT", "BIT_PER_SECOND", "DEGREES_LATITUDE", "DEGREES_LONGITUDE", "PH_VALUE", "DECIBEL", "DECIBEL_1W", "BEL", "COUNT", "RATIO_DIV", "RATIO_MOD", "PERCENTAGE_RELATIVE_HUMIDITY", "PERCENTAGE_BATTERY_LEVEL", "SECONDS_BATTERY_LEVEL", "EVENT_RATE_SECOND", "EVENT_RATE_MINUTE", "HEART_RATE", "HEART_BEATS", "SIEMENS_PER_METER", "LOCATION", "COLOR_HSB", "COLOR_RGB", "GENERIC_COMPLEX_PROPERTY", "HOME_COLORED_LIGHT", "HOME_DIMMED_LIGHT", "HOME_LIGHT", "HOME_CONTACT_SENSOR", "HOME_MOTION_SENSOR", "HOME_SMART_PLUG", "HOME_TEMPERATURE", "HOME_TEMPERATURE_C", "HOME_TEMPERATURE_F", "HOME_SWITCH", "HOME_TELEVISION", "GOOGLE_HOME_COLORED_LIGHT", "GOOGLE_HOME_DIMMED_LIGHT", "GOOGLE_HOME_LIGHT", "GOOGLE_HOME_CONTACT_SENSOR", "GOOGLE_HOME_MOTION_SENSOR", "GOOGLE_HOME_SMART_PLUG", "GOOGLE_HOME_TEMPERATURE", "GOOGLE_HOME_TEMPERATURE_C", "GOOGLE_HOME_TEMPERATURE_F", "GOOGLE_HOME_SWITCH", "SMART_HOME_COLORED_LIGHT", "SMART_HOME_DIMMED_LIGHT", "SMART_HOME_LIGHT", "SMART_HOME_CONTACT_SENSOR", "SMART_HOME_MOTION_SENSOR", "SMART_HOME_SMART_PLUG", "SMART_HOME_TEMPERATURE", "SMART_HOME_TEMPERATURE_C", "SMART_HOME_TEMPERATURE_F", "SMART_HOME_SWITCH", "SMART_HOME_TELEVISION", "ENERGY", "FORCE", "TEMPERATURE", "POWER", "ELECTRIC_CURRENT", "ELECTRIC_POTENTIAL", "ELECTRICAL_RESISTANCE", "CAPACITANCE", "TIME", "FREQUENCY", "DATA_RATE", "ACCELERATION", "AREA", "LENGTH", "VELOCITY", "MASS", "VOLUME", "FLOW_RATE", "ANGLE", "ILLUMINANCE", "LUMINOUS_FLUX", "LUMINANCE", "LUMINOUS_INTENSITY", "LOGARITHMIC_QUANTITY", "PRESSURE", "INFORMATION_CONTENT", "SCHEDULE", ] **max_value** | decimal.Decimal, int, float, | decimal.Decimal, | Maximum value of this property | [optional] value must be a 64 bit float **min_value** | decimal.Decimal, int, float, | decimal.Decimal, | Minimum value of this property | [optional] value must be a 64 bit float **persist** | bool, | BoolClass, | If true, data will persist into a timeseries database | [optional] if omitted the server will use the default value of True -**tag** | decimal.Decimal, int, float, | decimal.Decimal, | The integer id of the property | [optional] value must be a 64 bit float +**tag** | decimal.Decimal, int, | decimal.Decimal, | The integer id of the property | [optional] value must be a 64 bit integer **update_parameter** | decimal.Decimal, int, float, | decimal.Decimal, | The update frequency in seconds, or the amount of the property has to change in order to trigger an update | [optional] value must be a 64 bit float **variable_name** | str, | str, | The sketch variable name of the property | [optional] **any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] diff --git a/docs/models/Override.md b/docs/models/Override.md new file mode 100644 index 0000000..c3ec557 --- /dev/null +++ b/docs/models/Override.md @@ -0,0 +1,16 @@ +# iot_api_client.model.override.Override + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**old_thing_id** | str, uuid.UUID, | str, | The id of the thing to override | value must be a uuid +**new_thing_id** | str, uuid.UUID, | str, | The id of the new thing to link | value must be a uuid +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ThingClone.md b/docs/models/ThingClone.md new file mode 100644 index 0000000..bea001d --- /dev/null +++ b/docs/models/ThingClone.md @@ -0,0 +1,18 @@ +# iot_api_client.model.thing_clone.ThingClone + +Payload to clone a new thing from an existing one + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +dict, frozendict.frozendict, | frozendict.frozendict, | Payload to clone a new thing from an existing one | + +### Dictionary Keys +Key | Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- | ------------- +**name** | str, | str, | The friendly name of the thing | +**include_tags** | bool, | BoolClass, | Include tags in clone procedure | [optional] +**any_string_name** | dict, frozendict.frozendict, str, date, datetime, int, float, bool, decimal.Decimal, None, list, tuple, bytes, io.FileIO, io.BufferedReader | frozendict.frozendict, str, BoolClass, decimal.Decimal, NoneClass, tuple, bytes, FileIO | any string name can be used but the value must be the correct type | [optional] + +[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) + diff --git a/docs/models/ThingCreate.md b/docs/models/ThingCreate.md index f283090..1ab6030 100644 --- a/docs/models/ThingCreate.md +++ b/docs/models/ThingCreate.md @@ -14,6 +14,7 @@ Key | Input Type | Accessed Type | Description | Notes **id** | str, uuid.UUID, | str, | The id of the thing | [optional] value must be a uuid **name** | str, | str, | The friendly name of the thing | [optional] **[properties](#properties)** | list, tuple, | tuple, | The properties of the thing | [optional] +**[tags](#tags)** | list, tuple, | tuple, | Optional set of tags | [optional] **timezone** | str, | str, | A time zone name Check /v2/timezones for a list of valid names. | [optional] if omitted the server will use the default value of "America/New_York" **webhook_active** | bool, | BoolClass, | Webhook uri | [optional] **webhook_uri** | str, | str, | Webhook uri | [optional] @@ -33,5 +34,19 @@ Class Name | Input Type | Accessed Type | Description | Notes ------------- | ------------- | ------------- | ------------- | ------------- [**ModelProperty**](ModelProperty.md) | [**ModelProperty**](ModelProperty.md) | [**ModelProperty**](ModelProperty.md) | | +# tags + +Optional set of tags + +## Model Type Info +Input Type | Accessed Type | Description | Notes +------------ | ------------- | ------------- | ------------- +list, tuple, | tuple, | Optional set of tags | + +### Tuple Items +Class Name | Input Type | Accessed Type | Description | Notes +------------- | ------------- | ------------- | ------------- | ------------- +[**Tag**](Tag.md) | [**Tag**](Tag.md) | [**Tag**](Tag.md) | | + [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) diff --git a/iot_api_client/__init__.py b/iot_api_client/__init__.py index b346054..df36ebf 100644 --- a/iot_api_client/__init__.py +++ b/iot_api_client/__init__.py @@ -11,7 +11,7 @@ Generated by: https://openapi-generator.tech """ -__version__ = "2.0.0" +__version__ = "2.0.1" # import ApiClient from iot_api_client.api_client import ApiClient diff --git a/iot_api_client/apis/path_to_api.py b/iot_api_client/apis/path_to_api.py index 65407fb..73512c0 100644 --- a/iot_api_client/apis/path_to_api.py +++ b/iot_api_client/apis/path_to_api.py @@ -5,9 +5,11 @@ from iot_api_client.apis.paths.v1_lora_freq_plans_ import V1LoraFreqPlans from iot_api_client.apis.paths.v2_dashboards import V2Dashboards from iot_api_client.apis.paths.v2_dashboards_id import V2DashboardsId +from iot_api_client.apis.paths.v2_dashboards_id_clone import V2DashboardsIdClone from iot_api_client.apis.paths.v2_dashboards_id_share_request import V2DashboardsIdShareRequest from iot_api_client.apis.paths.v2_dashboards_id_shares import V2DashboardsIdShares from iot_api_client.apis.paths.v2_dashboards_id_shares_user_id import V2DashboardsIdSharesUserId +from iot_api_client.apis.paths.v2_dashboards_id_template import V2DashboardsIdTemplate from iot_api_client.apis.paths.v2_dashboards_id_widgets_widget_id_variables import V2DashboardsIdWidgetsWidgetIdVariables from iot_api_client.apis.paths.v2_devices import V2Devices from iot_api_client.apis.paths.v2_devices_id import V2DevicesId @@ -18,6 +20,7 @@ from iot_api_client.apis.paths.v2_devices_id_pass import V2DevicesIdPass from iot_api_client.apis.paths.v2_devices_id_properties import V2DevicesIdProperties from iot_api_client.apis.paths.v2_devices_id_properties_pid import V2DevicesIdPropertiesPid +from iot_api_client.apis.paths.v2_devices_id_status import V2DevicesIdStatus from iot_api_client.apis.paths.v2_devices_id_tags import V2DevicesIdTags from iot_api_client.apis.paths.v2_devices_id_tags_key import V2DevicesIdTagsKey from iot_api_client.apis.paths.v2_series_batch_query import V2SeriesBatchQuery @@ -26,6 +29,7 @@ from iot_api_client.apis.paths.v2_series_historic_data import V2SeriesHistoricData from iot_api_client.apis.paths.v2_things import V2Things from iot_api_client.apis.paths.v2_things_id import V2ThingsId +from iot_api_client.apis.paths.v2_things_id_clone import V2ThingsIdClone from iot_api_client.apis.paths.v2_things_id_properties import V2ThingsIdProperties from iot_api_client.apis.paths.v2_things_id_properties_pid import V2ThingsIdPropertiesPid from iot_api_client.apis.paths.v2_things_id_properties_pid_publish import V2ThingsIdPropertiesPidPublish @@ -34,6 +38,7 @@ from iot_api_client.apis.paths.v2_things_id_sketch_sketch_id import V2ThingsIdSketchSketchId from iot_api_client.apis.paths.v2_things_id_tags import V2ThingsIdTags from iot_api_client.apis.paths.v2_things_id_tags_key import V2ThingsIdTagsKey +from iot_api_client.apis.paths.v2_things_id_template import V2ThingsIdTemplate PathToApi = typing_extensions.TypedDict( 'PathToApi', @@ -42,9 +47,11 @@ PathValues.V1_LORAFREQPLANS_: V1LoraFreqPlans, PathValues.V2_DASHBOARDS: V2Dashboards, PathValues.V2_DASHBOARDS_ID: V2DashboardsId, + PathValues.V2_DASHBOARDS_ID_CLONE: V2DashboardsIdClone, PathValues.V2_DASHBOARDS_ID_SHARE_REQUEST: V2DashboardsIdShareRequest, PathValues.V2_DASHBOARDS_ID_SHARES: V2DashboardsIdShares, PathValues.V2_DASHBOARDS_ID_SHARES_USER_ID: V2DashboardsIdSharesUserId, + PathValues.V2_DASHBOARDS_ID_TEMPLATE: V2DashboardsIdTemplate, PathValues.V2_DASHBOARDS_ID_WIDGETS_WIDGET_ID_VARIABLES: V2DashboardsIdWidgetsWidgetIdVariables, PathValues.V2_DEVICES: V2Devices, PathValues.V2_DEVICES_ID: V2DevicesId, @@ -55,6 +62,7 @@ PathValues.V2_DEVICES_ID_PASS: V2DevicesIdPass, PathValues.V2_DEVICES_ID_PROPERTIES: V2DevicesIdProperties, PathValues.V2_DEVICES_ID_PROPERTIES_PID: V2DevicesIdPropertiesPid, + PathValues.V2_DEVICES_ID_STATUS: V2DevicesIdStatus, PathValues.V2_DEVICES_ID_TAGS: V2DevicesIdTags, PathValues.V2_DEVICES_ID_TAGS_KEY: V2DevicesIdTagsKey, PathValues.V2_SERIES_BATCH_QUERY: V2SeriesBatchQuery, @@ -63,6 +71,7 @@ PathValues.V2_SERIES_HISTORIC_DATA: V2SeriesHistoricData, PathValues.V2_THINGS: V2Things, PathValues.V2_THINGS_ID: V2ThingsId, + PathValues.V2_THINGS_ID_CLONE: V2ThingsIdClone, PathValues.V2_THINGS_ID_PROPERTIES: V2ThingsIdProperties, PathValues.V2_THINGS_ID_PROPERTIES_PID: V2ThingsIdPropertiesPid, PathValues.V2_THINGS_ID_PROPERTIES_PID_PUBLISH: V2ThingsIdPropertiesPidPublish, @@ -71,6 +80,7 @@ PathValues.V2_THINGS_ID_SKETCH_SKETCH_ID: V2ThingsIdSketchSketchId, PathValues.V2_THINGS_ID_TAGS: V2ThingsIdTags, PathValues.V2_THINGS_ID_TAGS_KEY: V2ThingsIdTagsKey, + PathValues.V2_THINGS_ID_TEMPLATE: V2ThingsIdTemplate, } ) @@ -80,9 +90,11 @@ PathValues.V1_LORAFREQPLANS_: V1LoraFreqPlans, PathValues.V2_DASHBOARDS: V2Dashboards, PathValues.V2_DASHBOARDS_ID: V2DashboardsId, + PathValues.V2_DASHBOARDS_ID_CLONE: V2DashboardsIdClone, PathValues.V2_DASHBOARDS_ID_SHARE_REQUEST: V2DashboardsIdShareRequest, PathValues.V2_DASHBOARDS_ID_SHARES: V2DashboardsIdShares, PathValues.V2_DASHBOARDS_ID_SHARES_USER_ID: V2DashboardsIdSharesUserId, + PathValues.V2_DASHBOARDS_ID_TEMPLATE: V2DashboardsIdTemplate, PathValues.V2_DASHBOARDS_ID_WIDGETS_WIDGET_ID_VARIABLES: V2DashboardsIdWidgetsWidgetIdVariables, PathValues.V2_DEVICES: V2Devices, PathValues.V2_DEVICES_ID: V2DevicesId, @@ -93,6 +105,7 @@ PathValues.V2_DEVICES_ID_PASS: V2DevicesIdPass, PathValues.V2_DEVICES_ID_PROPERTIES: V2DevicesIdProperties, PathValues.V2_DEVICES_ID_PROPERTIES_PID: V2DevicesIdPropertiesPid, + PathValues.V2_DEVICES_ID_STATUS: V2DevicesIdStatus, PathValues.V2_DEVICES_ID_TAGS: V2DevicesIdTags, PathValues.V2_DEVICES_ID_TAGS_KEY: V2DevicesIdTagsKey, PathValues.V2_SERIES_BATCH_QUERY: V2SeriesBatchQuery, @@ -101,6 +114,7 @@ PathValues.V2_SERIES_HISTORIC_DATA: V2SeriesHistoricData, PathValues.V2_THINGS: V2Things, PathValues.V2_THINGS_ID: V2ThingsId, + PathValues.V2_THINGS_ID_CLONE: V2ThingsIdClone, PathValues.V2_THINGS_ID_PROPERTIES: V2ThingsIdProperties, PathValues.V2_THINGS_ID_PROPERTIES_PID: V2ThingsIdPropertiesPid, PathValues.V2_THINGS_ID_PROPERTIES_PID_PUBLISH: V2ThingsIdPropertiesPidPublish, @@ -109,5 +123,6 @@ PathValues.V2_THINGS_ID_SKETCH_SKETCH_ID: V2ThingsIdSketchSketchId, PathValues.V2_THINGS_ID_TAGS: V2ThingsIdTags, PathValues.V2_THINGS_ID_TAGS_KEY: V2ThingsIdTagsKey, + PathValues.V2_THINGS_ID_TEMPLATE: V2ThingsIdTemplate, } ) diff --git a/iot_api_client/apis/paths/v2_dashboards_id_clone.py b/iot_api_client/apis/paths/v2_dashboards_id_clone.py new file mode 100644 index 0000000..5625596 --- /dev/null +++ b/iot_api_client/apis/paths/v2_dashboards_id_clone.py @@ -0,0 +1,7 @@ +from iot_api_client.paths.v2_dashboards_id_clone.put import ApiForput + + +class V2DashboardsIdClone( + ApiForput, +): + pass diff --git a/iot_api_client/apis/paths/v2_dashboards_id_template.py b/iot_api_client/apis/paths/v2_dashboards_id_template.py new file mode 100644 index 0000000..98bd282 --- /dev/null +++ b/iot_api_client/apis/paths/v2_dashboards_id_template.py @@ -0,0 +1,7 @@ +from iot_api_client.paths.v2_dashboards_id_template.get import ApiForget + + +class V2DashboardsIdTemplate( + ApiForget, +): + pass diff --git a/iot_api_client/apis/paths/v2_devices_id_status.py b/iot_api_client/apis/paths/v2_devices_id_status.py new file mode 100644 index 0000000..f79767f --- /dev/null +++ b/iot_api_client/apis/paths/v2_devices_id_status.py @@ -0,0 +1,7 @@ +from iot_api_client.paths.v2_devices_id_status.get import ApiForget + + +class V2DevicesIdStatus( + ApiForget, +): + pass diff --git a/iot_api_client/apis/paths/v2_things_id_clone.py b/iot_api_client/apis/paths/v2_things_id_clone.py new file mode 100644 index 0000000..9c44f23 --- /dev/null +++ b/iot_api_client/apis/paths/v2_things_id_clone.py @@ -0,0 +1,7 @@ +from iot_api_client.paths.v2_things_id_clone.put import ApiForput + + +class V2ThingsIdClone( + ApiForput, +): + pass diff --git a/iot_api_client/apis/paths/v2_things_id_template.py b/iot_api_client/apis/paths/v2_things_id_template.py new file mode 100644 index 0000000..f32797a --- /dev/null +++ b/iot_api_client/apis/paths/v2_things_id_template.py @@ -0,0 +1,7 @@ +from iot_api_client.paths.v2_things_id_template.get import ApiForget + + +class V2ThingsIdTemplate( + ApiForget, +): + pass diff --git a/iot_api_client/apis/tags/dashboards_v2_api.py b/iot_api_client/apis/tags/dashboards_v2_api.py index 6059764..845ca63 100644 --- a/iot_api_client/apis/tags/dashboards_v2_api.py +++ b/iot_api_client/apis/tags/dashboards_v2_api.py @@ -9,6 +9,7 @@ Generated by: https://openapi-generator.tech """ +from iot_api_client.paths.v2_dashboards_id_clone.put import DashboardsV2Clone from iot_api_client.paths.v2_dashboards.post import DashboardsV2Create from iot_api_client.paths.v2_dashboards_id.delete import DashboardsV2Delete from iot_api_client.paths.v2_dashboards_id_shares_user_id.delete import DashboardsV2DeleteShare @@ -18,10 +19,12 @@ from iot_api_client.paths.v2_dashboards_id_share_request.put import DashboardsV2RequestAccess from iot_api_client.paths.v2_dashboards_id_shares.put import DashboardsV2Share from iot_api_client.paths.v2_dashboards_id.get import DashboardsV2Show +from iot_api_client.paths.v2_dashboards_id_template.get import DashboardsV2Template from iot_api_client.paths.v2_dashboards_id.put import DashboardsV2Update class DashboardsV2Api( + DashboardsV2Clone, DashboardsV2Create, DashboardsV2Delete, DashboardsV2DeleteShare, @@ -31,6 +34,7 @@ class DashboardsV2Api( DashboardsV2RequestAccess, DashboardsV2Share, DashboardsV2Show, + DashboardsV2Template, DashboardsV2Update, ): """NOTE: This class is auto generated by OpenAPI Generator diff --git a/iot_api_client/apis/tags/devices_v2_api.py b/iot_api_client/apis/tags/devices_v2_api.py index a96dbaa..839d724 100644 --- a/iot_api_client/apis/tags/devices_v2_api.py +++ b/iot_api_client/apis/tags/devices_v2_api.py @@ -13,6 +13,7 @@ from iot_api_client.paths.v2_devices_id.delete import DevicesV2Delete from iot_api_client.paths.v2_devices_id_events.get import DevicesV2GetEvents from iot_api_client.paths.v2_devices_id_properties.get import DevicesV2GetProperties +from iot_api_client.paths.v2_devices_id_status.get import DevicesV2GetStatusEvents from iot_api_client.paths.v2_devices.get import DevicesV2List from iot_api_client.paths.v2_devices_id.get import DevicesV2Show from iot_api_client.paths.v2_devices_id_properties_pid.get import DevicesV2Timeseries @@ -25,6 +26,7 @@ class DevicesV2Api( DevicesV2Delete, DevicesV2GetEvents, DevicesV2GetProperties, + DevicesV2GetStatusEvents, DevicesV2List, DevicesV2Show, DevicesV2Timeseries, diff --git a/iot_api_client/apis/tags/things_v2_api.py b/iot_api_client/apis/tags/things_v2_api.py index b0fff45..d2a6b40 100644 --- a/iot_api_client/apis/tags/things_v2_api.py +++ b/iot_api_client/apis/tags/things_v2_api.py @@ -9,23 +9,27 @@ Generated by: https://openapi-generator.tech """ +from iot_api_client.paths.v2_things_id_clone.put import ThingsV2Clone from iot_api_client.paths.v2_things.put import ThingsV2Create from iot_api_client.paths.v2_things_id_sketch.put import ThingsV2CreateSketch from iot_api_client.paths.v2_things_id.delete import ThingsV2Delete from iot_api_client.paths.v2_things_id_sketch.delete import ThingsV2DeleteSketch from iot_api_client.paths.v2_things.get import ThingsV2List from iot_api_client.paths.v2_things_id.get import ThingsV2Show +from iot_api_client.paths.v2_things_id_template.get import ThingsV2Template from iot_api_client.paths.v2_things_id.post import ThingsV2Update from iot_api_client.paths.v2_things_id_sketch_sketch_id.put import ThingsV2UpdateSketch class ThingsV2Api( + ThingsV2Clone, ThingsV2Create, ThingsV2CreateSketch, ThingsV2Delete, ThingsV2DeleteSketch, ThingsV2List, ThingsV2Show, + ThingsV2Template, ThingsV2Update, ThingsV2UpdateSketch, ): diff --git a/iot_api_client/configuration.py b/iot_api_client/configuration.py index d68837e..bb66df8 100644 --- a/iot_api_client/configuration.py +++ b/iot_api_client/configuration.py @@ -368,7 +368,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 2.0\n"\ - "SDK Package Version: 2.0.0".\ + "SDK Package Version: 2.0.1".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/iot_api_client/model/arduino_dashboardv2template.py b/iot_api_client/model/arduino_dashboardv2template.py new file mode 100644 index 0000000..8a475f9 --- /dev/null +++ b/iot_api_client/model/arduino_dashboardv2template.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDashboardv2template( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDashboardv2template media type (default view) + """ + + + class MetaOapg: + required = { + "name", + } + + class properties: + name = schemas.StrSchema + + @staticmethod + def widgets() -> typing.Type['ArduinoWidgetv2templateCollection']: + return ArduinoWidgetv2templateCollection + __annotations__ = { + "name": name, + "widgets": widgets, + } + + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["widgets"]) -> 'ArduinoWidgetv2templateCollection': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "widgets", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["widgets"]) -> typing.Union['ArduinoWidgetv2templateCollection', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "widgets", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, ], + widgets: typing.Union['ArduinoWidgetv2templateCollection', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoDashboardv2template': + return super().__new__( + cls, + *_args, + name=name, + widgets=widgets, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_widgetv2template_collection import ArduinoWidgetv2templateCollection diff --git a/iot_api_client/model/arduino_dashboardv2template.pyi b/iot_api_client/model/arduino_dashboardv2template.pyi new file mode 100644 index 0000000..8a475f9 --- /dev/null +++ b/iot_api_client/model/arduino_dashboardv2template.pyi @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDashboardv2template( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDashboardv2template media type (default view) + """ + + + class MetaOapg: + required = { + "name", + } + + class properties: + name = schemas.StrSchema + + @staticmethod + def widgets() -> typing.Type['ArduinoWidgetv2templateCollection']: + return ArduinoWidgetv2templateCollection + __annotations__ = { + "name": name, + "widgets": widgets, + } + + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["widgets"]) -> 'ArduinoWidgetv2templateCollection': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "widgets", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["widgets"]) -> typing.Union['ArduinoWidgetv2templateCollection', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "widgets", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, ], + widgets: typing.Union['ArduinoWidgetv2templateCollection', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoDashboardv2template': + return super().__new__( + cls, + *_args, + name=name, + widgets=widgets, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_widgetv2template_collection import ArduinoWidgetv2templateCollection diff --git a/iot_api_client/model/arduino_devicev2.py b/iot_api_client/model/arduino_devicev2.py index 2cf4c9d..afcb304 100644 --- a/iot_api_client/model/arduino_devicev2.py +++ b/iot_api_client/model/arduino_devicev2.py @@ -96,6 +96,32 @@ def NB(cls): def LORA(cls): return cls("lora") created_at = schemas.DateTimeSchema + + + class device_status( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "ONLINE": "ONLINE", + "OFFLINE": "OFFLINE", + "UNKNOWN": "UNKNOWN", + } + + @schemas.classproperty + def ONLINE(cls): + return cls("ONLINE") + + @schemas.classproperty + def OFFLINE(cls): + return cls("OFFLINE") + + @schemas.classproperty + def UNKNOWN(cls): + return cls("UNKNOWN") @staticmethod def events() -> typing.Type['ArduinoDevicev2SimplePropertiesCollection']: @@ -185,6 +211,7 @@ def webhooks() -> typing.Type['ArduinoDevicev2WebhookCollection']: "user_id": user_id, "connection_type": connection_type, "created_at": created_at, + "device_status": device_status, "events": events, "fqbn": fqbn, "last_activity_at": last_activity_at, @@ -236,6 +263,9 @@ def __getitem__(self, name: typing_extensions.Literal["connection_type"]) -> Met @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["device_status"]) -> MetaOapg.properties.device_status: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["events"]) -> 'ArduinoDevicev2SimplePropertiesCollection': ... @@ -281,7 +311,7 @@ def __getitem__(self, name: typing_extensions.Literal["wifi_fw_version"]) -> Met @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "device_status", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -313,6 +343,9 @@ def get_item_oapg(self, name: typing_extensions.Literal["connection_type"]) -> t @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> typing.Union[MetaOapg.properties.created_at, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["device_status"]) -> typing.Union[MetaOapg.properties.device_status, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["events"]) -> typing.Union['ArduinoDevicev2SimplePropertiesCollection', schemas.Unset]: ... @@ -358,7 +391,7 @@ def get_item_oapg(self, name: typing_extensions.Literal["wifi_fw_version"]) -> t @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "device_status", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): return super().get_item_oapg(name) @@ -374,6 +407,7 @@ def __new__( type: typing.Union[MetaOapg.properties.type, str, ], connection_type: typing.Union[MetaOapg.properties.connection_type, str, schemas.Unset] = schemas.unset, created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, schemas.Unset] = schemas.unset, + device_status: typing.Union[MetaOapg.properties.device_status, str, schemas.Unset] = schemas.unset, events: typing.Union['ArduinoDevicev2SimplePropertiesCollection', schemas.Unset] = schemas.unset, fqbn: typing.Union[MetaOapg.properties.fqbn, str, schemas.Unset] = schemas.unset, last_activity_at: typing.Union[MetaOapg.properties.last_activity_at, str, datetime, schemas.Unset] = schemas.unset, @@ -403,6 +437,7 @@ def __new__( type=type, connection_type=connection_type, created_at=created_at, + device_status=device_status, events=events, fqbn=fqbn, last_activity_at=last_activity_at, diff --git a/iot_api_client/model/arduino_devicev2.pyi b/iot_api_client/model/arduino_devicev2.pyi index 0b72c51..3b1f983 100644 --- a/iot_api_client/model/arduino_devicev2.pyi +++ b/iot_api_client/model/arduino_devicev2.pyi @@ -85,6 +85,24 @@ class ArduinoDevicev2( def LORA(cls): return cls("lora") created_at = schemas.DateTimeSchema + + + class device_status( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def ONLINE(cls): + return cls("ONLINE") + + @schemas.classproperty + def OFFLINE(cls): + return cls("OFFLINE") + + @schemas.classproperty + def UNKNOWN(cls): + return cls("UNKNOWN") @staticmethod def events() -> typing.Type['ArduinoDevicev2SimplePropertiesCollection']: @@ -174,6 +192,7 @@ class ArduinoDevicev2( "user_id": user_id, "connection_type": connection_type, "created_at": created_at, + "device_status": device_status, "events": events, "fqbn": fqbn, "last_activity_at": last_activity_at, @@ -225,6 +244,9 @@ class ArduinoDevicev2( @typing.overload def __getitem__(self, name: typing_extensions.Literal["created_at"]) -> MetaOapg.properties.created_at: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["device_status"]) -> MetaOapg.properties.device_status: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["events"]) -> 'ArduinoDevicev2SimplePropertiesCollection': ... @@ -270,7 +292,7 @@ class ArduinoDevicev2( @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "device_status", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -302,6 +324,9 @@ class ArduinoDevicev2( @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["created_at"]) -> typing.Union[MetaOapg.properties.created_at, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["device_status"]) -> typing.Union[MetaOapg.properties.device_status, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["events"]) -> typing.Union['ArduinoDevicev2SimplePropertiesCollection', schemas.Unset]: ... @@ -347,7 +372,7 @@ class ArduinoDevicev2( @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["href", "id", "label", "name", "serial", "type", "user_id", "connection_type", "created_at", "device_status", "events", "fqbn", "last_activity_at", "latest_wifi_fw_version", "metadata", "no_sketch", "organization_id", "ota_available", "ota_compatible", "required_wifi_fw_version", "tags", "thing", "webhooks", "wifi_fw_version", ], str]): return super().get_item_oapg(name) @@ -363,6 +388,7 @@ class ArduinoDevicev2( type: typing.Union[MetaOapg.properties.type, str, ], connection_type: typing.Union[MetaOapg.properties.connection_type, str, schemas.Unset] = schemas.unset, created_at: typing.Union[MetaOapg.properties.created_at, str, datetime, schemas.Unset] = schemas.unset, + device_status: typing.Union[MetaOapg.properties.device_status, str, schemas.Unset] = schemas.unset, events: typing.Union['ArduinoDevicev2SimplePropertiesCollection', schemas.Unset] = schemas.unset, fqbn: typing.Union[MetaOapg.properties.fqbn, str, schemas.Unset] = schemas.unset, last_activity_at: typing.Union[MetaOapg.properties.last_activity_at, str, datetime, schemas.Unset] = schemas.unset, @@ -392,6 +418,7 @@ class ArduinoDevicev2( type=type, connection_type=connection_type, created_at=created_at, + device_status=device_status, events=events, fqbn=fqbn, last_activity_at=last_activity_at, diff --git a/iot_api_client/model/arduino_devicev2_status_event.py b/iot_api_client/model/arduino_devicev2_status_event.py new file mode 100644 index 0000000..f39e0f7 --- /dev/null +++ b/iot_api_client/model/arduino_devicev2_status_event.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDevicev2StatusEvent( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDevicev2StatusEvent media type (default view) + """ + + + class MetaOapg: + required = { + "updated_at", + "value", + } + + class properties: + updated_at = schemas.DateTimeSchema + + + class value( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "CONNECTED": "CONNECTED", + "DISCONNECTED": "DISCONNECTED", + } + + @schemas.classproperty + def CONNECTED(cls): + return cls("CONNECTED") + + @schemas.classproperty + def DISCONNECTED(cls): + return cls("DISCONNECTED") + __annotations__ = { + "updated_at": updated_at, + "value": value, + } + + updated_at: MetaOapg.properties.updated_at + value: MetaOapg.properties.value + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updated_at"]) -> MetaOapg.properties.updated_at: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["updated_at", "value", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updated_at"]) -> MetaOapg.properties.updated_at: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["updated_at", "value", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + updated_at: typing.Union[MetaOapg.properties.updated_at, str, datetime, ], + value: typing.Union[MetaOapg.properties.value, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoDevicev2StatusEvent': + return super().__new__( + cls, + *_args, + updated_at=updated_at, + value=value, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/arduino_devicev2_status_event.pyi b/iot_api_client/model/arduino_devicev2_status_event.pyi new file mode 100644 index 0000000..99eb165 --- /dev/null +++ b/iot_api_client/model/arduino_devicev2_status_event.pyi @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDevicev2StatusEvent( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDevicev2StatusEvent media type (default view) + """ + + + class MetaOapg: + required = { + "updated_at", + "value", + } + + class properties: + updated_at = schemas.DateTimeSchema + + + class value( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def CONNECTED(cls): + return cls("CONNECTED") + + @schemas.classproperty + def DISCONNECTED(cls): + return cls("DISCONNECTED") + __annotations__ = { + "updated_at": updated_at, + "value": value, + } + + updated_at: MetaOapg.properties.updated_at + value: MetaOapg.properties.value + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["updated_at"]) -> MetaOapg.properties.updated_at: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["updated_at", "value", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["updated_at"]) -> MetaOapg.properties.updated_at: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["value"]) -> MetaOapg.properties.value: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["updated_at", "value", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + updated_at: typing.Union[MetaOapg.properties.updated_at, str, datetime, ], + value: typing.Union[MetaOapg.properties.value, str, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoDevicev2StatusEvent': + return super().__new__( + cls, + *_args, + updated_at=updated_at, + value=value, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/arduino_devicev2_status_event_collection.py b/iot_api_client/model/arduino_devicev2_status_event_collection.py new file mode 100644 index 0000000..8e7a972 --- /dev/null +++ b/iot_api_client/model/arduino_devicev2_status_event_collection.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDevicev2StatusEventCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDevicev2StatusEventCollection is the media type for an array of ArduinoDevicev2StatusEvent (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoDevicev2StatusEvent']: + return ArduinoDevicev2StatusEvent + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoDevicev2StatusEvent'], typing.List['ArduinoDevicev2StatusEvent']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoDevicev2StatusEventCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoDevicev2StatusEvent': + return super().__getitem__(i) + +from iot_api_client.model.arduino_devicev2_status_event import ArduinoDevicev2StatusEvent diff --git a/iot_api_client/model/arduino_devicev2_status_event_collection.pyi b/iot_api_client/model/arduino_devicev2_status_event_collection.pyi new file mode 100644 index 0000000..8e7a972 --- /dev/null +++ b/iot_api_client/model/arduino_devicev2_status_event_collection.pyi @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDevicev2StatusEventCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDevicev2StatusEventCollection is the media type for an array of ArduinoDevicev2StatusEvent (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoDevicev2StatusEvent']: + return ArduinoDevicev2StatusEvent + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoDevicev2StatusEvent'], typing.List['ArduinoDevicev2StatusEvent']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoDevicev2StatusEventCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoDevicev2StatusEvent': + return super().__getitem__(i) + +from iot_api_client.model.arduino_devicev2_status_event import ArduinoDevicev2StatusEvent diff --git a/iot_api_client/model/arduino_devicev2_status_events.py b/iot_api_client/model/arduino_devicev2_status_events.py new file mode 100644 index 0000000..b1191d4 --- /dev/null +++ b/iot_api_client/model/arduino_devicev2_status_events.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDevicev2StatusEvents( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDevicev2StatusEvents media type (default view) + """ + + + class MetaOapg: + required = { + "id", + "events", + } + + class properties: + + @staticmethod + def events() -> typing.Type['ArduinoDevicev2StatusEventCollection']: + return ArduinoDevicev2StatusEventCollection + id = schemas.UUIDSchema + __annotations__ = { + "events": events, + "id": id, + } + + id: MetaOapg.properties.id + events: 'ArduinoDevicev2StatusEventCollection' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["events"]) -> 'ArduinoDevicev2StatusEventCollection': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["events", "id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["events"]) -> 'ArduinoDevicev2StatusEventCollection': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["events", "id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ], + events: 'ArduinoDevicev2StatusEventCollection', + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoDevicev2StatusEvents': + return super().__new__( + cls, + *_args, + id=id, + events=events, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_devicev2_status_event_collection import ArduinoDevicev2StatusEventCollection diff --git a/iot_api_client/model/arduino_devicev2_status_events.pyi b/iot_api_client/model/arduino_devicev2_status_events.pyi new file mode 100644 index 0000000..b1191d4 --- /dev/null +++ b/iot_api_client/model/arduino_devicev2_status_events.pyi @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoDevicev2StatusEvents( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoDevicev2StatusEvents media type (default view) + """ + + + class MetaOapg: + required = { + "id", + "events", + } + + class properties: + + @staticmethod + def events() -> typing.Type['ArduinoDevicev2StatusEventCollection']: + return ArduinoDevicev2StatusEventCollection + id = schemas.UUIDSchema + __annotations__ = { + "events": events, + "id": id, + } + + id: MetaOapg.properties.id + events: 'ArduinoDevicev2StatusEventCollection' + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["events"]) -> 'ArduinoDevicev2StatusEventCollection': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["events", "id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["events"]) -> 'ArduinoDevicev2StatusEventCollection': ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["id"]) -> MetaOapg.properties.id: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["events", "id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, ], + events: 'ArduinoDevicev2StatusEventCollection', + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoDevicev2StatusEvents': + return super().__new__( + cls, + *_args, + id=id, + events=events, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_devicev2_status_event_collection import ArduinoDevicev2StatusEventCollection diff --git a/iot_api_client/model/arduino_property.py b/iot_api_client/model/arduino_property.py index fcb79d6..17e4b27 100644 --- a/iot_api_client/model/arduino_property.py +++ b/iot_api_client/model/arduino_property.py @@ -62,7 +62,7 @@ class properties: min_value = schemas.Float64Schema persist = schemas.BoolSchema sync_id = schemas.UUIDSchema - tag = schemas.Float64Schema + tag = schemas.Int64Schema thing_name = schemas.StrSchema update_parameter = schemas.Float64Schema updated_at = schemas.DateTimeSchema @@ -259,7 +259,7 @@ def __new__( min_value: typing.Union[MetaOapg.properties.min_value, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, persist: typing.Union[MetaOapg.properties.persist, bool, schemas.Unset] = schemas.unset, sync_id: typing.Union[MetaOapg.properties.sync_id, str, uuid.UUID, schemas.Unset] = schemas.unset, - tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, schemas.Unset] = schemas.unset, thing_name: typing.Union[MetaOapg.properties.thing_name, str, schemas.Unset] = schemas.unset, update_parameter: typing.Union[MetaOapg.properties.update_parameter, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, updated_at: typing.Union[MetaOapg.properties.updated_at, str, datetime, schemas.Unset] = schemas.unset, diff --git a/iot_api_client/model/arduino_property.pyi b/iot_api_client/model/arduino_property.pyi index fcb79d6..17e4b27 100644 --- a/iot_api_client/model/arduino_property.pyi +++ b/iot_api_client/model/arduino_property.pyi @@ -62,7 +62,7 @@ class ArduinoProperty( min_value = schemas.Float64Schema persist = schemas.BoolSchema sync_id = schemas.UUIDSchema - tag = schemas.Float64Schema + tag = schemas.Int64Schema thing_name = schemas.StrSchema update_parameter = schemas.Float64Schema updated_at = schemas.DateTimeSchema @@ -259,7 +259,7 @@ class ArduinoProperty( min_value: typing.Union[MetaOapg.properties.min_value, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, persist: typing.Union[MetaOapg.properties.persist, bool, schemas.Unset] = schemas.unset, sync_id: typing.Union[MetaOapg.properties.sync_id, str, uuid.UUID, schemas.Unset] = schemas.unset, - tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, schemas.Unset] = schemas.unset, thing_name: typing.Union[MetaOapg.properties.thing_name, str, schemas.Unset] = schemas.unset, update_parameter: typing.Union[MetaOapg.properties.update_parameter, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, updated_at: typing.Union[MetaOapg.properties.updated_at, str, datetime, schemas.Unset] = schemas.unset, diff --git a/iot_api_client/model/arduino_series_response.py b/iot_api_client/model/arduino_series_response.py index 8307176..78e4c57 100644 --- a/iot_api_client/model/arduino_series_response.py +++ b/iot_api_client/model/arduino_series_response.py @@ -102,6 +102,87 @@ def __new__( def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + + + class aggregation( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "AVG": "AVG", + "MIN": "MIN", + "MAX": "MAX", + "SUM": "SUM", + "COUNT": "COUNT", + "PCT_99": "PCT_99", + "PCT_95": "PCT_95", + "PCT_90": "PCT_90", + "PCT_75": "PCT_75", + "PCT_50": "PCT_50", + "PCT_15": "PCT_15", + "PCT_5": "PCT_5", + "BOOL_OR": "BOOL_OR", + "BOOL_AND": "BOOL_AND", + } + + @schemas.classproperty + def AVG(cls): + return cls("AVG") + + @schemas.classproperty + def MIN(cls): + return cls("MIN") + + @schemas.classproperty + def MAX(cls): + return cls("MAX") + + @schemas.classproperty + def SUM(cls): + return cls("SUM") + + @schemas.classproperty + def COUNT(cls): + return cls("COUNT") + + @schemas.classproperty + def PCT_99(cls): + return cls("PCT_99") + + @schemas.classproperty + def PCT_95(cls): + return cls("PCT_95") + + @schemas.classproperty + def PCT_90(cls): + return cls("PCT_90") + + @schemas.classproperty + def PCT_75(cls): + return cls("PCT_75") + + @schemas.classproperty + def PCT_50(cls): + return cls("PCT_50") + + @schemas.classproperty + def PCT_15(cls): + return cls("PCT_15") + + @schemas.classproperty + def PCT_5(cls): + return cls("PCT_5") + + @schemas.classproperty + def BOOL_OR(cls): + return cls("BOOL_OR") + + @schemas.classproperty + def BOOL_AND(cls): + return cls("BOOL_AND") message = schemas.StrSchema series_limit = schemas.Int64Schema __annotations__ = { @@ -114,6 +195,7 @@ def __getitem__(self, i: int) -> MetaOapg.items: "times": times, "to_date": to_date, "values": values, + "aggregation": aggregation, "message": message, "series_limit": series_limit, } @@ -155,6 +237,9 @@ def __getitem__(self, name: typing_extensions.Literal["to_date"]) -> MetaOapg.pr @typing.overload def __getitem__(self, name: typing_extensions.Literal["values"]) -> MetaOapg.properties.values: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aggregation"]) -> MetaOapg.properties.aggregation: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... @@ -164,7 +249,7 @@ def __getitem__(self, name: typing_extensions.Literal["series_limit"]) -> MetaOa @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "message", "series_limit", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "aggregation", "message", "series_limit", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -196,6 +281,9 @@ def get_item_oapg(self, name: typing_extensions.Literal["to_date"]) -> MetaOapg. @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["values"]) -> MetaOapg.properties.values: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aggregation"]) -> typing.Union[MetaOapg.properties.aggregation, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... @@ -205,7 +293,7 @@ def get_item_oapg(self, name: typing_extensions.Literal["series_limit"]) -> typi @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "message", "series_limit", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "aggregation", "message", "series_limit", ], str]): return super().get_item_oapg(name) @@ -221,6 +309,7 @@ def __new__( values: typing.Union[MetaOapg.properties.values, list, tuple, ], interval: typing.Union[MetaOapg.properties.interval, decimal.Decimal, int, ], status: typing.Union[MetaOapg.properties.status, str, ], + aggregation: typing.Union[MetaOapg.properties.aggregation, str, schemas.Unset] = schemas.unset, message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, series_limit: typing.Union[MetaOapg.properties.series_limit, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -238,6 +327,7 @@ def __new__( values=values, interval=interval, status=status, + aggregation=aggregation, message=message, series_limit=series_limit, _configuration=_configuration, diff --git a/iot_api_client/model/arduino_series_response.pyi b/iot_api_client/model/arduino_series_response.pyi index 8307176..b47f898 100644 --- a/iot_api_client/model/arduino_series_response.pyi +++ b/iot_api_client/model/arduino_series_response.pyi @@ -102,6 +102,68 @@ class ArduinoSeriesResponse( def __getitem__(self, i: int) -> MetaOapg.items: return super().__getitem__(i) + + + class aggregation( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AVG(cls): + return cls("AVG") + + @schemas.classproperty + def MIN(cls): + return cls("MIN") + + @schemas.classproperty + def MAX(cls): + return cls("MAX") + + @schemas.classproperty + def SUM(cls): + return cls("SUM") + + @schemas.classproperty + def COUNT(cls): + return cls("COUNT") + + @schemas.classproperty + def PCT_99(cls): + return cls("PCT_99") + + @schemas.classproperty + def PCT_95(cls): + return cls("PCT_95") + + @schemas.classproperty + def PCT_90(cls): + return cls("PCT_90") + + @schemas.classproperty + def PCT_75(cls): + return cls("PCT_75") + + @schemas.classproperty + def PCT_50(cls): + return cls("PCT_50") + + @schemas.classproperty + def PCT_15(cls): + return cls("PCT_15") + + @schemas.classproperty + def PCT_5(cls): + return cls("PCT_5") + + @schemas.classproperty + def BOOL_OR(cls): + return cls("BOOL_OR") + + @schemas.classproperty + def BOOL_AND(cls): + return cls("BOOL_AND") message = schemas.StrSchema series_limit = schemas.Int64Schema __annotations__ = { @@ -114,6 +176,7 @@ class ArduinoSeriesResponse( "times": times, "to_date": to_date, "values": values, + "aggregation": aggregation, "message": message, "series_limit": series_limit, } @@ -155,6 +218,9 @@ class ArduinoSeriesResponse( @typing.overload def __getitem__(self, name: typing_extensions.Literal["values"]) -> MetaOapg.properties.values: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aggregation"]) -> MetaOapg.properties.aggregation: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["message"]) -> MetaOapg.properties.message: ... @@ -164,7 +230,7 @@ class ArduinoSeriesResponse( @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "message", "series_limit", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "aggregation", "message", "series_limit", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -196,6 +262,9 @@ class ArduinoSeriesResponse( @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["values"]) -> MetaOapg.properties.values: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aggregation"]) -> typing.Union[MetaOapg.properties.aggregation, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["message"]) -> typing.Union[MetaOapg.properties.message, schemas.Unset]: ... @@ -205,7 +274,7 @@ class ArduinoSeriesResponse( @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "message", "series_limit", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["count_values", "from_date", "interval", "query", "resp_version", "status", "times", "to_date", "values", "aggregation", "message", "series_limit", ], str]): return super().get_item_oapg(name) @@ -221,6 +290,7 @@ class ArduinoSeriesResponse( values: typing.Union[MetaOapg.properties.values, list, tuple, ], interval: typing.Union[MetaOapg.properties.interval, decimal.Decimal, int, ], status: typing.Union[MetaOapg.properties.status, str, ], + aggregation: typing.Union[MetaOapg.properties.aggregation, str, schemas.Unset] = schemas.unset, message: typing.Union[MetaOapg.properties.message, str, schemas.Unset] = schemas.unset, series_limit: typing.Union[MetaOapg.properties.series_limit, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -238,6 +308,7 @@ class ArduinoSeriesResponse( values=values, interval=interval, status=status, + aggregation=aggregation, message=message, series_limit=series_limit, _configuration=_configuration, diff --git a/iot_api_client/model/arduino_templateproperty.py b/iot_api_client/model/arduino_templateproperty.py new file mode 100644 index 0000000..3d78a6a --- /dev/null +++ b/iot_api_client/model/arduino_templateproperty.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplateproperty( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplateproperty media type (default view) + """ + + + class MetaOapg: + required = { + "update_strategy", + "name", + "permission", + "type", + } + + class properties: + name = schemas.StrSchema + permission = schemas.StrSchema + type = schemas.StrSchema + update_strategy = schemas.StrSchema + update_parameter = schemas.Float64Schema + variable_name = schemas.StrSchema + __annotations__ = { + "name": name, + "permission": permission, + "type": type, + "update_strategy": update_strategy, + "update_parameter": update_parameter, + "variable_name": variable_name, + } + + update_strategy: MetaOapg.properties.update_strategy + name: MetaOapg.properties.name + permission: MetaOapg.properties.permission + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["update_strategy"]) -> MetaOapg.properties.update_strategy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["update_parameter"]) -> MetaOapg.properties.update_parameter: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["variable_name"]) -> MetaOapg.properties.variable_name: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "permission", "type", "update_strategy", "update_parameter", "variable_name", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["update_strategy"]) -> MetaOapg.properties.update_strategy: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["update_parameter"]) -> typing.Union[MetaOapg.properties.update_parameter, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["variable_name"]) -> typing.Union[MetaOapg.properties.variable_name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "permission", "type", "update_strategy", "update_parameter", "variable_name", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + update_strategy: typing.Union[MetaOapg.properties.update_strategy, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + permission: typing.Union[MetaOapg.properties.permission, str, ], + type: typing.Union[MetaOapg.properties.type, str, ], + update_parameter: typing.Union[MetaOapg.properties.update_parameter, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + variable_name: typing.Union[MetaOapg.properties.variable_name, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoTemplateproperty': + return super().__new__( + cls, + *_args, + update_strategy=update_strategy, + name=name, + permission=permission, + type=type, + update_parameter=update_parameter, + variable_name=variable_name, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/arduino_templateproperty.pyi b/iot_api_client/model/arduino_templateproperty.pyi new file mode 100644 index 0000000..3d78a6a --- /dev/null +++ b/iot_api_client/model/arduino_templateproperty.pyi @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplateproperty( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplateproperty media type (default view) + """ + + + class MetaOapg: + required = { + "update_strategy", + "name", + "permission", + "type", + } + + class properties: + name = schemas.StrSchema + permission = schemas.StrSchema + type = schemas.StrSchema + update_strategy = schemas.StrSchema + update_parameter = schemas.Float64Schema + variable_name = schemas.StrSchema + __annotations__ = { + "name": name, + "permission": permission, + "type": type, + "update_strategy": update_strategy, + "update_parameter": update_parameter, + "variable_name": variable_name, + } + + update_strategy: MetaOapg.properties.update_strategy + name: MetaOapg.properties.name + permission: MetaOapg.properties.permission + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["update_strategy"]) -> MetaOapg.properties.update_strategy: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["update_parameter"]) -> MetaOapg.properties.update_parameter: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["variable_name"]) -> MetaOapg.properties.variable_name: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "permission", "type", "update_strategy", "update_parameter", "variable_name", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["update_strategy"]) -> MetaOapg.properties.update_strategy: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["update_parameter"]) -> typing.Union[MetaOapg.properties.update_parameter, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["variable_name"]) -> typing.Union[MetaOapg.properties.variable_name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "permission", "type", "update_strategy", "update_parameter", "variable_name", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + update_strategy: typing.Union[MetaOapg.properties.update_strategy, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + permission: typing.Union[MetaOapg.properties.permission, str, ], + type: typing.Union[MetaOapg.properties.type, str, ], + update_parameter: typing.Union[MetaOapg.properties.update_parameter, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + variable_name: typing.Union[MetaOapg.properties.variable_name, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoTemplateproperty': + return super().__new__( + cls, + *_args, + update_strategy=update_strategy, + name=name, + permission=permission, + type=type, + update_parameter=update_parameter, + variable_name=variable_name, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/arduino_templateproperty_collection.py b/iot_api_client/model/arduino_templateproperty_collection.py new file mode 100644 index 0000000..222e33b --- /dev/null +++ b/iot_api_client/model/arduino_templateproperty_collection.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplatepropertyCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplatepropertyCollection is the media type for an array of ArduinoTemplateproperty (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoTemplateproperty']: + return ArduinoTemplateproperty + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoTemplateproperty'], typing.List['ArduinoTemplateproperty']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoTemplatepropertyCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoTemplateproperty': + return super().__getitem__(i) + +from iot_api_client.model.arduino_templateproperty import ArduinoTemplateproperty diff --git a/iot_api_client/model/arduino_templateproperty_collection.pyi b/iot_api_client/model/arduino_templateproperty_collection.pyi new file mode 100644 index 0000000..222e33b --- /dev/null +++ b/iot_api_client/model/arduino_templateproperty_collection.pyi @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplatepropertyCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplatepropertyCollection is the media type for an array of ArduinoTemplateproperty (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoTemplateproperty']: + return ArduinoTemplateproperty + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoTemplateproperty'], typing.List['ArduinoTemplateproperty']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoTemplatepropertyCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoTemplateproperty': + return super().__getitem__(i) + +from iot_api_client.model.arduino_templateproperty import ArduinoTemplateproperty diff --git a/iot_api_client/model/arduino_templatevariable.py b/iot_api_client/model/arduino_templatevariable.py new file mode 100644 index 0000000..0edaf78 --- /dev/null +++ b/iot_api_client/model/arduino_templatevariable.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplatevariable( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplatevariable media type (default view) + """ + + + class MetaOapg: + required = { + "variable_id", + "thing_id", + "name", + "permission", + "type", + } + + class properties: + name = schemas.StrSchema + permission = schemas.StrSchema + thing_id = schemas.StrSchema + type = schemas.StrSchema + variable_id = schemas.StrSchema + + @staticmethod + def thing_timezone() -> typing.Type['ArduinoTimezone']: + return ArduinoTimezone + __annotations__ = { + "name": name, + "permission": permission, + "thing_id": thing_id, + "type": type, + "variable_id": variable_id, + "thing_timezone": thing_timezone, + } + + variable_id: MetaOapg.properties.variable_id + thing_id: MetaOapg.properties.thing_id + name: MetaOapg.properties.name + permission: MetaOapg.properties.permission + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thing_id"]) -> MetaOapg.properties.thing_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["variable_id"]) -> MetaOapg.properties.variable_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thing_timezone"]) -> 'ArduinoTimezone': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "permission", "thing_id", "type", "variable_id", "thing_timezone", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thing_id"]) -> MetaOapg.properties.thing_id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["variable_id"]) -> MetaOapg.properties.variable_id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thing_timezone"]) -> typing.Union['ArduinoTimezone', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "permission", "thing_id", "type", "variable_id", "thing_timezone", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + variable_id: typing.Union[MetaOapg.properties.variable_id, str, ], + thing_id: typing.Union[MetaOapg.properties.thing_id, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + permission: typing.Union[MetaOapg.properties.permission, str, ], + type: typing.Union[MetaOapg.properties.type, str, ], + thing_timezone: typing.Union['ArduinoTimezone', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoTemplatevariable': + return super().__new__( + cls, + *_args, + variable_id=variable_id, + thing_id=thing_id, + name=name, + permission=permission, + type=type, + thing_timezone=thing_timezone, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_timezone import ArduinoTimezone diff --git a/iot_api_client/model/arduino_templatevariable.pyi b/iot_api_client/model/arduino_templatevariable.pyi new file mode 100644 index 0000000..0edaf78 --- /dev/null +++ b/iot_api_client/model/arduino_templatevariable.pyi @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplatevariable( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplatevariable media type (default view) + """ + + + class MetaOapg: + required = { + "variable_id", + "thing_id", + "name", + "permission", + "type", + } + + class properties: + name = schemas.StrSchema + permission = schemas.StrSchema + thing_id = schemas.StrSchema + type = schemas.StrSchema + variable_id = schemas.StrSchema + + @staticmethod + def thing_timezone() -> typing.Type['ArduinoTimezone']: + return ArduinoTimezone + __annotations__ = { + "name": name, + "permission": permission, + "thing_id": thing_id, + "type": type, + "variable_id": variable_id, + "thing_timezone": thing_timezone, + } + + variable_id: MetaOapg.properties.variable_id + thing_id: MetaOapg.properties.thing_id + name: MetaOapg.properties.name + permission: MetaOapg.properties.permission + type: MetaOapg.properties.type + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thing_id"]) -> MetaOapg.properties.thing_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["variable_id"]) -> MetaOapg.properties.variable_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["thing_timezone"]) -> 'ArduinoTimezone': ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "permission", "thing_id", "type", "variable_id", "thing_timezone", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["permission"]) -> MetaOapg.properties.permission: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thing_id"]) -> MetaOapg.properties.thing_id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["variable_id"]) -> MetaOapg.properties.variable_id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["thing_timezone"]) -> typing.Union['ArduinoTimezone', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "permission", "thing_id", "type", "variable_id", "thing_timezone", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + variable_id: typing.Union[MetaOapg.properties.variable_id, str, ], + thing_id: typing.Union[MetaOapg.properties.thing_id, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + permission: typing.Union[MetaOapg.properties.permission, str, ], + type: typing.Union[MetaOapg.properties.type, str, ], + thing_timezone: typing.Union['ArduinoTimezone', schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoTemplatevariable': + return super().__new__( + cls, + *_args, + variable_id=variable_id, + thing_id=thing_id, + name=name, + permission=permission, + type=type, + thing_timezone=thing_timezone, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_timezone import ArduinoTimezone diff --git a/iot_api_client/model/arduino_templatevariable_collection.py b/iot_api_client/model/arduino_templatevariable_collection.py new file mode 100644 index 0000000..0c0acd2 --- /dev/null +++ b/iot_api_client/model/arduino_templatevariable_collection.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplatevariableCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplatevariableCollection is the media type for an array of ArduinoTemplatevariable (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoTemplatevariable']: + return ArduinoTemplatevariable + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoTemplatevariable'], typing.List['ArduinoTemplatevariable']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoTemplatevariableCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoTemplatevariable': + return super().__getitem__(i) + +from iot_api_client.model.arduino_templatevariable import ArduinoTemplatevariable diff --git a/iot_api_client/model/arduino_templatevariable_collection.pyi b/iot_api_client/model/arduino_templatevariable_collection.pyi new file mode 100644 index 0000000..0c0acd2 --- /dev/null +++ b/iot_api_client/model/arduino_templatevariable_collection.pyi @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoTemplatevariableCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoTemplatevariableCollection is the media type for an array of ArduinoTemplatevariable (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoTemplatevariable']: + return ArduinoTemplatevariable + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoTemplatevariable'], typing.List['ArduinoTemplatevariable']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoTemplatevariableCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoTemplatevariable': + return super().__getitem__(i) + +from iot_api_client.model.arduino_templatevariable import ArduinoTemplatevariable diff --git a/iot_api_client/model/arduino_thingtemplate.py b/iot_api_client/model/arduino_thingtemplate.py new file mode 100644 index 0000000..0ddef11 --- /dev/null +++ b/iot_api_client/model/arduino_thingtemplate.py @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoThingtemplate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoThingtemplate media type (default view) + """ + + + class MetaOapg: + required = { + "timezone", + "name", + } + + class properties: + name = schemas.StrSchema + timezone = schemas.StrSchema + organization_id = schemas.UUIDSchema + + @staticmethod + def properties() -> typing.Type['ArduinoTemplatepropertyCollection']: + return ArduinoTemplatepropertyCollection + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Tag']: + return Tag + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Tag': + return super().__getitem__(i) + webhook_uri = schemas.StrSchema + __annotations__ = { + "name": name, + "timezone": timezone, + "organization_id": organization_id, + "properties": properties, + "tags": tags, + "webhook_uri": webhook_uri, + } + + timezone: MetaOapg.properties.timezone + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["timezone"]) -> MetaOapg.properties.timezone: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization_id"]) -> MetaOapg.properties.organization_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["properties"]) -> 'ArduinoTemplatepropertyCollection': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["webhook_uri"]) -> MetaOapg.properties.webhook_uri: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "timezone", "organization_id", "properties", "tags", "webhook_uri", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["timezone"]) -> MetaOapg.properties.timezone: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization_id"]) -> typing.Union[MetaOapg.properties.organization_id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["properties"]) -> typing.Union['ArduinoTemplatepropertyCollection', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["webhook_uri"]) -> typing.Union[MetaOapg.properties.webhook_uri, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "timezone", "organization_id", "properties", "tags", "webhook_uri", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + timezone: typing.Union[MetaOapg.properties.timezone, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + organization_id: typing.Union[MetaOapg.properties.organization_id, str, uuid.UUID, schemas.Unset] = schemas.unset, + properties: typing.Union['ArduinoTemplatepropertyCollection', schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + webhook_uri: typing.Union[MetaOapg.properties.webhook_uri, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoThingtemplate': + return super().__new__( + cls, + *_args, + timezone=timezone, + name=name, + organization_id=organization_id, + properties=properties, + tags=tags, + webhook_uri=webhook_uri, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_templateproperty_collection import ArduinoTemplatepropertyCollection +from iot_api_client.model.tag import Tag diff --git a/iot_api_client/model/arduino_thingtemplate.pyi b/iot_api_client/model/arduino_thingtemplate.pyi new file mode 100644 index 0000000..0ddef11 --- /dev/null +++ b/iot_api_client/model/arduino_thingtemplate.pyi @@ -0,0 +1,168 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoThingtemplate( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoThingtemplate media type (default view) + """ + + + class MetaOapg: + required = { + "timezone", + "name", + } + + class properties: + name = schemas.StrSchema + timezone = schemas.StrSchema + organization_id = schemas.UUIDSchema + + @staticmethod + def properties() -> typing.Type['ArduinoTemplatepropertyCollection']: + return ArduinoTemplatepropertyCollection + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Tag']: + return Tag + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Tag': + return super().__getitem__(i) + webhook_uri = schemas.StrSchema + __annotations__ = { + "name": name, + "timezone": timezone, + "organization_id": organization_id, + "properties": properties, + "tags": tags, + "webhook_uri": webhook_uri, + } + + timezone: MetaOapg.properties.timezone + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["timezone"]) -> MetaOapg.properties.timezone: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["organization_id"]) -> MetaOapg.properties.organization_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["properties"]) -> 'ArduinoTemplatepropertyCollection': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["webhook_uri"]) -> MetaOapg.properties.webhook_uri: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "timezone", "organization_id", "properties", "tags", "webhook_uri", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["timezone"]) -> MetaOapg.properties.timezone: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["organization_id"]) -> typing.Union[MetaOapg.properties.organization_id, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["properties"]) -> typing.Union['ArduinoTemplatepropertyCollection', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["webhook_uri"]) -> typing.Union[MetaOapg.properties.webhook_uri, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "timezone", "organization_id", "properties", "tags", "webhook_uri", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + timezone: typing.Union[MetaOapg.properties.timezone, str, ], + name: typing.Union[MetaOapg.properties.name, str, ], + organization_id: typing.Union[MetaOapg.properties.organization_id, str, uuid.UUID, schemas.Unset] = schemas.unset, + properties: typing.Union['ArduinoTemplatepropertyCollection', schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, + webhook_uri: typing.Union[MetaOapg.properties.webhook_uri, str, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoThingtemplate': + return super().__new__( + cls, + *_args, + timezone=timezone, + name=name, + organization_id=organization_id, + properties=properties, + tags=tags, + webhook_uri=webhook_uri, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_templateproperty_collection import ArduinoTemplatepropertyCollection +from iot_api_client.model.tag import Tag diff --git a/iot_api_client/model/arduino_timezone.py b/iot_api_client/model/arduino_timezone.py index 8ee7036..a96b2f8 100644 --- a/iot_api_client/model/arduino_timezone.py +++ b/iot_api_client/model/arduino_timezone.py @@ -39,6 +39,7 @@ class MetaOapg: required = { "offset", "name", + "until", } class properties: @@ -53,6 +54,7 @@ class properties: offset: MetaOapg.properties.offset name: MetaOapg.properties.name + until: MetaOapg.properties.until @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... @@ -78,7 +80,7 @@ def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.pro def get_item_oapg(self, name: typing_extensions.Literal["offset"]) -> MetaOapg.properties.offset: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["until"]) -> typing.Union[MetaOapg.properties.until, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["until"]) -> MetaOapg.properties.until: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... @@ -92,7 +94,7 @@ def __new__( *_args: typing.Union[dict, frozendict.frozendict, ], offset: typing.Union[MetaOapg.properties.offset, decimal.Decimal, int, ], name: typing.Union[MetaOapg.properties.name, str, ], - until: typing.Union[MetaOapg.properties.until, str, datetime, schemas.Unset] = schemas.unset, + until: typing.Union[MetaOapg.properties.until, str, datetime, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ArduinoTimezone': diff --git a/iot_api_client/model/arduino_timezone.pyi b/iot_api_client/model/arduino_timezone.pyi index 8ee7036..a96b2f8 100644 --- a/iot_api_client/model/arduino_timezone.pyi +++ b/iot_api_client/model/arduino_timezone.pyi @@ -39,6 +39,7 @@ class ArduinoTimezone( required = { "offset", "name", + "until", } class properties: @@ -53,6 +54,7 @@ class ArduinoTimezone( offset: MetaOapg.properties.offset name: MetaOapg.properties.name + until: MetaOapg.properties.until @typing.overload def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... @@ -78,7 +80,7 @@ class ArduinoTimezone( def get_item_oapg(self, name: typing_extensions.Literal["offset"]) -> MetaOapg.properties.offset: ... @typing.overload - def get_item_oapg(self, name: typing_extensions.Literal["until"]) -> typing.Union[MetaOapg.properties.until, schemas.Unset]: ... + def get_item_oapg(self, name: typing_extensions.Literal["until"]) -> MetaOapg.properties.until: ... @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... @@ -92,7 +94,7 @@ class ArduinoTimezone( *_args: typing.Union[dict, frozendict.frozendict, ], offset: typing.Union[MetaOapg.properties.offset, decimal.Decimal, int, ], name: typing.Union[MetaOapg.properties.name, str, ], - until: typing.Union[MetaOapg.properties.until, str, datetime, schemas.Unset] = schemas.unset, + until: typing.Union[MetaOapg.properties.until, str, datetime, ], _configuration: typing.Optional[schemas.Configuration] = None, **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], ) -> 'ArduinoTimezone': diff --git a/iot_api_client/model/arduino_widgetv2.py b/iot_api_client/model/arduino_widgetv2.py index a80d7e8..7cff6dd 100644 --- a/iot_api_client/model/arduino_widgetv2.py +++ b/iot_api_client/model/arduino_widgetv2.py @@ -31,7 +31,7 @@ class ArduinoWidgetv2( Do not edit the class manually. - Widget describes a dashboard widget (default view) + ArduinoWidgetv2 media type (default view) """ diff --git a/iot_api_client/model/arduino_widgetv2.pyi b/iot_api_client/model/arduino_widgetv2.pyi index 5270d97..9872235 100644 --- a/iot_api_client/model/arduino_widgetv2.pyi +++ b/iot_api_client/model/arduino_widgetv2.pyi @@ -31,7 +31,7 @@ class ArduinoWidgetv2( Do not edit the class manually. - Widget describes a dashboard widget (default view) + ArduinoWidgetv2 media type (default view) """ diff --git a/iot_api_client/model/arduino_widgetv2template.py b/iot_api_client/model/arduino_widgetv2template.py new file mode 100644 index 0000000..a32b080 --- /dev/null +++ b/iot_api_client/model/arduino_widgetv2template.py @@ -0,0 +1,238 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoWidgetv2template( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoWidgetv2template media type (default view) + """ + + + class MetaOapg: + required = { + "options", + "width", + "x", + "y", + "type", + "height", + } + + class properties: + height = schemas.Int64Schema + + + class options( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.AnyTypeSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + ) -> 'options': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + type = schemas.StrSchema + width = schemas.Int64Schema + x = schemas.Int64Schema + y = schemas.Int64Schema + height_mobile = schemas.Int64Schema + name = schemas.StrSchema + + @staticmethod + def variables() -> typing.Type['ArduinoTemplatevariableCollection']: + return ArduinoTemplatevariableCollection + width_mobile = schemas.Int64Schema + x_mobile = schemas.Int64Schema + y_mobile = schemas.Int64Schema + __annotations__ = { + "height": height, + "options": options, + "type": type, + "width": width, + "x": x, + "y": y, + "height_mobile": height_mobile, + "name": name, + "variables": variables, + "width_mobile": width_mobile, + "x_mobile": x_mobile, + "y_mobile": y_mobile, + } + + options: MetaOapg.properties.options + width: MetaOapg.properties.width + x: MetaOapg.properties.x + y: MetaOapg.properties.y + type: MetaOapg.properties.type + height: MetaOapg.properties.height + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["height"]) -> MetaOapg.properties.height: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["options"]) -> MetaOapg.properties.options: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["x"]) -> MetaOapg.properties.x: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["y"]) -> MetaOapg.properties.y: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["height_mobile"]) -> MetaOapg.properties.height_mobile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["variables"]) -> 'ArduinoTemplatevariableCollection': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["width_mobile"]) -> MetaOapg.properties.width_mobile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["x_mobile"]) -> MetaOapg.properties.x_mobile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["y_mobile"]) -> MetaOapg.properties.y_mobile: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["height", "options", "type", "width", "x", "y", "height_mobile", "name", "variables", "width_mobile", "x_mobile", "y_mobile", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["height"]) -> MetaOapg.properties.height: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["options"]) -> MetaOapg.properties.options: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["x"]) -> MetaOapg.properties.x: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["y"]) -> MetaOapg.properties.y: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["height_mobile"]) -> typing.Union[MetaOapg.properties.height_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["variables"]) -> typing.Union['ArduinoTemplatevariableCollection', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["width_mobile"]) -> typing.Union[MetaOapg.properties.width_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["x_mobile"]) -> typing.Union[MetaOapg.properties.x_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["y_mobile"]) -> typing.Union[MetaOapg.properties.y_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["height", "options", "type", "width", "x", "y", "height_mobile", "name", "variables", "width_mobile", "x_mobile", "y_mobile", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + options: typing.Union[MetaOapg.properties.options, dict, frozendict.frozendict, ], + width: typing.Union[MetaOapg.properties.width, decimal.Decimal, int, ], + x: typing.Union[MetaOapg.properties.x, decimal.Decimal, int, ], + y: typing.Union[MetaOapg.properties.y, decimal.Decimal, int, ], + type: typing.Union[MetaOapg.properties.type, str, ], + height: typing.Union[MetaOapg.properties.height, decimal.Decimal, int, ], + height_mobile: typing.Union[MetaOapg.properties.height_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + variables: typing.Union['ArduinoTemplatevariableCollection', schemas.Unset] = schemas.unset, + width_mobile: typing.Union[MetaOapg.properties.width_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + x_mobile: typing.Union[MetaOapg.properties.x_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + y_mobile: typing.Union[MetaOapg.properties.y_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoWidgetv2template': + return super().__new__( + cls, + *_args, + options=options, + width=width, + x=x, + y=y, + type=type, + height=height, + height_mobile=height_mobile, + name=name, + variables=variables, + width_mobile=width_mobile, + x_mobile=x_mobile, + y_mobile=y_mobile, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_templatevariable_collection import ArduinoTemplatevariableCollection diff --git a/iot_api_client/model/arduino_widgetv2template.pyi b/iot_api_client/model/arduino_widgetv2template.pyi new file mode 100644 index 0000000..a32b080 --- /dev/null +++ b/iot_api_client/model/arduino_widgetv2template.pyi @@ -0,0 +1,238 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoWidgetv2template( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoWidgetv2template media type (default view) + """ + + + class MetaOapg: + required = { + "options", + "width", + "x", + "y", + "type", + "height", + } + + class properties: + height = schemas.Int64Schema + + + class options( + schemas.DictSchema + ): + + + class MetaOapg: + additional_properties = schemas.AnyTypeSchema + + def __getitem__(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + # dict_instance[name] accessor + return super().__getitem__(name) + + def get_item_oapg(self, name: typing.Union[str, ]) -> MetaOapg.additional_properties: + return super().get_item_oapg(name) + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[MetaOapg.additional_properties, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, bool, None, list, tuple, bytes, io.FileIO, io.BufferedReader, ], + ) -> 'options': + return super().__new__( + cls, + *_args, + _configuration=_configuration, + **kwargs, + ) + type = schemas.StrSchema + width = schemas.Int64Schema + x = schemas.Int64Schema + y = schemas.Int64Schema + height_mobile = schemas.Int64Schema + name = schemas.StrSchema + + @staticmethod + def variables() -> typing.Type['ArduinoTemplatevariableCollection']: + return ArduinoTemplatevariableCollection + width_mobile = schemas.Int64Schema + x_mobile = schemas.Int64Schema + y_mobile = schemas.Int64Schema + __annotations__ = { + "height": height, + "options": options, + "type": type, + "width": width, + "x": x, + "y": y, + "height_mobile": height_mobile, + "name": name, + "variables": variables, + "width_mobile": width_mobile, + "x_mobile": x_mobile, + "y_mobile": y_mobile, + } + + options: MetaOapg.properties.options + width: MetaOapg.properties.width + x: MetaOapg.properties.x + y: MetaOapg.properties.y + type: MetaOapg.properties.type + height: MetaOapg.properties.height + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["height"]) -> MetaOapg.properties.height: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["options"]) -> MetaOapg.properties.options: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["x"]) -> MetaOapg.properties.x: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["y"]) -> MetaOapg.properties.y: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["height_mobile"]) -> MetaOapg.properties.height_mobile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["variables"]) -> 'ArduinoTemplatevariableCollection': ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["width_mobile"]) -> MetaOapg.properties.width_mobile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["x_mobile"]) -> MetaOapg.properties.x_mobile: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["y_mobile"]) -> MetaOapg.properties.y_mobile: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["height", "options", "type", "width", "x", "y", "height_mobile", "name", "variables", "width_mobile", "x_mobile", "y_mobile", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["height"]) -> MetaOapg.properties.height: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["options"]) -> MetaOapg.properties.options: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["type"]) -> MetaOapg.properties.type: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["width"]) -> MetaOapg.properties.width: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["x"]) -> MetaOapg.properties.x: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["y"]) -> MetaOapg.properties.y: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["height_mobile"]) -> typing.Union[MetaOapg.properties.height_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union[MetaOapg.properties.name, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["variables"]) -> typing.Union['ArduinoTemplatevariableCollection', schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["width_mobile"]) -> typing.Union[MetaOapg.properties.width_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["x_mobile"]) -> typing.Union[MetaOapg.properties.x_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["y_mobile"]) -> typing.Union[MetaOapg.properties.y_mobile, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["height", "options", "type", "width", "x", "y", "height_mobile", "name", "variables", "width_mobile", "x_mobile", "y_mobile", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + options: typing.Union[MetaOapg.properties.options, dict, frozendict.frozendict, ], + width: typing.Union[MetaOapg.properties.width, decimal.Decimal, int, ], + x: typing.Union[MetaOapg.properties.x, decimal.Decimal, int, ], + y: typing.Union[MetaOapg.properties.y, decimal.Decimal, int, ], + type: typing.Union[MetaOapg.properties.type, str, ], + height: typing.Union[MetaOapg.properties.height, decimal.Decimal, int, ], + height_mobile: typing.Union[MetaOapg.properties.height_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, + variables: typing.Union['ArduinoTemplatevariableCollection', schemas.Unset] = schemas.unset, + width_mobile: typing.Union[MetaOapg.properties.width_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + x_mobile: typing.Union[MetaOapg.properties.x_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + y_mobile: typing.Union[MetaOapg.properties.y_mobile, decimal.Decimal, int, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ArduinoWidgetv2template': + return super().__new__( + cls, + *_args, + options=options, + width=width, + x=x, + y=y, + type=type, + height=height, + height_mobile=height_mobile, + name=name, + variables=variables, + width_mobile=width_mobile, + x_mobile=x_mobile, + y_mobile=y_mobile, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.arduino_templatevariable_collection import ArduinoTemplatevariableCollection diff --git a/iot_api_client/model/arduino_widgetv2template_collection.py b/iot_api_client/model/arduino_widgetv2template_collection.py new file mode 100644 index 0000000..50dc7d6 --- /dev/null +++ b/iot_api_client/model/arduino_widgetv2template_collection.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoWidgetv2templateCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoWidgetv2templateCollection is the media type for an array of ArduinoWidgetv2template (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoWidgetv2template']: + return ArduinoWidgetv2template + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoWidgetv2template'], typing.List['ArduinoWidgetv2template']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoWidgetv2templateCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoWidgetv2template': + return super().__getitem__(i) + +from iot_api_client.model.arduino_widgetv2template import ArduinoWidgetv2template diff --git a/iot_api_client/model/arduino_widgetv2template_collection.pyi b/iot_api_client/model/arduino_widgetv2template_collection.pyi new file mode 100644 index 0000000..50dc7d6 --- /dev/null +++ b/iot_api_client/model/arduino_widgetv2template_collection.pyi @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ArduinoWidgetv2templateCollection( + schemas.ListSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + ArduinoWidgetv2templateCollection is the media type for an array of ArduinoWidgetv2template (default view) + """ + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['ArduinoWidgetv2template']: + return ArduinoWidgetv2template + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['ArduinoWidgetv2template'], typing.List['ArduinoWidgetv2template']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'ArduinoWidgetv2templateCollection': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'ArduinoWidgetv2template': + return super().__getitem__(i) + +from iot_api_client.model.arduino_widgetv2template import ArduinoWidgetv2template diff --git a/iot_api_client/model/batch_query_request_media_v1.py b/iot_api_client/model/batch_query_request_media_v1.py index 313def3..92290a5 100644 --- a/iot_api_client/model/batch_query_request_media_v1.py +++ b/iot_api_client/model/batch_query_request_media_v1.py @@ -44,12 +44,94 @@ class properties: _from = schemas.DateTimeSchema q = schemas.StrSchema to = schemas.DateTimeSchema + + + class aggregation( + schemas.EnumBase, + schemas.StrSchema + ): + + + class MetaOapg: + enum_value_to_name = { + "AVG": "AVG", + "MIN": "MIN", + "MAX": "MAX", + "SUM": "SUM", + "COUNT": "COUNT", + "PCT_99": "PCT_99", + "PCT_95": "PCT_95", + "PCT_90": "PCT_90", + "PCT_75": "PCT_75", + "PCT_50": "PCT_50", + "PCT_15": "PCT_15", + "PCT_5": "PCT_5", + "BOOL_OR": "BOOL_OR", + "BOOL_AND": "BOOL_AND", + } + + @schemas.classproperty + def AVG(cls): + return cls("AVG") + + @schemas.classproperty + def MIN(cls): + return cls("MIN") + + @schemas.classproperty + def MAX(cls): + return cls("MAX") + + @schemas.classproperty + def SUM(cls): + return cls("SUM") + + @schemas.classproperty + def COUNT(cls): + return cls("COUNT") + + @schemas.classproperty + def PCT_99(cls): + return cls("PCT_99") + + @schemas.classproperty + def PCT_95(cls): + return cls("PCT_95") + + @schemas.classproperty + def PCT_90(cls): + return cls("PCT_90") + + @schemas.classproperty + def PCT_75(cls): + return cls("PCT_75") + + @schemas.classproperty + def PCT_50(cls): + return cls("PCT_50") + + @schemas.classproperty + def PCT_15(cls): + return cls("PCT_15") + + @schemas.classproperty + def PCT_5(cls): + return cls("PCT_5") + + @schemas.classproperty + def BOOL_OR(cls): + return cls("BOOL_OR") + + @schemas.classproperty + def BOOL_AND(cls): + return cls("BOOL_AND") interval = schemas.Int64Schema series_limit = schemas.Int64Schema __annotations__ = { "from": _from, "q": q, "to": to, + "aggregation": aggregation, "interval": interval, "series_limit": series_limit, } @@ -66,6 +148,9 @@ def __getitem__(self, name: typing_extensions.Literal["q"]) -> MetaOapg.properti @typing.overload def __getitem__(self, name: typing_extensions.Literal["to"]) -> MetaOapg.properties.to: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aggregation"]) -> MetaOapg.properties.aggregation: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["interval"]) -> MetaOapg.properties.interval: ... @@ -75,7 +160,7 @@ def __getitem__(self, name: typing_extensions.Literal["series_limit"]) -> MetaOa @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "interval", "series_limit", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "aggregation", "interval", "series_limit", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -89,6 +174,9 @@ def get_item_oapg(self, name: typing_extensions.Literal["q"]) -> MetaOapg.proper @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["to"]) -> MetaOapg.properties.to: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aggregation"]) -> typing.Union[MetaOapg.properties.aggregation, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["interval"]) -> typing.Union[MetaOapg.properties.interval, schemas.Unset]: ... @@ -98,7 +186,7 @@ def get_item_oapg(self, name: typing_extensions.Literal["series_limit"]) -> typi @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "interval", "series_limit", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "aggregation", "interval", "series_limit", ], str]): return super().get_item_oapg(name) @@ -107,6 +195,7 @@ def __new__( *_args: typing.Union[dict, frozendict.frozendict, ], q: typing.Union[MetaOapg.properties.q, str, ], to: typing.Union[MetaOapg.properties.to, str, datetime, ], + aggregation: typing.Union[MetaOapg.properties.aggregation, str, schemas.Unset] = schemas.unset, interval: typing.Union[MetaOapg.properties.interval, decimal.Decimal, int, schemas.Unset] = schemas.unset, series_limit: typing.Union[MetaOapg.properties.series_limit, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -117,6 +206,7 @@ def __new__( *_args, q=q, to=to, + aggregation=aggregation, interval=interval, series_limit=series_limit, _configuration=_configuration, diff --git a/iot_api_client/model/batch_query_request_media_v1.pyi b/iot_api_client/model/batch_query_request_media_v1.pyi index 313def3..01f086a 100644 --- a/iot_api_client/model/batch_query_request_media_v1.pyi +++ b/iot_api_client/model/batch_query_request_media_v1.pyi @@ -44,12 +44,75 @@ class BatchQueryRequestMediaV1( _from = schemas.DateTimeSchema q = schemas.StrSchema to = schemas.DateTimeSchema + + + class aggregation( + schemas.EnumBase, + schemas.StrSchema + ): + + @schemas.classproperty + def AVG(cls): + return cls("AVG") + + @schemas.classproperty + def MIN(cls): + return cls("MIN") + + @schemas.classproperty + def MAX(cls): + return cls("MAX") + + @schemas.classproperty + def SUM(cls): + return cls("SUM") + + @schemas.classproperty + def COUNT(cls): + return cls("COUNT") + + @schemas.classproperty + def PCT_99(cls): + return cls("PCT_99") + + @schemas.classproperty + def PCT_95(cls): + return cls("PCT_95") + + @schemas.classproperty + def PCT_90(cls): + return cls("PCT_90") + + @schemas.classproperty + def PCT_75(cls): + return cls("PCT_75") + + @schemas.classproperty + def PCT_50(cls): + return cls("PCT_50") + + @schemas.classproperty + def PCT_15(cls): + return cls("PCT_15") + + @schemas.classproperty + def PCT_5(cls): + return cls("PCT_5") + + @schemas.classproperty + def BOOL_OR(cls): + return cls("BOOL_OR") + + @schemas.classproperty + def BOOL_AND(cls): + return cls("BOOL_AND") interval = schemas.Int64Schema series_limit = schemas.Int64Schema __annotations__ = { "from": _from, "q": q, "to": to, + "aggregation": aggregation, "interval": interval, "series_limit": series_limit, } @@ -66,6 +129,9 @@ class BatchQueryRequestMediaV1( @typing.overload def __getitem__(self, name: typing_extensions.Literal["to"]) -> MetaOapg.properties.to: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["aggregation"]) -> MetaOapg.properties.aggregation: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["interval"]) -> MetaOapg.properties.interval: ... @@ -75,7 +141,7 @@ class BatchQueryRequestMediaV1( @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "interval", "series_limit", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "aggregation", "interval", "series_limit", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -89,6 +155,9 @@ class BatchQueryRequestMediaV1( @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["to"]) -> MetaOapg.properties.to: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["aggregation"]) -> typing.Union[MetaOapg.properties.aggregation, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["interval"]) -> typing.Union[MetaOapg.properties.interval, schemas.Unset]: ... @@ -98,7 +167,7 @@ class BatchQueryRequestMediaV1( @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "interval", "series_limit", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["from", "q", "to", "aggregation", "interval", "series_limit", ], str]): return super().get_item_oapg(name) @@ -107,6 +176,7 @@ class BatchQueryRequestMediaV1( *_args: typing.Union[dict, frozendict.frozendict, ], q: typing.Union[MetaOapg.properties.q, str, ], to: typing.Union[MetaOapg.properties.to, str, datetime, ], + aggregation: typing.Union[MetaOapg.properties.aggregation, str, schemas.Unset] = schemas.unset, interval: typing.Union[MetaOapg.properties.interval, decimal.Decimal, int, schemas.Unset] = schemas.unset, series_limit: typing.Union[MetaOapg.properties.series_limit, decimal.Decimal, int, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, @@ -117,6 +187,7 @@ class BatchQueryRequestMediaV1( *_args, q=q, to=to, + aggregation=aggregation, interval=interval, series_limit=series_limit, _configuration=_configuration, diff --git a/iot_api_client/model/clone.py b/iot_api_client/model/clone.py new file mode 100644 index 0000000..9458f5b --- /dev/null +++ b/iot_api_client/model/clone.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class Clone( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + + + class overrides( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Override']: + return Override + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Override'], typing.List['Override']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'overrides': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Override': + return super().__getitem__(i) + __annotations__ = { + "overrides": overrides, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["overrides"]) -> MetaOapg.properties.overrides: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["overrides", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["overrides"]) -> typing.Union[MetaOapg.properties.overrides, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["overrides", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + overrides: typing.Union[MetaOapg.properties.overrides, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Clone': + return super().__new__( + cls, + *_args, + overrides=overrides, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.override import Override diff --git a/iot_api_client/model/clone.pyi b/iot_api_client/model/clone.pyi new file mode 100644 index 0000000..9458f5b --- /dev/null +++ b/iot_api_client/model/clone.pyi @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class Clone( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + + class properties: + + + class overrides( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Override']: + return Override + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Override'], typing.List['Override']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'overrides': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Override': + return super().__getitem__(i) + __annotations__ = { + "overrides": overrides, + } + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["overrides"]) -> MetaOapg.properties.overrides: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["overrides", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["overrides"]) -> typing.Union[MetaOapg.properties.overrides, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["overrides", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + overrides: typing.Union[MetaOapg.properties.overrides, list, tuple, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Clone': + return super().__new__( + cls, + *_args, + overrides=overrides, + _configuration=_configuration, + **kwargs, + ) + +from iot_api_client.model.override import Override diff --git a/iot_api_client/model/model_property.py b/iot_api_client/model/model_property.py index 12b14bd..a7f9166 100644 --- a/iot_api_client/model/model_property.py +++ b/iot_api_client/model/model_property.py @@ -160,6 +160,27 @@ class MetaOapg: "HOME_TEMPERATURE_F": "HOME_TEMPERATURE_F", "HOME_SWITCH": "HOME_SWITCH", "HOME_TELEVISION": "HOME_TELEVISION", + "GOOGLE_HOME_COLORED_LIGHT": "GOOGLE_HOME_COLORED_LIGHT", + "GOOGLE_HOME_DIMMED_LIGHT": "GOOGLE_HOME_DIMMED_LIGHT", + "GOOGLE_HOME_LIGHT": "GOOGLE_HOME_LIGHT", + "GOOGLE_HOME_CONTACT_SENSOR": "GOOGLE_HOME_CONTACT_SENSOR", + "GOOGLE_HOME_MOTION_SENSOR": "GOOGLE_HOME_MOTION_SENSOR", + "GOOGLE_HOME_SMART_PLUG": "GOOGLE_HOME_SMART_PLUG", + "GOOGLE_HOME_TEMPERATURE": "GOOGLE_HOME_TEMPERATURE", + "GOOGLE_HOME_TEMPERATURE_C": "GOOGLE_HOME_TEMPERATURE_C", + "GOOGLE_HOME_TEMPERATURE_F": "GOOGLE_HOME_TEMPERATURE_F", + "GOOGLE_HOME_SWITCH": "GOOGLE_HOME_SWITCH", + "SMART_HOME_COLORED_LIGHT": "SMART_HOME_COLORED_LIGHT", + "SMART_HOME_DIMMED_LIGHT": "SMART_HOME_DIMMED_LIGHT", + "SMART_HOME_LIGHT": "SMART_HOME_LIGHT", + "SMART_HOME_CONTACT_SENSOR": "SMART_HOME_CONTACT_SENSOR", + "SMART_HOME_MOTION_SENSOR": "SMART_HOME_MOTION_SENSOR", + "SMART_HOME_SMART_PLUG": "SMART_HOME_SMART_PLUG", + "SMART_HOME_TEMPERATURE": "SMART_HOME_TEMPERATURE", + "SMART_HOME_TEMPERATURE_C": "SMART_HOME_TEMPERATURE_C", + "SMART_HOME_TEMPERATURE_F": "SMART_HOME_TEMPERATURE_F", + "SMART_HOME_SWITCH": "SMART_HOME_SWITCH", + "SMART_HOME_TELEVISION": "SMART_HOME_TELEVISION", "ENERGY": "ENERGY", "FORCE": "FORCE", "TEMPERATURE": "TEMPERATURE", @@ -525,6 +546,90 @@ def HOME_SWITCH(cls): def HOME_TELEVISION(cls): return cls("HOME_TELEVISION") + @schemas.classproperty + def GOOGLE_HOME_COLORED_LIGHT(cls): + return cls("GOOGLE_HOME_COLORED_LIGHT") + + @schemas.classproperty + def GOOGLE_HOME_DIMMED_LIGHT(cls): + return cls("GOOGLE_HOME_DIMMED_LIGHT") + + @schemas.classproperty + def GOOGLE_HOME_LIGHT(cls): + return cls("GOOGLE_HOME_LIGHT") + + @schemas.classproperty + def GOOGLE_HOME_CONTACT_SENSOR(cls): + return cls("GOOGLE_HOME_CONTACT_SENSOR") + + @schemas.classproperty + def GOOGLE_HOME_MOTION_SENSOR(cls): + return cls("GOOGLE_HOME_MOTION_SENSOR") + + @schemas.classproperty + def GOOGLE_HOME_SMART_PLUG(cls): + return cls("GOOGLE_HOME_SMART_PLUG") + + @schemas.classproperty + def GOOGLE_HOME_TEMPERATURE(cls): + return cls("GOOGLE_HOME_TEMPERATURE") + + @schemas.classproperty + def GOOGLE_HOME_TEMPERATURE_C(cls): + return cls("GOOGLE_HOME_TEMPERATURE_C") + + @schemas.classproperty + def GOOGLE_HOME_TEMPERATURE_F(cls): + return cls("GOOGLE_HOME_TEMPERATURE_F") + + @schemas.classproperty + def GOOGLE_HOME_SWITCH(cls): + return cls("GOOGLE_HOME_SWITCH") + + @schemas.classproperty + def SMART_HOME_COLORED_LIGHT(cls): + return cls("SMART_HOME_COLORED_LIGHT") + + @schemas.classproperty + def SMART_HOME_DIMMED_LIGHT(cls): + return cls("SMART_HOME_DIMMED_LIGHT") + + @schemas.classproperty + def SMART_HOME_LIGHT(cls): + return cls("SMART_HOME_LIGHT") + + @schemas.classproperty + def SMART_HOME_CONTACT_SENSOR(cls): + return cls("SMART_HOME_CONTACT_SENSOR") + + @schemas.classproperty + def SMART_HOME_MOTION_SENSOR(cls): + return cls("SMART_HOME_MOTION_SENSOR") + + @schemas.classproperty + def SMART_HOME_SMART_PLUG(cls): + return cls("SMART_HOME_SMART_PLUG") + + @schemas.classproperty + def SMART_HOME_TEMPERATURE(cls): + return cls("SMART_HOME_TEMPERATURE") + + @schemas.classproperty + def SMART_HOME_TEMPERATURE_C(cls): + return cls("SMART_HOME_TEMPERATURE_C") + + @schemas.classproperty + def SMART_HOME_TEMPERATURE_F(cls): + return cls("SMART_HOME_TEMPERATURE_F") + + @schemas.classproperty + def SMART_HOME_SWITCH(cls): + return cls("SMART_HOME_SWITCH") + + @schemas.classproperty + def SMART_HOME_TELEVISION(cls): + return cls("SMART_HOME_TELEVISION") + @schemas.classproperty def ENERGY(cls): return cls("ENERGY") @@ -656,7 +761,7 @@ def TIMED(cls): max_value = schemas.Float64Schema min_value = schemas.Float64Schema persist = schemas.BoolSchema - tag = schemas.Float64Schema + tag = schemas.Int64Schema update_parameter = schemas.Float64Schema @@ -773,7 +878,7 @@ def __new__( max_value: typing.Union[MetaOapg.properties.max_value, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, min_value: typing.Union[MetaOapg.properties.min_value, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, persist: typing.Union[MetaOapg.properties.persist, bool, schemas.Unset] = schemas.unset, - tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, schemas.Unset] = schemas.unset, update_parameter: typing.Union[MetaOapg.properties.update_parameter, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, variable_name: typing.Union[MetaOapg.properties.variable_name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, diff --git a/iot_api_client/model/model_property.pyi b/iot_api_client/model/model_property.pyi index d7fa637..1dd20e9 100644 --- a/iot_api_client/model/model_property.pyi +++ b/iot_api_client/model/model_property.pyi @@ -402,6 +402,90 @@ class ModelProperty( def HOME_TELEVISION(cls): return cls("HOME_TELEVISION") + @schemas.classproperty + def GOOGLE_HOME_COLORED_LIGHT(cls): + return cls("GOOGLE_HOME_COLORED_LIGHT") + + @schemas.classproperty + def GOOGLE_HOME_DIMMED_LIGHT(cls): + return cls("GOOGLE_HOME_DIMMED_LIGHT") + + @schemas.classproperty + def GOOGLE_HOME_LIGHT(cls): + return cls("GOOGLE_HOME_LIGHT") + + @schemas.classproperty + def GOOGLE_HOME_CONTACT_SENSOR(cls): + return cls("GOOGLE_HOME_CONTACT_SENSOR") + + @schemas.classproperty + def GOOGLE_HOME_MOTION_SENSOR(cls): + return cls("GOOGLE_HOME_MOTION_SENSOR") + + @schemas.classproperty + def GOOGLE_HOME_SMART_PLUG(cls): + return cls("GOOGLE_HOME_SMART_PLUG") + + @schemas.classproperty + def GOOGLE_HOME_TEMPERATURE(cls): + return cls("GOOGLE_HOME_TEMPERATURE") + + @schemas.classproperty + def GOOGLE_HOME_TEMPERATURE_C(cls): + return cls("GOOGLE_HOME_TEMPERATURE_C") + + @schemas.classproperty + def GOOGLE_HOME_TEMPERATURE_F(cls): + return cls("GOOGLE_HOME_TEMPERATURE_F") + + @schemas.classproperty + def GOOGLE_HOME_SWITCH(cls): + return cls("GOOGLE_HOME_SWITCH") + + @schemas.classproperty + def SMART_HOME_COLORED_LIGHT(cls): + return cls("SMART_HOME_COLORED_LIGHT") + + @schemas.classproperty + def SMART_HOME_DIMMED_LIGHT(cls): + return cls("SMART_HOME_DIMMED_LIGHT") + + @schemas.classproperty + def SMART_HOME_LIGHT(cls): + return cls("SMART_HOME_LIGHT") + + @schemas.classproperty + def SMART_HOME_CONTACT_SENSOR(cls): + return cls("SMART_HOME_CONTACT_SENSOR") + + @schemas.classproperty + def SMART_HOME_MOTION_SENSOR(cls): + return cls("SMART_HOME_MOTION_SENSOR") + + @schemas.classproperty + def SMART_HOME_SMART_PLUG(cls): + return cls("SMART_HOME_SMART_PLUG") + + @schemas.classproperty + def SMART_HOME_TEMPERATURE(cls): + return cls("SMART_HOME_TEMPERATURE") + + @schemas.classproperty + def SMART_HOME_TEMPERATURE_C(cls): + return cls("SMART_HOME_TEMPERATURE_C") + + @schemas.classproperty + def SMART_HOME_TEMPERATURE_F(cls): + return cls("SMART_HOME_TEMPERATURE_F") + + @schemas.classproperty + def SMART_HOME_SWITCH(cls): + return cls("SMART_HOME_SWITCH") + + @schemas.classproperty + def SMART_HOME_TELEVISION(cls): + return cls("SMART_HOME_TELEVISION") + @schemas.classproperty def ENERGY(cls): return cls("ENERGY") @@ -526,7 +610,7 @@ class ModelProperty( max_value = schemas.Float64Schema min_value = schemas.Float64Schema persist = schemas.BoolSchema - tag = schemas.Float64Schema + tag = schemas.Int64Schema update_parameter = schemas.Float64Schema @@ -637,7 +721,7 @@ class ModelProperty( max_value: typing.Union[MetaOapg.properties.max_value, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, min_value: typing.Union[MetaOapg.properties.min_value, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, persist: typing.Union[MetaOapg.properties.persist, bool, schemas.Unset] = schemas.unset, - tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, + tag: typing.Union[MetaOapg.properties.tag, decimal.Decimal, int, schemas.Unset] = schemas.unset, update_parameter: typing.Union[MetaOapg.properties.update_parameter, decimal.Decimal, int, float, schemas.Unset] = schemas.unset, variable_name: typing.Union[MetaOapg.properties.variable_name, str, schemas.Unset] = schemas.unset, _configuration: typing.Optional[schemas.Configuration] = None, diff --git a/iot_api_client/model/override.py b/iot_api_client/model/override.py new file mode 100644 index 0000000..4b88d30 --- /dev/null +++ b/iot_api_client/model/override.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class Override( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "old_thing_id", + "new_thing_id", + } + + class properties: + new_thing_id = schemas.UUIDSchema + old_thing_id = schemas.UUIDSchema + __annotations__ = { + "new_thing_id": new_thing_id, + "old_thing_id": old_thing_id, + } + + old_thing_id: MetaOapg.properties.old_thing_id + new_thing_id: MetaOapg.properties.new_thing_id + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["new_thing_id"]) -> MetaOapg.properties.new_thing_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["old_thing_id"]) -> MetaOapg.properties.old_thing_id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["new_thing_id", "old_thing_id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["new_thing_id"]) -> MetaOapg.properties.new_thing_id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["old_thing_id"]) -> MetaOapg.properties.old_thing_id: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["new_thing_id", "old_thing_id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + old_thing_id: typing.Union[MetaOapg.properties.old_thing_id, str, uuid.UUID, ], + new_thing_id: typing.Union[MetaOapg.properties.new_thing_id, str, uuid.UUID, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Override': + return super().__new__( + cls, + *_args, + old_thing_id=old_thing_id, + new_thing_id=new_thing_id, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/override.pyi b/iot_api_client/model/override.pyi new file mode 100644 index 0000000..4b88d30 --- /dev/null +++ b/iot_api_client/model/override.pyi @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class Override( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + + class MetaOapg: + required = { + "old_thing_id", + "new_thing_id", + } + + class properties: + new_thing_id = schemas.UUIDSchema + old_thing_id = schemas.UUIDSchema + __annotations__ = { + "new_thing_id": new_thing_id, + "old_thing_id": old_thing_id, + } + + old_thing_id: MetaOapg.properties.old_thing_id + new_thing_id: MetaOapg.properties.new_thing_id + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["new_thing_id"]) -> MetaOapg.properties.new_thing_id: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["old_thing_id"]) -> MetaOapg.properties.old_thing_id: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["new_thing_id", "old_thing_id", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["new_thing_id"]) -> MetaOapg.properties.new_thing_id: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["old_thing_id"]) -> MetaOapg.properties.old_thing_id: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["new_thing_id", "old_thing_id", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + old_thing_id: typing.Union[MetaOapg.properties.old_thing_id, str, uuid.UUID, ], + new_thing_id: typing.Union[MetaOapg.properties.new_thing_id, str, uuid.UUID, ], + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'Override': + return super().__new__( + cls, + *_args, + old_thing_id=old_thing_id, + new_thing_id=new_thing_id, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/thing_clone.py b/iot_api_client/model/thing_clone.py new file mode 100644 index 0000000..03f2699 --- /dev/null +++ b/iot_api_client/model/thing_clone.py @@ -0,0 +1,106 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ThingClone( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Payload to clone a new thing from an existing one + """ + + + class MetaOapg: + required = { + "name", + } + + class properties: + + + class name( + schemas.StrSchema + ): + + + class MetaOapg: + max_length = 64 + regex=[{ + 'pattern': r'^[a-zA-Z0-9_.@ -]+$', # noqa: E501 + }] + include_tags = schemas.BoolSchema + __annotations__ = { + "name": name, + "include_tags": include_tags, + } + + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["include_tags"]) -> MetaOapg.properties.include_tags: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "include_tags", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["include_tags"]) -> typing.Union[MetaOapg.properties.include_tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "include_tags", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, ], + include_tags: typing.Union[MetaOapg.properties.include_tags, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ThingClone': + return super().__new__( + cls, + *_args, + name=name, + include_tags=include_tags, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/thing_clone.pyi b/iot_api_client/model/thing_clone.pyi new file mode 100644 index 0000000..7114bbb --- /dev/null +++ b/iot_api_client/model/thing_clone.pyi @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + + +class ThingClone( + schemas.DictSchema +): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Payload to clone a new thing from an existing one + """ + + + class MetaOapg: + required = { + "name", + } + + class properties: + + + class name( + schemas.StrSchema + ): + pass + include_tags = schemas.BoolSchema + __annotations__ = { + "name": name, + "include_tags": include_tags, + } + + name: MetaOapg.properties.name + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["include_tags"]) -> MetaOapg.properties.include_tags: ... + + @typing.overload + def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... + + def __getitem__(self, name: typing.Union[typing_extensions.Literal["name", "include_tags", ], str]): + # dict_instance[name] accessor + return super().__getitem__(name) + + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> MetaOapg.properties.name: ... + + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["include_tags"]) -> typing.Union[MetaOapg.properties.include_tags, schemas.Unset]: ... + + @typing.overload + def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... + + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["name", "include_tags", ], str]): + return super().get_item_oapg(name) + + + def __new__( + cls, + *_args: typing.Union[dict, frozendict.frozendict, ], + name: typing.Union[MetaOapg.properties.name, str, ], + include_tags: typing.Union[MetaOapg.properties.include_tags, bool, schemas.Unset] = schemas.unset, + _configuration: typing.Optional[schemas.Configuration] = None, + **kwargs: typing.Union[schemas.AnyTypeSchema, dict, frozendict.frozendict, str, date, datetime, uuid.UUID, int, float, decimal.Decimal, None, list, tuple, bytes], + ) -> 'ThingClone': + return super().__new__( + cls, + *_args, + name=name, + include_tags=include_tags, + _configuration=_configuration, + **kwargs, + ) diff --git a/iot_api_client/model/thing_create.py b/iot_api_client/model/thing_create.py index 2ef1687..ce199cf 100644 --- a/iot_api_client/model/thing_create.py +++ b/iot_api_client/model/thing_create.py @@ -78,6 +78,32 @@ def __new__( def __getitem__(self, i: int) -> 'ModelProperty': return super().__getitem__(i) + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Tag']: + return Tag + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Tag': + return super().__getitem__(i) timezone = schemas.StrSchema webhook_active = schemas.BoolSchema webhook_uri = schemas.StrSchema @@ -86,6 +112,7 @@ def __getitem__(self, i: int) -> 'ModelProperty': "id": id, "name": name, "properties": properties, + "tags": tags, "timezone": timezone, "webhook_active": webhook_active, "webhook_uri": webhook_uri, @@ -103,6 +130,9 @@ def __getitem__(self, name: typing_extensions.Literal["name"]) -> MetaOapg.prope @typing.overload def __getitem__(self, name: typing_extensions.Literal["properties"]) -> MetaOapg.properties.properties: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["timezone"]) -> MetaOapg.properties.timezone: ... @@ -115,7 +145,7 @@ def __getitem__(self, name: typing_extensions.Literal["webhook_uri"]) -> MetaOap @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "timezone", "webhook_active", "webhook_uri", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "tags", "timezone", "webhook_active", "webhook_uri", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -132,6 +162,9 @@ def get_item_oapg(self, name: typing_extensions.Literal["name"]) -> typing.Union @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["properties"]) -> typing.Union[MetaOapg.properties.properties, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["timezone"]) -> typing.Union[MetaOapg.properties.timezone, schemas.Unset]: ... @@ -144,7 +177,7 @@ def get_item_oapg(self, name: typing_extensions.Literal["webhook_uri"]) -> typin @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "timezone", "webhook_active", "webhook_uri", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "tags", "timezone", "webhook_active", "webhook_uri", ], str]): return super().get_item_oapg(name) @@ -155,6 +188,7 @@ def __new__( id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, schemas.Unset] = schemas.unset, name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, properties: typing.Union[MetaOapg.properties.properties, list, tuple, schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, timezone: typing.Union[MetaOapg.properties.timezone, str, schemas.Unset] = schemas.unset, webhook_active: typing.Union[MetaOapg.properties.webhook_active, bool, schemas.Unset] = schemas.unset, webhook_uri: typing.Union[MetaOapg.properties.webhook_uri, str, schemas.Unset] = schemas.unset, @@ -168,6 +202,7 @@ def __new__( id=id, name=name, properties=properties, + tags=tags, timezone=timezone, webhook_active=webhook_active, webhook_uri=webhook_uri, @@ -176,3 +211,4 @@ def __new__( ) from iot_api_client.model.model_property import ModelProperty +from iot_api_client.model.tag import Tag diff --git a/iot_api_client/model/thing_create.pyi b/iot_api_client/model/thing_create.pyi index 49aa438..fd95eee 100644 --- a/iot_api_client/model/thing_create.pyi +++ b/iot_api_client/model/thing_create.pyi @@ -72,6 +72,32 @@ class ThingCreate( def __getitem__(self, i: int) -> 'ModelProperty': return super().__getitem__(i) + + + class tags( + schemas.ListSchema + ): + + + class MetaOapg: + + @staticmethod + def items() -> typing.Type['Tag']: + return Tag + + def __new__( + cls, + _arg: typing.Union[typing.Tuple['Tag'], typing.List['Tag']], + _configuration: typing.Optional[schemas.Configuration] = None, + ) -> 'tags': + return super().__new__( + cls, + _arg, + _configuration=_configuration, + ) + + def __getitem__(self, i: int) -> 'Tag': + return super().__getitem__(i) timezone = schemas.StrSchema webhook_active = schemas.BoolSchema webhook_uri = schemas.StrSchema @@ -80,6 +106,7 @@ class ThingCreate( "id": id, "name": name, "properties": properties, + "tags": tags, "timezone": timezone, "webhook_active": webhook_active, "webhook_uri": webhook_uri, @@ -97,6 +124,9 @@ class ThingCreate( @typing.overload def __getitem__(self, name: typing_extensions.Literal["properties"]) -> MetaOapg.properties.properties: ... + @typing.overload + def __getitem__(self, name: typing_extensions.Literal["tags"]) -> MetaOapg.properties.tags: ... + @typing.overload def __getitem__(self, name: typing_extensions.Literal["timezone"]) -> MetaOapg.properties.timezone: ... @@ -109,7 +139,7 @@ class ThingCreate( @typing.overload def __getitem__(self, name: str) -> schemas.UnsetAnyTypeSchema: ... - def __getitem__(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "timezone", "webhook_active", "webhook_uri", ], str]): + def __getitem__(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "tags", "timezone", "webhook_active", "webhook_uri", ], str]): # dict_instance[name] accessor return super().__getitem__(name) @@ -126,6 +156,9 @@ class ThingCreate( @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["properties"]) -> typing.Union[MetaOapg.properties.properties, schemas.Unset]: ... + @typing.overload + def get_item_oapg(self, name: typing_extensions.Literal["tags"]) -> typing.Union[MetaOapg.properties.tags, schemas.Unset]: ... + @typing.overload def get_item_oapg(self, name: typing_extensions.Literal["timezone"]) -> typing.Union[MetaOapg.properties.timezone, schemas.Unset]: ... @@ -138,7 +171,7 @@ class ThingCreate( @typing.overload def get_item_oapg(self, name: str) -> typing.Union[schemas.UnsetAnyTypeSchema, schemas.Unset]: ... - def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "timezone", "webhook_active", "webhook_uri", ], str]): + def get_item_oapg(self, name: typing.Union[typing_extensions.Literal["device_id", "id", "name", "properties", "tags", "timezone", "webhook_active", "webhook_uri", ], str]): return super().get_item_oapg(name) @@ -149,6 +182,7 @@ class ThingCreate( id: typing.Union[MetaOapg.properties.id, str, uuid.UUID, schemas.Unset] = schemas.unset, name: typing.Union[MetaOapg.properties.name, str, schemas.Unset] = schemas.unset, properties: typing.Union[MetaOapg.properties.properties, list, tuple, schemas.Unset] = schemas.unset, + tags: typing.Union[MetaOapg.properties.tags, list, tuple, schemas.Unset] = schemas.unset, timezone: typing.Union[MetaOapg.properties.timezone, str, schemas.Unset] = schemas.unset, webhook_active: typing.Union[MetaOapg.properties.webhook_active, bool, schemas.Unset] = schemas.unset, webhook_uri: typing.Union[MetaOapg.properties.webhook_uri, str, schemas.Unset] = schemas.unset, @@ -162,6 +196,7 @@ class ThingCreate( id=id, name=name, properties=properties, + tags=tags, timezone=timezone, webhook_active=webhook_active, webhook_uri=webhook_uri, @@ -170,3 +205,4 @@ class ThingCreate( ) from iot_api_client.model.model_property import ModelProperty +from iot_api_client.model.tag import Tag diff --git a/iot_api_client/models/__init__.py b/iot_api_client/models/__init__.py index 1c33efe..a0b1281 100644 --- a/iot_api_client/models/__init__.py +++ b/iot_api_client/models/__init__.py @@ -17,6 +17,7 @@ from iot_api_client.model.arduino_dashboardshare_collection import ArduinoDashboardshareCollection from iot_api_client.model.arduino_dashboardv2 import ArduinoDashboardv2 from iot_api_client.model.arduino_dashboardv2_collection import ArduinoDashboardv2Collection +from iot_api_client.model.arduino_dashboardv2template import ArduinoDashboardv2template from iot_api_client.model.arduino_devicev2 import ArduinoDevicev2 from iot_api_client.model.arduino_devicev2_cert import ArduinoDevicev2Cert from iot_api_client.model.arduino_devicev2_cert_collection import ArduinoDevicev2CertCollection @@ -25,6 +26,9 @@ from iot_api_client.model.arduino_devicev2_pass import ArduinoDevicev2Pass from iot_api_client.model.arduino_devicev2_simple_properties import ArduinoDevicev2SimpleProperties from iot_api_client.model.arduino_devicev2_simple_properties_collection import ArduinoDevicev2SimplePropertiesCollection +from iot_api_client.model.arduino_devicev2_status_event import ArduinoDevicev2StatusEvent +from iot_api_client.model.arduino_devicev2_status_event_collection import ArduinoDevicev2StatusEventCollection +from iot_api_client.model.arduino_devicev2_status_events import ArduinoDevicev2StatusEvents from iot_api_client.model.arduino_devicev2_webhook import ArduinoDevicev2Webhook from iot_api_client.model.arduino_devicev2_webhook_collection import ArduinoDevicev2WebhookCollection from iot_api_client.model.arduino_devicev2properties import ArduinoDevicev2properties @@ -45,13 +49,20 @@ from iot_api_client.model.arduino_series_raw_response import ArduinoSeriesRawResponse from iot_api_client.model.arduino_series_response import ArduinoSeriesResponse from iot_api_client.model.arduino_tags import ArduinoTags +from iot_api_client.model.arduino_templateproperty import ArduinoTemplateproperty +from iot_api_client.model.arduino_templateproperty_collection import ArduinoTemplatepropertyCollection +from iot_api_client.model.arduino_templatevariable import ArduinoTemplatevariable +from iot_api_client.model.arduino_templatevariable_collection import ArduinoTemplatevariableCollection from iot_api_client.model.arduino_thing import ArduinoThing from iot_api_client.model.arduino_thing_collection import ArduinoThingCollection +from iot_api_client.model.arduino_thingtemplate import ArduinoThingtemplate from iot_api_client.model.arduino_timeseriesmedia import ArduinoTimeseriesmedia from iot_api_client.model.arduino_timezone import ArduinoTimezone from iot_api_client.model.arduino_variableslinks import ArduinoVariableslinks from iot_api_client.model.arduino_widgetv2 import ArduinoWidgetv2 from iot_api_client.model.arduino_widgetv2_collection import ArduinoWidgetv2Collection +from iot_api_client.model.arduino_widgetv2template import ArduinoWidgetv2template +from iot_api_client.model.arduino_widgetv2template_collection import ArduinoWidgetv2templateCollection from iot_api_client.model.batch_last_value_requests_media_v1 import BatchLastValueRequestsMediaV1 from iot_api_client.model.batch_query_raw_last_value_request_media_v1 import BatchQueryRawLastValueRequestMediaV1 from iot_api_client.model.batch_query_raw_request_media_v1 import BatchQueryRawRequestMediaV1 @@ -60,6 +71,7 @@ from iot_api_client.model.batch_query_request_media_v1 import BatchQueryRequestMediaV1 from iot_api_client.model.batch_query_requests_media_v1 import BatchQueryRequestsMediaV1 from iot_api_client.model.check_devices_v2_pass_payload import CheckDevicesV2PassPayload +from iot_api_client.model.clone import Clone from iot_api_client.model.create_devices_v2_certs_payload import CreateDevicesV2CertsPayload from iot_api_client.model.create_devices_v2_payload import CreateDevicesV2Payload from iot_api_client.model.create_lora_devices_v1_payload import CreateLoraDevicesV1Payload @@ -72,11 +84,13 @@ from iot_api_client.model.error import Error from iot_api_client.model.historic_data_request import HistoricDataRequest from iot_api_client.model.model_property import ModelProperty +from iot_api_client.model.override import Override from iot_api_client.model.properties_value import PropertiesValue from iot_api_client.model.properties_values import PropertiesValues from iot_api_client.model.property_value import PropertyValue from iot_api_client.model.sharerequest import Sharerequest from iot_api_client.model.tag import Tag +from iot_api_client.model.thing_clone import ThingClone from iot_api_client.model.thing_create import ThingCreate from iot_api_client.model.thing_sketch import ThingSketch from iot_api_client.model.thing_update import ThingUpdate diff --git a/iot_api_client/paths/__init__.py b/iot_api_client/paths/__init__.py index 7651b55..71037b3 100644 --- a/iot_api_client/paths/__init__.py +++ b/iot_api_client/paths/__init__.py @@ -10,9 +10,11 @@ class PathValues(str, enum.Enum): V1_LORAFREQPLANS_ = "/v1/lora-freq-plans/" V2_DASHBOARDS = "/v2/dashboards" V2_DASHBOARDS_ID = "/v2/dashboards/{id}" + V2_DASHBOARDS_ID_CLONE = "/v2/dashboards/{id}/clone" V2_DASHBOARDS_ID_SHARE_REQUEST = "/v2/dashboards/{id}/share_request" V2_DASHBOARDS_ID_SHARES = "/v2/dashboards/{id}/shares" V2_DASHBOARDS_ID_SHARES_USER_ID = "/v2/dashboards/{id}/shares/{user_id}" + V2_DASHBOARDS_ID_TEMPLATE = "/v2/dashboards/{id}/template" V2_DASHBOARDS_ID_WIDGETS_WIDGET_ID_VARIABLES = "/v2/dashboards/{id}/widgets/{widgetId}/variables" V2_DEVICES = "/v2/devices" V2_DEVICES_ID = "/v2/devices/{id}" @@ -23,6 +25,7 @@ class PathValues(str, enum.Enum): V2_DEVICES_ID_PASS = "/v2/devices/{id}/pass" V2_DEVICES_ID_PROPERTIES = "/v2/devices/{id}/properties" V2_DEVICES_ID_PROPERTIES_PID = "/v2/devices/{id}/properties/{pid}" + V2_DEVICES_ID_STATUS = "/v2/devices/{id}/status" V2_DEVICES_ID_TAGS = "/v2/devices/{id}/tags" V2_DEVICES_ID_TAGS_KEY = "/v2/devices/{id}/tags/{key}" V2_SERIES_BATCH_QUERY = "/v2/series/batch_query" @@ -31,6 +34,7 @@ class PathValues(str, enum.Enum): V2_SERIES_HISTORIC_DATA = "/v2/series/historic_data" V2_THINGS = "/v2/things" V2_THINGS_ID = "/v2/things/{id}" + V2_THINGS_ID_CLONE = "/v2/things/{id}/clone" V2_THINGS_ID_PROPERTIES = "/v2/things/{id}/properties" V2_THINGS_ID_PROPERTIES_PID = "/v2/things/{id}/properties/{pid}" V2_THINGS_ID_PROPERTIES_PID_PUBLISH = "/v2/things/{id}/properties/{pid}/publish" @@ -39,3 +43,4 @@ class PathValues(str, enum.Enum): V2_THINGS_ID_SKETCH_SKETCH_ID = "/v2/things/{id}/sketch/{sketchId}" V2_THINGS_ID_TAGS = "/v2/things/{id}/tags" V2_THINGS_ID_TAGS_KEY = "/v2/things/{id}/tags/{key}" + V2_THINGS_ID_TEMPLATE = "/v2/things/{id}/template" diff --git a/iot_api_client/paths/v2_dashboards_id/get.py b/iot_api_client/paths/v2_dashboards_id/get.py index d89a95a..7bf035a 100644 --- a/iot_api_client/paths/v2_dashboards_id/get.py +++ b/iot_api_client/paths/v2_dashboards_id/get.py @@ -130,6 +130,29 @@ class ApiResponseFor401(api_client.ApiResponse): schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), }, ) +SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor403ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor403ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationVndGoaErrorjson), + }, +) @dataclass @@ -168,6 +191,7 @@ class ApiResponseFor500(api_client.ApiResponse): _status_code_to_response = { '200': _response_for_200, '401': _response_for_401, + '403': _response_for_403, '404': _response_for_404, '500': _response_for_500, } diff --git a/iot_api_client/paths/v2_dashboards_id/get.pyi b/iot_api_client/paths/v2_dashboards_id/get.pyi index abb92a4..323b0f6 100644 --- a/iot_api_client/paths/v2_dashboards_id/get.pyi +++ b/iot_api_client/paths/v2_dashboards_id/get.pyi @@ -125,6 +125,29 @@ _response_for_401 = api_client.OpenApiResponse( schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), }, ) +SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor403ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor403(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor403ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_403 = api_client.OpenApiResponse( + response_cls=ApiResponseFor403, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor403ResponseBodyApplicationVndGoaErrorjson), + }, +) @dataclass diff --git a/iot_api_client/paths/v2_dashboards_id_clone/__init__.py b/iot_api_client/paths/v2_dashboards_id_clone/__init__.py new file mode 100644 index 0000000..68f7e51 --- /dev/null +++ b/iot_api_client/paths/v2_dashboards_id_clone/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from iot_api_client.paths.v2_dashboards_id_clone import Api + +from iot_api_client.paths import PathValues + +path = PathValues.V2_DASHBOARDS_ID_CLONE \ No newline at end of file diff --git a/iot_api_client/paths/v2_dashboards_id_clone/put.py b/iot_api_client/paths/v2_dashboards_id_clone/put.py new file mode 100644 index 0000000..e5a6ede --- /dev/null +++ b/iot_api_client/paths/v2_dashboards_id_clone/put.py @@ -0,0 +1,585 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.clone import Clone +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_dashboardv2 import ArduinoDashboardv2 + +from . import path + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = Clone +SchemaForRequestBodyApplicationXWwwFormUrlencoded = Clone + + +request_body_clone = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, + required=True, +) +_auth = [ + 'oauth2', +] +SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json = ArduinoDashboardv2 +SchemaFor201ResponseBodyApplicationVndGoaErrorjson = ArduinoDashboardv2 + + +@dataclass +class ApiResponseFor201(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor201ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_201 = api_client.OpenApiResponse( + response_cls=ApiResponseFor201, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor401ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor401ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_status_code_to_response = { + '201': _response_for_201, + '400': _response_for_400, + '401': _response_for_401, + '404': _response_for_404, + '500': _response_for_500, +} +_all_accept_content_types = ( + 'application/vnd.arduino.dashboardv2+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + clone dashboards_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_clone.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DashboardsV2Clone(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_dashboards_id_clone/put.pyi b/iot_api_client/paths/v2_dashboards_id_clone/put.pyi new file mode 100644 index 0000000..2030169 --- /dev/null +++ b/iot_api_client/paths/v2_dashboards_id_clone/put.pyi @@ -0,0 +1,573 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.clone import Clone +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_dashboardv2 import ArduinoDashboardv2 + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = Clone +SchemaForRequestBodyApplicationXWwwFormUrlencoded = Clone + + +request_body_clone = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, + required=True, +) +SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json = ArduinoDashboardv2 +SchemaFor201ResponseBodyApplicationVndGoaErrorjson = ArduinoDashboardv2 + + +@dataclass +class ApiResponseFor201(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor201ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_201 = api_client.OpenApiResponse( + response_cls=ApiResponseFor201, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor401ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor401ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.dashboardv2+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2json), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_all_accept_content_types = ( + 'application/vnd.arduino.dashboardv2+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _dashboards_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + clone dashboards_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_clone.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DashboardsV2Clone(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def dashboards_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_dashboards_id_template/__init__.py b/iot_api_client/paths/v2_dashboards_id_template/__init__.py new file mode 100644 index 0000000..8a2e2be --- /dev/null +++ b/iot_api_client/paths/v2_dashboards_id_template/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from iot_api_client.paths.v2_dashboards_id_template import Api + +from iot_api_client.paths import PathValues + +path = PathValues.V2_DASHBOARDS_ID_TEMPLATE \ No newline at end of file diff --git a/iot_api_client/paths/v2_dashboards_id_template/get.py b/iot_api_client/paths/v2_dashboards_id_template/get.py new file mode 100644 index 0000000..33aac62 --- /dev/null +++ b/iot_api_client/paths/v2_dashboards_id_template/get.py @@ -0,0 +1,436 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_dashboardv2template import ArduinoDashboardv2template + +from . import path + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +_auth = [ + 'oauth2', +] +SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson = ArduinoDashboardv2template +SchemaFor200ResponseBodyApplicationVndGoaErrorjson = ArduinoDashboardv2template + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor200ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson = Error +SchemaFor401ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor401ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '401': _response_for_401, + '404': _response_for_404, + '500': _response_for_500, +} +_all_accept_content_types = ( + 'application/vnd.arduino.dashboardv2template+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _dashboards_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _dashboards_v2_template_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _dashboards_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _dashboards_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + template dashboards_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DashboardsV2Template(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def dashboards_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def dashboards_v2_template( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def dashboards_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def dashboards_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_dashboards_id_template/get.pyi b/iot_api_client/paths/v2_dashboards_id_template/get.pyi new file mode 100644 index 0000000..21d3df6 --- /dev/null +++ b/iot_api_client/paths/v2_dashboards_id_template/get.pyi @@ -0,0 +1,424 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_dashboardv2template import ArduinoDashboardv2template + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson = ArduinoDashboardv2template +SchemaFor200ResponseBodyApplicationVndGoaErrorjson = ArduinoDashboardv2template + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor200ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson = Error +SchemaFor401ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor401ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.dashboardv2template+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoDashboardv2templatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_all_accept_content_types = ( + 'application/vnd.arduino.dashboardv2template+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _dashboards_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _dashboards_v2_template_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _dashboards_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _dashboards_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + template dashboards_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DashboardsV2Template(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def dashboards_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def dashboards_v2_template( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def dashboards_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def dashboards_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._dashboards_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_devices_id_status/__init__.py b/iot_api_client/paths/v2_devices_id_status/__init__.py new file mode 100644 index 0000000..2f28ad4 --- /dev/null +++ b/iot_api_client/paths/v2_devices_id_status/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from iot_api_client.paths.v2_devices_id_status import Api + +from iot_api_client.paths import PathValues + +path = PathValues.V2_DEVICES_ID_STATUS \ No newline at end of file diff --git a/iot_api_client/paths/v2_devices_id_status/get.py b/iot_api_client/paths/v2_devices_id_status/get.py new file mode 100644 index 0000000..88787fa --- /dev/null +++ b/iot_api_client/paths/v2_devices_id_status/get.py @@ -0,0 +1,510 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_devicev2_status_events import ArduinoDevicev2StatusEvents + +from . import path + +# Query params +LimitSchema = schemas.IntSchema +StartSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'start': typing.Union[StartSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_start = api_client.QueryParameter( + name="start", + style=api_client.ParameterStyle.FORM, + schema=StartSchema, + explode=True, +) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +_auth = [ + 'oauth2', +] +SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = ArduinoDevicev2StatusEvents +SchemaFor200ResponseBodyApplicationVndGoaErrorjson = ArduinoDevicev2StatusEvents + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor200ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor401ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor401ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor503ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor503(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor503ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_503 = api_client.OpenApiResponse( + response_cls=ApiResponseFor503, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor503ResponseBodyApplicationVndGoaErrorjson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '400': _response_for_400, + '401': _response_for_401, + '500': _response_for_500, + '503': _response_for_503, +} +_all_accept_content_types = ( + 'application/vnd.arduino.devicev2.status.events+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _devices_v2_get_status_events_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _devices_v2_get_status_events_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _devices_v2_get_status_events_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _devices_v2_get_status_events_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + GetStatusEvents devices_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_limit, + request_query_start, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DevicesV2GetStatusEvents(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def devices_v2_get_status_events( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def devices_v2_get_status_events( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def devices_v2_get_status_events( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def devices_v2_get_status_events( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._devices_v2_get_status_events_oapg( + query_params=query_params, + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._devices_v2_get_status_events_oapg( + query_params=query_params, + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_devices_id_status/get.pyi b/iot_api_client/paths/v2_devices_id_status/get.pyi new file mode 100644 index 0000000..97e7458 --- /dev/null +++ b/iot_api_client/paths/v2_devices_id_status/get.pyi @@ -0,0 +1,498 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_devicev2_status_events import ArduinoDevicev2StatusEvents + +# Query params +LimitSchema = schemas.IntSchema +StartSchema = schemas.StrSchema +RequestRequiredQueryParams = typing_extensions.TypedDict( + 'RequestRequiredQueryParams', + { + } +) +RequestOptionalQueryParams = typing_extensions.TypedDict( + 'RequestOptionalQueryParams', + { + 'limit': typing.Union[LimitSchema, decimal.Decimal, int, ], + 'start': typing.Union[StartSchema, str, ], + }, + total=False +) + + +class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams): + pass + + +request_query_limit = api_client.QueryParameter( + name="limit", + style=api_client.ParameterStyle.FORM, + schema=LimitSchema, + explode=True, +) +request_query_start = api_client.QueryParameter( + name="start", + style=api_client.ParameterStyle.FORM, + schema=StartSchema, + explode=True, +) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = ArduinoDevicev2StatusEvents +SchemaFor200ResponseBodyApplicationVndGoaErrorjson = ArduinoDevicev2StatusEvents + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor200ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor401ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor401ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor401ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson = Error +SchemaFor503ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor503(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson, + SchemaFor503ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_503 = api_client.OpenApiResponse( + response_cls=ApiResponseFor503, + content={ + 'application/vnd.arduino.devicev2.status.events+json': api_client.MediaType( + schema=SchemaFor503ResponseBodyApplicationVndArduinoDevicev2StatusEventsjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor503ResponseBodyApplicationVndGoaErrorjson), + }, +) +_all_accept_content_types = ( + 'application/vnd.arduino.devicev2.status.events+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _devices_v2_get_status_events_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _devices_v2_get_status_events_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _devices_v2_get_status_events_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _devices_v2_get_status_events_oapg( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + GetStatusEvents devices_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + prefix_separator_iterator = None + for parameter in ( + request_query_limit, + request_query_start, + ): + parameter_data = query_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + if prefix_separator_iterator is None: + prefix_separator_iterator = parameter.get_prefix_separator_iterator() + serialized_data = parameter.serialize(parameter_data, prefix_separator_iterator) + for serialized_value in serialized_data.values(): + used_path += serialized_value + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class DevicesV2GetStatusEvents(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def devices_v2_get_status_events( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def devices_v2_get_status_events( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def devices_v2_get_status_events( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def devices_v2_get_status_events( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._devices_v2_get_status_events_oapg( + query_params=query_params, + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._devices_v2_get_status_events_oapg( + query_params=query_params, + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_things_id_clone/__init__.py b/iot_api_client/paths/v2_things_id_clone/__init__.py new file mode 100644 index 0000000..e2a6527 --- /dev/null +++ b/iot_api_client/paths/v2_things_id_clone/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from iot_api_client.paths.v2_things_id_clone import Api + +from iot_api_client.paths import PathValues + +path = PathValues.V2_THINGS_ID_CLONE \ No newline at end of file diff --git a/iot_api_client/paths/v2_things_id_clone/put.py b/iot_api_client/paths/v2_things_id_clone/put.py new file mode 100644 index 0000000..0c7c2a6 --- /dev/null +++ b/iot_api_client/paths/v2_things_id_clone/put.py @@ -0,0 +1,574 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.thing_clone import ThingClone +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_thing import ArduinoThing + +from . import path + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ThingClone +SchemaForRequestBodyApplicationXWwwFormUrlencoded = ThingClone + + +request_body_thing_clone = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, + required=True, +) +_auth = [ + 'oauth2', +] +SchemaFor201ResponseBodyApplicationVndArduinoThingjson = ArduinoThing +SchemaFor201ResponseBodyApplicationVndGoaErrorjson = ArduinoThing + + +@dataclass +class ApiResponseFor201(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor201ResponseBodyApplicationVndArduinoThingjson, + SchemaFor201ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_201 = api_client.OpenApiResponse( + response_cls=ApiResponseFor201, + content={ + 'application/vnd.arduino.thing+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndArduinoThingjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoThingjson = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoThingjson, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.thing+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoThingjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoThingjson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoThingjson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.thing+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoThingjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_status_code_to_response = { + '201': _response_for_201, + '400': _response_for_400, + '401': _response_for_401, + '404': _response_for_404, + '500': _response_for_500, +} +_all_accept_content_types = ( + 'application/vnd.arduino.thing+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + clone things_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_thing_clone.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ThingsV2Clone(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_things_id_clone/put.pyi b/iot_api_client/paths/v2_things_id_clone/put.pyi new file mode 100644 index 0000000..edda1d5 --- /dev/null +++ b/iot_api_client/paths/v2_things_id_clone/put.pyi @@ -0,0 +1,562 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.thing_clone import ThingClone +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_thing import ArduinoThing + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +# body param +SchemaForRequestBodyApplicationJson = ThingClone +SchemaForRequestBodyApplicationXWwwFormUrlencoded = ThingClone + + +request_body_thing_clone = api_client.RequestBody( + content={ + 'application/json': api_client.MediaType( + schema=SchemaForRequestBodyApplicationJson), + 'application/x-www-form-urlencoded': api_client.MediaType( + schema=SchemaForRequestBodyApplicationXWwwFormUrlencoded), + }, + required=True, +) +SchemaFor201ResponseBodyApplicationVndArduinoThingjson = ArduinoThing +SchemaFor201ResponseBodyApplicationVndGoaErrorjson = ArduinoThing + + +@dataclass +class ApiResponseFor201(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor201ResponseBodyApplicationVndArduinoThingjson, + SchemaFor201ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_201 = api_client.OpenApiResponse( + response_cls=ApiResponseFor201, + content={ + 'application/vnd.arduino.thing+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndArduinoThingjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor201ResponseBodyApplicationVndGoaErrorjson), + }, +) +SchemaFor400ResponseBodyApplicationVndArduinoThingjson = Error +SchemaFor400ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor400(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor400ResponseBodyApplicationVndArduinoThingjson, + SchemaFor400ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_400 = api_client.OpenApiResponse( + response_cls=ApiResponseFor400, + content={ + 'application/vnd.arduino.thing+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndArduinoThingjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor400ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoThingjson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoThingjson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.thing+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoThingjson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_all_accept_content_types = ( + 'application/vnd.arduino.thing+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _things_v2_clone_oapg( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + clone things_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + if body is schemas.unset: + raise exceptions.ApiValueError( + 'The required body parameter has an invalid value of: unset. Set a valid value instead') + _fields = None + _body = None + serialized_data = request_body_thing_clone.serialize(body, content_type) + _headers.add('Content-Type', content_type) + if 'fields' in serialized_data: + _fields = serialized_data['fields'] + elif 'body' in serialized_data: + _body = serialized_data['body'] + response = self.api_client.call_api( + resource_path=used_path, + method='put'.upper(), + headers=_headers, + fields=_fields, + body=_body, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ThingsV2Clone(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def things_v2_clone( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForput(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,], + content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor201, + ]: ... + + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + skip_deserialization: typing_extensions.Literal[True], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor201, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def put( + self, + body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], + content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_clone_oapg( + body=body, + header_params=header_params, + path_params=path_params, + content_type=content_type, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_things_id_properties/get.py b/iot_api_client/paths/v2_things_id_properties/get.py index d3a93dd..79991e8 100644 --- a/iot_api_client/paths/v2_things_id_properties/get.py +++ b/iot_api_client/paths/v2_things_id_properties/get.py @@ -56,6 +56,31 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) schema=ShowDeletedSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( @@ -194,6 +219,7 @@ class BaseApi(api_client.Api): def _properties_v2_list_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -208,6 +234,7 @@ def _properties_v2_list_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -218,6 +245,7 @@ def _properties_v2_list_oapg( def _properties_v2_list_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -231,6 +259,7 @@ def _properties_v2_list_oapg( def _properties_v2_list_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -244,6 +273,7 @@ def _properties_v2_list_oapg( class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -274,6 +304,14 @@ class instances used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -314,6 +352,7 @@ class PropertiesV2List(BaseApi): def properties_v2_list( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -328,6 +367,7 @@ def properties_v2_list( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -338,6 +378,7 @@ def properties_v2_list( def properties_v2_list( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -351,6 +392,7 @@ def properties_v2_list( def properties_v2_list( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -359,6 +401,7 @@ def properties_v2_list( ): return self._properties_v2_list_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -374,6 +417,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -388,6 +432,7 @@ def get( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -398,6 +443,7 @@ def get( def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -411,6 +457,7 @@ def get( def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -419,6 +466,7 @@ def get( ): return self._properties_v2_list_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_properties/get.pyi b/iot_api_client/paths/v2_things_id_properties/get.pyi index c28c9a9..d1ca80c 100644 --- a/iot_api_client/paths/v2_things_id_properties/get.pyi +++ b/iot_api_client/paths/v2_things_id_properties/get.pyi @@ -54,6 +54,31 @@ request_query_show_deleted = api_client.QueryParameter( schema=ShowDeletedSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( @@ -183,6 +208,7 @@ class BaseApi(api_client.Api): def _properties_v2_list_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -197,6 +223,7 @@ class BaseApi(api_client.Api): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -207,6 +234,7 @@ class BaseApi(api_client.Api): def _properties_v2_list_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -220,6 +248,7 @@ class BaseApi(api_client.Api): def _properties_v2_list_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -233,6 +262,7 @@ class BaseApi(api_client.Api): class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -263,6 +293,14 @@ class BaseApi(api_client.Api): used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -303,6 +341,7 @@ class PropertiesV2List(BaseApi): def properties_v2_list( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -317,6 +356,7 @@ class PropertiesV2List(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -327,6 +367,7 @@ class PropertiesV2List(BaseApi): def properties_v2_list( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -340,6 +381,7 @@ class PropertiesV2List(BaseApi): def properties_v2_list( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -348,6 +390,7 @@ class PropertiesV2List(BaseApi): ): return self._properties_v2_list_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -363,6 +406,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -377,6 +421,7 @@ class ApiForget(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -387,6 +432,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -400,6 +446,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -408,6 +455,7 @@ class ApiForget(BaseApi): ): return self._properties_v2_list_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_properties/put.py b/iot_api_client/paths/v2_things_id_properties/put.py index ed3b307..b11f278 100644 --- a/iot_api_client/paths/v2_things_id_properties/put.py +++ b/iot_api_client/paths/v2_things_id_properties/put.py @@ -31,6 +31,31 @@ from . import path +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( @@ -221,6 +246,7 @@ def _properties_v2_create_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -235,6 +261,7 @@ def _properties_v2_create_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -249,6 +276,7 @@ def _properties_v2_create_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -265,6 +293,7 @@ def _properties_v2_create_oapg( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -276,6 +305,7 @@ def _properties_v2_create_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -290,6 +320,7 @@ def _properties_v2_create_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -302,6 +333,7 @@ def _properties_v2_create_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -319,6 +351,14 @@ class instances used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -373,6 +413,7 @@ def properties_v2_create( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -387,6 +428,7 @@ def properties_v2_create( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -401,6 +443,7 @@ def properties_v2_create( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -417,6 +460,7 @@ def properties_v2_create( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -428,6 +472,7 @@ def properties_v2_create( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -442,6 +487,7 @@ def properties_v2_create( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -450,6 +496,7 @@ def properties_v2_create( ): return self._properties_v2_create_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -467,6 +514,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -481,6 +529,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -495,6 +544,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -511,6 +561,7 @@ def put( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -522,6 +573,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -536,6 +588,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -544,6 +597,7 @@ def put( ): return self._properties_v2_create_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/iot_api_client/paths/v2_things_id_properties/put.pyi b/iot_api_client/paths/v2_things_id_properties/put.pyi index f9752d5..88d9c8b 100644 --- a/iot_api_client/paths/v2_things_id_properties/put.pyi +++ b/iot_api_client/paths/v2_things_id_properties/put.pyi @@ -29,6 +29,31 @@ from iot_api_client.model.arduino_property import ArduinoProperty from iot_api_client.model.error import Error from iot_api_client.model.model_property import ModelProperty +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema RequestRequiredPathParams = typing_extensions.TypedDict( @@ -208,6 +233,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -222,6 +248,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -236,6 +263,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -252,6 +280,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -263,6 +292,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -277,6 +307,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -289,6 +320,7 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -306,6 +338,14 @@ class BaseApi(api_client.Api): used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -360,6 +400,7 @@ class PropertiesV2Create(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -374,6 +415,7 @@ class PropertiesV2Create(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -388,6 +430,7 @@ class PropertiesV2Create(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -404,6 +447,7 @@ class PropertiesV2Create(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -415,6 +459,7 @@ class PropertiesV2Create(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -429,6 +474,7 @@ class PropertiesV2Create(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -437,6 +483,7 @@ class PropertiesV2Create(BaseApi): ): return self._properties_v2_create_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -454,6 +501,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -468,6 +516,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -482,6 +531,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -498,6 +548,7 @@ class ApiForput(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -509,6 +560,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -523,6 +575,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -531,6 +584,7 @@ class ApiForput(BaseApi): ): return self._properties_v2_create_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/iot_api_client/paths/v2_things_id_properties_pid/delete.py b/iot_api_client/paths/v2_things_id_properties_pid/delete.py index d05f8d5..1a59108 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid/delete.py +++ b/iot_api_client/paths/v2_things_id_properties_pid/delete.py @@ -55,6 +55,31 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) schema=ForceSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -179,6 +204,7 @@ class BaseApi(api_client.Api): def _properties_v2_delete_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -193,6 +219,7 @@ def _properties_v2_delete_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -203,6 +230,7 @@ def _properties_v2_delete_oapg( def _properties_v2_delete_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -216,6 +244,7 @@ def _properties_v2_delete_oapg( def _properties_v2_delete_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -229,6 +258,7 @@ def _properties_v2_delete_oapg( class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -260,6 +290,14 @@ class instances used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -300,6 +338,7 @@ class PropertiesV2Delete(BaseApi): def properties_v2_delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -314,6 +353,7 @@ def properties_v2_delete( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -324,6 +364,7 @@ def properties_v2_delete( def properties_v2_delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -337,6 +378,7 @@ def properties_v2_delete( def properties_v2_delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -345,6 +387,7 @@ def properties_v2_delete( ): return self._properties_v2_delete_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -360,6 +403,7 @@ class ApiFordelete(BaseApi): def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -374,6 +418,7 @@ def delete( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -384,6 +429,7 @@ def delete( def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -397,6 +443,7 @@ def delete( def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -405,6 +452,7 @@ def delete( ): return self._properties_v2_delete_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_properties_pid/delete.pyi b/iot_api_client/paths/v2_things_id_properties_pid/delete.pyi index ef87af1..02b1f96 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid/delete.pyi +++ b/iot_api_client/paths/v2_things_id_properties_pid/delete.pyi @@ -53,6 +53,31 @@ request_query_force = api_client.QueryParameter( schema=ForceSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -168,6 +193,7 @@ class BaseApi(api_client.Api): def _properties_v2_delete_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -182,6 +208,7 @@ class BaseApi(api_client.Api): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -192,6 +219,7 @@ class BaseApi(api_client.Api): def _properties_v2_delete_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -205,6 +233,7 @@ class BaseApi(api_client.Api): def _properties_v2_delete_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -218,6 +247,7 @@ class BaseApi(api_client.Api): class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -249,6 +279,14 @@ class BaseApi(api_client.Api): used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -289,6 +327,7 @@ class PropertiesV2Delete(BaseApi): def properties_v2_delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -303,6 +342,7 @@ class PropertiesV2Delete(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -313,6 +353,7 @@ class PropertiesV2Delete(BaseApi): def properties_v2_delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -326,6 +367,7 @@ class PropertiesV2Delete(BaseApi): def properties_v2_delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -334,6 +376,7 @@ class PropertiesV2Delete(BaseApi): ): return self._properties_v2_delete_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -349,6 +392,7 @@ class ApiFordelete(BaseApi): def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -363,6 +407,7 @@ class ApiFordelete(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -373,6 +418,7 @@ class ApiFordelete(BaseApi): def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -386,6 +432,7 @@ class ApiFordelete(BaseApi): def delete( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -394,6 +441,7 @@ class ApiFordelete(BaseApi): ): return self._properties_v2_delete_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_properties_pid/get.py b/iot_api_client/paths/v2_things_id_properties_pid/get.py index 6a2126c..4f658dc 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid/get.py +++ b/iot_api_client/paths/v2_things_id_properties_pid/get.py @@ -56,6 +56,31 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) schema=ShowDeletedSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -202,6 +227,7 @@ class BaseApi(api_client.Api): def _properties_v2_show_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -216,6 +242,7 @@ def _properties_v2_show_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -226,6 +253,7 @@ def _properties_v2_show_oapg( def _properties_v2_show_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -239,6 +267,7 @@ def _properties_v2_show_oapg( def _properties_v2_show_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -252,6 +281,7 @@ def _properties_v2_show_oapg( class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -283,6 +313,14 @@ class instances used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -323,6 +361,7 @@ class PropertiesV2Show(BaseApi): def properties_v2_show( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -337,6 +376,7 @@ def properties_v2_show( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -347,6 +387,7 @@ def properties_v2_show( def properties_v2_show( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -360,6 +401,7 @@ def properties_v2_show( def properties_v2_show( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -368,6 +410,7 @@ def properties_v2_show( ): return self._properties_v2_show_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -383,6 +426,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -397,6 +441,7 @@ def get( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -407,6 +452,7 @@ def get( def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -420,6 +466,7 @@ def get( def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -428,6 +475,7 @@ def get( ): return self._properties_v2_show_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_properties_pid/get.pyi b/iot_api_client/paths/v2_things_id_properties_pid/get.pyi index 1f591fc..aad63e8 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid/get.pyi +++ b/iot_api_client/paths/v2_things_id_properties_pid/get.pyi @@ -54,6 +54,31 @@ request_query_show_deleted = api_client.QueryParameter( schema=ShowDeletedSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -191,6 +216,7 @@ class BaseApi(api_client.Api): def _properties_v2_show_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -205,6 +231,7 @@ class BaseApi(api_client.Api): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -215,6 +242,7 @@ class BaseApi(api_client.Api): def _properties_v2_show_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -228,6 +256,7 @@ class BaseApi(api_client.Api): def _properties_v2_show_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -241,6 +270,7 @@ class BaseApi(api_client.Api): class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -272,6 +302,14 @@ class BaseApi(api_client.Api): used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -312,6 +350,7 @@ class PropertiesV2Show(BaseApi): def properties_v2_show( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -326,6 +365,7 @@ class PropertiesV2Show(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -336,6 +376,7 @@ class PropertiesV2Show(BaseApi): def properties_v2_show( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -349,6 +390,7 @@ class PropertiesV2Show(BaseApi): def properties_v2_show( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -357,6 +399,7 @@ class PropertiesV2Show(BaseApi): ): return self._properties_v2_show_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -372,6 +415,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -386,6 +430,7 @@ class ApiForget(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -396,6 +441,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -409,6 +455,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -417,6 +464,7 @@ class ApiForget(BaseApi): ): return self._properties_v2_show_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_properties_pid/post.py b/iot_api_client/paths/v2_things_id_properties_pid/post.py index 6c6bfc2..435e14a 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid/post.py +++ b/iot_api_client/paths/v2_things_id_properties_pid/post.py @@ -31,6 +31,31 @@ from . import path +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -216,6 +241,7 @@ def _properties_v2_update_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -230,6 +256,7 @@ def _properties_v2_update_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -244,6 +271,7 @@ def _properties_v2_update_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -260,6 +288,7 @@ def _properties_v2_update_oapg( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -271,6 +300,7 @@ def _properties_v2_update_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,6 +315,7 @@ def _properties_v2_update_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -297,6 +328,7 @@ def _properties_v2_update_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -315,6 +347,14 @@ class instances used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -369,6 +409,7 @@ def properties_v2_update( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -383,6 +424,7 @@ def properties_v2_update( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -397,6 +439,7 @@ def properties_v2_update( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -413,6 +456,7 @@ def properties_v2_update( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -424,6 +468,7 @@ def properties_v2_update( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -438,6 +483,7 @@ def properties_v2_update( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -446,6 +492,7 @@ def properties_v2_update( ): return self._properties_v2_update_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -463,6 +510,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -477,6 +525,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -491,6 +540,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -507,6 +557,7 @@ def post( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -518,6 +569,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -532,6 +584,7 @@ def post( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -540,6 +593,7 @@ def post( ): return self._properties_v2_update_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/iot_api_client/paths/v2_things_id_properties_pid/post.pyi b/iot_api_client/paths/v2_things_id_properties_pid/post.pyi index 7db9195..5693880 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid/post.pyi +++ b/iot_api_client/paths/v2_things_id_properties_pid/post.pyi @@ -29,6 +29,31 @@ from iot_api_client.model.arduino_property import ArduinoProperty from iot_api_client.model.error import Error from iot_api_client.model.model_property import ModelProperty +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -204,6 +229,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -218,6 +244,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -232,6 +259,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -248,6 +276,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -259,6 +288,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,6 +303,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -285,6 +316,7 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -303,6 +335,14 @@ class BaseApi(api_client.Api): used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -357,6 +397,7 @@ class PropertiesV2Update(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -371,6 +412,7 @@ class PropertiesV2Update(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -385,6 +427,7 @@ class PropertiesV2Update(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -401,6 +444,7 @@ class PropertiesV2Update(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -412,6 +456,7 @@ class PropertiesV2Update(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -426,6 +471,7 @@ class PropertiesV2Update(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -434,6 +480,7 @@ class PropertiesV2Update(BaseApi): ): return self._properties_v2_update_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -451,6 +498,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -465,6 +513,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -479,6 +528,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -495,6 +545,7 @@ class ApiForpost(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -506,6 +557,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -520,6 +572,7 @@ class ApiForpost(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -528,6 +581,7 @@ class ApiForpost(BaseApi): ): return self._properties_v2_update_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/iot_api_client/paths/v2_things_id_properties_pid_publish/put.py b/iot_api_client/paths/v2_things_id_properties_pid_publish/put.py index 63fd6b6..f863ce7 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid_publish/put.py +++ b/iot_api_client/paths/v2_things_id_properties_pid_publish/put.py @@ -30,6 +30,31 @@ from . import path +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -193,6 +218,7 @@ def _properties_v2_publish_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -207,6 +233,7 @@ def _properties_v2_publish_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -221,6 +248,7 @@ def _properties_v2_publish_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -237,6 +265,7 @@ def _properties_v2_publish_oapg( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -248,6 +277,7 @@ def _properties_v2_publish_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -262,6 +292,7 @@ def _properties_v2_publish_oapg( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -274,6 +305,7 @@ def _properties_v2_publish_oapg( api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -292,6 +324,14 @@ class instances used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -346,6 +386,7 @@ def properties_v2_publish( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -360,6 +401,7 @@ def properties_v2_publish( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -374,6 +416,7 @@ def properties_v2_publish( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -390,6 +433,7 @@ def properties_v2_publish( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -401,6 +445,7 @@ def properties_v2_publish( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -415,6 +460,7 @@ def properties_v2_publish( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -423,6 +469,7 @@ def properties_v2_publish( ): return self._properties_v2_publish_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -440,6 +487,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -454,6 +502,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -468,6 +517,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -484,6 +534,7 @@ def put( body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -495,6 +546,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -509,6 +561,7 @@ def put( self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -517,6 +570,7 @@ def put( ): return self._properties_v2_publish_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/iot_api_client/paths/v2_things_id_properties_pid_publish/put.pyi b/iot_api_client/paths/v2_things_id_properties_pid_publish/put.pyi index 7ef2cba..22d2a9d 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid_publish/put.pyi +++ b/iot_api_client/paths/v2_things_id_properties_pid_publish/put.pyi @@ -28,6 +28,31 @@ from iot_api_client import schemas # noqa: F401 from iot_api_client.model.property_value import PropertyValue from iot_api_client.model.error import Error +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -181,6 +206,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -195,6 +221,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -209,6 +236,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -225,6 +253,7 @@ class BaseApi(api_client.Api): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -236,6 +265,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -250,6 +280,7 @@ class BaseApi(api_client.Api): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -262,6 +293,7 @@ class BaseApi(api_client.Api): api_response.body and api_response.headers will not be deserialized into schema class instances """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -280,6 +312,14 @@ class BaseApi(api_client.Api): used_path = used_path.replace('{%s}' % k, v) _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -334,6 +374,7 @@ class PropertiesV2Publish(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -348,6 +389,7 @@ class PropertiesV2Publish(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -362,6 +404,7 @@ class PropertiesV2Publish(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -378,6 +421,7 @@ class PropertiesV2Publish(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -389,6 +433,7 @@ class PropertiesV2Publish(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -403,6 +448,7 @@ class PropertiesV2Publish(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -411,6 +457,7 @@ class PropertiesV2Publish(BaseApi): ): return self._properties_v2_publish_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, @@ -428,6 +475,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,], content_type: typing_extensions.Literal["application/json"] = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -442,6 +490,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: typing_extensions.Literal["application/x-www-form-urlencoded"], + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -456,6 +505,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -472,6 +522,7 @@ class ApiForput(BaseApi): body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], skip_deserialization: typing_extensions.Literal[True], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -483,6 +534,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = ..., + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -497,6 +549,7 @@ class ApiForput(BaseApi): self, body: typing.Union[SchemaForRequestBodyApplicationJson,SchemaForRequestBodyApplicationXWwwFormUrlencoded,], content_type: str = 'application/json', + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -505,6 +558,7 @@ class ApiForput(BaseApi): ): return self._properties_v2_publish_oapg( body=body, + header_params=header_params, path_params=path_params, content_type=content_type, accept_content_types=accept_content_types, diff --git a/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.py b/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.py index 6545b25..b5f49a3 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.py +++ b/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.py @@ -31,6 +31,77 @@ from . import path # Query params + + +class AggregationSchema( + schemas.EnumBase, + schemas.StrSchema +): + + + class MetaOapg: + enum_value_to_name = { + "AVG": "AVG", + "MIN": "MIN", + "MAX": "MAX", + "SUM": "SUM", + "COUNT": "COUNT", + "PCT_99": "PCT_99", + "PCT_95": "PCT_95", + "PCT_90": "PCT_90", + "PCT_75": "PCT_75", + "PCT_50": "PCT_50", + "PCT_15": "PCT_15", + "PCT_5": "PCT_5", + } + + @schemas.classproperty + def AVG(cls): + return cls("AVG") + + @schemas.classproperty + def MIN(cls): + return cls("MIN") + + @schemas.classproperty + def MAX(cls): + return cls("MAX") + + @schemas.classproperty + def SUM(cls): + return cls("SUM") + + @schemas.classproperty + def COUNT(cls): + return cls("COUNT") + + @schemas.classproperty + def PCT_99(cls): + return cls("PCT_99") + + @schemas.classproperty + def PCT_95(cls): + return cls("PCT_95") + + @schemas.classproperty + def PCT_90(cls): + return cls("PCT_90") + + @schemas.classproperty + def PCT_75(cls): + return cls("PCT_75") + + @schemas.classproperty + def PCT_50(cls): + return cls("PCT_50") + + @schemas.classproperty + def PCT_15(cls): + return cls("PCT_15") + + @schemas.classproperty + def PCT_5(cls): + return cls("PCT_5") DescSchema = schemas.BoolSchema ModelFromSchema = schemas.StrSchema @@ -51,6 +122,7 @@ class MetaOapg: RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'aggregation': typing.Union[AggregationSchema, str, ], 'desc': typing.Union[DescSchema, bool, ], 'from': typing.Union[ModelFromSchema, str, ], 'interval': typing.Union[IntervalSchema, decimal.Decimal, int, ], @@ -64,6 +136,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) pass +request_query_aggregation = api_client.QueryParameter( + name="aggregation", + style=api_client.ParameterStyle.FORM, + schema=AggregationSchema, + explode=True, +) request_query_desc = api_client.QueryParameter( name="desc", style=api_client.ParameterStyle.FORM, @@ -88,6 +166,31 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) schema=ToSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -236,6 +339,7 @@ class BaseApi(api_client.Api): def _properties_v2_timeseries_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -250,6 +354,7 @@ def _properties_v2_timeseries_oapg( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -260,6 +365,7 @@ def _properties_v2_timeseries_oapg( def _properties_v2_timeseries_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -273,6 +379,7 @@ def _properties_v2_timeseries_oapg( def _properties_v2_timeseries_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -286,6 +393,7 @@ def _properties_v2_timeseries_oapg( class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -305,6 +413,7 @@ class instances prefix_separator_iterator = None for parameter in ( + request_query_aggregation, request_query_desc, request_query__from, request_query_interval, @@ -320,6 +429,14 @@ class instances used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -360,6 +477,7 @@ class PropertiesV2Timeseries(BaseApi): def properties_v2_timeseries( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -374,6 +492,7 @@ def properties_v2_timeseries( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -384,6 +503,7 @@ def properties_v2_timeseries( def properties_v2_timeseries( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -397,6 +517,7 @@ def properties_v2_timeseries( def properties_v2_timeseries( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -405,6 +526,7 @@ def properties_v2_timeseries( ): return self._properties_v2_timeseries_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -420,6 +542,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -434,6 +557,7 @@ def get( self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -444,6 +568,7 @@ def get( def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -457,6 +582,7 @@ def get( def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -465,6 +591,7 @@ def get( ): return self._properties_v2_timeseries_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.pyi b/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.pyi index 72dd14a..32d4c52 100644 --- a/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.pyi +++ b/iot_api_client/paths/v2_things_id_properties_pid_timeseries/get.pyi @@ -29,6 +29,60 @@ from iot_api_client.model.arduino_timeseriesmedia import ArduinoTimeseriesmedia from iot_api_client.model.error import Error # Query params + + +class AggregationSchema( + schemas.EnumBase, + schemas.StrSchema +): + + @schemas.classproperty + def AVG(cls): + return cls("AVG") + + @schemas.classproperty + def MIN(cls): + return cls("MIN") + + @schemas.classproperty + def MAX(cls): + return cls("MAX") + + @schemas.classproperty + def SUM(cls): + return cls("SUM") + + @schemas.classproperty + def COUNT(cls): + return cls("COUNT") + + @schemas.classproperty + def PCT_99(cls): + return cls("PCT_99") + + @schemas.classproperty + def PCT_95(cls): + return cls("PCT_95") + + @schemas.classproperty + def PCT_90(cls): + return cls("PCT_90") + + @schemas.classproperty + def PCT_75(cls): + return cls("PCT_75") + + @schemas.classproperty + def PCT_50(cls): + return cls("PCT_50") + + @schemas.classproperty + def PCT_15(cls): + return cls("PCT_15") + + @schemas.classproperty + def PCT_5(cls): + return cls("PCT_5") DescSchema = schemas.BoolSchema ModelFromSchema = schemas.StrSchema @@ -46,6 +100,7 @@ RequestRequiredQueryParams = typing_extensions.TypedDict( RequestOptionalQueryParams = typing_extensions.TypedDict( 'RequestOptionalQueryParams', { + 'aggregation': typing.Union[AggregationSchema, str, ], 'desc': typing.Union[DescSchema, bool, ], 'from': typing.Union[ModelFromSchema, str, ], 'interval': typing.Union[IntervalSchema, decimal.Decimal, int, ], @@ -59,6 +114,12 @@ class RequestQueryParams(RequestRequiredQueryParams, RequestOptionalQueryParams) pass +request_query_aggregation = api_client.QueryParameter( + name="aggregation", + style=api_client.ParameterStyle.FORM, + schema=AggregationSchema, + explode=True, +) request_query_desc = api_client.QueryParameter( name="desc", style=api_client.ParameterStyle.FORM, @@ -83,6 +144,31 @@ request_query_to = api_client.QueryParameter( schema=ToSchema, explode=True, ) +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) # Path params IdSchema = schemas.StrSchema PidSchema = schemas.StrSchema @@ -221,6 +307,7 @@ class BaseApi(api_client.Api): def _properties_v2_timeseries_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -235,6 +322,7 @@ class BaseApi(api_client.Api): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -245,6 +333,7 @@ class BaseApi(api_client.Api): def _properties_v2_timeseries_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -258,6 +347,7 @@ class BaseApi(api_client.Api): def _properties_v2_timeseries_oapg( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -271,6 +361,7 @@ class BaseApi(api_client.Api): class instances """ self._verify_typed_dict_inputs_oapg(RequestQueryParams, query_params) + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) used_path = path.value @@ -290,6 +381,7 @@ class BaseApi(api_client.Api): prefix_separator_iterator = None for parameter in ( + request_query_aggregation, request_query_desc, request_query__from, request_query_interval, @@ -305,6 +397,14 @@ class BaseApi(api_client.Api): used_path += serialized_value _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) # TODO add cookie handling if accept_content_types: for accept_content_type in accept_content_types: @@ -345,6 +445,7 @@ class PropertiesV2Timeseries(BaseApi): def properties_v2_timeseries( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -359,6 +460,7 @@ class PropertiesV2Timeseries(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -369,6 +471,7 @@ class PropertiesV2Timeseries(BaseApi): def properties_v2_timeseries( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -382,6 +485,7 @@ class PropertiesV2Timeseries(BaseApi): def properties_v2_timeseries( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -390,6 +494,7 @@ class PropertiesV2Timeseries(BaseApi): ): return self._properties_v2_timeseries_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, @@ -405,6 +510,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -419,6 +525,7 @@ class ApiForget(BaseApi): self, skip_deserialization: typing_extensions.Literal[True], query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -429,6 +536,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -442,6 +550,7 @@ class ApiForget(BaseApi): def get( self, query_params: RequestQueryParams = frozendict.frozendict(), + header_params: RequestHeaderParams = frozendict.frozendict(), path_params: RequestPathParams = frozendict.frozendict(), accept_content_types: typing.Tuple[str] = _all_accept_content_types, stream: bool = False, @@ -450,6 +559,7 @@ class ApiForget(BaseApi): ): return self._properties_v2_timeseries_oapg( query_params=query_params, + header_params=header_params, path_params=path_params, accept_content_types=accept_content_types, stream=stream, diff --git a/iot_api_client/paths/v2_things_id_template/__init__.py b/iot_api_client/paths/v2_things_id_template/__init__.py new file mode 100644 index 0000000..096b1f5 --- /dev/null +++ b/iot_api_client/paths/v2_things_id_template/__init__.py @@ -0,0 +1,7 @@ +# do not import all endpoints into this module because that uses a lot of memory and stack frames +# if you need the ability to import all endpoints from this module, import them with +# from iot_api_client.paths.v2_things_id_template import Api + +from iot_api_client.paths import PathValues + +path = PathValues.V2_THINGS_ID_TEMPLATE \ No newline at end of file diff --git a/iot_api_client/paths/v2_things_id_template/get.py b/iot_api_client/paths/v2_things_id_template/get.py new file mode 100644 index 0000000..5a1fa7c --- /dev/null +++ b/iot_api_client/paths/v2_things_id_template/get.py @@ -0,0 +1,401 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_thingtemplate import ArduinoThingtemplate + +from . import path + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +_auth = [ + 'oauth2', +] +SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson = ArduinoThingtemplate +SchemaFor200ResponseBodyApplicationVndGoaErrorjson = ArduinoThingtemplate + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson, + SchemaFor200ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.arduino.thingtemplate+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.thingtemplate+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_status_code_to_response = { + '200': _response_for_200, + '401': _response_for_401, + '404': _response_for_404, + '500': _response_for_500, +} +_all_accept_content_types = ( + 'application/vnd.arduino.thingtemplate+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _things_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _things_v2_template_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _things_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _things_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + template things_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ThingsV2Template(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def things_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def things_v2_template( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def things_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def things_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/iot_api_client/paths/v2_things_id_template/get.pyi b/iot_api_client/paths/v2_things_id_template/get.pyi new file mode 100644 index 0000000..f88a2de --- /dev/null +++ b/iot_api_client/paths/v2_things_id_template/get.pyi @@ -0,0 +1,390 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +from dataclasses import dataclass +import typing_extensions +import urllib3 +from urllib3._collections import HTTPHeaderDict + +from iot_api_client import api_client, exceptions +from datetime import date, datetime # noqa: F401 +import decimal # noqa: F401 +import functools # noqa: F401 +import io # noqa: F401 +import re # noqa: F401 +import typing # noqa: F401 +import typing_extensions # noqa: F401 +import uuid # noqa: F401 + +import frozendict # noqa: F401 + +from iot_api_client import schemas # noqa: F401 + +from iot_api_client.model.error import Error +from iot_api_client.model.arduino_thingtemplate import ArduinoThingtemplate + +# Header params +XOrganizationSchema = schemas.StrSchema +RequestRequiredHeaderParams = typing_extensions.TypedDict( + 'RequestRequiredHeaderParams', + { + } +) +RequestOptionalHeaderParams = typing_extensions.TypedDict( + 'RequestOptionalHeaderParams', + { + 'X-Organization': typing.Union[XOrganizationSchema, str, ], + }, + total=False +) + + +class RequestHeaderParams(RequestRequiredHeaderParams, RequestOptionalHeaderParams): + pass + + +request_header_x_organization = api_client.HeaderParameter( + name="X-Organization", + style=api_client.ParameterStyle.SIMPLE, + schema=XOrganizationSchema, +) +# Path params +IdSchema = schemas.StrSchema +RequestRequiredPathParams = typing_extensions.TypedDict( + 'RequestRequiredPathParams', + { + 'id': typing.Union[IdSchema, str, ], + } +) +RequestOptionalPathParams = typing_extensions.TypedDict( + 'RequestOptionalPathParams', + { + }, + total=False +) + + +class RequestPathParams(RequestRequiredPathParams, RequestOptionalPathParams): + pass + + +request_path_id = api_client.PathParameter( + name="id", + style=api_client.ParameterStyle.SIMPLE, + schema=IdSchema, + required=True, +) +SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson = ArduinoThingtemplate +SchemaFor200ResponseBodyApplicationVndGoaErrorjson = ArduinoThingtemplate + + +@dataclass +class ApiResponseFor200(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson, + SchemaFor200ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_200 = api_client.OpenApiResponse( + response_cls=ApiResponseFor200, + content={ + 'application/vnd.arduino.thingtemplate+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndArduinoThingtemplatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor200ResponseBodyApplicationVndGoaErrorjson), + }, +) + + +@dataclass +class ApiResponseFor401(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_401 = api_client.OpenApiResponse( + response_cls=ApiResponseFor401, +) + + +@dataclass +class ApiResponseFor404(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: schemas.Unset = schemas.unset + headers: schemas.Unset = schemas.unset + + +_response_for_404 = api_client.OpenApiResponse( + response_cls=ApiResponseFor404, +) +SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson = Error +SchemaFor500ResponseBodyApplicationVndGoaErrorjson = Error + + +@dataclass +class ApiResponseFor500(api_client.ApiResponse): + response: urllib3.HTTPResponse + body: typing.Union[ + SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson, + SchemaFor500ResponseBodyApplicationVndGoaErrorjson, + ] + headers: schemas.Unset = schemas.unset + + +_response_for_500 = api_client.OpenApiResponse( + response_cls=ApiResponseFor500, + content={ + 'application/vnd.arduino.thingtemplate+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndArduinoThingtemplatejson), + 'application/vnd.goa.error+json': api_client.MediaType( + schema=SchemaFor500ResponseBodyApplicationVndGoaErrorjson), + }, +) +_all_accept_content_types = ( + 'application/vnd.arduino.thingtemplate+json', + 'application/vnd.goa.error+json', +) + + +class BaseApi(api_client.Api): + @typing.overload + def _things_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def _things_v2_template_oapg( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def _things_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def _things_v2_template_oapg( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + """ + template things_v2 + :param skip_deserialization: If true then api_response.response will be set but + api_response.body and api_response.headers will not be deserialized into schema + class instances + """ + self._verify_typed_dict_inputs_oapg(RequestHeaderParams, header_params) + self._verify_typed_dict_inputs_oapg(RequestPathParams, path_params) + used_path = path.value + + _path_params = {} + for parameter in ( + request_path_id, + ): + parameter_data = path_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _path_params.update(serialized_data) + + for k, v in _path_params.items(): + used_path = used_path.replace('{%s}' % k, v) + + _headers = HTTPHeaderDict() + for parameter in ( + request_header_x_organization, + ): + parameter_data = header_params.get(parameter.name, schemas.unset) + if parameter_data is schemas.unset: + continue + serialized_data = parameter.serialize(parameter_data) + _headers.extend(serialized_data) + # TODO add cookie handling + if accept_content_types: + for accept_content_type in accept_content_types: + _headers.add('Accept', accept_content_type) + + response = self.api_client.call_api( + resource_path=used_path, + method='get'.upper(), + headers=_headers, + auth_settings=_auth, + stream=stream, + timeout=timeout, + ) + + if skip_deserialization: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + else: + response_for_status = _status_code_to_response.get(str(response.status)) + if response_for_status: + api_response = response_for_status.deserialize(response, self.api_client.configuration) + else: + api_response = api_client.ApiResponseWithoutDeserialization(response=response) + + if not 200 <= response.status <= 299: + raise exceptions.ApiException( + status=response.status, + reason=response.reason, + api_response=api_response + ) + + return api_response + + +class ThingsV2Template(BaseApi): + # this class is used by api classes that refer to endpoints with operationId fn names + + @typing.overload + def things_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def things_v2_template( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def things_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def things_v2_template( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + +class ApiForget(BaseApi): + # this class is used by api classes that refer to endpoints by path and http method names + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: typing_extensions.Literal[False] = ..., + ) -> typing.Union[ + ApiResponseFor200, + ]: ... + + @typing.overload + def get( + self, + skip_deserialization: typing_extensions.Literal[True], + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + ) -> api_client.ApiResponseWithoutDeserialization: ... + + @typing.overload + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = ..., + ) -> typing.Union[ + ApiResponseFor200, + api_client.ApiResponseWithoutDeserialization, + ]: ... + + def get( + self, + header_params: RequestHeaderParams = frozendict.frozendict(), + path_params: RequestPathParams = frozendict.frozendict(), + accept_content_types: typing.Tuple[str] = _all_accept_content_types, + stream: bool = False, + timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None, + skip_deserialization: bool = False, + ): + return self._things_v2_template_oapg( + header_params=header_params, + path_params=path_params, + accept_content_types=accept_content_types, + stream=stream, + timeout=timeout, + skip_deserialization=skip_deserialization + ) + + diff --git a/test/test_models/test_arduino_dashboardv2template.py b/test/test_models/test_arduino_dashboardv2template.py new file mode 100644 index 0000000..38e501c --- /dev/null +++ b/test/test_models/test_arduino_dashboardv2template.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_dashboardv2template import ArduinoDashboardv2template +from iot_api_client import configuration + + +class TestArduinoDashboardv2template(unittest.TestCase): + """ArduinoDashboardv2template unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_devicev2_status_event.py b/test/test_models/test_arduino_devicev2_status_event.py new file mode 100644 index 0000000..81389a3 --- /dev/null +++ b/test/test_models/test_arduino_devicev2_status_event.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_devicev2_status_event import ArduinoDevicev2StatusEvent +from iot_api_client import configuration + + +class TestArduinoDevicev2StatusEvent(unittest.TestCase): + """ArduinoDevicev2StatusEvent unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_devicev2_status_event_collection.py b/test/test_models/test_arduino_devicev2_status_event_collection.py new file mode 100644 index 0000000..0eba4b0 --- /dev/null +++ b/test/test_models/test_arduino_devicev2_status_event_collection.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_devicev2_status_event_collection import ArduinoDevicev2StatusEventCollection +from iot_api_client import configuration + + +class TestArduinoDevicev2StatusEventCollection(unittest.TestCase): + """ArduinoDevicev2StatusEventCollection unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_devicev2_status_events.py b/test/test_models/test_arduino_devicev2_status_events.py new file mode 100644 index 0000000..3e92690 --- /dev/null +++ b/test/test_models/test_arduino_devicev2_status_events.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_devicev2_status_events import ArduinoDevicev2StatusEvents +from iot_api_client import configuration + + +class TestArduinoDevicev2StatusEvents(unittest.TestCase): + """ArduinoDevicev2StatusEvents unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_templateproperty.py b/test/test_models/test_arduino_templateproperty.py new file mode 100644 index 0000000..e954a84 --- /dev/null +++ b/test/test_models/test_arduino_templateproperty.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_templateproperty import ArduinoTemplateproperty +from iot_api_client import configuration + + +class TestArduinoTemplateproperty(unittest.TestCase): + """ArduinoTemplateproperty unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_templateproperty_collection.py b/test/test_models/test_arduino_templateproperty_collection.py new file mode 100644 index 0000000..f219bf8 --- /dev/null +++ b/test/test_models/test_arduino_templateproperty_collection.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_templateproperty_collection import ArduinoTemplatepropertyCollection +from iot_api_client import configuration + + +class TestArduinoTemplatepropertyCollection(unittest.TestCase): + """ArduinoTemplatepropertyCollection unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_templatevariable.py b/test/test_models/test_arduino_templatevariable.py new file mode 100644 index 0000000..98c7cfc --- /dev/null +++ b/test/test_models/test_arduino_templatevariable.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_templatevariable import ArduinoTemplatevariable +from iot_api_client import configuration + + +class TestArduinoTemplatevariable(unittest.TestCase): + """ArduinoTemplatevariable unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_templatevariable_collection.py b/test/test_models/test_arduino_templatevariable_collection.py new file mode 100644 index 0000000..43ac46b --- /dev/null +++ b/test/test_models/test_arduino_templatevariable_collection.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_templatevariable_collection import ArduinoTemplatevariableCollection +from iot_api_client import configuration + + +class TestArduinoTemplatevariableCollection(unittest.TestCase): + """ArduinoTemplatevariableCollection unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_thingtemplate.py b/test/test_models/test_arduino_thingtemplate.py new file mode 100644 index 0000000..5757cc6 --- /dev/null +++ b/test/test_models/test_arduino_thingtemplate.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_thingtemplate import ArduinoThingtemplate +from iot_api_client import configuration + + +class TestArduinoThingtemplate(unittest.TestCase): + """ArduinoThingtemplate unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_widgetv2template.py b/test/test_models/test_arduino_widgetv2template.py new file mode 100644 index 0000000..2130391 --- /dev/null +++ b/test/test_models/test_arduino_widgetv2template.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_widgetv2template import ArduinoWidgetv2template +from iot_api_client import configuration + + +class TestArduinoWidgetv2template(unittest.TestCase): + """ArduinoWidgetv2template unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_arduino_widgetv2template_collection.py b/test/test_models/test_arduino_widgetv2template_collection.py new file mode 100644 index 0000000..ef1d43d --- /dev/null +++ b/test/test_models/test_arduino_widgetv2template_collection.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.arduino_widgetv2template_collection import ArduinoWidgetv2templateCollection +from iot_api_client import configuration + + +class TestArduinoWidgetv2templateCollection(unittest.TestCase): + """ArduinoWidgetv2templateCollection unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_clone.py b/test/test_models/test_clone.py new file mode 100644 index 0000000..2d680da --- /dev/null +++ b/test/test_models/test_clone.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.clone import Clone +from iot_api_client import configuration + + +class TestClone(unittest.TestCase): + """Clone unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_override.py b/test/test_models/test_override.py new file mode 100644 index 0000000..0759361 --- /dev/null +++ b/test/test_models/test_override.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.override import Override +from iot_api_client import configuration + + +class TestOverride(unittest.TestCase): + """Override unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_models/test_thing_clone.py b/test/test_models/test_thing_clone.py new file mode 100644 index 0000000..a89d23a --- /dev/null +++ b/test/test_models/test_thing_clone.py @@ -0,0 +1,25 @@ +# coding: utf-8 + +""" + 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) # noqa: E501 + + The version of the OpenAPI document: 2.0 + Generated by: https://openapi-generator.tech +""" + +import unittest + +import iot_api_client +from iot_api_client.model.thing_clone import ThingClone +from iot_api_client import configuration + + +class TestThingClone(unittest.TestCase): + """ThingClone unit test stubs""" + _configuration = configuration.Configuration() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_v2_dashboards_id_clone/__init__.py b/test/test_paths/test_v2_dashboards_id_clone/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_v2_dashboards_id_clone/test_put.py b/test/test_paths/test_v2_dashboards_id_clone/test_put.py new file mode 100644 index 0000000..2f2a683 --- /dev/null +++ b/test/test_paths/test_v2_dashboards_id_clone/test_put.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import iot_api_client +from iot_api_client.paths.v2_dashboards_id_clone import put # noqa: E501 +from iot_api_client import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestV2DashboardsIdClone(ApiTestMixin, unittest.TestCase): + """ + V2DashboardsIdClone unit test stubs + clone dashboards_v2 # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 201 + + + + + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_v2_dashboards_id_template/__init__.py b/test/test_paths/test_v2_dashboards_id_template/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_v2_dashboards_id_template/test_get.py b/test/test_paths/test_v2_dashboards_id_template/test_get.py new file mode 100644 index 0000000..9c0affa --- /dev/null +++ b/test/test_paths/test_v2_dashboards_id_template/test_get.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import iot_api_client +from iot_api_client.paths.v2_dashboards_id_template import get # noqa: E501 +from iot_api_client import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestV2DashboardsIdTemplate(ApiTestMixin, unittest.TestCase): + """ + V2DashboardsIdTemplate unit test stubs + template dashboards_v2 # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_v2_devices_id_status/__init__.py b/test/test_paths/test_v2_devices_id_status/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_v2_devices_id_status/test_get.py b/test/test_paths/test_v2_devices_id_status/test_get.py new file mode 100644 index 0000000..7687273 --- /dev/null +++ b/test/test_paths/test_v2_devices_id_status/test_get.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import iot_api_client +from iot_api_client.paths.v2_devices_id_status import get # noqa: E501 +from iot_api_client import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestV2DevicesIdStatus(ApiTestMixin, unittest.TestCase): + """ + V2DevicesIdStatus unit test stubs + GetStatusEvents devices_v2 # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_v2_things_id_clone/__init__.py b/test/test_paths/test_v2_things_id_clone/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_v2_things_id_clone/test_put.py b/test/test_paths/test_v2_things_id_clone/test_put.py new file mode 100644 index 0000000..0ddf7f9 --- /dev/null +++ b/test/test_paths/test_v2_things_id_clone/test_put.py @@ -0,0 +1,47 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import iot_api_client +from iot_api_client.paths.v2_things_id_clone import put # noqa: E501 +from iot_api_client import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestV2ThingsIdClone(ApiTestMixin, unittest.TestCase): + """ + V2ThingsIdClone unit test stubs + clone things_v2 # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = put.ApiForput(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 201 + + + + + + + + + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_paths/test_v2_things_id_template/__init__.py b/test/test_paths/test_v2_things_id_template/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test/test_paths/test_v2_things_id_template/test_get.py b/test/test_paths/test_v2_things_id_template/test_get.py new file mode 100644 index 0000000..3f2aea8 --- /dev/null +++ b/test/test_paths/test_v2_things_id_template/test_get.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + + + Generated by: https://openapi-generator.tech +""" + +import unittest +from unittest.mock import patch + +import urllib3 + +import iot_api_client +from iot_api_client.paths.v2_things_id_template import get # noqa: E501 +from iot_api_client import configuration, schemas, api_client + +from .. import ApiTestMixin + + +class TestV2ThingsIdTemplate(ApiTestMixin, unittest.TestCase): + """ + V2ThingsIdTemplate unit test stubs + template things_v2 # noqa: E501 + """ + _configuration = configuration.Configuration() + + def setUp(self): + used_api_client = api_client.ApiClient(configuration=self._configuration) + self.api = get.ApiForget(api_client=used_api_client) # noqa: E501 + + def tearDown(self): + pass + + response_status = 200 + + + + + + +if __name__ == '__main__': + unittest.main()