From e3d32cde9c38df1c4d7d28836ee629977e4a589f Mon Sep 17 00:00:00 2001 From: Cyberwave CI Date: Fri, 17 Jul 2026 11:13:03 +0000 Subject: [PATCH] chore: sync from monorepo (0dd4a34f981dc59e562c31d0a174f24c53e5c76d) --- README.md | 4 +- include/cyberwave/camera_streaming.h | 75 +- include/cyberwave/cyberwave_mqtt_adapter.h | 7 - include/cyberwave/mqtt_interface.h | 21 - .../CppRestOpenAPIClient/api/CatalogApi.h | 55 - .../CppRestOpenAPIClient/api/DefaultApi.h | 245 +- .../model/AttachmentDownloadUrlSchema.h | 78 - .../model/CatalogSeedDetailSchema.h | 101 - .../model/CatalogSeedOptionSchema.h | 22 - .../model/CatalogSeedOptionsResponseSchema.h | 16 - .../model/CatalogSeedRequestSchema.h | 30 - .../model/CatalogSeedResponseSchema.h | 16 - .../model/ControllerPolicyCreateSchema.h | 8 - .../model/ControllerPolicyExecuteSchema.h | 38 - ...llerPolicyInferenceCommandResponseSchema.h | 93 - .../ControllerPolicyInferenceCommandSchema.h | 95 - .../model/ControllerPolicyUpdateSchema.h | 7 - .../model/DatasetCreateSchema.h | 7 - .../model/DriverControllerAssetSchema.h | 139 - .../DriverControllerAssetsResponseSchema.h | 77 - .../model/DriverControllerSeedItemSchema.h | 116 - .../model/DriverControllerSeedRequestSchema.h | 93 - .../DriverControllerSeedResponseSchema.h | 93 - .../EnsureControllerPolicyResponseSchema.h | 107 - .../model/EpisodeSchema.h | 8 - .../model/HardwareOrderAdminSchema.h | 279 - .../model/HardwareOrderCreateSchema.h | 182 - .../model/HardwareOrderLineItemCreateSchema.h | 83 - .../model/HardwareOrderLineItemSchema.h | 132 - .../model/HardwareOrderLineItemUpdateSchema.h | 83 - .../model/HardwareOrderSchema.h | 255 - .../model/HardwareOrderStatusUpdateSchema.h | 75 - .../model/NavigationWaypointSchema.h | 7 - .../model/OnlineControllerSessionSchema.h | 7 - .../model/RLTaskCreateSchema.h | 28 - .../model/RLTaskGenerateEnvCfgSchema.h | 77 - .../model/RLTaskPolicyProvenanceSchema.h | 15 - .../RLTaskRLConfigValidateResultSchema.h | 85 - .../model/RLTaskSceneEntityCreateSchema.h | 7 - .../model/RLTaskSceneEntitySchema.h | 7 - .../model/RLTaskSceneEntityUpdateSchema.h | 7 - .../CppRestOpenAPIClient/model/RLTaskSchema.h | 32 - .../model/RLTaskSourceFileSchema.h | 4 +- .../model/RLTaskSourceFileUpsertSchema.h | 4 +- .../model/RLTaskUpdateSchema.h | 28 - .../SeedAutogenControllersRequestSchema.h | 74 - .../SeedAutogenControllersResponseSchema.h | 93 - .../model/SimulationStartSchema.h | 10 - .../model/SimulationStreamProfileSchema.h | 147 - .../TriggerAutogenControllersResponseSchema.h | 91 - .../CppRestOpenAPIClient/model/TwinSchema.h | 16 - .../model/WorkflowSchema.h | 8 - .../model/WorkflowTemplateSchema.h | 8 - .../model/WorkflowWorkerSourceSchema.h | 152 - .../model/WorkflowWorkerSourceUpdateSchema.h | 78 - rest/src/api/CatalogApi.cpp | 746 +- rest/src/api/DefaultApi.cpp | 12614 +++++++--------- .../src/model/AttachmentDownloadUrlSchema.cpp | 124 - rest/src/model/CatalogSeedDetailSchema.cpp | 270 - rest/src/model/CatalogSeedOptionSchema.cpp | 139 - .../CatalogSeedOptionsResponseSchema.cpp | 96 - rest/src/model/CatalogSeedRequestSchema.cpp | 188 - rest/src/model/CatalogSeedResponseSchema.cpp | 96 - .../model/ControllerPolicyCreateSchema.cpp | 48 - .../model/ControllerPolicyExecuteSchema.cpp | 216 - ...erPolicyInferenceCommandResponseSchema.cpp | 221 - ...ControllerPolicyInferenceCommandSchema.cpp | 218 - .../model/ControllerPolicyUpdateSchema.cpp | 46 - rest/src/model/DatasetCreateSchema.cpp | 45 - .../src/model/DriverControllerAssetSchema.cpp | 504 - .../DriverControllerAssetsResponseSchema.cpp | 123 - .../model/DriverControllerSeedItemSchema.cpp | 361 - .../DriverControllerSeedRequestSchema.cpp | 217 - .../DriverControllerSeedResponseSchema.cpp | 220 - .../EnsureControllerPolicyResponseSchema.cpp | 309 - rest/src/model/EpisodeSchema.cpp | 48 - rest/src/model/HardwareOrderAdminSchema.cpp | 1344 -- rest/src/model/HardwareOrderCreateSchema.cpp | 754 - .../HardwareOrderLineItemCreateSchema.cpp | 172 - .../src/model/HardwareOrderLineItemSchema.cpp | 462 - .../HardwareOrderLineItemUpdateSchema.cpp | 167 - rest/src/model/HardwareOrderSchema.cpp | 1197 -- .../model/HardwareOrderStatusUpdateSchema.cpp | 124 - rest/src/model/NavigationWaypointSchema.cpp | 45 - .../model/OnlineControllerSessionSchema.cpp | 46 - rest/src/model/RLTaskCreateSchema.cpp | 182 - rest/src/model/RLTaskGenerateEnvCfgSchema.cpp | 123 - .../model/RLTaskPolicyProvenanceSchema.cpp | 94 - .../RLTaskRLConfigValidateResultSchema.cpp | 169 - .../model/RLTaskSceneEntityCreateSchema.cpp | 46 - rest/src/model/RLTaskSceneEntitySchema.cpp | 46 - .../model/RLTaskSceneEntityUpdateSchema.cpp | 46 - rest/src/model/RLTaskSchema.cpp | 192 - rest/src/model/RLTaskUpdateSchema.cpp | 182 - .../SeedAutogenControllersRequestSchema.cpp | 121 - .../SeedAutogenControllersResponseSchema.cpp | 220 - rest/src/model/SimulationStartSchema.cpp | 46 - .../model/SimulationStreamProfileSchema.cpp | 483 - ...riggerAutogenControllersResponseSchema.cpp | 221 - rest/src/model/TwinSchema.cpp | 96 - rest/src/model/WorkflowSchema.cpp | 48 - rest/src/model/WorkflowTemplateSchema.cpp | 48 - rest/src/model/WorkflowWorkerSourceSchema.cpp | 590 - .../WorkflowWorkerSourceUpdateSchema.cpp | 124 - src/cyberwave/camera_streaming.cpp | 310 +- tests/test_camera_streaming.cpp | 18 - tests/test_mqtt_interface.cpp | 5 - 107 files changed, 5291 insertions(+), 22904 deletions(-) delete mode 100644 rest/include/CppRestOpenAPIClient/model/AttachmentDownloadUrlSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/CatalogSeedDetailSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandResponseSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/DriverControllerAssetSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/DriverControllerAssetsResponseSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/DriverControllerSeedItemSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/DriverControllerSeedRequestSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/DriverControllerSeedResponseSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/EnsureControllerPolicyResponseSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/HardwareOrderAdminSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/HardwareOrderCreateSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemCreateSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemUpdateSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/HardwareOrderSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/HardwareOrderStatusUpdateSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/RLTaskGenerateEnvCfgSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/RLTaskRLConfigValidateResultSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersRequestSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersResponseSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/SimulationStreamProfileSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/TriggerAutogenControllersResponseSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceSchema.h delete mode 100644 rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceUpdateSchema.h delete mode 100644 rest/src/model/AttachmentDownloadUrlSchema.cpp delete mode 100644 rest/src/model/CatalogSeedDetailSchema.cpp delete mode 100644 rest/src/model/ControllerPolicyInferenceCommandResponseSchema.cpp delete mode 100644 rest/src/model/ControllerPolicyInferenceCommandSchema.cpp delete mode 100644 rest/src/model/DriverControllerAssetSchema.cpp delete mode 100644 rest/src/model/DriverControllerAssetsResponseSchema.cpp delete mode 100644 rest/src/model/DriverControllerSeedItemSchema.cpp delete mode 100644 rest/src/model/DriverControllerSeedRequestSchema.cpp delete mode 100644 rest/src/model/DriverControllerSeedResponseSchema.cpp delete mode 100644 rest/src/model/EnsureControllerPolicyResponseSchema.cpp delete mode 100644 rest/src/model/HardwareOrderAdminSchema.cpp delete mode 100644 rest/src/model/HardwareOrderCreateSchema.cpp delete mode 100644 rest/src/model/HardwareOrderLineItemCreateSchema.cpp delete mode 100644 rest/src/model/HardwareOrderLineItemSchema.cpp delete mode 100644 rest/src/model/HardwareOrderLineItemUpdateSchema.cpp delete mode 100644 rest/src/model/HardwareOrderSchema.cpp delete mode 100644 rest/src/model/HardwareOrderStatusUpdateSchema.cpp delete mode 100644 rest/src/model/RLTaskGenerateEnvCfgSchema.cpp delete mode 100644 rest/src/model/RLTaskRLConfigValidateResultSchema.cpp delete mode 100644 rest/src/model/SeedAutogenControllersRequestSchema.cpp delete mode 100644 rest/src/model/SeedAutogenControllersResponseSchema.cpp delete mode 100644 rest/src/model/SimulationStreamProfileSchema.cpp delete mode 100644 rest/src/model/TriggerAutogenControllersResponseSchema.cpp delete mode 100644 rest/src/model/WorkflowWorkerSourceSchema.cpp delete mode 100644 rest/src/model/WorkflowWorkerSourceUpdateSchema.cpp diff --git a/README.md b/README.md index bf47dc8..f2b0c2e 100644 --- a/README.md +++ b/README.md @@ -98,8 +98,8 @@ sudo cmake --install build | `OpenSSL` | Yes | TLS | | `libmosquitto` + `nlohmann_json` + `spdlog` | For MQTT | Real-time pub/sub | | `OpenCV` | Optional | `camera_stream_opencv` example (`./install.sh --with-opencv`) | -| `libdatachannel` | Optional | WebRTC in CameraStreamer and EncodedH264CameraStreamer | -| FFmpeg (`libavcodec`, `libavutil`, `libswscale`) | Optional | H264 encoding in CameraStreamer (not required for EncodedH264CameraStreamer passthrough) | +| `libdatachannel` | Optional | WebRTC camera streaming | +| FFmpeg (`libavcodec`, `libavutil`, `libswscale`) | Optional | H264 encoding in CameraStreamer | ## Using the SDK in Your Project diff --git a/include/cyberwave/camera_streaming.h b/include/cyberwave/camera_streaming.h index c5cef0b..ec5abbe 100644 --- a/include/cyberwave/camera_streaming.h +++ b/include/cyberwave/camera_streaming.h @@ -101,6 +101,7 @@ class CameraStreamer private: void stream_loop(); + void publish_edge_health(double now_seconds); std::shared_ptr mqtt_; std::string twin_uuid_; @@ -117,7 +118,6 @@ class CameraStreamer std::string webrtc_stun_url_; std::vector webrtc_turn_servers_; std::unique_ptr webrtc_adapter_; - std::unique_ptr webrtc_mqtt_subscription_; // Optional: JPEG -> Annex-B H264 conversion when WebRTC is enabled. std::unique_ptr h264_encoder_; @@ -137,79 +137,6 @@ class CameraStreamer std::function log_fn_; }; -/** - * @brief Streamer for pre-encoded Annex-B H264 video. - * - * Bypasses raw-frame conversion and software H264 encoding for devices that - * already produce browser-compatible Annex-B access units. WebRTC carries video; - * MQTT carries signaling and edge_health telemetry (same contract as - * CameraStreamer). - * - * send_frame() forwards every access unit as-is: incoming frames are already - * inter-predicted by the source encoder, so dropping a non-key frame here would - * corrupt the decode chain for every subsequent frame until the next IDR. Rate - * limiting (if ever needed) must happen at GOP granularity upstream, not here. - * - * Threading: do not call send_frame() concurrently with stop() or from multiple - * threads without external synchronization. - */ -class EncodedH264CameraStreamer -{ -public: - /** - * @param mqtt Must outlive the streamer; can be nullptr (start() no-op). - * @param twin_uuid Twin to stream to. - */ - EncodedH264CameraStreamer(std::shared_ptr mqtt, const std::string& twin_uuid, - std::string sensor_name = "", - std::string webrtc_stun_url = "stun:stun.l.google.com:19302", - std::vector webrtc_turn_servers = {}); - ~EncodedH264CameraStreamer(); - - EncodedH264CameraStreamer(const EncodedH264CameraStreamer&) = delete; - EncodedH264CameraStreamer& operator=(const EncodedH264CameraStreamer&) = delete; - - void start(); - void stop(); - bool running() const noexcept { return running_.load(); } - - /** - * @brief Inject a log callback so WebRTC state messages use the caller's logger. - * - * Call before start(). - */ - void set_log_callback(std::function fn); - - /** - * @brief Enable or disable recording in the WebRTC offer sent to the media service. - * - * Call before start(). Default is false. - */ - void set_recording(bool recording) { recording_ = recording; } - - /** Push one Annex-B access unit. Returns false when not running, throttled, or send failed. */ - bool send_frame(const std::vector& annexb_h264, std::uint64_t timestamp_us); - -private: - std::shared_ptr mqtt_; - std::string twin_uuid_; - std::atomic running_{false}; - - std::string sensor_name_{}; - bool recording_{false}; - std::string webrtc_stun_url_; - std::vector webrtc_turn_servers_; - std::unique_ptr webrtc_adapter_; - std::unique_ptr webrtc_mqtt_subscription_; - - double edge_health_stream_started_at_seconds_{0.0}; - double edge_health_last_publish_ts_seconds_{0.0}; - double edge_health_last_frame_ts_seconds_{0.0}; - std::uint64_t edge_health_frames_sent_{0}; - - std::function log_fn_; -}; - /** * @brief Synthetic frame source for tests and placeholder streaming. */ diff --git a/include/cyberwave/cyberwave_mqtt_adapter.h b/include/cyberwave/cyberwave_mqtt_adapter.h index ed4b509..366909a 100644 --- a/include/cyberwave/cyberwave_mqtt_adapter.h +++ b/include/cyberwave/cyberwave_mqtt_adapter.h @@ -177,13 +177,6 @@ class CyberwaveMqttAdapter : public IMqttClient inner_->subscribe_pointcloud_stream(twin_uuid, wrap(handler)); } - std::unique_ptr subscribe_webrtc_messages_scoped(const std::string& twin_uuid, - MqttMessageHandler handler) override - { - inner_->publish_telemetry_start(twin_uuid); - return IMqttClient::subscribe_webrtc_messages_scoped(twin_uuid, std::move(handler)); - } - void subscribe_environment(const std::string& env_uuid, MqttMessageHandler handler) override { inner_->subscribe_environment(env_uuid, wrap(handler)); diff --git a/include/cyberwave/mqtt_interface.h b/include/cyberwave/mqtt_interface.h index 8b75cbd..ea4ed11 100644 --- a/include/cyberwave/mqtt_interface.h +++ b/include/cyberwave/mqtt_interface.h @@ -14,7 +14,6 @@ #include #include #include -#include namespace cyberwave { @@ -403,26 +402,6 @@ struct IMqttClient subscribe(get_topic_prefix() + "cyberwave/twin/" + twin_uuid + "/webrtc-candidate", std::move(handler)); } - /** - * Subscribe to WebRTC signaling with RAII unsubscribe when the handle is destroyed. - * Prefer this over subscribe_webrtc_messages() for stream lifecycles tied to start()/stop(). - */ - virtual std::unique_ptr subscribe_webrtc_messages_scoped(const std::string& twin_uuid, - MqttMessageHandler handler) - { - struct WebRtcMessageSubscriptions final : MqttSubscriptionHandle - { - std::vector> subscriptions; - }; - - auto handle = std::make_unique(); - const std::string base = get_topic_prefix() + "cyberwave/twin/" + twin_uuid + "/webrtc-"; - handle->subscriptions.push_back(subscribe_scoped(base + "offer", handler)); - handle->subscriptions.push_back(subscribe_scoped(base + "answer", handler)); - handle->subscriptions.push_back(subscribe_scoped(base + "candidate", std::move(handler))); - return handle; - } - /** * Publish an edge command response message for a twin. * Topic: {prefix}cyberwave/twin/{uuid}/command diff --git a/rest/include/CppRestOpenAPIClient/api/CatalogApi.h b/rest/include/CppRestOpenAPIClient/api/CatalogApi.h index cfcf848..e79b0c1 100644 --- a/rest/include/CppRestOpenAPIClient/api/CatalogApi.h +++ b/rest/include/CppRestOpenAPIClient/api/CatalogApi.h @@ -23,16 +23,9 @@ #include "CppRestOpenAPIClient/ApiClient.h" #include "CppRestOpenAPIClient/AnyType.h" -#include "CppRestOpenAPIClient/model/CatalogSeedDetailSchema.h" #include "CppRestOpenAPIClient/model/CatalogSeedOptionsResponseSchema.h" #include "CppRestOpenAPIClient/model/CatalogSeedRequestSchema.h" #include "CppRestOpenAPIClient/model/CatalogSeedResponseSchema.h" -#include "CppRestOpenAPIClient/model/DriverControllerAssetsResponseSchema.h" -#include "CppRestOpenAPIClient/model/DriverControllerSeedRequestSchema.h" -#include "CppRestOpenAPIClient/model/DriverControllerSeedResponseSchema.h" -#include "CppRestOpenAPIClient/model/SeedAutogenControllersRequestSchema.h" -#include "CppRestOpenAPIClient/model/SeedAutogenControllersResponseSchema.h" -#include "CppRestOpenAPIClient/model/TriggerAutogenControllersResponseSchema.h" #include #include #include @@ -54,14 +47,6 @@ class CatalogApi virtual ~CatalogApi(); - /// - /// List Driver Controller Assets - /// - /// - /// - /// - pplx::task> srcAppApiCatalogSeedListDriverControllerAssets( - ) const; /// /// Search Catalog /// @@ -77,16 +62,6 @@ class CatalogApi boost::optional offset ) const; /// - /// Seed Autogen Controllers - /// - /// - /// Seed (create or update) all autogenerated controllers into a workspace. Autogenerated controllers are derived from asset capabilities and stored in AUTOGENERATED_CONTROLLERS inside seed_controllers.py. This endpoint mirrors what the CLI does without the --autogen-controllers-from-prod file-write step. If the list is empty (no autogen run has happened yet), returns a zero-count result. - /// - /// - pplx::task> srcAppApiCatalogSeedSeedAutogenControllers( - std::shared_ptr seedAutogenControllersRequestSchema - ) const; - /// /// Seed Catalog /// /// @@ -97,28 +72,6 @@ class CatalogApi std::shared_ptr catalogSeedRequestSchema ) const; /// - /// Seed Detail - /// - /// - /// Inspectable detail for a single catalog item (admin \"info\" button). ``group`` is one of ``controllers``, ``mlmodels``, ``workflow_templates``, ``asset_patches``, or ``simplified_meshes``; ``key`` is the item's catalog key (or registry_id for asset patches and simplified meshes). - /// - /// - /// - pplx::task> srcAppApiCatalogSeedSeedDetail( - utility::string_t group, - utility::string_t key - ) const; - /// - /// Seed Driver Controllers - /// - /// - /// - /// - /// - pplx::task> srcAppApiCatalogSeedSeedDriverControllers( - std::shared_ptr driverControllerSeedRequestSchema - ) const; - /// /// Seed Options /// /// @@ -126,14 +79,6 @@ class CatalogApi /// pplx::task> srcAppApiCatalogSeedSeedOptions( ) const; - /// - /// Trigger Autogen Controllers - /// - /// - /// Fetch assets from production, regenerate AUTOGENERATED_CONTROLLERS in seed_controllers.py. Equivalent to running: python manage.py seed_controllers --env {env} --autogen-controllers-from-prod After the file is written, the module is reloaded so subsequent calls to /seed-options and /seed-autogen-controllers see the updated list immediately. - /// - pplx::task> srcAppApiCatalogSeedTriggerAutogenControllers( - ) const; protected: std::shared_ptr m_ApiClient; diff --git a/rest/include/CppRestOpenAPIClient/api/DefaultApi.h b/rest/include/CppRestOpenAPIClient/api/DefaultApi.h index f7b3cc7..7777b1c 100644 --- a/rest/include/CppRestOpenAPIClient/api/DefaultApi.h +++ b/rest/include/CppRestOpenAPIClient/api/DefaultApi.h @@ -42,7 +42,6 @@ #include "CppRestOpenAPIClient/model/AssetSchemaVariantUpsertSchema.h" #include "CppRestOpenAPIClient/model/AssetUpdateSchema.h" #include "CppRestOpenAPIClient/model/AttachmentCreateSchema.h" -#include "CppRestOpenAPIClient/model/AttachmentDownloadUrlSchema.h" #include "CppRestOpenAPIClient/model/AttachmentSchema.h" #include "CppRestOpenAPIClient/model/AutoTopupConfigSchema.h" #include "CppRestOpenAPIClient/model/AutoTopupUpdateSchema.h" @@ -58,8 +57,6 @@ #include "CppRestOpenAPIClient/model/ControllerPolicyCreateSchema.h" #include "CppRestOpenAPIClient/model/ControllerPolicyExecuteResponseSchema.h" #include "CppRestOpenAPIClient/model/ControllerPolicyExecuteSchema.h" -#include "CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandResponseSchema.h" -#include "CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandSchema.h" #include "CppRestOpenAPIClient/model/ControllerPolicySchema.h" #include "CppRestOpenAPIClient/model/ControllerPolicyStopEnvironmentSchema.h" #include "CppRestOpenAPIClient/model/ControllerPolicyStopResponseSchema.h" @@ -99,7 +96,6 @@ #include "CppRestOpenAPIClient/model/EdgeRegisterSchema.h" #include "CppRestOpenAPIClient/model/EdgeSchema.h" #include "CppRestOpenAPIClient/model/EndSessionResponseSchema.h" -#include "CppRestOpenAPIClient/model/EnsureControllerPolicyResponseSchema.h" #include "CppRestOpenAPIClient/model/EnvironmentCloneSchema.h" #include "CppRestOpenAPIClient/model/EnvironmentCreateSchema.h" #include "CppRestOpenAPIClient/model/EnvironmentNavigationSettingsPatchSchema.h" @@ -123,11 +119,6 @@ #include "CppRestOpenAPIClient/model/FinalizeTopupRequestSchema.h" #include "CppRestOpenAPIClient/model/FinalizeTopupResponseSchema.h" #include "CppRestOpenAPIClient/model/GeneratePromoCodeRequestSchema.h" -#include "CppRestOpenAPIClient/model/HardwareOrderAdminSchema.h" -#include "CppRestOpenAPIClient/model/HardwareOrderCreateSchema.h" -#include "CppRestOpenAPIClient/model/HardwareOrderLineItemUpdateSchema.h" -#include "CppRestOpenAPIClient/model/HardwareOrderSchema.h" -#include "CppRestOpenAPIClient/model/HardwareOrderStatusUpdateSchema.h" #include "CppRestOpenAPIClient/HttpContent.h" #include "CppRestOpenAPIClient/model/Image_Bytes.h" #include "CppRestOpenAPIClient/model/ImportResultSchema.h" @@ -203,7 +194,6 @@ #include "CppRestOpenAPIClient/model/RLTaskCheckpointSchema.h" #include "CppRestOpenAPIClient/model/RLTaskCloneSchema.h" #include "CppRestOpenAPIClient/model/RLTaskCreateSchema.h" -#include "CppRestOpenAPIClient/model/RLTaskGenerateEnvCfgSchema.h" #include "CppRestOpenAPIClient/model/RLTaskImportResultSchema.h" #include "CppRestOpenAPIClient/model/RLTaskInferenceLaunchSchema.h" #include "CppRestOpenAPIClient/model/RLTaskInferenceRunSchema.h" @@ -211,7 +201,6 @@ #include "CppRestOpenAPIClient/model/RLTaskOrchestrationHintsSchema.h" #include "CppRestOpenAPIClient/model/RLTaskPolicyProvenanceSchema.h" #include "CppRestOpenAPIClient/model/RLTaskRLConfigSpecSchema.h" -#include "CppRestOpenAPIClient/model/RLTaskRLConfigValidateResultSchema.h" #include "CppRestOpenAPIClient/model/RLTaskRegenerateSceneSchema.h" #include "CppRestOpenAPIClient/model/RLTaskSceneEntitiesReplaceSchema.h" #include "CppRestOpenAPIClient/model/RLTaskSceneEntityCreateSchema.h" @@ -309,8 +298,6 @@ #include "CppRestOpenAPIClient/model/WorkflowTemplateSchema.h" #include "CppRestOpenAPIClient/model/WorkflowTriggerSchema.h" #include "CppRestOpenAPIClient/model/WorkflowUpdateSchema.h" -#include "CppRestOpenAPIClient/model/WorkflowWorkerSourceSchema.h" -#include "CppRestOpenAPIClient/model/WorkflowWorkerSourceUpdateSchema.h" #include "CppRestOpenAPIClient/model/WorkflowsConfigSchema.h" #include "CppRestOpenAPIClient/model/WorkspaceCreateSchema.h" #include "CppRestOpenAPIClient/model/WorkspaceResponseSchema.h" @@ -1020,23 +1007,13 @@ class DefaultApi /// Download Attachment /// /// - /// Download attachment file content. Issues a 302 to the public CDN URL. Suitable for non-browser clients (SDK, CLI, ``curl``) that follow redirects without CORS. Browser XHR/``fetch`` callers should use ``/download-url`` instead — a cross-origin redirect taints their ``Origin`` to ``null`` and fails GCS CORS. + /// Download attachment file content. /// /// pplx::task srcAppApiAttachmentsDownloadAttachment( utility::string_t uuid ) const; /// - /// Download Attachment Url - /// - /// - /// Return the CDN URL for fetching the attachment directly. Browser callers fetch this endpoint (their real ``Origin`` is preserved), then fetch/download the returned URL directly — avoiding the cross-origin redirect that ``/download`` performs, which would null the ``Origin`` and be blocked by CORS. - /// - /// - pplx::task> srcAppApiAttachmentsDownloadAttachmentUrl( - utility::string_t uuid - ) const; - /// /// Get Attachment /// /// @@ -1173,18 +1150,6 @@ class DefaultApi boost::optional workspaceUuid ) const; /// - /// Send Inference Command - /// - /// - /// Send a validated inference command to a running RL-task controller. - /// - /// - /// - pplx::task> srcAppApiControllerPoliciesSendInferenceCommand( - utility::string_t uuid, - std::shared_ptr controllerPolicyInferenceCommandSchema - ) const; - /// /// Stop Controller Policy /// /// @@ -1330,7 +1295,7 @@ class DefaultApi /// Download Dataset /// /// - /// Request a download URL for a dataset in a specific format. This endpoint is **idempotent**: calling it multiple times will not spawn duplicate conversion tasks. Supported ``format`` values (``DatasetType`` values) ---------------------------------------------------- - ``parquet`` — Cyberwave joined-parquet zip (native datasets only). Deprecated alias: ``plain``. - ``lerobot3`` — LeRobot v3 (Forge writer). Deprecated alias: ``lerobot``. - ``lerobot21`` — LeRobot v2.1 (Forge writer). - ``rlds`` — RLDS / TF-Record (Open-X-Embodiment style, Forge writer). - ``openvla`` — Cyberwave OpenVLA TFDS bundle (Cyberwave-generated writer). - ``robodm`` — Berkeley .vla format (Forge writer). Planned / not yet implemented (returns 422): ``mcap``, ``gr00t``, ``hdf5``, ``zarr``, ``rosbag`` Returns ------- HTTP 200 (``DatasetDownloadReadySchema``) The artifact is ready; ``signed_url`` is valid for 24 h. HTTP 202 (``DatasetDownloadProcessingSchema``) A conversion task was queued or is already running. Poll ``poll_url`` (this endpoint) again until you get a 200. HTTP 422 The format is not supported (either invalid or TODO). + /// Request a download URL for a dataset in a specific format. This endpoint is **idempotent**: calling it multiple times will not spawn duplicate conversion tasks. Supported ``format`` values (``DatasetType`` values) ---------------------------------------------------- - ``parquet`` — Cyberwave joined-parquet zip (native datasets only). Deprecated alias: ``plain``. - ``lerobot3`` — LeRobot v3 (Forge writer). Deprecated alias: ``lerobot``. - ``lerobot21`` — LeRobot v2.1 (Forge writer). - ``rlds`` — RLDS / TF-Record (Open-X-Embodiment style, Forge writer). - ``openvla`` — Cyberwave OpenVLA TFDS bundle (Cyberwave-owned writer). - ``robodm`` — Berkeley .vla format (Forge writer). Planned / not yet implemented (returns 422): ``mcap``, ``gr00t``, ``hdf5``, ``zarr``, ``rosbag`` Returns ------- HTTP 200 (``DatasetDownloadReadySchema``) The artifact is ready; ``signed_url`` is valid for 24 h. HTTP 202 (``DatasetDownloadProcessingSchema``) A conversion task was queued or is already running. Poll ``poll_url`` (this endpoint) again until you get a 200. HTTP 422 The format is not supported (either invalid or TODO). /// /// /// @@ -1806,13 +1771,11 @@ class DefaultApi /// Get Environment Urdf Scene Zip Direct /// /// - /// Get URDF scene ZIP for an environment (direct download). Returns a ZIP file containing: - scene.urdf: The complete URDF scene - assets/: Directory with all required mesh files Composes schema from all twins and exports to URDF format. ``exclude_twin_uuids`` (optional, comma-separated) drops the named twins from the export. The Gazebo HIL path passes the arm twin's UUID here so the ZIP contains only the environment props (the arm is spawned separately from its kortex description). + /// Get URDF scene ZIP for an environment (direct download). Returns a ZIP file containing: - scene.urdf: The complete URDF scene - assets/: Directory with all required mesh files Composes schema from all twins and exports to URDF format. /// /// - /// (optional, default to utility::conversions::to_string_t("")) pplx::task srcAppApiEnvironmentsExportsGetEnvironmentUrdfSceneZipDirect( - utility::string_t uuid, - boost::optional excludeTwinUuids + utility::string_t uuid ) const; /// /// Get Mjlab Scene Package Zip @@ -2192,15 +2155,13 @@ class DefaultApi /// Get Recording Data /// /// - /// Return signed URLs and minimal metadata for replay (no sampled frames). Camera: MP4 signed URL (legacy MKV chunks may require a narrow parquet read). Robot: parquet signed URL for client-side windowed reads. Pointcloud: flatbuffer chunk signed URLs when ``return_flatbuffers`` (default); otherwise parquet descriptors (generating/updating/ready) and a prewarm of the parquet build for each linked stream. + /// Return signed URLs and minimal metadata for replay (no sampled frames). Camera: MP4 signed URL (legacy MKV chunks may require a narrow parquet read). Robot: parquet signed URL for client-side windowed reads. Pointcloud: flatbuffer chunk signed URLs (unchanged linking). /// /// /// - /// (optional, default to false) pplx::task> srcAppApiEnvironmentsRecordingsGetRecordingData( utility::string_t uuid, - utility::string_t recordingUuid, - boost::optional returnFlatbuffers + utility::string_t recordingUuid ) const; /// /// Get Recording Debug Artifacts @@ -2389,22 +2350,6 @@ class DefaultApi utility::string_t uuid ) const; /// - /// Get Online Controller Session Logs - /// - /// - /// Return recent logs for an online controller session. - /// - /// - /// - /// (optional, default to utility::conversions::to_string_t("")) - /// (optional, default to 0) - pplx::task>> srcAppApiEnvironmentsSimulationGetOnlineControllerSessionLogs( - utility::string_t uuid, - utility::string_t sessionUuid, - boost::optional logType, - boost::optional limit - ) const; - /// /// List Online Controller Sessions /// /// @@ -3288,7 +3233,7 @@ class DefaultApi /// List Mlmodels /// /// - /// List all ML models for the authenticated user's workspace. Query params: deployment: Filter by deployment type (cloud, edge, hybrid) edge_compatible: If true, return only edge or hybrid models model_external_id: Filter by exact model_external_id (e.g. \"yolov8n.pt\") supported_level: Filter by supported_level (driver, cloud, backend, not_supported_yet) is_trainable: Filter by is_trainable catalog_seed_id: Filter by metadata.catalog_seed_id (the ``catalog_key`` stamped by the seed_models command). Used by the seeder to dedup catalog entries idempotently. + /// List all ML models for the authenticated user's workspace. Query params: deployment: Filter by deployment type (cloud, edge, hybrid) edge_compatible: If true, return only edge or hybrid models model_external_id: Filter by exact model_external_id (e.g. \"yolov8n.pt\") supported_level: Filter by supported_level (driver, cloud, backend, not_supported_yet) is_trainable: Filter by is_trainable catalog_seed_id: Filter by metadata.catalog_seed_id (the ``catalog_key`` stamped by the seed_models command). Used by the seeder to dedup catalog entries idempotently. offset/limit: Optional pagination. When ``limit`` is omitted the full result set is returned (backward compatible). /// /// (optional, default to utility::conversions::to_string_t("")) /// (optional, default to false) @@ -3296,23 +3241,31 @@ class DefaultApi /// (optional, default to utility::conversions::to_string_t("")) /// (optional, default to false) /// (optional, default to utility::conversions::to_string_t("")) + /// (optional, default to 0) + /// (optional, default to 0) pplx::task>> srcAppApiMlmodelsListMlmodels( boost::optional deployment, boost::optional edgeCompatible, boost::optional modelExternalId, boost::optional supportedLevel, boost::optional isTrainable, - boost::optional catalogSeedId + boost::optional catalogSeedId, + boost::optional limit, + boost::optional offset ) const; /// /// List Public Mlmodels /// /// - /// List all public ML models. No authentication required. + /// List all public ML models. No authentication required. Supports optional ``offset``/``limit`` pagination. When ``limit`` is omitted the full result set is returned (backward compatible). /// /// (optional, default to utility::conversions::to_string_t("")) + /// (optional, default to 0) + /// (optional, default to 0) pplx::task>> srcAppApiMlmodelsListPublicMlmodels( - boost::optional deployment + boost::optional deployment, + boost::optional limit, + boost::optional offset ) const; /// /// List Structured Actions @@ -3475,76 +3428,6 @@ class DefaultApi std::shared_ptr image ) const; /// - /// Create Hardware Order - /// - /// - /// - /// - /// - /// - pplx::task> srcAppApiOrdersCreateHardwareOrder( - utility::string_t workspaceUuid, - std::shared_ptr hardwareOrderCreateSchema - ) const; - /// - /// Get Hardware Order - /// - /// - /// - /// - /// - /// - pplx::task> srcAppApiOrdersGetHardwareOrder( - utility::string_t workspaceUuid, - utility::string_t orderUuid - ) const; - /// - /// List All Hardware Orders - /// - /// - /// - /// - /// (optional, default to utility::conversions::to_string_t("")) - pplx::task>> srcAppApiOrdersListAllHardwareOrders( - boost::optional status - ) const; - /// - /// List Hardware Orders - /// - /// - /// - /// - /// - pplx::task>> srcAppApiOrdersListHardwareOrders( - utility::string_t workspaceUuid - ) const; - /// - /// Update Hardware Order Line Item - /// - /// - /// - /// - /// - /// - /// - pplx::task> srcAppApiOrdersUpdateHardwareOrderLineItem( - utility::string_t orderUuid, - utility::string_t lineItemUuid, - std::shared_ptr hardwareOrderLineItemUpdateSchema - ) const; - /// - /// Update Hardware Order Status - /// - /// - /// - /// - /// - /// - pplx::task> srcAppApiOrdersUpdateHardwareOrderStatus( - utility::string_t orderUuid, - std::shared_ptr hardwareOrderStatusUpdateSchema - ) const; - /// /// Charge Saved Card /// /// @@ -3942,15 +3825,13 @@ class DefaultApi /// Delete Rl Task Source File /// /// - /// Delete a source file by path. User-written files delete freely. Cyberwave-generated files are protected by default (deleting one only to have the next regenerate / export recreate it is rarely intended), but ``force=true`` lets the operator remove them deliberately — e.g. to clean up demo-seeded files. Regenerating (Scene / Actions / Observations / Files tabs) will recreate any generated file. + /// Delete a single user-owned source file by path. /// /// /// - /// (optional, default to false) pplx::task srcAppApiRlTasksDeleteRlTaskSourceFile( utility::string_t uuid, - utility::string_t path, - boost::optional force + utility::string_t path ) const; /// /// Export Rl Task Zip @@ -3963,22 +3844,10 @@ class DefaultApi utility::string_t uuid ) const; /// - /// Generate Rl Task Env Cfg - /// - /// - /// Write a runnable starter for the user-written ``env_cfg.py``. The starter wires the generated ``make_scene_cfg`` + ``make_actions`` + ``make_observations`` into an mjlab ``ManagerBasedRlEnvCfg`` so the user has a working entrypoint to edit instead of a blank file. Unlike the Cyberwave-generated modules, ``env_cfg.py`` is user-written — so we refuse to overwrite an existing one unless ``overwrite`` is set, surfacing a 409 the UI confirms before clobbering hand-written code. - /// - /// - /// - pplx::task> srcAppApiRlTasksExportsGenerateRlTaskEnvCfg( - utility::string_t uuid, - std::shared_ptr rLTaskGenerateEnvCfgSchema - ) const; - /// /// Regenerate Rl Task Scene Cfg /// /// - /// Regenerate the Cyberwave-generated SceneCfg source file at ``scene_cfg_path``. The user controls *where* the file is written (any safe relative path inside the task tree); we never enforce a particular import statement in the surrounding user code. + /// Regenerate the Cyberwave-owned SceneCfg source file at ``scene_cfg_path``. The user controls *where* the file is written (any safe relative path inside the task tree); we never enforce a particular import statement in the surrounding user code. /// /// /// @@ -3987,16 +3856,6 @@ class DefaultApi std::shared_ptr rLTaskRegenerateSceneSchema ) const; /// - /// Regenerate Rl Task Task Spec - /// - /// - /// Regenerate the spec-derived files (Actions / Observations tabs). Refreshes ``cyberwave_task_spec.py``, ``scene_bindings.py``, ``actions.py``, ``observations.py``, and the ``task_export/`` adapters — everything that derives from the authored Actions / Observations / RL-config — without rebuilding ``scene_cfg.py``. Use ``regenerate-scene-cfg`` (Scene tab) for the scene, or the Files tab to regenerate everything. - /// - /// - pplx::task> srcAppApiRlTasksExportsRegenerateRlTaskTaskSpec( - utility::string_t uuid - ) const; - /// /// Get Rl Task /// /// @@ -4322,7 +4181,7 @@ class DefaultApi /// Update Rl Task From Zip /// /// - /// Replace/update the user-written source files of an RL task from a ZIP. + /// Replace/update the user-owned source files of an RL task from a ZIP. /// /// /// @@ -4362,7 +4221,7 @@ class DefaultApi /// Upsert Rl Task Source File /// /// - /// Upsert a single source file for an RL task. Editing a Cyberwave-generated file is allowed (operators sometimes need to tweak one); we preserve its existing owner + ``generated_kind`` so it stays in place and a later regenerate still restores the canonical version. + /// Upsert a single user-owned source file for an RL task. /// /// /// @@ -4371,18 +4230,6 @@ class DefaultApi std::shared_ptr rLTaskSourceFileUpsertSchema ) const; /// - /// Validate Rl Task Rl Config - /// - /// - /// Dry-run validate an RL config spec without persisting it. Runs the same ``normalize_rl_config_spec`` the save path uses, so a ``valid`` result guarantees a subsequent save would also pass. A failing spec is a normal ``200`` result (``{valid: false, error}``) rather than an HTTP error, so the frontend should read ``valid`` instead of the status. - /// - /// - /// - pplx::task> srcAppApiRlTasksValidateRlTaskRlConfig( - utility::string_t uuid, - std::shared_ptr rLTaskRLConfigSpecSchema - ) const; - /// /// Check Entity Slug /// /// @@ -4595,16 +4442,6 @@ class DefaultApi boost::optional robotType ) const; /// - /// Ensure Twin Controller Policy - /// - /// - /// Ensure a twin has a teleop controller policy attached (setup-time). Called by the Send Pose inspector on twin selection: auto-attaches a default when none is set, else raises an operator Alert + 409 so the UI can warn. - /// - /// - pplx::task> srcAppApiTwinsEnsureTwinControllerPolicy( - utility::string_t uuid - ) const; - /// /// Execute Twin Action /// /// @@ -4698,7 +4535,7 @@ class DefaultApi /// Get Twin Latest Frame /// /// - /// Get the latest frame from a twin's camera stream. Serves the frame directly from Redis without saving to permanent storage. For multi-camera twins, the media service stores frames with key frame:{twin_uuid}_{sensor_id}:rgb:latest. Pass ?sensor_id=wrist_camera to get a specific camera. Query params: - mock: if true, return a deterministic mock JPEG payload. - frame_bucket: ``\"policy_depth\"`` to fetch the policy-resolution depth frame rendered by cyberwave-sim at the trained observation resolution (e.g. 32x32). Parity-critical: returns 404 when no policy-depth frame is available rather than falling back to a regular RGB frame. + /// Get the latest frame from a twin's camera stream. Serves the frame directly from Redis without saving to permanent storage. For multi-camera twins, the media service stores frames with key frame:{twin_uuid}_{sensor_id}:rgb:latest. Pass ?sensor_id=wrist_camera to get a specific camera. Query params: - mock: if true, return a deterministic mock JPEG payload. - frame_bucket: ``\"policy_depth\"`` to fetch the policy-resolution depth frame rendered by cyberwave-sim at the trained observation resolution (e.g. 32x32). Falls back to the regular frame when unavailable. /// /// /// (optional, default to false) @@ -5425,16 +5262,6 @@ class DefaultApi utility::string_t nodeUuid ) const; /// - /// Get Workflow Worker Source - /// - /// - /// Return the materialised worker source plus override provenance. ``materialized_source`` is what ships to the edge (override if saved, else autogenerated). ``autogenerated_source`` is always the current compiler output so the UI can diff and offer \"restore\". ``is_stale`` warns that the graph changed since the override was saved. - /// - /// - pplx::task> srcAppApiWorkflowsGetWorkflowWorkerSource( - utility::string_t uuid - ) const; - /// /// Get Workflows Config /// /// @@ -5509,28 +5336,6 @@ class DefaultApi boost::optional slug ) const; /// - /// Restore Workflow Worker Source - /// - /// - /// Restore the autogenerated worker source by clearing the override. - /// - /// - pplx::task> srcAppApiWorkflowsRestoreWorkflowWorkerSource( - utility::string_t uuid - ) const; - /// - /// Save Workflow Worker Source - /// - /// - /// Save (or replace) the user's worker-source override. The override is validated as parseable Python (never executed here) and stored verbatim. We snapshot a hash of the *current* autogenerated source so later graph edits can be detected as drift (``is_stale``). Custom worker source only ever runs on the user's own edge runtime. - /// - /// - /// - pplx::task> srcAppApiWorkflowsSaveWorkflowWorkerSource( - utility::string_t uuid, - std::shared_ptr workflowWorkerSourceUpdateSchema - ) const; - /// /// Sync Workflow To Edge /// /// @@ -5890,7 +5695,7 @@ class DefaultApi /// Leave Team /// /// - /// Leave a team, or (for workspace admins) remove another member. + /// Leave a team /// /// /// diff --git a/rest/include/CppRestOpenAPIClient/model/AttachmentDownloadUrlSchema.h b/rest/include/CppRestOpenAPIClient/model/AttachmentDownloadUrlSchema.h deleted file mode 100644 index 97a6cdd..0000000 --- a/rest/include/CppRestOpenAPIClient/model/AttachmentDownloadUrlSchema.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * AttachmentDownloadUrlSchema.h - * - * CDN URL for fetching an attachment's file directly. Returned instead of a 302 redirect so browser callers can fetch the object directly (preserving their real ``Origin``) rather than being redirected cross-origin, which taints the ``Origin`` to ``null`` and fails CORS. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_AttachmentDownloadUrlSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_AttachmentDownloadUrlSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// CDN URL for fetching an attachment's file directly. Returned instead of a 302 redirect so browser callers can fetch the object directly (preserving their real ``Origin``) rather than being redirected cross-origin, which taints the ``Origin`` to ``null`` and fails CORS. -/// -class AttachmentDownloadUrlSchema - : public ModelBase -{ -public: - AttachmentDownloadUrlSchema(); - virtual ~AttachmentDownloadUrlSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// AttachmentDownloadUrlSchema members - - - utility::string_t getUrl() const; - bool urlIsSet() const; - void unsetUrl(); - void setUrl(const utility::string_t& value); - - -protected: - utility::string_t m_Url; - bool m_UrlIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_AttachmentDownloadUrlSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/CatalogSeedDetailSchema.h b/rest/include/CppRestOpenAPIClient/model/CatalogSeedDetailSchema.h deleted file mode 100644 index fd207e7..0000000 --- a/rest/include/CppRestOpenAPIClient/model/CatalogSeedDetailSchema.h +++ /dev/null @@ -1,101 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * CatalogSeedDetailSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_CatalogSeedDetailSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_CatalogSeedDetailSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class CatalogSeedDetailSchema - : public ModelBase -{ -public: - CatalogSeedDetailSchema(); - virtual ~CatalogSeedDetailSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// CatalogSeedDetailSchema members - - - utility::string_t getGroup() const; - bool groupIsSet() const; - void unsetGroup(); - void setGroup(const utility::string_t& value); - - utility::string_t getKey() const; - bool keyIsSet() const; - void unsetKey(); - void setKey(const utility::string_t& value); - - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - void setName(const utility::string_t& value); - - std::map> getDetail() const; - bool detailIsSet() const; - void unsetDetail(); - void setDetail(const std::map>& value); - - -protected: - utility::string_t m_Group; - bool m_GroupIsSet; - - utility::string_t m_Key; - bool m_KeyIsSet; - - utility::string_t m_Name; - bool m_NameIsSet; - - std::map> m_Detail; - bool m_DetailIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_CatalogSeedDetailSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionSchema.h b/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionSchema.h index b3fc467..7f69d4e 100644 --- a/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionSchema.h @@ -84,21 +84,6 @@ class CatalogSeedOptionSchema void unsetTemplate_kind(); void setTemplateKind(const utility::string_t& value); - utility::string_t getRegistryId() const; - bool registryIdIsSet() const; - void unsetRegistry_id(); - void setRegistryId(const utility::string_t& value); - - int32_t getPatchCount() const; - bool patchCountIsSet() const; - void unsetPatch_count(); - void setPatchCount(int32_t value); - - bool isIsAutogenerated() const; - bool isAutogeneratedIsSet() const; - void unsetIs_autogenerated(); - void setIsAutogenerated(bool value); - protected: utility::string_t m_Key; @@ -116,13 +101,6 @@ class CatalogSeedOptionSchema boost::optional m_Template_kind; - boost::optional m_Registry_id; - - boost::optional m_Patch_count; - - bool m_Is_autogenerated; - bool m_Is_autogeneratedIsSet; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionsResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionsResponseSchema.h index 2bcb017..77c094d 100644 --- a/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionsResponseSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/CatalogSeedOptionsResponseSchema.h @@ -71,16 +71,6 @@ class CatalogSeedOptionsResponseSchema void unsetWorkflow_templates(); void setWorkflowTemplates(const std::vector>& value); - std::vector> getAssetPatches() const; - bool assetPatchesIsSet() const; - void unsetAsset_patches(); - void setAssetPatches(const std::vector>& value); - - std::vector> getSimplifiedMeshes() const; - bool simplifiedMeshesIsSet() const; - void unsetSimplified_meshes(); - void setSimplifiedMeshes(const std::vector>& value); - protected: std::vector> m_Controllers; @@ -92,12 +82,6 @@ class CatalogSeedOptionsResponseSchema std::vector> m_Workflow_templates; bool m_Workflow_templatesIsSet; - std::vector> m_Asset_patches; - bool m_Asset_patchesIsSet; - - std::vector> m_Simplified_meshes; - bool m_Simplified_meshesIsSet; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/CatalogSeedRequestSchema.h b/rest/include/CppRestOpenAPIClient/model/CatalogSeedRequestSchema.h index 229a5c5..ca65ebe 100644 --- a/rest/include/CppRestOpenAPIClient/model/CatalogSeedRequestSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/CatalogSeedRequestSchema.h @@ -75,16 +75,6 @@ class CatalogSeedRequestSchema void unsetSeed_workflow_templates(); void setSeedWorkflowTemplates(bool value); - bool isSeedAssetPatches() const; - bool seedAssetPatchesIsSet() const; - void unsetSeed_asset_patches(); - void setSeedAssetPatches(bool value); - - bool isSeedSimplifiedMeshes() const; - bool seedSimplifiedMeshesIsSet() const; - void unsetSeed_simplified_meshes(); - void setSeedSimplifiedMeshes(bool value); - std::vector getControllerKeys() const; bool controllerKeysIsSet() const; void unsetController_keys(); @@ -100,16 +90,6 @@ class CatalogSeedRequestSchema void unsetWorkflow_template_keys(); void setWorkflowTemplateKeys(const std::vector& value); - std::vector getAssetPatchKeys() const; - bool assetPatchKeysIsSet() const; - void unsetAsset_patch_keys(); - void setAssetPatchKeys(const std::vector& value); - - std::vector getSimplifiedMeshKeys() const; - bool simplifiedMeshKeysIsSet() const; - void unsetSimplified_mesh_keys(); - void setSimplifiedMeshKeys(const std::vector& value); - protected: boost::optional m_Workspace_uuid; @@ -123,22 +103,12 @@ class CatalogSeedRequestSchema bool m_Seed_workflow_templates; bool m_Seed_workflow_templatesIsSet; - bool m_Seed_asset_patches; - bool m_Seed_asset_patchesIsSet; - - bool m_Seed_simplified_meshes; - bool m_Seed_simplified_meshesIsSet; - boost::optional> m_Controller_keys; boost::optional> m_Mlmodel_keys; boost::optional> m_Workflow_template_keys; - boost::optional> m_Asset_patch_keys; - - boost::optional> m_Simplified_mesh_keys; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/CatalogSeedResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/CatalogSeedResponseSchema.h index 6d43696..8377bcc 100644 --- a/rest/include/CppRestOpenAPIClient/model/CatalogSeedResponseSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/CatalogSeedResponseSchema.h @@ -76,16 +76,6 @@ class CatalogSeedResponseSchema void unsetWorkflow_templates(); void setWorkflowTemplates(const std::shared_ptr& value); - std::shared_ptr getAssetPatches() const; - bool assetPatchesIsSet() const; - void unsetAsset_patches(); - void setAssetPatches(const std::shared_ptr& value); - - std::shared_ptr getSimplifiedMeshes() const; - bool simplifiedMeshesIsSet() const; - void unsetSimplified_meshes(); - void setSimplifiedMeshes(const std::shared_ptr& value); - protected: utility::string_t m_Workspace_uuid; @@ -100,12 +90,6 @@ class CatalogSeedResponseSchema std::shared_ptr m_Workflow_templates; bool m_Workflow_templatesIsSet; - std::shared_ptr m_Asset_patches; - bool m_Asset_patchesIsSet; - - std::shared_ptr m_Simplified_meshes; - bool m_Simplified_meshesIsSet; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyCreateSchema.h b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyCreateSchema.h index a6b61c5..127afee 100644 --- a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyCreateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyCreateSchema.h @@ -97,11 +97,6 @@ class ControllerPolicyCreateSchema void unsetAsset_uuids(); void setAssetUuids(const std::vector& value); - std::vector getAssetRegistryIds() const; - bool assetRegistryIdsIsSet() const; - void unsetAsset_registry_ids(); - void setAssetRegistryIds(const std::vector& value); - utility::string_t getDevice() const; bool deviceIsSet() const; void unsetDevice(); @@ -130,9 +125,6 @@ class ControllerPolicyCreateSchema std::vector m_Asset_uuids; bool m_Asset_uuidsIsSet; - std::vector m_Asset_registry_ids; - bool m_Asset_registry_idsIsSet; - boost::optional m_Device; }; diff --git a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyExecuteSchema.h b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyExecuteSchema.h index 3790311..a1d0931 100644 --- a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyExecuteSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyExecuteSchema.h @@ -62,11 +62,6 @@ class ControllerPolicyExecuteSchema LIVE, SIMULATION, }; - enum class TransportEnum - { - ZENOH, - MQTT, - }; enum class Runtime_kindEnum { PHYSICAL, @@ -95,10 +90,6 @@ class ControllerPolicyExecuteSchema const utility::string_t fromModeEnum(const ModeEnum value) const; - TransportEnum toTransportEnum(const utility::string_t& value) const; - const utility::string_t fromTransportEnum(const TransportEnum value) const; - - Runtime_kindEnum toRuntime_kindEnum(const utility::string_t& value) const; const utility::string_t fromRuntime_kindEnum(const Runtime_kindEnum value) const; @@ -130,16 +121,6 @@ class ControllerPolicyExecuteSchema void unsetMode(); void setMode(const ModeEnum value); - TransportEnum getTransport() const; - bool transportIsSet() const; - void unsetTransport(); - void setTransport(const TransportEnum value); - - bool isConfirmLive() const; - bool confirmLiveIsSet() const; - void unsetConfirm_live(); - void setConfirmLive(bool value); - Runtime_kindEnum getRuntimeKind() const; bool runtimeKindIsSet() const; void unsetRuntime_kind(); @@ -230,16 +211,6 @@ class ControllerPolicyExecuteSchema void unsetServer_mode(); void setServerMode(bool value); - std::map> getInferenceCommand() const; - bool inferenceCommandIsSet() const; - void unsetInference_command(); - void setInferenceCommand(const std::map>& value); - - std::map> getRuntimeParams() const; - bool runtimeParamsIsSet() const; - void unsetRuntime_params(); - void setRuntimeParams(const std::map>& value); - protected: utility::string_t m_Twin_uuid; @@ -250,11 +221,6 @@ class ControllerPolicyExecuteSchema boost::optional m_Mode; - boost::optional m_Transport; - - bool m_Confirm_live; - bool m_Confirm_liveIsSet; - boost::optional m_Runtime_kind; boost::optional m_Simulation_backend; @@ -293,10 +259,6 @@ class ControllerPolicyExecuteSchema bool m_Server_mode; bool m_Server_modeIsSet; - boost::optional>> m_Inference_command; - - boost::optional>> m_Runtime_params; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandResponseSchema.h deleted file mode 100644 index 97e0c98..0000000 --- a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandResponseSchema.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ControllerPolicyInferenceCommandResponseSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ControllerPolicyInferenceCommandResponseSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ControllerPolicyInferenceCommandResponseSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class ControllerPolicyInferenceCommandResponseSchema - : public ModelBase -{ -public: - ControllerPolicyInferenceCommandResponseSchema(); - virtual ~ControllerPolicyInferenceCommandResponseSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// ControllerPolicyInferenceCommandResponseSchema members - - - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - void setStatus(const utility::string_t& value); - - utility::string_t getTopic() const; - bool topicIsSet() const; - void unsetTopic(); - void setTopic(const utility::string_t& value); - - std::map> getPayloadSent() const; - bool payloadSentIsSet() const; - void unsetPayload_sent(); - void setPayloadSent(const std::map>& value); - - -protected: - utility::string_t m_Status; - bool m_StatusIsSet; - - utility::string_t m_Topic; - bool m_TopicIsSet; - - std::map> m_Payload_sent; - bool m_Payload_sentIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ControllerPolicyInferenceCommandResponseSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandSchema.h b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandSchema.h deleted file mode 100644 index c074c20..0000000 --- a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandSchema.h +++ /dev/null @@ -1,95 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * ControllerPolicyInferenceCommandSchema.h - * - * Send a validated inference command to a running RL-task controller. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_ControllerPolicyInferenceCommandSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_ControllerPolicyInferenceCommandSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// Send a validated inference command to a running RL-task controller. -/// -class ControllerPolicyInferenceCommandSchema - : public ModelBase -{ -public: - ControllerPolicyInferenceCommandSchema(); - virtual ~ControllerPolicyInferenceCommandSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// ControllerPolicyInferenceCommandSchema members - - - utility::string_t getTwinUuid() const; - bool twinUuidIsSet() const; - void unsetTwin_uuid(); - void setTwinUuid(const utility::string_t& value); - - utility::string_t getCommandName() const; - bool commandNameIsSet() const; - void unsetCommand_name(); - void setCommandName(const utility::string_t& value); - - std::map> getPayload() const; - bool payloadIsSet() const; - void unsetPayload(); - void setPayload(const std::map>& value); - - -protected: - utility::string_t m_Twin_uuid; - bool m_Twin_uuidIsSet; - - boost::optional m_Command_name; - - std::map> m_Payload; - bool m_PayloadIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_ControllerPolicyInferenceCommandSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyUpdateSchema.h b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyUpdateSchema.h index 959e87d..47f6e08 100644 --- a/rest/include/CppRestOpenAPIClient/model/ControllerPolicyUpdateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/ControllerPolicyUpdateSchema.h @@ -87,11 +87,6 @@ class ControllerPolicyUpdateSchema void unsetAsset_uuids(); void setAssetUuids(const std::vector& value); - std::vector getAssetRegistryIds() const; - bool assetRegistryIdsIsSet() const; - void unsetAsset_registry_ids(); - void setAssetRegistryIds(const std::vector& value); - utility::string_t getDevice() const; bool deviceIsSet() const; void unsetDevice(); @@ -111,8 +106,6 @@ class ControllerPolicyUpdateSchema boost::optional> m_Asset_uuids; - boost::optional> m_Asset_registry_ids; - boost::optional m_Device; }; diff --git a/rest/include/CppRestOpenAPIClient/model/DatasetCreateSchema.h b/rest/include/CppRestOpenAPIClient/model/DatasetCreateSchema.h index 8854a5a..846d3cd 100644 --- a/rest/include/CppRestOpenAPIClient/model/DatasetCreateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/DatasetCreateSchema.h @@ -72,11 +72,6 @@ class DatasetCreateSchema void unsetMetadata(); void setMetadata(const std::map>& value); - bool isIncludeAudio() const; - bool includeAudioIsSet() const; - void unsetInclude_audio(); - void setIncludeAudio(bool value); - protected: std::vector m_Episodes; @@ -86,8 +81,6 @@ class DatasetCreateSchema boost::optional>> m_Metadata; - boost::optional m_Include_audio; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/DriverControllerAssetSchema.h b/rest/include/CppRestOpenAPIClient/model/DriverControllerAssetSchema.h deleted file mode 100644 index 1127ed1..0000000 --- a/rest/include/CppRestOpenAPIClient/model/DriverControllerAssetSchema.h +++ /dev/null @@ -1,139 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DriverControllerAssetSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerAssetSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerAssetSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class DriverControllerAssetSchema - : public ModelBase -{ -public: - DriverControllerAssetSchema(); - virtual ~DriverControllerAssetSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// DriverControllerAssetSchema members - - - utility::string_t getAssetUuid() const; - bool assetUuidIsSet() const; - void unsetAsset_uuid(); - void setAssetUuid(const utility::string_t& value); - - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - void setName(const utility::string_t& value); - - utility::string_t getSlug() const; - bool slugIsSet() const; - void unsetSlug(); - void setSlug(const utility::string_t& value); - - utility::string_t getRegistryId() const; - bool registryIdIsSet() const; - void unsetRegistry_id(); - void setRegistryId(const utility::string_t& value); - - utility::string_t getCatalogKey() const; - bool catalogKeyIsSet() const; - void unsetCatalog_key(); - void setCatalogKey(const utility::string_t& value); - - std::map> getMqttCommandSchema() const; - bool mqttCommandSchemaIsSet() const; - void unsetMqtt_command_schema(); - void setMqttCommandSchema(const std::map>& value); - - std::vector getControllableJointNames() const; - bool controllableJointNamesIsSet() const; - void unsetControllable_joint_names(); - void setControllableJointNames(const std::vector& value); - - bool isAlreadySeeded() const; - bool alreadySeededIsSet() const; - void unsetAlready_seeded(); - void setAlreadySeeded(bool value); - - utility::string_t getControllerPolicyUuid() const; - bool controllerPolicyUuidIsSet() const; - void unsetController_policy_uuid(); - void setControllerPolicyUuid(const utility::string_t& value); - - -protected: - utility::string_t m_Asset_uuid; - bool m_Asset_uuidIsSet; - - utility::string_t m_Name; - bool m_NameIsSet; - - boost::optional m_Slug; - - boost::optional m_Registry_id; - - utility::string_t m_Catalog_key; - bool m_Catalog_keyIsSet; - - std::map> m_Mqtt_command_schema; - bool m_Mqtt_command_schemaIsSet; - - std::vector m_Controllable_joint_names; - bool m_Controllable_joint_namesIsSet; - - bool m_Already_seeded; - bool m_Already_seededIsSet; - - boost::optional m_Controller_policy_uuid; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerAssetSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/DriverControllerAssetsResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/DriverControllerAssetsResponseSchema.h deleted file mode 100644 index 965a850..0000000 --- a/rest/include/CppRestOpenAPIClient/model/DriverControllerAssetsResponseSchema.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DriverControllerAssetsResponseSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerAssetsResponseSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerAssetsResponseSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/DriverControllerAssetSchema.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class DriverControllerAssetSchema; - - -class DriverControllerAssetsResponseSchema - : public ModelBase -{ -public: - DriverControllerAssetsResponseSchema(); - virtual ~DriverControllerAssetsResponseSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// DriverControllerAssetsResponseSchema members - - - std::vector> getAssets() const; - bool assetsIsSet() const; - void unsetAssets(); - void setAssets(const std::vector>& value); - - -protected: - std::vector> m_Assets; - bool m_AssetsIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerAssetsResponseSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedItemSchema.h b/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedItemSchema.h deleted file mode 100644 index 1b23435..0000000 --- a/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedItemSchema.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DriverControllerSeedItemSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedItemSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedItemSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class DriverControllerSeedItemSchema - : public ModelBase -{ -public: - DriverControllerSeedItemSchema(); - virtual ~DriverControllerSeedItemSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// DriverControllerSeedItemSchema members - - - utility::string_t getAssetUuid() const; - bool assetUuidIsSet() const; - void unsetAsset_uuid(); - void setAssetUuid(const utility::string_t& value); - - utility::string_t getName() const; - bool nameIsSet() const; - void unsetName(); - void setName(const utility::string_t& value); - - utility::string_t getDescription() const; - bool descriptionIsSet() const; - void unsetDescription(); - void setDescription(const utility::string_t& value); - - std::vector>> getKeyboardBindings() const; - bool keyboardBindingsIsSet() const; - void unsetKeyboard_bindings(); - void setKeyboardBindings(const std::vector>>& value); - - utility::string_t getJointMode() const; - bool jointModeIsSet() const; - void unsetJoint_mode(); - void setJointMode(const utility::string_t& value); - - std::vector getControlSurfaces() const; - bool controlSurfacesIsSet() const; - void unsetControl_surfaces(); - void setControlSurfaces(const std::vector& value); - - -protected: - utility::string_t m_Asset_uuid; - bool m_Asset_uuidIsSet; - - boost::optional m_Name; - - boost::optional m_Description; - - std::vector>> m_Keyboard_bindings; - bool m_Keyboard_bindingsIsSet; - - utility::string_t m_Joint_mode; - bool m_Joint_modeIsSet; - - std::vector m_Control_surfaces; - bool m_Control_surfacesIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedItemSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedRequestSchema.h b/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedRequestSchema.h deleted file mode 100644 index 3e02d5c..0000000 --- a/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedRequestSchema.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DriverControllerSeedRequestSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedRequestSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedRequestSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include "CppRestOpenAPIClient/model/DriverControllerSeedItemSchema.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class DriverControllerSeedItemSchema; - - -class DriverControllerSeedRequestSchema - : public ModelBase -{ -public: - DriverControllerSeedRequestSchema(); - virtual ~DriverControllerSeedRequestSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// DriverControllerSeedRequestSchema members - - - utility::string_t getWorkspaceUuid() const; - bool workspaceUuidIsSet() const; - void unsetWorkspace_uuid(); - void setWorkspaceUuid(const utility::string_t& value); - - bool isEnsureTemplate() const; - bool ensureTemplateIsSet() const; - void unsetEnsure_template(); - void setEnsureTemplate(bool value); - - std::vector> getControllers() const; - bool controllersIsSet() const; - void unsetControllers(); - void setControllers(const std::vector>& value); - - -protected: - boost::optional m_Workspace_uuid; - - bool m_Ensure_template; - bool m_Ensure_templateIsSet; - - std::vector> m_Controllers; - bool m_ControllersIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedRequestSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedResponseSchema.h deleted file mode 100644 index 25c2a7a..0000000 --- a/rest/include/CppRestOpenAPIClient/model/DriverControllerSeedResponseSchema.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * DriverControllerSeedResponseSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedResponseSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedResponseSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/CatalogSeedGroupSchema.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class CatalogSeedGroupSchema; - - -class DriverControllerSeedResponseSchema - : public ModelBase -{ -public: - DriverControllerSeedResponseSchema(); - virtual ~DriverControllerSeedResponseSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// DriverControllerSeedResponseSchema members - - - utility::string_t getWorkspaceUuid() const; - bool workspaceUuidIsSet() const; - void unsetWorkspace_uuid(); - void setWorkspaceUuid(const utility::string_t& value); - - std::shared_ptr getRTemplate() const; - bool rTemplateIsSet() const; - void unsetr_template(); - void setRTemplate(const std::shared_ptr& value); - - std::shared_ptr getControllers() const; - bool controllersIsSet() const; - void unsetControllers(); - void setControllers(const std::shared_ptr& value); - - -protected: - utility::string_t m_Workspace_uuid; - bool m_Workspace_uuidIsSet; - - std::shared_ptr m_r_template; - bool m_r_templateIsSet; - - std::shared_ptr m_Controllers; - bool m_ControllersIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_DriverControllerSeedResponseSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/EnsureControllerPolicyResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/EnsureControllerPolicyResponseSchema.h deleted file mode 100644 index f24bae8..0000000 --- a/rest/include/CppRestOpenAPIClient/model/EnsureControllerPolicyResponseSchema.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * EnsureControllerPolicyResponseSchema.h - * - * Result of the setup-time controller-policy check for a twin. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_EnsureControllerPolicyResponseSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_EnsureControllerPolicyResponseSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// Result of the setup-time controller-policy check for a twin. -/// -class EnsureControllerPolicyResponseSchema - : public ModelBase -{ -public: - EnsureControllerPolicyResponseSchema(); - virtual ~EnsureControllerPolicyResponseSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// EnsureControllerPolicyResponseSchema members - - - bool isAttached() const; - bool attachedIsSet() const; - void unsetAttached(); - void setAttached(bool value); - - bool isAutoAttached() const; - bool autoAttachedIsSet() const; - void unsetAuto_attached(); - void setAutoAttached(bool value); - - utility::string_t getControllerPolicyUuid() const; - bool controllerPolicyUuidIsSet() const; - void unsetController_policy_uuid(); - void setControllerPolicyUuid(const utility::string_t& value); - - utility::string_t getControllerPolicyName() const; - bool controllerPolicyNameIsSet() const; - void unsetController_policy_name(); - void setControllerPolicyName(const utility::string_t& value); - - utility::string_t getMessage() const; - bool messageIsSet() const; - void unsetMessage(); - void setMessage(const utility::string_t& value); - - -protected: - bool m_Attached; - bool m_AttachedIsSet; - - bool m_Auto_attached; - bool m_Auto_attachedIsSet; - - boost::optional m_Controller_policy_uuid; - - boost::optional m_Controller_policy_name; - - boost::optional m_Message; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_EnsureControllerPolicyResponseSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/EpisodeSchema.h b/rest/include/CppRestOpenAPIClient/model/EpisodeSchema.h index 0fcbcf7..42f198e 100644 --- a/rest/include/CppRestOpenAPIClient/model/EpisodeSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/EpisodeSchema.h @@ -107,11 +107,6 @@ class EpisodeSchema void unsetUpdated_by(); void setUpdatedBy(const utility::string_t& value); - std::vector>> getAudio() const; - bool audioIsSet() const; - void unsetAudio(); - void setAudio(const std::vector>>& value); - protected: utility::string_t m_Uuid; @@ -142,9 +137,6 @@ class EpisodeSchema boost::optional m_Updated_by; - std::vector>> m_Audio; - bool m_AudioIsSet; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/HardwareOrderAdminSchema.h b/rest/include/CppRestOpenAPIClient/model/HardwareOrderAdminSchema.h deleted file mode 100644 index 2cf655b..0000000 --- a/rest/include/CppRestOpenAPIClient/model/HardwareOrderAdminSchema.h +++ /dev/null @@ -1,279 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HardwareOrderAdminSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderAdminSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderAdminSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" -#include "CppRestOpenAPIClient/model/HardwareOrderLineItemSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class HardwareOrderLineItemSchema; - - -class HardwareOrderAdminSchema - : public ModelBase -{ -public: - HardwareOrderAdminSchema(); - virtual ~HardwareOrderAdminSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// HardwareOrderAdminSchema members - - - utility::string_t getUuid() const; - bool uuidIsSet() const; - void unsetUuid(); - void setUuid(const utility::string_t& value); - - utility::string_t getOrganizationUuid() const; - bool organizationUuidIsSet() const; - void unsetOrganization_uuid(); - void setOrganizationUuid(const utility::string_t& value); - - utility::string_t getWorkspaceUuid() const; - bool workspaceUuidIsSet() const; - void unsetWorkspace_uuid(); - void setWorkspaceUuid(const utility::string_t& value); - - utility::string_t getCreatedByUuid() const; - bool createdByUuidIsSet() const; - void unsetCreated_by_uuid(); - void setCreatedByUuid(const utility::string_t& value); - - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - void setStatus(const utility::string_t& value); - - utility::string_t getPurchaseType() const; - bool purchaseTypeIsSet() const; - void unsetPurchase_type(); - void setPurchaseType(const utility::string_t& value); - - utility::string_t getTotalCostCredits() const; - bool totalCostCreditsIsSet() const; - void unsetTotal_cost_credits(); - void setTotalCostCredits(const utility::string_t& value); - - utility::string_t getTrackingNumber() const; - bool trackingNumberIsSet() const; - void unsetTracking_number(); - void setTrackingNumber(const utility::string_t& value); - - utility::string_t getDeliveryAddressUuid() const; - bool deliveryAddressUuidIsSet() const; - void unsetDelivery_address_uuid(); - void setDeliveryAddressUuid(const utility::string_t& value); - - utility::string_t getShippingLabel() const; - bool shippingLabelIsSet() const; - void unsetShipping_label(); - void setShippingLabel(const utility::string_t& value); - - utility::string_t getShippingContactName() const; - bool shippingContactNameIsSet() const; - void unsetShipping_contact_name(); - void setShippingContactName(const utility::string_t& value); - - utility::string_t getShippingContactPhone() const; - bool shippingContactPhoneIsSet() const; - void unsetShipping_contact_phone(); - void setShippingContactPhone(const utility::string_t& value); - - utility::string_t getShippingContactEmail() const; - bool shippingContactEmailIsSet() const; - void unsetShipping_contact_email(); - void setShippingContactEmail(const utility::string_t& value); - - utility::string_t getShippingAddressLine1() const; - bool shippingAddressLine1IsSet() const; - void unsetShipping_address_line1(); - void setShippingAddressLine1(const utility::string_t& value); - - utility::string_t getShippingAddressLine2() const; - bool shippingAddressLine2IsSet() const; - void unsetShipping_address_line2(); - void setShippingAddressLine2(const utility::string_t& value); - - utility::string_t getShippingCity() const; - bool shippingCityIsSet() const; - void unsetShipping_city(); - void setShippingCity(const utility::string_t& value); - - utility::string_t getShippingState() const; - bool shippingStateIsSet() const; - void unsetShipping_state(); - void setShippingState(const utility::string_t& value); - - utility::string_t getShippingPostalCode() const; - bool shippingPostalCodeIsSet() const; - void unsetShipping_postal_code(); - void setShippingPostalCode(const utility::string_t& value); - - utility::string_t getShippingCountry() const; - bool shippingCountryIsSet() const; - void unsetShipping_country(); - void setShippingCountry(const utility::string_t& value); - - std::map> getMetadata() const; - bool metadataIsSet() const; - void unsetMetadata(); - void setMetadata(const std::map>& value); - - utility::string_t getCreatedAt() const; - bool createdAtIsSet() const; - void unsetCreated_at(); - void setCreatedAt(const utility::string_t& value); - - utility::string_t getUpdatedAt() const; - bool updatedAtIsSet() const; - void unsetUpdated_at(); - void setUpdatedAt(const utility::string_t& value); - - std::vector> getLineItems() const; - bool lineItemsIsSet() const; - void unsetLine_items(); - void setLineItems(const std::vector>& value); - - utility::string_t getOrganizationName() const; - bool organizationNameIsSet() const; - void unsetOrganization_name(); - void setOrganizationName(const utility::string_t& value); - - utility::string_t getWorkspaceName() const; - bool workspaceNameIsSet() const; - void unsetWorkspace_name(); - void setWorkspaceName(const utility::string_t& value); - - utility::string_t getCreatedByEmail() const; - bool createdByEmailIsSet() const; - void unsetCreated_by_email(); - void setCreatedByEmail(const utility::string_t& value); - - -protected: - utility::string_t m_Uuid; - bool m_UuidIsSet; - - utility::string_t m_Organization_uuid; - bool m_Organization_uuidIsSet; - - utility::string_t m_Workspace_uuid; - bool m_Workspace_uuidIsSet; - - utility::string_t m_Created_by_uuid; - bool m_Created_by_uuidIsSet; - - utility::string_t m_Status; - bool m_StatusIsSet; - - utility::string_t m_Purchase_type; - bool m_Purchase_typeIsSet; - - utility::string_t m_Total_cost_credits; - bool m_Total_cost_creditsIsSet; - - utility::string_t m_Tracking_number; - bool m_Tracking_numberIsSet; - - boost::optional m_Delivery_address_uuid; - - utility::string_t m_Shipping_label; - bool m_Shipping_labelIsSet; - - utility::string_t m_Shipping_contact_name; - bool m_Shipping_contact_nameIsSet; - - utility::string_t m_Shipping_contact_phone; - bool m_Shipping_contact_phoneIsSet; - - utility::string_t m_Shipping_contact_email; - bool m_Shipping_contact_emailIsSet; - - utility::string_t m_Shipping_address_line1; - bool m_Shipping_address_line1IsSet; - - utility::string_t m_Shipping_address_line2; - bool m_Shipping_address_line2IsSet; - - utility::string_t m_Shipping_city; - bool m_Shipping_cityIsSet; - - utility::string_t m_Shipping_state; - bool m_Shipping_stateIsSet; - - utility::string_t m_Shipping_postal_code; - bool m_Shipping_postal_codeIsSet; - - utility::string_t m_Shipping_country; - bool m_Shipping_countryIsSet; - - std::map> m_Metadata; - bool m_MetadataIsSet; - - utility::string_t m_Created_at; - bool m_Created_atIsSet; - - utility::string_t m_Updated_at; - bool m_Updated_atIsSet; - - std::vector> m_Line_items; - bool m_Line_itemsIsSet; - - utility::string_t m_Organization_name; - bool m_Organization_nameIsSet; - - utility::string_t m_Workspace_name; - bool m_Workspace_nameIsSet; - - utility::string_t m_Created_by_email; - bool m_Created_by_emailIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderAdminSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/HardwareOrderCreateSchema.h b/rest/include/CppRestOpenAPIClient/model/HardwareOrderCreateSchema.h deleted file mode 100644 index 552ac5d..0000000 --- a/rest/include/CppRestOpenAPIClient/model/HardwareOrderCreateSchema.h +++ /dev/null @@ -1,182 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HardwareOrderCreateSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderCreateSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderCreateSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/HardwareOrderLineItemCreateSchema.h" -#include -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class HardwareOrderLineItemCreateSchema; - - -class HardwareOrderCreateSchema - : public ModelBase -{ -public: - HardwareOrderCreateSchema(); - virtual ~HardwareOrderCreateSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// HardwareOrderCreateSchema members - - - utility::string_t getPurchaseType() const; - bool purchaseTypeIsSet() const; - void unsetPurchase_type(); - void setPurchaseType(const utility::string_t& value); - - std::vector> getItems() const; - bool itemsIsSet() const; - void unsetItems(); - void setItems(const std::vector>& value); - - utility::string_t getDeliveryAddressUuid() const; - bool deliveryAddressUuidIsSet() const; - void unsetDelivery_address_uuid(); - void setDeliveryAddressUuid(const utility::string_t& value); - - utility::string_t getShippingLabel() const; - bool shippingLabelIsSet() const; - void unsetShipping_label(); - void setShippingLabel(const utility::string_t& value); - - utility::string_t getShippingContactName() const; - bool shippingContactNameIsSet() const; - void unsetShipping_contact_name(); - void setShippingContactName(const utility::string_t& value); - - utility::string_t getShippingContactPhone() const; - bool shippingContactPhoneIsSet() const; - void unsetShipping_contact_phone(); - void setShippingContactPhone(const utility::string_t& value); - - utility::string_t getShippingContactEmail() const; - bool shippingContactEmailIsSet() const; - void unsetShipping_contact_email(); - void setShippingContactEmail(const utility::string_t& value); - - utility::string_t getShippingAddressLine1() const; - bool shippingAddressLine1IsSet() const; - void unsetShipping_address_line1(); - void setShippingAddressLine1(const utility::string_t& value); - - utility::string_t getShippingAddressLine2() const; - bool shippingAddressLine2IsSet() const; - void unsetShipping_address_line2(); - void setShippingAddressLine2(const utility::string_t& value); - - utility::string_t getShippingCity() const; - bool shippingCityIsSet() const; - void unsetShipping_city(); - void setShippingCity(const utility::string_t& value); - - utility::string_t getShippingState() const; - bool shippingStateIsSet() const; - void unsetShipping_state(); - void setShippingState(const utility::string_t& value); - - utility::string_t getShippingPostalCode() const; - bool shippingPostalCodeIsSet() const; - void unsetShipping_postal_code(); - void setShippingPostalCode(const utility::string_t& value); - - utility::string_t getShippingCountry() const; - bool shippingCountryIsSet() const; - void unsetShipping_country(); - void setShippingCountry(const utility::string_t& value); - - std::map> getMetadata() const; - bool metadataIsSet() const; - void unsetMetadata(); - void setMetadata(const std::map>& value); - - -protected: - utility::string_t m_Purchase_type; - bool m_Purchase_typeIsSet; - - std::vector> m_Items; - bool m_ItemsIsSet; - - boost::optional m_Delivery_address_uuid; - - utility::string_t m_Shipping_label; - bool m_Shipping_labelIsSet; - - utility::string_t m_Shipping_contact_name; - bool m_Shipping_contact_nameIsSet; - - utility::string_t m_Shipping_contact_phone; - bool m_Shipping_contact_phoneIsSet; - - utility::string_t m_Shipping_contact_email; - bool m_Shipping_contact_emailIsSet; - - utility::string_t m_Shipping_address_line1; - bool m_Shipping_address_line1IsSet; - - utility::string_t m_Shipping_address_line2; - bool m_Shipping_address_line2IsSet; - - utility::string_t m_Shipping_city; - bool m_Shipping_cityIsSet; - - utility::string_t m_Shipping_state; - bool m_Shipping_stateIsSet; - - utility::string_t m_Shipping_postal_code; - bool m_Shipping_postal_codeIsSet; - - utility::string_t m_Shipping_country; - bool m_Shipping_countryIsSet; - - boost::optional>> m_Metadata; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderCreateSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemCreateSchema.h b/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemCreateSchema.h deleted file mode 100644 index 4cad379..0000000 --- a/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemCreateSchema.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HardwareOrderLineItemCreateSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemCreateSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemCreateSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class HardwareOrderLineItemCreateSchema - : public ModelBase -{ -public: - HardwareOrderLineItemCreateSchema(); - virtual ~HardwareOrderLineItemCreateSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// HardwareOrderLineItemCreateSchema members - - - utility::string_t getAssetUuid() const; - bool assetUuidIsSet() const; - void unsetAsset_uuid(); - void setAssetUuid(const utility::string_t& value); - - int32_t getQuantity() const; - bool quantityIsSet() const; - void unsetQuantity(); - void setQuantity(int32_t value); - - -protected: - utility::string_t m_Asset_uuid; - bool m_Asset_uuidIsSet; - - int32_t m_Quantity; - bool m_QuantityIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemCreateSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemSchema.h b/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemSchema.h deleted file mode 100644 index ca0f35c..0000000 --- a/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemSchema.h +++ /dev/null @@ -1,132 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HardwareOrderLineItemSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class HardwareOrderLineItemSchema - : public ModelBase -{ -public: - HardwareOrderLineItemSchema(); - virtual ~HardwareOrderLineItemSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// HardwareOrderLineItemSchema members - - - utility::string_t getUuid() const; - bool uuidIsSet() const; - void unsetUuid(); - void setUuid(const utility::string_t& value); - - utility::string_t getAssetUuid() const; - bool assetUuidIsSet() const; - void unsetAsset_uuid(); - void setAssetUuid(const utility::string_t& value); - - utility::string_t getAssetName() const; - bool assetNameIsSet() const; - void unsetAsset_name(); - void setAssetName(const utility::string_t& value); - - int32_t getQuantity() const; - bool quantityIsSet() const; - void unsetQuantity(); - void setQuantity(int32_t value); - - utility::string_t getUnitPriceCredits() const; - bool unitPriceCreditsIsSet() const; - void unsetUnit_price_credits(); - void setUnitPriceCredits(const utility::string_t& value); - - utility::string_t getLineTotalCredits() const; - bool lineTotalCreditsIsSet() const; - void unsetLine_total_credits(); - void setLineTotalCredits(const utility::string_t& value); - - utility::string_t getTrackingNumber() const; - bool trackingNumberIsSet() const; - void unsetTracking_number(); - void setTrackingNumber(const utility::string_t& value); - - std::map> getMetadata() const; - bool metadataIsSet() const; - void unsetMetadata(); - void setMetadata(const std::map>& value); - - -protected: - utility::string_t m_Uuid; - bool m_UuidIsSet; - - boost::optional m_Asset_uuid; - - utility::string_t m_Asset_name; - bool m_Asset_nameIsSet; - - int32_t m_Quantity; - bool m_QuantityIsSet; - - utility::string_t m_Unit_price_credits; - bool m_Unit_price_creditsIsSet; - - utility::string_t m_Line_total_credits; - bool m_Line_total_creditsIsSet; - - utility::string_t m_Tracking_number; - bool m_Tracking_numberIsSet; - - std::map> m_Metadata; - bool m_MetadataIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemUpdateSchema.h b/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemUpdateSchema.h deleted file mode 100644 index 2ed3e98..0000000 --- a/rest/include/CppRestOpenAPIClient/model/HardwareOrderLineItemUpdateSchema.h +++ /dev/null @@ -1,83 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HardwareOrderLineItemUpdateSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemUpdateSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemUpdateSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class HardwareOrderLineItemUpdateSchema - : public ModelBase -{ -public: - HardwareOrderLineItemUpdateSchema(); - virtual ~HardwareOrderLineItemUpdateSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// HardwareOrderLineItemUpdateSchema members - - - utility::string_t getTrackingNumber() const; - bool trackingNumberIsSet() const; - void unsetTracking_number(); - void setTrackingNumber(const utility::string_t& value); - - std::map> getMetadata() const; - bool metadataIsSet() const; - void unsetMetadata(); - void setMetadata(const std::map>& value); - - -protected: - boost::optional m_Tracking_number; - - boost::optional>> m_Metadata; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderLineItemUpdateSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/HardwareOrderSchema.h b/rest/include/CppRestOpenAPIClient/model/HardwareOrderSchema.h deleted file mode 100644 index 95f9e0c..0000000 --- a/rest/include/CppRestOpenAPIClient/model/HardwareOrderSchema.h +++ /dev/null @@ -1,255 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HardwareOrderSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include -#include -#include "CppRestOpenAPIClient/AnyType.h" -#include "CppRestOpenAPIClient/model/HardwareOrderLineItemSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class HardwareOrderLineItemSchema; - - -class HardwareOrderSchema - : public ModelBase -{ -public: - HardwareOrderSchema(); - virtual ~HardwareOrderSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// HardwareOrderSchema members - - - utility::string_t getUuid() const; - bool uuidIsSet() const; - void unsetUuid(); - void setUuid(const utility::string_t& value); - - utility::string_t getOrganizationUuid() const; - bool organizationUuidIsSet() const; - void unsetOrganization_uuid(); - void setOrganizationUuid(const utility::string_t& value); - - utility::string_t getWorkspaceUuid() const; - bool workspaceUuidIsSet() const; - void unsetWorkspace_uuid(); - void setWorkspaceUuid(const utility::string_t& value); - - utility::string_t getCreatedByUuid() const; - bool createdByUuidIsSet() const; - void unsetCreated_by_uuid(); - void setCreatedByUuid(const utility::string_t& value); - - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - void setStatus(const utility::string_t& value); - - utility::string_t getPurchaseType() const; - bool purchaseTypeIsSet() const; - void unsetPurchase_type(); - void setPurchaseType(const utility::string_t& value); - - utility::string_t getTotalCostCredits() const; - bool totalCostCreditsIsSet() const; - void unsetTotal_cost_credits(); - void setTotalCostCredits(const utility::string_t& value); - - utility::string_t getTrackingNumber() const; - bool trackingNumberIsSet() const; - void unsetTracking_number(); - void setTrackingNumber(const utility::string_t& value); - - utility::string_t getDeliveryAddressUuid() const; - bool deliveryAddressUuidIsSet() const; - void unsetDelivery_address_uuid(); - void setDeliveryAddressUuid(const utility::string_t& value); - - utility::string_t getShippingLabel() const; - bool shippingLabelIsSet() const; - void unsetShipping_label(); - void setShippingLabel(const utility::string_t& value); - - utility::string_t getShippingContactName() const; - bool shippingContactNameIsSet() const; - void unsetShipping_contact_name(); - void setShippingContactName(const utility::string_t& value); - - utility::string_t getShippingContactPhone() const; - bool shippingContactPhoneIsSet() const; - void unsetShipping_contact_phone(); - void setShippingContactPhone(const utility::string_t& value); - - utility::string_t getShippingContactEmail() const; - bool shippingContactEmailIsSet() const; - void unsetShipping_contact_email(); - void setShippingContactEmail(const utility::string_t& value); - - utility::string_t getShippingAddressLine1() const; - bool shippingAddressLine1IsSet() const; - void unsetShipping_address_line1(); - void setShippingAddressLine1(const utility::string_t& value); - - utility::string_t getShippingAddressLine2() const; - bool shippingAddressLine2IsSet() const; - void unsetShipping_address_line2(); - void setShippingAddressLine2(const utility::string_t& value); - - utility::string_t getShippingCity() const; - bool shippingCityIsSet() const; - void unsetShipping_city(); - void setShippingCity(const utility::string_t& value); - - utility::string_t getShippingState() const; - bool shippingStateIsSet() const; - void unsetShipping_state(); - void setShippingState(const utility::string_t& value); - - utility::string_t getShippingPostalCode() const; - bool shippingPostalCodeIsSet() const; - void unsetShipping_postal_code(); - void setShippingPostalCode(const utility::string_t& value); - - utility::string_t getShippingCountry() const; - bool shippingCountryIsSet() const; - void unsetShipping_country(); - void setShippingCountry(const utility::string_t& value); - - std::map> getMetadata() const; - bool metadataIsSet() const; - void unsetMetadata(); - void setMetadata(const std::map>& value); - - utility::string_t getCreatedAt() const; - bool createdAtIsSet() const; - void unsetCreated_at(); - void setCreatedAt(const utility::string_t& value); - - utility::string_t getUpdatedAt() const; - bool updatedAtIsSet() const; - void unsetUpdated_at(); - void setUpdatedAt(const utility::string_t& value); - - std::vector> getLineItems() const; - bool lineItemsIsSet() const; - void unsetLine_items(); - void setLineItems(const std::vector>& value); - - -protected: - utility::string_t m_Uuid; - bool m_UuidIsSet; - - utility::string_t m_Organization_uuid; - bool m_Organization_uuidIsSet; - - utility::string_t m_Workspace_uuid; - bool m_Workspace_uuidIsSet; - - utility::string_t m_Created_by_uuid; - bool m_Created_by_uuidIsSet; - - utility::string_t m_Status; - bool m_StatusIsSet; - - utility::string_t m_Purchase_type; - bool m_Purchase_typeIsSet; - - utility::string_t m_Total_cost_credits; - bool m_Total_cost_creditsIsSet; - - utility::string_t m_Tracking_number; - bool m_Tracking_numberIsSet; - - boost::optional m_Delivery_address_uuid; - - utility::string_t m_Shipping_label; - bool m_Shipping_labelIsSet; - - utility::string_t m_Shipping_contact_name; - bool m_Shipping_contact_nameIsSet; - - utility::string_t m_Shipping_contact_phone; - bool m_Shipping_contact_phoneIsSet; - - utility::string_t m_Shipping_contact_email; - bool m_Shipping_contact_emailIsSet; - - utility::string_t m_Shipping_address_line1; - bool m_Shipping_address_line1IsSet; - - utility::string_t m_Shipping_address_line2; - bool m_Shipping_address_line2IsSet; - - utility::string_t m_Shipping_city; - bool m_Shipping_cityIsSet; - - utility::string_t m_Shipping_state; - bool m_Shipping_stateIsSet; - - utility::string_t m_Shipping_postal_code; - bool m_Shipping_postal_codeIsSet; - - utility::string_t m_Shipping_country; - bool m_Shipping_countryIsSet; - - std::map> m_Metadata; - bool m_MetadataIsSet; - - utility::string_t m_Created_at; - bool m_Created_atIsSet; - - utility::string_t m_Updated_at; - bool m_Updated_atIsSet; - - std::vector> m_Line_items; - bool m_Line_itemsIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/HardwareOrderStatusUpdateSchema.h b/rest/include/CppRestOpenAPIClient/model/HardwareOrderStatusUpdateSchema.h deleted file mode 100644 index bb508ef..0000000 --- a/rest/include/CppRestOpenAPIClient/model/HardwareOrderStatusUpdateSchema.h +++ /dev/null @@ -1,75 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * HardwareOrderStatusUpdateSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderStatusUpdateSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderStatusUpdateSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class HardwareOrderStatusUpdateSchema - : public ModelBase -{ -public: - HardwareOrderStatusUpdateSchema(); - virtual ~HardwareOrderStatusUpdateSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// HardwareOrderStatusUpdateSchema members - - - utility::string_t getStatus() const; - bool statusIsSet() const; - void unsetStatus(); - void setStatus(const utility::string_t& value); - - -protected: - utility::string_t m_Status; - bool m_StatusIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_HardwareOrderStatusUpdateSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/NavigationWaypointSchema.h b/rest/include/CppRestOpenAPIClient/model/NavigationWaypointSchema.h index dfcd122..3cd7a77 100644 --- a/rest/include/CppRestOpenAPIClient/model/NavigationWaypointSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/NavigationWaypointSchema.h @@ -84,11 +84,6 @@ class NavigationWaypointSchema void unsetYaw(); void setYaw(double value); - double getDurationSeconds() const; - bool durationSecondsIsSet() const; - void unsetDuration_seconds(); - void setDurationSeconds(double value); - std::vector> getActions() const; bool actionsIsSet() const; void unsetActions(); @@ -110,8 +105,6 @@ class NavigationWaypointSchema boost::optional m_Yaw; - boost::optional m_Duration_seconds; - boost::optional>> m_Actions; boost::optional>> m_Metadata; diff --git a/rest/include/CppRestOpenAPIClient/model/OnlineControllerSessionSchema.h b/rest/include/CppRestOpenAPIClient/model/OnlineControllerSessionSchema.h index 0189065..ae1cc4e 100644 --- a/rest/include/CppRestOpenAPIClient/model/OnlineControllerSessionSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/OnlineControllerSessionSchema.h @@ -84,11 +84,6 @@ class OnlineControllerSessionSchema void unsetWorkload_uuid(); void setWorkloadUuid(const utility::string_t& value); - utility::string_t getInstanceUuid() const; - bool instanceUuidIsSet() const; - void unsetInstance_uuid(); - void setInstanceUuid(const utility::string_t& value); - utility::string_t getPhase() const; bool phaseIsSet() const; void unsetPhase(); @@ -138,8 +133,6 @@ class OnlineControllerSessionSchema boost::optional m_Workload_uuid; - boost::optional m_Instance_uuid; - utility::string_t m_Phase; bool m_PhaseIsSet; diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskCreateSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskCreateSchema.h index d029536..c0853b8 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskCreateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskCreateSchema.h @@ -176,26 +176,6 @@ class RLTaskCreateSchema void unsetRl_config_spec(); void setRlConfigSpec(const std::map>& value); - std::map> getTrainingCommandSpec() const; - bool trainingCommandSpecIsSet() const; - void unsetTraining_command_spec(); - void setTrainingCommandSpec(const std::map>& value); - - std::map> getInferenceCommandSpec() const; - bool inferenceCommandSpecIsSet() const; - void unsetInference_command_spec(); - void setInferenceCommandSpec(const std::map>& value); - - bool isTrainingCommandSetupEnabled() const; - bool trainingCommandSetupEnabledIsSet() const; - void unsetTraining_command_setup_enabled(); - void setTrainingCommandSetupEnabled(bool value); - - bool isInferenceCommandSetupEnabled() const; - bool inferenceCommandSetupEnabledIsSet() const; - void unsetInference_command_setup_enabled(); - void setInferenceCommandSetupEnabled(bool value); - std::vector> getInitialSourceFiles() const; bool initialSourceFilesIsSet() const; void unsetInitial_source_files(); @@ -244,14 +224,6 @@ class RLTaskCreateSchema boost::optional>> m_Rl_config_spec; - boost::optional>> m_Training_command_spec; - - boost::optional>> m_Inference_command_spec; - - boost::optional m_Training_command_setup_enabled; - - boost::optional m_Inference_command_setup_enabled; - boost::optional>> m_Initial_source_files; }; diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskGenerateEnvCfgSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskGenerateEnvCfgSchema.h deleted file mode 100644 index 34728d2..0000000 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskGenerateEnvCfgSchema.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * RLTaskGenerateEnvCfgSchema.h - * - * Inputs for generating the user-written ``env_cfg.py`` starter. ``overwrite`` must be set explicitly to replace an existing ``env_cfg.py`` — the endpoint returns 409 otherwise so the UI can confirm before clobbering hand-written code. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskGenerateEnvCfgSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskGenerateEnvCfgSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// Inputs for generating the user-written ``env_cfg.py`` starter. ``overwrite`` must be set explicitly to replace an existing ``env_cfg.py`` — the endpoint returns 409 otherwise so the UI can confirm before clobbering hand-written code. -/// -class RLTaskGenerateEnvCfgSchema - : public ModelBase -{ -public: - RLTaskGenerateEnvCfgSchema(); - virtual ~RLTaskGenerateEnvCfgSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// RLTaskGenerateEnvCfgSchema members - - - bool isOverwrite() const; - bool overwriteIsSet() const; - void unsetOverwrite(); - void setOverwrite(bool value); - - -protected: - bool m_Overwrite; - bool m_OverwriteIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskGenerateEnvCfgSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskPolicyProvenanceSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskPolicyProvenanceSchema.h index 0201af1..070ae3c 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskPolicyProvenanceSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskPolicyProvenanceSchema.h @@ -90,16 +90,6 @@ class RLTaskPolicyProvenanceSchema void unsetSource_code_available(); void setSourceCodeAvailable(bool value); - bool isInferenceCommandSetupEnabled() const; - bool inferenceCommandSetupEnabledIsSet() const; - void unsetInference_command_setup_enabled(); - void setInferenceCommandSetupEnabled(bool value); - - std::map> getInferenceCommandSpec() const; - bool inferenceCommandSpecIsSet() const; - void unsetInference_command_spec(); - void setInferenceCommandSpec(const std::map>& value); - std::vector getWarnings() const; bool warningsIsSet() const; void unsetWarnings(); @@ -122,11 +112,6 @@ class RLTaskPolicyProvenanceSchema bool m_Source_code_available; bool m_Source_code_availableIsSet; - bool m_Inference_command_setup_enabled; - bool m_Inference_command_setup_enabledIsSet; - - boost::optional>> m_Inference_command_spec; - std::vector m_Warnings; bool m_WarningsIsSet; diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskRLConfigValidateResultSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskRLConfigValidateResultSchema.h deleted file mode 100644 index 87ddeb1..0000000 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskRLConfigValidateResultSchema.h +++ /dev/null @@ -1,85 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * RLTaskRLConfigValidateResultSchema.h - * - * Result of the RL config dry-run validate endpoint. ``valid`` reports whether the spec would pass ``normalize_rl_config_spec`` (i.e. whether a save would succeed); ``error`` carries the first validation message (field-path prefixed) when it would not. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskRLConfigValidateResultSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskRLConfigValidateResultSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// Result of the RL config dry-run validate endpoint. ``valid`` reports whether the spec would pass ``normalize_rl_config_spec`` (i.e. whether a save would succeed); ``error`` carries the first validation message (field-path prefixed) when it would not. -/// -class RLTaskRLConfigValidateResultSchema - : public ModelBase -{ -public: - RLTaskRLConfigValidateResultSchema(); - virtual ~RLTaskRLConfigValidateResultSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// RLTaskRLConfigValidateResultSchema members - - - bool isValid() const; - bool validIsSet() const; - void unsetValid(); - void setValid(bool value); - - utility::string_t getError() const; - bool errorIsSet() const; - void unsetError(); - void setError(const utility::string_t& value); - - -protected: - bool m_Valid; - bool m_ValidIsSet; - - boost::optional m_Error; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskRLConfigValidateResultSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityCreateSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityCreateSchema.h index a1b16c1..5d849c4 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityCreateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityCreateSchema.h @@ -104,11 +104,6 @@ class RLTaskSceneEntityCreateSchema void unsetTwin_name(); void setTwinName(const utility::string_t& value); - utility::string_t getEnvironmentObjectExternalId() const; - bool environmentObjectExternalIdIsSet() const; - void unsetEnvironment_object_external_id(); - void setEnvironmentObjectExternalId(const utility::string_t& value); - std::map> getInitialState() const; bool initialStateIsSet() const; void unsetInitial_state(); @@ -169,8 +164,6 @@ class RLTaskSceneEntityCreateSchema boost::optional m_Twin_name; - boost::optional m_Environment_object_external_id; - boost::optional>> m_Initial_state; boost::optional>> m_Articulation; diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntitySchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntitySchema.h index 5a85fdb..a188eb8 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntitySchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntitySchema.h @@ -114,11 +114,6 @@ class RLTaskSceneEntitySchema void unsetTwin_name(); void setTwinName(const utility::string_t& value); - utility::string_t getEnvironmentObjectExternalId() const; - bool environmentObjectExternalIdIsSet() const; - void unsetEnvironment_object_external_id(); - void setEnvironmentObjectExternalId(const utility::string_t& value); - std::map> getInitialState() const; bool initialStateIsSet() const; void unsetInitial_state(); @@ -195,8 +190,6 @@ class RLTaskSceneEntitySchema boost::optional m_Twin_name; - boost::optional m_Environment_object_external_id; - std::map> m_Initial_state; bool m_Initial_stateIsSet; diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityUpdateSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityUpdateSchema.h index fcc2570..d34e927 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityUpdateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskSceneEntityUpdateSchema.h @@ -104,11 +104,6 @@ class RLTaskSceneEntityUpdateSchema void unsetTwin_name(); void setTwinName(const utility::string_t& value); - utility::string_t getEnvironmentObjectExternalId() const; - bool environmentObjectExternalIdIsSet() const; - void unsetEnvironment_object_external_id(); - void setEnvironmentObjectExternalId(const utility::string_t& value); - std::map> getInitialState() const; bool initialStateIsSet() const; void unsetInitial_state(); @@ -166,8 +161,6 @@ class RLTaskSceneEntityUpdateSchema boost::optional m_Twin_name; - boost::optional m_Environment_object_external_id; - boost::optional>> m_Initial_state; boost::optional>> m_Articulation; diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskSchema.h index 016ebe7..845dc9d 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskSchema.h @@ -198,26 +198,6 @@ class RLTaskSchema void unsetRl_config_spec(); void setRlConfigSpec(const std::map>& value); - std::map> getTrainingCommandSpec() const; - bool trainingCommandSpecIsSet() const; - void unsetTraining_command_spec(); - void setTrainingCommandSpec(const std::map>& value); - - std::map> getInferenceCommandSpec() const; - bool inferenceCommandSpecIsSet() const; - void unsetInference_command_spec(); - void setInferenceCommandSpec(const std::map>& value); - - bool isTrainingCommandSetupEnabled() const; - bool trainingCommandSetupEnabledIsSet() const; - void unsetTraining_command_setup_enabled(); - void setTrainingCommandSetupEnabled(bool value); - - bool isInferenceCommandSetupEnabled() const; - bool inferenceCommandSetupEnabledIsSet() const; - void unsetInference_command_setup_enabled(); - void setInferenceCommandSetupEnabled(bool value); - bool isHasSceneCfg() const; bool hasSceneCfgIsSet() const; void unsetHas_scene_cfg(); @@ -340,18 +320,6 @@ class RLTaskSchema std::map> m_Rl_config_spec; bool m_Rl_config_specIsSet; - std::map> m_Training_command_spec; - bool m_Training_command_specIsSet; - - std::map> m_Inference_command_spec; - bool m_Inference_command_specIsSet; - - bool m_Training_command_setup_enabled; - bool m_Training_command_setup_enabledIsSet; - - bool m_Inference_command_setup_enabled; - bool m_Inference_command_setup_enabledIsSet; - bool m_Has_scene_cfg; bool m_Has_scene_cfgIsSet; diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileSchema.h index 899cb39..5362b6e 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileSchema.h @@ -12,7 +12,7 @@ /* * RLTaskSourceFileSchema.h * - * A single source file in an RL task tree (user- or Cyberwave-generated). + * A single source file in an RL task tree (user- or Cyberwave-owned). */ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskSourceFileSchema_H_ @@ -33,7 +33,7 @@ namespace model { /// -/// A single source file in an RL task tree (user- or Cyberwave-generated). +/// A single source file in an RL task tree (user- or Cyberwave-owned). /// class RLTaskSourceFileSchema : public ModelBase diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileUpsertSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileUpsertSchema.h index 66caa65..c07641b 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileUpsertSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskSourceFileUpsertSchema.h @@ -12,7 +12,7 @@ /* * RLTaskSourceFileUpsertSchema.h * - * Upsert payload for a single user-written source file. + * Upsert payload for a single user-owned source file. */ #ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_RLTaskSourceFileUpsertSchema_H_ @@ -32,7 +32,7 @@ namespace model { /// -/// Upsert payload for a single user-written source file. +/// Upsert payload for a single user-owned source file. /// class RLTaskSourceFileUpsertSchema : public ModelBase diff --git a/rest/include/CppRestOpenAPIClient/model/RLTaskUpdateSchema.h b/rest/include/CppRestOpenAPIClient/model/RLTaskUpdateSchema.h index 336c307..6b84374 100644 --- a/rest/include/CppRestOpenAPIClient/model/RLTaskUpdateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/RLTaskUpdateSchema.h @@ -168,26 +168,6 @@ class RLTaskUpdateSchema void unsetRl_config_spec(); void setRlConfigSpec(const std::map>& value); - std::map> getTrainingCommandSpec() const; - bool trainingCommandSpecIsSet() const; - void unsetTraining_command_spec(); - void setTrainingCommandSpec(const std::map>& value); - - std::map> getInferenceCommandSpec() const; - bool inferenceCommandSpecIsSet() const; - void unsetInference_command_spec(); - void setInferenceCommandSpec(const std::map>& value); - - bool isTrainingCommandSetupEnabled() const; - bool trainingCommandSetupEnabledIsSet() const; - void unsetTraining_command_setup_enabled(); - void setTrainingCommandSetupEnabled(bool value); - - bool isInferenceCommandSetupEnabled() const; - bool inferenceCommandSetupEnabledIsSet() const; - void unsetInference_command_setup_enabled(); - void setInferenceCommandSetupEnabled(bool value); - protected: boost::optional m_Name; @@ -226,14 +206,6 @@ class RLTaskUpdateSchema boost::optional>> m_Rl_config_spec; - boost::optional>> m_Training_command_spec; - - boost::optional>> m_Inference_command_spec; - - boost::optional m_Training_command_setup_enabled; - - boost::optional m_Inference_command_setup_enabled; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersRequestSchema.h b/rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersRequestSchema.h deleted file mode 100644 index 5ad9631..0000000 --- a/rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersRequestSchema.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SeedAutogenControllersRequestSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SeedAutogenControllersRequestSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SeedAutogenControllersRequestSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class SeedAutogenControllersRequestSchema - : public ModelBase -{ -public: - SeedAutogenControllersRequestSchema(); - virtual ~SeedAutogenControllersRequestSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// SeedAutogenControllersRequestSchema members - - - utility::string_t getWorkspaceUuid() const; - bool workspaceUuidIsSet() const; - void unsetWorkspace_uuid(); - void setWorkspaceUuid(const utility::string_t& value); - - -protected: - boost::optional m_Workspace_uuid; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SeedAutogenControllersRequestSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersResponseSchema.h deleted file mode 100644 index 4604ea5..0000000 --- a/rest/include/CppRestOpenAPIClient/model/SeedAutogenControllersResponseSchema.h +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SeedAutogenControllersResponseSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SeedAutogenControllersResponseSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SeedAutogenControllersResponseSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include "CppRestOpenAPIClient/model/CatalogSeedGroupSchema.h" -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -class CatalogSeedGroupSchema; - - -class SeedAutogenControllersResponseSchema - : public ModelBase -{ -public: - SeedAutogenControllersResponseSchema(); - virtual ~SeedAutogenControllersResponseSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// SeedAutogenControllersResponseSchema members - - - utility::string_t getWorkspaceUuid() const; - bool workspaceUuidIsSet() const; - void unsetWorkspace_uuid(); - void setWorkspaceUuid(const utility::string_t& value); - - std::shared_ptr getControllers() const; - bool controllersIsSet() const; - void unsetControllers(); - void setControllers(const std::shared_ptr& value); - - int32_t getAutogenCount() const; - bool autogenCountIsSet() const; - void unsetAutogen_count(); - void setAutogenCount(int32_t value); - - -protected: - utility::string_t m_Workspace_uuid; - bool m_Workspace_uuidIsSet; - - std::shared_ptr m_Controllers; - bool m_ControllersIsSet; - - int32_t m_Autogen_count; - bool m_Autogen_countIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SeedAutogenControllersResponseSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/SimulationStartSchema.h b/rest/include/CppRestOpenAPIClient/model/SimulationStartSchema.h index f9d3111..596753c 100644 --- a/rest/include/CppRestOpenAPIClient/model/SimulationStartSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/SimulationStartSchema.h @@ -26,9 +26,7 @@ #include "CppRestOpenAPIClient/model/OnlineControllerSpecSchema.h" #include "CppRestOpenAPIClient/model/SimulationRuntimeOptionsSchema.h" #include "CppRestOpenAPIClient/model/SimulationTimingOptionsSchema.h" -#include "CppRestOpenAPIClient/model/SimulationStreamProfileSchema.h" #include -#include #include namespace org { @@ -39,7 +37,6 @@ namespace model { class SimulationRuntimeOptionsSchema; class SimulationTimingOptionsSchema; class OnlineControllerSpecSchema; -class SimulationStreamProfileSchema; /// @@ -113,11 +110,6 @@ class SimulationStartSchema void unsetAuto_run_controllers(); void setAutoRunControllers(bool value); - std::map> getStreamProfile() const; - bool streamProfileIsSet() const; - void unsetStream_profile(); - void setStreamProfile(const std::map>& value); - protected: boost::optional m_Duration; @@ -135,8 +127,6 @@ class SimulationStartSchema bool m_Auto_run_controllers; bool m_Auto_run_controllersIsSet; - boost::optional>> m_Stream_profile; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/SimulationStreamProfileSchema.h b/rest/include/CppRestOpenAPIClient/model/SimulationStreamProfileSchema.h deleted file mode 100644 index 21b044d..0000000 --- a/rest/include/CppRestOpenAPIClient/model/SimulationStreamProfileSchema.h +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * SimulationStreamProfileSchema.h - * - * Per-twin selection of which simulated state surfaces are streamed. Mirrors ``src.lib.simulation_stream_profile``. The main source of truth is each twin's ``metadata[\"simulation_stream_profile\"]``; this schema only lets a start request pin an explicit per-twin override. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_SimulationStreamProfileSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_SimulationStreamProfileSchema_H_ - -#include -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// Per-twin selection of which simulated state surfaces are streamed. Mirrors ``src.lib.simulation_stream_profile``. The main source of truth is each twin's ``metadata[\"simulation_stream_profile\"]``; this schema only lets a start request pin an explicit per-twin override. -/// -class SimulationStreamProfileSchema - : public ModelBase -{ -public: - SimulationStreamProfileSchema(); - virtual ~SimulationStreamProfileSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// SimulationStreamProfileSchema members - - enum class PoseEnum - { - NONE, - BASE_LINK, - ALL_LINKS, - }; - enum class VelocityEnum - { - NONE, - BASE_LINK, - ALL_LINKS, - }; - - PoseEnum toPoseEnum(const utility::string_t& value) const; - const utility::string_t fromPoseEnum(const PoseEnum value) const; - - - VelocityEnum toVelocityEnum(const utility::string_t& value) const; - const utility::string_t fromVelocityEnum(const VelocityEnum value) const; - - - int32_t getVersion() const; - bool versionIsSet() const; - void unsetVersion(); - void setVersion(int32_t value); - - bool isJointPositions() const; - bool jointPositionsIsSet() const; - void unsetJoint_positions(); - void setJointPositions(bool value); - - bool isJointVelocities() const; - bool jointVelocitiesIsSet() const; - void unsetJoint_velocities(); - void setJointVelocities(bool value); - - bool isJointEfforts() const; - bool jointEffortsIsSet() const; - void unsetJoint_efforts(); - void setJointEfforts(bool value); - - bool isCameraStreams() const; - bool cameraStreamsIsSet() const; - void unsetCamera_streams(); - void setCameraStreams(bool value); - - PoseEnum getPose() const; - bool poseIsSet() const; - void unsetPose(); - void setPose(const PoseEnum value); - - VelocityEnum getVelocity() const; - bool velocityIsSet() const; - void unsetVelocity(); - void setVelocity(const VelocityEnum value); - - -protected: - int32_t m_Version; - bool m_VersionIsSet; - - bool m_Joint_positions; - bool m_Joint_positionsIsSet; - - bool m_Joint_velocities; - bool m_Joint_velocitiesIsSet; - - bool m_Joint_efforts; - bool m_Joint_effortsIsSet; - - bool m_Camera_streams; - bool m_Camera_streamsIsSet; - - PoseEnum m_Pose; - bool m_PoseIsSet; - - VelocityEnum m_Velocity; - bool m_VelocityIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_SimulationStreamProfileSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/TriggerAutogenControllersResponseSchema.h b/rest/include/CppRestOpenAPIClient/model/TriggerAutogenControllersResponseSchema.h deleted file mode 100644 index 3059233..0000000 --- a/rest/include/CppRestOpenAPIClient/model/TriggerAutogenControllersResponseSchema.h +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * TriggerAutogenControllersResponseSchema.h - * - * - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_TriggerAutogenControllersResponseSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_TriggerAutogenControllersResponseSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -class TriggerAutogenControllersResponseSchema - : public ModelBase -{ -public: - TriggerAutogenControllersResponseSchema(); - virtual ~TriggerAutogenControllersResponseSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// TriggerAutogenControllersResponseSchema members - - - int32_t getGeneratedCount() const; - bool generatedCountIsSet() const; - void unsetGenerated_count(); - void setGeneratedCount(int32_t value); - - utility::string_t getEnvironment() const; - bool environmentIsSet() const; - void unsetEnvironment(); - void setEnvironment(const utility::string_t& value); - - utility::string_t getMessage() const; - bool messageIsSet() const; - void unsetMessage(); - void setMessage(const utility::string_t& value); - - -protected: - int32_t m_Generated_count; - bool m_Generated_countIsSet; - - utility::string_t m_Environment; - bool m_EnvironmentIsSet; - - utility::string_t m_Message; - bool m_MessageIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_TriggerAutogenControllersResponseSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/TwinSchema.h b/rest/include/CppRestOpenAPIClient/model/TwinSchema.h index 5036b10..3db53b3 100644 --- a/rest/include/CppRestOpenAPIClient/model/TwinSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/TwinSchema.h @@ -262,16 +262,6 @@ class TwinSchema void unsetExport_warnings(); void setExportWarnings(const std::vector>& value); - std::map> getMqttCommandSchema() const; - bool mqttCommandSchemaIsSet() const; - void unsetMqtt_command_schema(); - void setMqttCommandSchema(const std::map>& value); - - std::vector getControllableJointNames() const; - bool controllableJointNamesIsSet() const; - void unsetControllable_joint_names(); - void setControllableJointNames(const std::vector& value); - protected: utility::string_t m_Uuid; @@ -386,12 +376,6 @@ class TwinSchema std::vector> m_Export_warnings; bool m_Export_warningsIsSet; - std::map> m_Mqtt_command_schema; - bool m_Mqtt_command_schemaIsSet; - - std::vector m_Controllable_joint_names; - bool m_Controllable_joint_namesIsSet; - }; diff --git a/rest/include/CppRestOpenAPIClient/model/WorkflowSchema.h b/rest/include/CppRestOpenAPIClient/model/WorkflowSchema.h index 492f4fa..850824c 100644 --- a/rest/include/CppRestOpenAPIClient/model/WorkflowSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/WorkflowSchema.h @@ -159,11 +159,6 @@ class WorkflowSchema void unsetMetadata(); void setMetadata(const std::map>& value); - bool isHasWorkerSourceOverride() const; - bool hasWorkerSourceOverrideIsSet() const; - void unsetHas_worker_source_override(); - void setHasWorkerSourceOverride(bool value); - std::vector> getNodes() const; bool nodesIsSet() const; void unsetNodes(); @@ -228,9 +223,6 @@ class WorkflowSchema std::map> m_Metadata; bool m_MetadataIsSet; - bool m_Has_worker_source_override; - bool m_Has_worker_source_overrideIsSet; - boost::optional>> m_Nodes; boost::optional>> m_Connections; diff --git a/rest/include/CppRestOpenAPIClient/model/WorkflowTemplateSchema.h b/rest/include/CppRestOpenAPIClient/model/WorkflowTemplateSchema.h index c4abe85..33b9aa6 100644 --- a/rest/include/CppRestOpenAPIClient/model/WorkflowTemplateSchema.h +++ b/rest/include/CppRestOpenAPIClient/model/WorkflowTemplateSchema.h @@ -159,11 +159,6 @@ class WorkflowTemplateSchema void unsetMetadata(); void setMetadata(const std::map>& value); - bool isHasWorkerSourceOverride() const; - bool hasWorkerSourceOverrideIsSet() const; - void unsetHas_worker_source_override(); - void setHasWorkerSourceOverride(bool value); - std::vector> getNodes() const; bool nodesIsSet() const; void unsetNodes(); @@ -233,9 +228,6 @@ class WorkflowTemplateSchema std::map> m_Metadata; bool m_MetadataIsSet; - bool m_Has_worker_source_override; - bool m_Has_worker_source_overrideIsSet; - boost::optional>> m_Nodes; boost::optional>> m_Connections; diff --git a/rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceSchema.h b/rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceSchema.h deleted file mode 100644 index d017c03..0000000 --- a/rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceSchema.h +++ /dev/null @@ -1,152 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * WorkflowWorkerSourceSchema.h - * - * Response for ``GET /workflows/{uuid}/worker-source``. ``materialized_source`` is what actually ships to the edge — the override when one is saved, otherwise the autogenerated source. ``autogenerated_source`` is always the current compiler output (or ``None`` when the graph doesn't compile) so the UI can diff against an override and offer \"restore\". ``is_stale`` is ``true`` when an override is saved but the graph has changed since (warn-only). ``autogen_error`` carries a human-readable reason when autogeneration failed, so an override-only workflow can still explain why there's no baseline. - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_WorkflowWorkerSourceSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_WorkflowWorkerSourceSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// Response for ``GET /workflows/{uuid}/worker-source``. ``materialized_source`` is what actually ships to the edge — the override when one is saved, otherwise the autogenerated source. ``autogenerated_source`` is always the current compiler output (or ``None`` when the graph doesn't compile) so the UI can diff against an override and offer \"restore\". ``is_stale`` is ``true`` when an override is saved but the graph has changed since (warn-only). ``autogen_error`` carries a human-readable reason when autogeneration failed, so an override-only workflow can still explain why there's no baseline. -/// -class WorkflowWorkerSourceSchema - : public ModelBase -{ -public: - WorkflowWorkerSourceSchema(); - virtual ~WorkflowWorkerSourceSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// WorkflowWorkerSourceSchema members - - - utility::string_t getWorkflowUuid() const; - bool workflowUuidIsSet() const; - void unsetWorkflow_uuid(); - void setWorkflowUuid(const utility::string_t& value); - - utility::string_t getFilename() const; - bool filenameIsSet() const; - void unsetFilename(); - void setFilename(const utility::string_t& value); - - utility::string_t getMaterializedSource() const; - bool materializedSourceIsSet() const; - void unsetMaterialized_source(); - void setMaterializedSource(const utility::string_t& value); - - utility::string_t getAutogeneratedSource() const; - bool autogeneratedSourceIsSet() const; - void unsetAutogenerated_source(); - void setAutogeneratedSource(const utility::string_t& value); - - bool isIsOverridden() const; - bool isOverriddenIsSet() const; - void unsetIs_overridden(); - void setIsOverridden(bool value); - - bool isIsStale() const; - bool isStaleIsSet() const; - void unsetIs_stale(); - void setIsStale(bool value); - - utility::string_t getCompiledKind() const; - bool compiledKindIsSet() const; - void unsetCompiled_kind(); - void setCompiledKind(const utility::string_t& value); - - utility::string_t getAutogenError() const; - bool autogenErrorIsSet() const; - void unsetAutogen_error(); - void setAutogenError(const utility::string_t& value); - - std::vector getWarnings() const; - bool warningsIsSet() const; - void unsetWarnings(); - void setWarnings(const std::vector& value); - - utility::datetime getUpdatedAt() const; - bool updatedAtIsSet() const; - void unsetUpdated_at(); - void setUpdatedAt(const utility::datetime& value); - - utility::string_t getUpdatedByUuid() const; - bool updatedByUuidIsSet() const; - void unsetUpdated_by_uuid(); - void setUpdatedByUuid(const utility::string_t& value); - - -protected: - utility::string_t m_Workflow_uuid; - bool m_Workflow_uuidIsSet; - - boost::optional m_Filename; - - boost::optional m_Materialized_source; - - boost::optional m_Autogenerated_source; - - bool m_Is_overridden; - bool m_Is_overriddenIsSet; - - bool m_Is_stale; - bool m_Is_staleIsSet; - - boost::optional m_Compiled_kind; - - boost::optional m_Autogen_error; - - std::vector m_Warnings; - bool m_WarningsIsSet; - - boost::optional m_Updated_at; - - boost::optional m_Updated_by_uuid; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_WorkflowWorkerSourceSchema_H_ */ diff --git a/rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceUpdateSchema.h b/rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceUpdateSchema.h deleted file mode 100644 index 27b16ce..0000000 --- a/rest/include/CppRestOpenAPIClient/model/WorkflowWorkerSourceUpdateSchema.h +++ /dev/null @@ -1,78 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - -/* - * WorkflowWorkerSourceUpdateSchema.h - * - * Payload for ``PUT /workflows/{uuid}/worker-source`` (save override). - */ - -#ifndef ORG_OPENAPITOOLS_CLIENT_MODEL_WorkflowWorkerSourceUpdateSchema_H_ -#define ORG_OPENAPITOOLS_CLIENT_MODEL_WorkflowWorkerSourceUpdateSchema_H_ - -#include - -#include "CppRestOpenAPIClient/ModelBase.h" - -#include - -namespace org { -namespace openapitools { -namespace client { -namespace model { - - - -/// -/// Payload for ``PUT /workflows/{uuid}/worker-source`` (save override). -/// -class WorkflowWorkerSourceUpdateSchema - : public ModelBase -{ -public: - WorkflowWorkerSourceUpdateSchema(); - virtual ~WorkflowWorkerSourceUpdateSchema(); - - ///////////////////////////////////////////// - /// ModelBase overrides - - void validate() override; - - web::json::value toJson() const override; - bool fromJson(const web::json::value& json) override; - - void toMultipart(std::shared_ptr multipart, const utility::string_t& namePrefix) const override; - bool fromMultiPart(std::shared_ptr multipart, const utility::string_t& namePrefix) override; - - - ///////////////////////////////////////////// - /// WorkflowWorkerSourceUpdateSchema members - - - utility::string_t getSource() const; - bool sourceIsSet() const; - void unsetSource(); - void setSource(const utility::string_t& value); - - -protected: - utility::string_t m_Source; - bool m_SourceIsSet; - -}; - - -} -} -} -} - -#endif /* ORG_OPENAPITOOLS_CLIENT_MODEL_WorkflowWorkerSourceUpdateSchema_H_ */ diff --git a/rest/src/api/CatalogApi.cpp b/rest/src/api/CatalogApi.cpp index 15c19ff..a0e3381 100644 --- a/rest/src/api/CatalogApi.cpp +++ b/rest/src/api/CatalogApi.cpp @@ -35,136 +35,6 @@ CatalogApi::~CatalogApi() { } -pplx::task> CatalogApi::srcAppApiCatalogSeedListDriverControllerAssets() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/driver-controllers"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedListDriverControllerAssets does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedListDriverControllerAssets does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedListDriverControllerAssets: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedListDriverControllerAssets: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new DriverControllerAssetsResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedListDriverControllerAssets: unsupported response type")); - } - - return localVarResult; - }); -} pplx::task>> CatalogApi::srcAppApiCatalogSeedSearchCatalog(utility::string_t query, boost::optional limit, boost::optional offset) const { @@ -303,18 +173,18 @@ pplx::task>> CatalogApi::sr return localVarResult; }); } -pplx::task> CatalogApi::srcAppApiCatalogSeedSeedAutogenControllers(std::shared_ptr seedAutogenControllersRequestSchema) const +pplx::task> CatalogApi::srcAppApiCatalogSeedSeedCatalog(std::shared_ptr catalogSeedRequestSchema) const { - // verify the required parameter 'seedAutogenControllersRequestSchema' is set - if (seedAutogenControllersRequestSchema == nullptr) + // verify the required parameter 'catalogSeedRequestSchema' is set + if (catalogSeedRequestSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'seedAutogenControllersRequestSchema' when calling CatalogApi->srcAppApiCatalogSeedSeedAutogenControllers")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'catalogSeedRequestSchema' when calling CatalogApi->srcAppApiCatalogSeedSeedCatalog")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/seed-autogen-controllers"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/seed"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -343,7 +213,7 @@ pplx::task> CatalogApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedAutogenControllers does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedCatalog does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -361,7 +231,7 @@ pplx::task> CatalogApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(seedAutogenControllersRequestSchema); + localVarJson = ModelBase::toJson(catalogSeedRequestSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -372,9 +242,9 @@ pplx::task> CatalogApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(seedAutogenControllersRequestSchema.get()) + if(catalogSeedRequestSchema.get()) { - seedAutogenControllersRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("seedAutogenControllersRequestSchema")); + catalogSeedRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("catalogSeedRequestSchema")); } @@ -387,7 +257,7 @@ pplx::task> CatalogApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedAutogenControllers does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedCatalog does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -415,7 +285,7 @@ pplx::task> CatalogApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedAutogenControllers: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedCatalog: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -426,7 +296,7 @@ pplx::task> CatalogApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedAutogenControllers: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedCatalog: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -435,7 +305,7 @@ pplx::task> CatalogApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new SeedAutogenControllersResponseSchema()); + std::shared_ptr localVarResult(new CatalogSeedResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -450,24 +320,18 @@ pplx::task> CatalogApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedAutogenControllers: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedCatalog: unsupported response type")); } return localVarResult; }); } -pplx::task> CatalogApi::srcAppApiCatalogSeedSeedCatalog(std::shared_ptr catalogSeedRequestSchema) const +pplx::task> CatalogApi::srcAppApiCatalogSeedSeedOptions() const { - // verify the required parameter 'catalogSeedRequestSchema' is set - if (catalogSeedRequestSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'catalogSeedRequestSchema' when calling CatalogApi->srcAppApiCatalogSeedSeedCatalog")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/seed"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/seed-options"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -496,13 +360,12 @@ pplx::task> CatalogApi::srcAppApiCata } else { - throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedCatalog does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedOptions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -512,27 +375,11 @@ pplx::task> CatalogApi::srcAppApiCata if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(catalogSeedRequestSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(catalogSeedRequestSchema.get()) - { - catalogSeedRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("catalogSeedRequestSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -540,7 +387,7 @@ pplx::task> CatalogApi::srcAppApiCata } else { - throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedCatalog does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedOptions does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -552,7 +399,7 @@ pplx::task> CatalogApi::srcAppApiCata } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -568,7 +415,7 @@ pplx::task> CatalogApi::srcAppApiCata if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedCatalog: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedOptions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -579,7 +426,7 @@ pplx::task> CatalogApi::srcAppApiCata if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedCatalog: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedOptions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -588,426 +435,7 @@ pplx::task> CatalogApi::srcAppApiCata }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new CatalogSeedResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedCatalog: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> CatalogApi::srcAppApiCatalogSeedSeedDetail(utility::string_t group, utility::string_t key) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/seed-detail"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedDetail does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - { - localVarQueryParams[utility::conversions::to_string_t("group")] = ApiClient::parameterToString(group); - } - { - localVarQueryParams[utility::conversions::to_string_t("key")] = ApiClient::parameterToString(key); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedDetail does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedDetail: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedDetail: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new CatalogSeedDetailSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedDetail: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> CatalogApi::srcAppApiCatalogSeedSeedDriverControllers(std::shared_ptr driverControllerSeedRequestSchema) const -{ - - // verify the required parameter 'driverControllerSeedRequestSchema' is set - if (driverControllerSeedRequestSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'driverControllerSeedRequestSchema' when calling CatalogApi->srcAppApiCatalogSeedSeedDriverControllers")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/driver-controllers/seed"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedDriverControllers does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(driverControllerSeedRequestSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(driverControllerSeedRequestSchema.get()) - { - driverControllerSeedRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("driverControllerSeedRequestSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedDriverControllers does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedDriverControllers: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedDriverControllers: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new DriverControllerSeedResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedDriverControllers: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> CatalogApi::srcAppApiCatalogSeedSeedOptions() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/seed-options"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedOptions does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedSeedOptions does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedOptions: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedSeedOptions: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new CatalogSeedOptionsResponseSchema()); + std::shared_ptr localVarResult(new CatalogSeedOptionsResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -1028,136 +456,6 @@ pplx::task> CatalogApi::srcApp return localVarResult; }); } -pplx::task> CatalogApi::srcAppApiCatalogSeedTriggerAutogenControllers() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/catalog/trigger-autogen-controllers"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedTriggerAutogenControllers does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("CatalogApi->srcAppApiCatalogSeedTriggerAutogenControllers does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedTriggerAutogenControllers: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedTriggerAutogenControllers: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new TriggerAutogenControllersResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiCatalogSeedTriggerAutogenControllers: unsupported response type")); - } - - return localVarResult; - }); -} } } diff --git a/rest/src/api/DefaultApi.cpp b/rest/src/api/DefaultApi.cpp index 997457b..774b061 100644 --- a/rest/src/api/DefaultApi.cpp +++ b/rest/src/api/DefaultApi.cpp @@ -7985,137 +7985,6 @@ pplx::task DefaultApi::srcAppApiAttachmentsDownloadAttachment(utility::str return void(); }); } -pplx::task> DefaultApi::srcAppApiAttachmentsDownloadAttachmentUrl(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/attachments/{uuid}/download-url"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiAttachmentsDownloadAttachmentUrl does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiAttachmentsDownloadAttachmentUrl does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiAttachmentsDownloadAttachmentUrl: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiAttachmentsDownloadAttachmentUrl: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new AttachmentDownloadUrlSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiAttachmentsDownloadAttachmentUrl: unsupported response type")); - } - - return localVarResult; - }); -} pplx::task> DefaultApi::srcAppApiAttachmentsGetAttachment(utility::string_t uuid) const { @@ -9818,160 +9687,6 @@ pplx::task>> DefaultApi::src return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiControllerPoliciesSendInferenceCommand(utility::string_t uuid, std::shared_ptr controllerPolicyInferenceCommandSchema) const -{ - - // verify the required parameter 'controllerPolicyInferenceCommandSchema' is set - if (controllerPolicyInferenceCommandSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'controllerPolicyInferenceCommandSchema' when calling DefaultApi->srcAppApiControllerPoliciesSendInferenceCommand")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/controller-policies/{uuid}/inference-command"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiControllerPoliciesSendInferenceCommand does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(controllerPolicyInferenceCommandSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(controllerPolicyInferenceCommandSchema.get()) - { - controllerPolicyInferenceCommandSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("controllerPolicyInferenceCommandSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiControllerPoliciesSendInferenceCommand does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiControllerPoliciesSendInferenceCommand: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiControllerPoliciesSendInferenceCommand: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new ControllerPolicyInferenceCommandResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiControllerPoliciesSendInferenceCommand: unsupported response type")); - } - - return localVarResult; - }); -} pplx::task> DefaultApi::srcAppApiControllerPoliciesStopControllerPolicy(utility::string_t uuid, std::shared_ptr controllerPolicyStopSchema) const { @@ -17602,7 +17317,7 @@ pplx::task DefaultApi::srcAppApiEnvironmentsExportsGetEnvironmentUrdfScene return void(); }); } -pplx::task DefaultApi::srcAppApiEnvironmentsExportsGetEnvironmentUrdfSceneZipDirect(utility::string_t uuid, boost::optional excludeTwinUuids) const +pplx::task DefaultApi::srcAppApiEnvironmentsExportsGetEnvironmentUrdfSceneZipDirect(utility::string_t uuid) const { @@ -17643,10 +17358,6 @@ pplx::task DefaultApi::srcAppApiEnvironmentsExportsGetEnvironmentUrdfScene std::unordered_set localVarConsumeHttpContentTypes; - if (excludeTwinUuids) - { - localVarQueryParams[utility::conversions::to_string_t("exclude_twin_uuids")] = ApiClient::parameterToString(*excludeTwinUuids); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -21691,7 +21402,7 @@ pplx::task>> DefaultApi::sr return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsRecordingsGetRecordingData(utility::string_t uuid, utility::string_t recordingUuid, boost::optional returnFlatbuffers) const +pplx::task> DefaultApi::srcAppApiEnvironmentsRecordingsGetRecordingData(utility::string_t uuid, utility::string_t recordingUuid) const { @@ -21734,10 +21445,6 @@ pplx::task> DefaultApi::srcAppAp std::unordered_set localVarConsumeHttpContentTypes; - if (returnFlatbuffers) - { - localVarQueryParams[utility::conversions::to_string_t("return_flatbuffers")] = ApiClient::parameterToString(*returnFlatbuffers); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -24073,14 +23780,13 @@ pplx::task>> DefaultApi::sr return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEnvironmentsSimulationGetOnlineControllerSessionLogs(utility::string_t uuid, utility::string_t sessionUuid, boost::optional logType, boost::optional limit) const +pplx::task>> DefaultApi::srcAppApiEnvironmentsSimulationListOnlineControllerSessions(utility::string_t uuid, boost::optional activeOnly) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/online-controllers/{session_uuid}/logs"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/online-controllers"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("session_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(sessionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -24109,20 +23815,16 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationGetOnlineControllerSessionLogs does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationListOnlineControllerSessions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (logType) - { - localVarQueryParams[utility::conversions::to_string_t("log_type")] = ApiClient::parameterToString(*logType); - } - if (limit) + if (activeOnly) { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + localVarQueryParams[utility::conversions::to_string_t("active_only")] = ApiClient::parameterToString(*activeOnly); } std::shared_ptr localVarHttpBody; @@ -24144,7 +23846,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationGetOnlineControllerSessionLogs does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationListOnlineControllerSessions does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -24172,7 +23874,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationGetOnlineControllerSessionLogs: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationListOnlineControllerSessions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -24183,7 +23885,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationGetOnlineControllerSessionLogs: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationListOnlineControllerSessions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -24192,17 +23894,16 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - for( auto& localVarItem : localVarJson.as_object() ) + for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) @@ -24212,18 +23913,18 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationGetOnlineControllerSessionLogs: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationListOnlineControllerSessions: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEnvironmentsSimulationListOnlineControllerSessions(utility::string_t uuid, boost::optional activeOnly) const +pplx::task>> DefaultApi::srcAppApiEnvironmentsSimulationResetEnvironment(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/online-controllers"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/reset"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -24253,17 +23954,13 @@ pplx::task>> DefaultA } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationListOnlineControllerSessions does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationResetEnvironment does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (activeOnly) - { - localVarQueryParams[utility::conversions::to_string_t("active_only")] = ApiClient::parameterToString(*activeOnly); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -24284,7 +23981,7 @@ pplx::task>> DefaultA } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationListOnlineControllerSessions does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationResetEnvironment does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -24296,7 +23993,7 @@ pplx::task>> DefaultA } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -24312,7 +24009,7 @@ pplx::task>> DefaultA if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationListOnlineControllerSessions: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationResetEnvironment: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -24323,7 +24020,7 @@ pplx::task>> DefaultA if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationListOnlineControllerSessions: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationResetEnvironment: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -24332,16 +24029,17 @@ pplx::task>> DefaultA }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::map> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) + + for( auto& localVarItem : localVarJson.as_object() ) { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) @@ -24351,19 +24049,20 @@ pplx::task>> DefaultA else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationListOnlineControllerSessions: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationResetEnvironment: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEnvironmentsSimulationResetEnvironment(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiEnvironmentsSimulationStopEnvironmentSimulation(utility::string_t uuid, utility::string_t simulationId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/reset"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/simulations/{simulation_id}/stop"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("simulation_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(simulationId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -24392,7 +24091,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationResetEnvironment does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationStopEnvironmentSimulation does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -24419,7 +24118,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationResetEnvironment does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationStopEnvironmentSimulation does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -24447,7 +24146,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationResetEnvironment: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationStopEnvironmentSimulation: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -24458,7 +24157,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationResetEnvironment: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationStopEnvironmentSimulation: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -24487,20 +24186,25 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationResetEnvironment: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationStopEnvironmentSimulation: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEnvironmentsSimulationStopEnvironmentSimulation(utility::string_t uuid, utility::string_t simulationId) const +pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot(utility::string_t uuid, std::shared_ptr environmentSnapshotCreateSchema) const { + // verify the required parameter 'environmentSnapshotCreateSchema' is set + if (environmentSnapshotCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentSnapshotCreateSchema' when calling DefaultApi->srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/simulations/{simulation_id}/stop"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("simulation_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(simulationId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -24529,12 +24233,13 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationStopEnvironmentSimulation does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -24544,11 +24249,27 @@ pplx::task>> DefaultApi::sr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(environmentSnapshotCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(environmentSnapshotCreateSchema.get()) + { + environmentSnapshotCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentSnapshotCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -24556,7 +24277,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSimulationStopEnvironmentSimulation does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -24584,7 +24305,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationStopEnvironmentSimulation: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -24595,7 +24316,139 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationStopEnvironmentSimulation: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::shared_ptr localVarResult(new EnvironmentSnapshotSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task>> DefaultApi::srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const +{ + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -24624,25 +24477,20 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSimulationStopEnvironmentSimulation: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot(utility::string_t uuid, std::shared_ptr environmentSnapshotCreateSchema) const +pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const { - // verify the required parameter 'environmentSnapshotCreateSchema' is set - if (environmentSnapshotCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentSnapshotCreateSchema' when calling DefaultApi->srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -24671,13 +24519,12 @@ pplx::task> DefaultApi::srcAppApiEnvi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -24687,27 +24534,11 @@ pplx::task> DefaultApi::srcAppApiEnvi if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(environmentSnapshotCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(environmentSnapshotCreateSchema.get()) - { - environmentSnapshotCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentSnapshotCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -24715,7 +24546,7 @@ pplx::task> DefaultApi::srcAppApiEnvi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -24727,7 +24558,7 @@ pplx::task> DefaultApi::srcAppApiEnvi } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -24743,7 +24574,7 @@ pplx::task> DefaultApi::srcAppApiEnvi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -24754,7 +24585,7 @@ pplx::task> DefaultApi::srcAppApiEnvi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -24778,20 +24609,19 @@ pplx::task> DefaultApi::srcAppApiEnvi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsCreateEnvironmentSnapshot: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const +pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshot-hash"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -24820,7 +24650,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -24847,7 +24677,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -24859,7 +24689,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -24875,7 +24705,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -24886,7 +24716,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -24895,7 +24725,7 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::map localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -24903,7 +24733,7 @@ pplx::task>> DefaultApi::sr for( auto& localVarItem : localVarJson.as_object() ) { - std::shared_ptr localVarItemObj; + utility::string_t localVarItemObj; ModelBase::fromJson(localVarItem.second, localVarItemObj); localVarResult[localVarItem.first] = localVarItemObj; } @@ -24915,20 +24745,19 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsDeleteEnvironmentSnapshot: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const +pplx::task>> DefaultApi::srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -24957,7 +24786,7 @@ pplx::task> DefaultApi::srcAppApiEnvi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -24984,7 +24813,7 @@ pplx::task> DefaultApi::srcAppApiEnvi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -25012,7 +24841,7 @@ pplx::task> DefaultApi::srcAppApiEnvi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -25023,7 +24852,7 @@ pplx::task> DefaultApi::srcAppApiEnvi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -25032,13 +24861,17 @@ pplx::task> DefaultApi::srcAppApiEnvi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EnvironmentSnapshotSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -25047,19 +24880,20 @@ pplx::task> DefaultApi::srcAppApiEnvi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshot: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshot-hash"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}/restore"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -25088,7 +24922,7 @@ pplx::task> DefaultApi::srcAppApi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -25115,7 +24949,7 @@ pplx::task> DefaultApi::srcAppApi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -25127,7 +24961,7 @@ pplx::task> DefaultApi::srcAppApi } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -25143,7 +24977,7 @@ pplx::task> DefaultApi::srcAppApi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -25154,7 +24988,7 @@ pplx::task> DefaultApi::srcAppApi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -25163,18 +24997,13 @@ pplx::task> DefaultApi::srcAppApi }) .then([=, this](utility::string_t localVarResponse) { - std::map localVarResult; + std::shared_ptr localVarResult(new EnvironmentSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_object() ) - { - utility::string_t localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -25183,19 +25012,20 @@ pplx::task> DefaultApi::srcAppApi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsGetEnvironmentSnapshotHash: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -25224,7 +25054,7 @@ pplx::task>> DefaultApi:: } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -25251,7 +25081,7 @@ pplx::task>> DefaultApi:: } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -25263,7 +25093,7 @@ pplx::task>> DefaultApi:: } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -25279,7 +25109,7 @@ pplx::task>> DefaultApi:: if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -25290,7 +25120,7 @@ pplx::task>> DefaultApi:: if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -25299,18 +25129,168 @@ pplx::task>> DefaultApi:: }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new EnvironmentSnapshotSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task> DefaultApi::srcAppApiEnvironmentsUpdateEnvironment(utility::string_t uuid, std::shared_ptr environmentCreateSchema) const +{ + + // verify the required parameter 'environmentCreateSchema' is set + if (environmentCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentCreateSchema' when calling DefaultApi->srcAppApiEnvironmentsUpdateEnvironment")); + } + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironment does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(environmentCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(environmentCreateSchema.get()) + { + environmentCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironment does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironment: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironment: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::shared_ptr localVarResult(new EnvironmentSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { // TODO multipart response parsing @@ -25318,20 +25298,26 @@ pplx::task>> DefaultApi:: else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsListEnvironmentSnapshots: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironment: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const +pplx::task> DefaultApi::srcAppApiEnvironmentsUpdateEnvironmentForProject(utility::string_t projectUuid, utility::string_t uuid, std::shared_ptr environmentCreateSchema) const { + // verify the required parameter 'environmentCreateSchema' is set + if (environmentCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentCreateSchema' when calling DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentForProject")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}/restore"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{project_uuid}/environments/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("project_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(projectUuid))); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -25360,12 +25346,13 @@ pplx::task> DefaultApi::srcAppApiEnvironments } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentForProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -25375,143 +25362,27 @@ pplx::task> DefaultApi::srcAppApiEnvironments if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(environmentCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new EnvironmentSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); + std::shared_ptr localVarMultipart(new MultipartFormData); - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else + if(environmentCreateSchema.get()) { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsRestoreEnvironmentSnapshot: unsupported response type")); + environmentCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentCreateSchema")); } + - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot(utility::string_t uuid, utility::string_t snapshotUuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/snapshots/{snapshot_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("snapshot_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(snapshotUuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -25519,7 +25390,7 @@ pplx::task> DefaultApi::srcAppApiEnvi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentForProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -25547,7 +25418,7 @@ pplx::task> DefaultApi::srcAppApiEnvi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentForProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -25558,7 +25429,7 @@ pplx::task> DefaultApi::srcAppApiEnvi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentForProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -25567,7 +25438,7 @@ pplx::task> DefaultApi::srcAppApiEnvi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EnvironmentSnapshotSchema()); + std::shared_ptr localVarResult(new EnvironmentSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -25582,25 +25453,26 @@ pplx::task> DefaultApi::srcAppApiEnvi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsSnapshotsUpdateEnvironmentSnapshot: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentForProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsUpdateEnvironment(utility::string_t uuid, std::shared_ptr environmentCreateSchema) const +pplx::task> DefaultApi::srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive(utility::string_t uuid, utility::string_t primitiveId, std::shared_ptr environmentProceduralPrimitivePatchSchema) const { - // verify the required parameter 'environmentCreateSchema' is set - if (environmentCreateSchema == nullptr) + // verify the required parameter 'environmentProceduralPrimitivePatchSchema' is set + if (environmentProceduralPrimitivePatchSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentCreateSchema' when calling DefaultApi->srcAppApiEnvironmentsUpdateEnvironment")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentProceduralPrimitivePatchSchema' when calling DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/procedural-primitives/{primitive_id}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("primitive_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(primitiveId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -25629,7 +25501,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironment does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -25647,7 +25519,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(environmentCreateSchema); + localVarJson = ModelBase::toJson(environmentProceduralPrimitivePatchSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -25658,9 +25530,9 @@ pplx::task> DefaultApi::srcAppApiEnvironments localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(environmentCreateSchema.get()) + if(environmentProceduralPrimitivePatchSchema.get()) { - environmentCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentCreateSchema")); + environmentProceduralPrimitivePatchSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentProceduralPrimitivePatchSchema")); } @@ -25673,7 +25545,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironment does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -25685,7 +25557,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -25701,7 +25573,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironment: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -25712,7 +25584,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironment: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -25721,7 +25593,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EnvironmentSchema()); + std::shared_ptr localVarResult(new EnvironmentProceduralPrimitiveSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -25736,25 +25608,18 @@ pplx::task> DefaultApi::srcAppApiEnvironments else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironment: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsUpdateEnvironmentForProject(utility::string_t projectUuid, utility::string_t uuid, std::shared_ptr environmentCreateSchema) const +pplx::task> DefaultApi::srcAppApiEnvironmentsUploadEnvironmentThumbnail(utility::string_t uuid, std::shared_ptr image) const { - // verify the required parameter 'environmentCreateSchema' is set - if (environmentCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentCreateSchema' when calling DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentForProject")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{project_uuid}/environments/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("project_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(projectUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/thumbnail"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -25784,14 +25649,17 @@ pplx::task> DefaultApi::srcAppApiEnvironments } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentForProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUploadEnvironmentThumbnail does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); + { + localVarFileParams[ utility::conversions::to_string_t("image") ] = image; + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -25800,27 +25668,11 @@ pplx::task> DefaultApi::srcAppApiEnvironments if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(environmentCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(environmentCreateSchema.get()) - { - environmentCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -25828,7 +25680,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentForProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUploadEnvironmentThumbnail does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -25840,7 +25692,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -25856,7 +25708,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentForProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUploadEnvironmentThumbnail: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -25867,7 +25719,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentForProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUploadEnvironmentThumbnail: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -25876,7 +25728,7 @@ pplx::task> DefaultApi::srcAppApiEnvironments }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EnvironmentSchema()); + std::shared_ptr localVarResult(new AttachmentSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -25891,26 +25743,24 @@ pplx::task> DefaultApi::srcAppApiEnvironments else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentForProject: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUploadEnvironmentThumbnail: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive(utility::string_t uuid, utility::string_t primitiveId, std::shared_ptr environmentProceduralPrimitivePatchSchema) const +pplx::task> DefaultApi::srcAppApiEpisodeCreateEpisode(std::shared_ptr episodeCreateSchema) const { - // verify the required parameter 'environmentProceduralPrimitivePatchSchema' is set - if (environmentProceduralPrimitivePatchSchema == nullptr) + // verify the required parameter 'episodeCreateSchema' is set + if (episodeCreateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'environmentProceduralPrimitivePatchSchema' when calling DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'episodeCreateSchema' when calling DefaultApi->srcAppApiEpisodeCreateEpisode")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/procedural-primitives/{primitive_id}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("primitive_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(primitiveId))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -25939,7 +25789,7 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeCreateEpisode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -25957,7 +25807,7 @@ pplx::task> DefaultApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(environmentProceduralPrimitivePatchSchema); + localVarJson = ModelBase::toJson(episodeCreateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -25968,9 +25818,9 @@ pplx::task> DefaultApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(environmentProceduralPrimitivePatchSchema.get()) + if(episodeCreateSchema.get()) { - environmentProceduralPrimitivePatchSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("environmentProceduralPrimitivePatchSchema")); + episodeCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("episodeCreateSchema")); } @@ -25983,7 +25833,7 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeCreateEpisode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -25995,7 +25845,7 @@ pplx::task> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -26011,7 +25861,7 @@ pplx::task> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEpisodeCreateEpisode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26022,7 +25872,7 @@ pplx::task> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEpisodeCreateEpisode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -26031,7 +25881,7 @@ pplx::task> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EnvironmentProceduralPrimitiveSchema()); + std::shared_ptr localVarResult(new EpisodeSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -26046,18 +25896,18 @@ pplx::task> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUpdateEnvironmentProceduralPrimitive: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEpisodeCreateEpisode: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEnvironmentsUploadEnvironmentThumbnail(utility::string_t uuid, std::shared_ptr image) const +pplx::task> DefaultApi::srcAppApiEpisodeDeleteEpisode(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/environments/{uuid}/thumbnail"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -26087,17 +25937,13 @@ pplx::task> DefaultApi::srcAppApiEnvironmentsU } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUploadEnvironmentThumbnail does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeDeleteEpisode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); - { - localVarFileParams[ utility::conversions::to_string_t("image") ] = image; - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -26118,7 +25964,7 @@ pplx::task> DefaultApi::srcAppApiEnvironmentsU } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEnvironmentsUploadEnvironmentThumbnail does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeDeleteEpisode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -26130,7 +25976,7 @@ pplx::task> DefaultApi::srcAppApiEnvironmentsU } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -26146,7 +25992,7 @@ pplx::task> DefaultApi::srcAppApiEnvironmentsU if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUploadEnvironmentThumbnail: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEpisodeDeleteEpisode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26157,7 +26003,7 @@ pplx::task> DefaultApi::srcAppApiEnvironmentsU if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUploadEnvironmentThumbnail: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEpisodeDeleteEpisode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -26166,13 +26012,18 @@ pplx::task> DefaultApi::srcAppApiEnvironmentsU }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new AttachmentSchema()); + std::map localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_object() ) + { + bool localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -26181,24 +26032,19 @@ pplx::task> DefaultApi::srcAppApiEnvironmentsU else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEnvironmentsUploadEnvironmentThumbnail: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEpisodeDeleteEpisode: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEpisodeCreateEpisode(std::shared_ptr episodeCreateSchema) const +pplx::task> DefaultApi::srcAppApiEpisodeGetEpisode(utility::string_t uuid) const { - // verify the required parameter 'episodeCreateSchema' is set - if (episodeCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'episodeCreateSchema' when calling DefaultApi->srcAppApiEpisodeCreateEpisode")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -26227,13 +26073,12 @@ pplx::task> DefaultApi::srcAppApiEpisodeCreateEpi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeCreateEpisode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeGetEpisode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -26243,27 +26088,11 @@ pplx::task> DefaultApi::srcAppApiEpisodeCreateEpi if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(episodeCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(episodeCreateSchema.get()) - { - episodeCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("episodeCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -26271,7 +26100,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeCreateEpi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeCreateEpisode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeGetEpisode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -26283,7 +26112,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeCreateEpi } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -26299,7 +26128,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeCreateEpi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEpisodeCreateEpisode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEpisodeGetEpisode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26310,7 +26139,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeCreateEpi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeCreateEpisode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEpisodeGetEpisode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -26334,19 +26163,18 @@ pplx::task> DefaultApi::srcAppApiEpisodeCreateEpi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeCreateEpisode: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEpisodeGetEpisode: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEpisodeDeleteEpisode(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiEpisodeListEpisodeTaskNames() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/task-names"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -26375,7 +26203,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeDelete } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeDeleteEpisode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodeTaskNames does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -26402,7 +26230,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeDelete } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeDeleteEpisode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodeTaskNames does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -26414,7 +26242,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeDelete } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -26430,7 +26258,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeDelete if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEpisodeDeleteEpisode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodeTaskNames: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26441,7 +26269,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeDelete if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeDeleteEpisode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodeTaskNames: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -26450,17 +26278,150 @@ pplx::task> DefaultApi::srcAppApiEpisodeDelete }) .then([=, this](utility::string_t localVarResponse) { - std::map localVarResult; + std::vector localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); + for( auto& localVarItem : localVarJson.as_array() ) + { + utility::string_t localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodeTaskNames: unsupported response type")); + } - for( auto& localVarItem : localVarJson.as_object() ) + return localVarResult; + }); +} +pplx::task>> DefaultApi::srcAppApiEpisodeListEpisodes() const +{ + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes"); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodes does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodes does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodes: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { - bool localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodes: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::vector> localVarResult; + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) @@ -26470,18 +26431,18 @@ pplx::task> DefaultApi::srcAppApiEpisodeDelete else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeDeleteEpisode: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodes: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEpisodeGetEpisode(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiEpisodeRecomputeEpisodeParquet(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}/recompute"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -26511,7 +26472,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeGetEpisod } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeGetEpisode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeRecomputeEpisodeParquet does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -26538,7 +26499,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeGetEpisod } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeGetEpisode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeRecomputeEpisodeParquet does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -26550,7 +26511,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeGetEpisod } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -26566,7 +26527,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeGetEpisod if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEpisodeGetEpisode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEpisodeRecomputeEpisodeParquet: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26577,7 +26538,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeGetEpisod if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeGetEpisode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEpisodeRecomputeEpisodeParquet: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -26586,13 +26547,18 @@ pplx::task> DefaultApi::srcAppApiEpisodeGetEpisod }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EpisodeSchema()); + std::map> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_object() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -26601,18 +26567,25 @@ pplx::task> DefaultApi::srcAppApiEpisodeGetEpisod else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeGetEpisode: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiEpisodeRecomputeEpisodeParquet: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEpisodeListEpisodeTaskNames() const +pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpisode(utility::string_t uuid, std::shared_ptr episodeUpdateSchema) const { + // verify the required parameter 'episodeUpdateSchema' is set + if (episodeUpdateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'episodeUpdateSchema' when calling DefaultApi->srcAppApiEpisodeUpdateEpisode")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/task-names"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -26641,12 +26614,13 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodeTaskNames does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeUpdateEpisode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -26656,11 +26630,27 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(episodeUpdateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(episodeUpdateSchema.get()) + { + episodeUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("episodeUpdateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -26668,7 +26658,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodeTaskNames does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeUpdateEpisode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -26680,7 +26670,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -26696,7 +26686,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodeTaskNames: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiEpisodeUpdateEpisode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26707,7 +26697,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodeTaskNames: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiEpisodeUpdateEpisode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -26716,18 +26706,149 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso }) .then([=, this](utility::string_t localVarResponse) { - std::vector localVarResult; + std::shared_ptr localVarResult(new EpisodeSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiEpisodeUpdateEpisode: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task> DefaultApi::srcAppApiExecutionsGetTaskExecution(utility::string_t uuid, boost::optional workspaceUuid) const +{ + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/executions/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsGetTaskExecution does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + if (workspaceUuid) + { + localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); + } + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsGetTaskExecution does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiExecutionsGetTaskExecution: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { - utility::string_t localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiExecutionsGetTaskExecution: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::shared_ptr localVarResult(new DeferredTaskExecutionResponseSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { // TODO multipart response parsing @@ -26735,18 +26856,18 @@ pplx::task> DefaultApi::srcAppApiEpisodeListEpiso else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodeTaskNames: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiExecutionsGetTaskExecution: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEpisodeListEpisodes() const +pplx::task>> DefaultApi::srcAppApiExecutionsListTaskExecutions(boost::optional workspaceUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/executions"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -26775,13 +26896,17 @@ pplx::task>> DefaultApi::srcAppApiEpi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodes does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsListTaskExecutions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (workspaceUuid) + { + localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -26802,7 +26927,7 @@ pplx::task>> DefaultApi::srcAppApiEpi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeListEpisodes does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsListTaskExecutions does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -26830,7 +26955,7 @@ pplx::task>> DefaultApi::srcAppApiEpi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodes: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiExecutionsListTaskExecutions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26841,7 +26966,7 @@ pplx::task>> DefaultApi::srcAppApiEpi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodes: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiExecutionsListTaskExecutions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -26850,14 +26975,14 @@ pplx::task>> DefaultApi::srcAppApiEpi }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -26869,19 +26994,19 @@ pplx::task>> DefaultApi::srcAppApiEpi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeListEpisodes: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiExecutionsListTaskExecutions: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiEpisodeRecomputeEpisodeParquet(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiInvitationRouterAcceptInvitationEndpoint(utility::string_t token) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}/recompute"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/invitations/accept/{token}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("token") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(token))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -26910,7 +27035,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeRecomputeEpisodeParquet does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterAcceptInvitationEndpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -26937,7 +27062,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeRecomputeEpisodeParquet does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterAcceptInvitationEndpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -26949,7 +27074,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -26965,7 +27090,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEpisodeRecomputeEpisodeParquet: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterAcceptInvitationEndpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -26976,7 +27101,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeRecomputeEpisodeParquet: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterAcceptInvitationEndpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -27005,25 +27130,19 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeRecomputeEpisodeParquet: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterAcceptInvitationEndpoint: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpisode(utility::string_t uuid, std::shared_ptr episodeUpdateSchema) const +pplx::task>> DefaultApi::srcAppApiInvitationRouterGetInvitationInfo(utility::string_t token) const { - // verify the required parameter 'episodeUpdateSchema' is set - if (episodeUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'episodeUpdateSchema' when calling DefaultApi->srcAppApiEpisodeUpdateEpisode")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/episodes/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/invitations/info/{token}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("token") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(token))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -27052,13 +27171,12 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeUpdateEpisode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterGetInvitationInfo does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -27068,27 +27186,11 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(episodeUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(episodeUpdateSchema.get()) - { - episodeUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("episodeUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -27096,7 +27198,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiEpisodeUpdateEpisode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterGetInvitationInfo does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -27108,7 +27210,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -27124,7 +27226,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiEpisodeUpdateEpisode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterGetInvitationInfo: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -27135,7 +27237,7 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeUpdateEpisode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterGetInvitationInfo: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -27144,13 +27246,18 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EpisodeSchema()); + std::map> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_object() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -27159,19 +27266,24 @@ pplx::task> DefaultApi::srcAppApiEpisodeUpdateEpi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiEpisodeUpdateEpisode: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterGetInvitationInfo: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiExecutionsGetTaskExecution(utility::string_t uuid, boost::optional workspaceUuid) const +pplx::task> DefaultApi::srcAppApiKeybindingsCreateKeybinding(std::shared_ptr keybindingCreateSchema) const { + // verify the required parameter 'keybindingCreateSchema' is set + if (keybindingCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'keybindingCreateSchema' when calling DefaultApi->srcAppApiKeybindingsCreateKeybinding")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/executions/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -27200,17 +27312,14 @@ pplx::task> DefaultApi::src } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsGetTaskExecution does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsCreateKeybinding does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - if (workspaceUuid) - { - localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -27219,11 +27328,27 @@ pplx::task> DefaultApi::src if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(keybindingCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(keybindingCreateSchema.get()) + { + keybindingCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("keybindingCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -27231,7 +27356,7 @@ pplx::task> DefaultApi::src } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsGetTaskExecution does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsCreateKeybinding does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -27243,7 +27368,7 @@ pplx::task> DefaultApi::src } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -27259,7 +27384,7 @@ pplx::task> DefaultApi::src if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiExecutionsGetTaskExecution: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsCreateKeybinding: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -27270,7 +27395,7 @@ pplx::task> DefaultApi::src if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiExecutionsGetTaskExecution: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsCreateKeybinding: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -27279,7 +27404,7 @@ pplx::task> DefaultApi::src }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new DeferredTaskExecutionResponseSchema()); + std::shared_ptr localVarResult(new KeybindingSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -27294,18 +27419,19 @@ pplx::task> DefaultApi::src else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiExecutionsGetTaskExecution: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsCreateKeybinding: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiExecutionsListTaskExecutions(boost::optional workspaceUuid) const +pplx::task DefaultApi::srcAppApiKeybindingsDeleteKeybinding(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/executions"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -27313,7 +27439,6 @@ pplx::task>> De std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -27334,18 +27459,127 @@ pplx::task>> De } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsListTaskExecutions does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsDeleteKeybinding does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (workspaceUuid) + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { - localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsDeleteKeybinding does not consume any supported media type")); } + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsDeleteKeybinding: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsDeleteKeybinding: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + return void(); + }); +} +pplx::task> DefaultApi::srcAppApiKeybindingsGetKeybinding(utility::string_t uuid) const +{ + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsGetKeybinding does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -27365,7 +27599,7 @@ pplx::task>> De } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiExecutionsListTaskExecutions does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsGetKeybinding does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -27393,7 +27627,7 @@ pplx::task>> De if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiExecutionsListTaskExecutions: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsGetKeybinding: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -27404,7 +27638,7 @@ pplx::task>> De if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiExecutionsListTaskExecutions: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsGetKeybinding: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -27413,17 +27647,13 @@ pplx::task>> De }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new KeybindingSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -27432,19 +27662,18 @@ pplx::task>> De else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiExecutionsListTaskExecutions: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsGetKeybinding: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiInvitationRouterAcceptInvitationEndpoint(utility::string_t token) const +pplx::task>> DefaultApi::srcAppApiKeybindingsListKeybindings() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/invitations/accept/{token}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("token") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(token))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -27473,7 +27702,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterAcceptInvitationEndpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsListKeybindings does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -27500,7 +27729,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterAcceptInvitationEndpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsListKeybindings does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -27528,7 +27757,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterAcceptInvitationEndpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsListKeybindings: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -27539,7 +27768,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterAcceptInvitationEndpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsListKeybindings: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -27548,17 +27777,16 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - for( auto& localVarItem : localVarJson.as_object() ) + for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) @@ -27568,19 +27796,25 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterAcceptInvitationEndpoint: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsListKeybindings: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiInvitationRouterGetInvitationInfo(utility::string_t token) const +pplx::task> DefaultApi::srcAppApiKeybindingsUpdateKeybinding(utility::string_t uuid, std::shared_ptr keybindingUpdateSchema) const { + // verify the required parameter 'keybindingUpdateSchema' is set + if (keybindingUpdateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'keybindingUpdateSchema' when calling DefaultApi->srcAppApiKeybindingsUpdateKeybinding")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/invitations/info/{token}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("token") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(token))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -27609,12 +27843,13 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterGetInvitationInfo does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsUpdateKeybinding does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -27624,11 +27859,27 @@ pplx::task>> DefaultApi::sr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(keybindingUpdateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(keybindingUpdateSchema.get()) + { + keybindingUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("keybindingUpdateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -27636,7 +27887,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiInvitationRouterGetInvitationInfo does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsUpdateKeybinding does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -27648,7 +27899,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -27664,7 +27915,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterGetInvitationInfo: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsUpdateKeybinding: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -27675,7 +27926,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterGetInvitationInfo: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsUpdateKeybinding: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -27684,18 +27935,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::shared_ptr localVarResult(new KeybindingSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_object() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -27704,24 +27950,19 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiInvitationRouterGetInvitationInfo: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiKeybindingsUpdateKeybinding: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiKeybindingsCreateKeybinding(std::shared_ptr keybindingCreateSchema) const +pplx::task> DefaultApi::srcAppApiLabsAdminForceEndSession(utility::string_t sessionUuid) const { - // verify the required parameter 'keybindingCreateSchema' is set - if (keybindingCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'keybindingCreateSchema' when calling DefaultApi->srcAppApiKeybindingsCreateKeybinding")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/admin/sessions/{session_uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("session_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(sessionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -27750,13 +27991,12 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsCreateKeybinding does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsAdminForceEndSession does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -27766,27 +28006,11 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(keybindingCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(keybindingCreateSchema.get()) - { - keybindingCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("keybindingCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -27794,7 +28018,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsCreateKeybinding does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsAdminForceEndSession does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -27806,7 +28030,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -27822,7 +28046,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsCreateKeybinding: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiLabsAdminForceEndSession: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -27833,7 +28057,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsCreateKeybinding: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiLabsAdminForceEndSession: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -27842,7 +28066,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new KeybindingSchema()); + std::shared_ptr localVarResult(new EndSessionResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -27857,131 +28081,18 @@ pplx::task> DefaultApi::srcAppApiKeybindingsCr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsCreateKeybinding: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiLabsAdminForceEndSession: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiKeybindingsDeleteKeybinding(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsDeleteKeybinding does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsDeleteKeybinding does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsDeleteKeybinding: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsDeleteKeybinding: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task> DefaultApi::srcAppApiKeybindingsGetKeybinding(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiLabsEndLabSession() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/end-session"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -28010,7 +28121,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsGe } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsGetKeybinding does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsEndLabSession does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -28037,7 +28148,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsGe } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsGetKeybinding does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsEndLabSession does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -28049,7 +28160,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsGe } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -28065,7 +28176,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsGe if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsGetKeybinding: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiLabsEndLabSession: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -28076,7 +28187,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsGe if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsGetKeybinding: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiLabsEndLabSession: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -28085,7 +28196,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsGe }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new KeybindingSchema()); + std::shared_ptr localVarResult(new EndSessionResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -28100,18 +28211,18 @@ pplx::task> DefaultApi::srcAppApiKeybindingsGe else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsGetKeybinding: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiLabsEndLabSession: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiKeybindingsListKeybindings() const +pplx::task> DefaultApi::srcAppApiLabsGetAdminLabOverview() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/admin/sessions"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -28140,7 +28251,7 @@ pplx::task>> DefaultApi::srcAppApi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsListKeybindings does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetAdminLabOverview does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -28167,7 +28278,7 @@ pplx::task>> DefaultApi::srcAppApi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsListKeybindings does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetAdminLabOverview does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -28195,7 +28306,7 @@ pplx::task>> DefaultApi::srcAppApi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsListKeybindings: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiLabsGetAdminLabOverview: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -28206,7 +28317,7 @@ pplx::task>> DefaultApi::srcAppApi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsListKeybindings: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiLabsGetAdminLabOverview: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -28215,17 +28326,13 @@ pplx::task>> DefaultApi::srcAppApi }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new AdminLabOverviewSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -28234,25 +28341,18 @@ pplx::task>> DefaultApi::srcAppApi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsListKeybindings: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiLabsGetAdminLabOverview: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiKeybindingsUpdateKeybinding(utility::string_t uuid, std::shared_ptr keybindingUpdateSchema) const +pplx::task> DefaultApi::srcAppApiLabsGetLabStatus() const { - // verify the required parameter 'keybindingUpdateSchema' is set - if (keybindingUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'keybindingUpdateSchema' when calling DefaultApi->srcAppApiKeybindingsUpdateKeybinding")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/keybindings/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/status"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -28281,13 +28381,12 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsUpdateKeybinding does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetLabStatus does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -28297,27 +28396,11 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(keybindingUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(keybindingUpdateSchema.get()) - { - keybindingUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("keybindingUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -28325,7 +28408,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiKeybindingsUpdateKeybinding does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetLabStatus does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -28337,7 +28420,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -28353,7 +28436,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsUpdateKeybinding: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiLabsGetLabStatus: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -28364,7 +28447,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsUpdateKeybinding: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiLabsGetLabStatus: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -28373,7 +28456,7 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new KeybindingSchema()); + std::shared_ptr localVarResult(new LabStatusResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -28388,19 +28471,18 @@ pplx::task> DefaultApi::srcAppApiKeybindingsUp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiKeybindingsUpdateKeybinding: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiLabsGetLabStatus: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiLabsAdminForceEndSession(utility::string_t sessionUuid) const +pplx::task> DefaultApi::srcAppApiLabsRequestLabAccess(std::shared_ptr body) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/admin/sessions/{session_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("session_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(sessionUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/request-access"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -28429,12 +28511,13 @@ pplx::task> DefaultApi::srcAppApiLabsA } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsAdminForceEndSession does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsRequestLabAccess does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -28444,11 +28527,22 @@ pplx::task> DefaultApi::srcAppApiLabsA if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(body); + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + localVarMultipart->add(ModelBase::toHttpContent(utility::conversions::to_string_t("body"), body)); + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -28456,7 +28550,7 @@ pplx::task> DefaultApi::srcAppApiLabsA } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsAdminForceEndSession does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsRequestLabAccess does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -28468,7 +28562,7 @@ pplx::task> DefaultApi::srcAppApiLabsA } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -28484,7 +28578,7 @@ pplx::task> DefaultApi::srcAppApiLabsA if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiLabsAdminForceEndSession: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiLabsRequestLabAccess: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -28495,7 +28589,7 @@ pplx::task> DefaultApi::srcAppApiLabsA if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsAdminForceEndSession: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiLabsRequestLabAccess: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -28504,7 +28598,7 @@ pplx::task> DefaultApi::srcAppApiLabsA }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EndSessionResponseSchema()); + std::shared_ptr localVarResult(new LabAccessResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -28519,18 +28613,18 @@ pplx::task> DefaultApi::srcAppApiLabsA else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsAdminForceEndSession: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiLabsRequestLabAccess: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiLabsEndLabSession() const +pplx::task> DefaultApi::srcAppApiMapsCreateMap(utility::string_t mapType, boost::optional twinUuid, boost::optional environmentUuid, boost::optional resolution, boost::optional originX, boost::optional originY, boost::optional originZ, boost::optional originRoll, boost::optional originPitch, boost::optional originYaw, boost::optional> metadata, boost::optional> file) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/end-session"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -28559,143 +28653,61 @@ pplx::task> DefaultApi::srcAppApiLabsE } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsEndLabSession does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsCreateMap does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + localVarFormParams[ utility::conversions::to_string_t("map_type") ] = ApiClient::parameterToString(mapType); } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + if (twinUuid) { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + localVarFormParams[ utility::conversions::to_string_t("twin_uuid") ] = ApiClient::parameterToString(*twinUuid); } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + if (environmentUuid) { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + localVarFormParams[ utility::conversions::to_string_t("environment_uuid") ] = ApiClient::parameterToString(*environmentUuid); } - else + if (resolution) { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsEndLabSession does not consume any supported media type")); + localVarFormParams[ utility::conversions::to_string_t("resolution") ] = ApiClient::parameterToString(*resolution); } - - // authentication (CustomTokenAuthentication) required + if (originX) { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } + localVarFormParams[ utility::conversions::to_string_t("origin_x") ] = ApiClient::parameterToString(*originX); } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) + if (originY) { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiLabsEndLabSession: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsEndLabSession: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) + localVarFormParams[ utility::conversions::to_string_t("origin_y") ] = ApiClient::parameterToString(*originY); + } + if (originZ) { - std::shared_ptr localVarResult(new EndSessionResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsEndLabSession: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiLabsGetAdminLabOverview() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/admin/sessions"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) + localVarFormParams[ utility::conversions::to_string_t("origin_z") ] = ApiClient::parameterToString(*originZ); + } + if (originRoll) { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + localVarFormParams[ utility::conversions::to_string_t("origin_roll") ] = ApiClient::parameterToString(*originRoll); } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + if (originPitch) { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + localVarFormParams[ utility::conversions::to_string_t("origin_pitch") ] = ApiClient::parameterToString(*originPitch); } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + if (originYaw) { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + localVarFormParams[ utility::conversions::to_string_t("origin_yaw") ] = ApiClient::parameterToString(*originYaw); } - else + if (metadata && *metadata != nullptr) { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetAdminLabOverview does not produce any supported media type")); + localVarFormParams[ utility::conversions::to_string_t("metadata") ] = ApiClient::parameterToString(*metadata); + } + if (file && *file != nullptr) + { + localVarFileParams[ utility::conversions::to_string_t("file") ] = *file; } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -28716,7 +28728,7 @@ pplx::task> DefaultApi::srcAppApiLabsGet } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetAdminLabOverview does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsCreateMap does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -28728,7 +28740,7 @@ pplx::task> DefaultApi::srcAppApiLabsGet } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -28744,7 +28756,7 @@ pplx::task> DefaultApi::srcAppApiLabsGet if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiLabsGetAdminLabOverview: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsCreateMap: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -28755,7 +28767,7 @@ pplx::task> DefaultApi::srcAppApiLabsGet if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsGetAdminLabOverview: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsCreateMap: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -28764,7 +28776,7 @@ pplx::task> DefaultApi::srcAppApiLabsGet }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new AdminLabOverviewSchema()); + std::shared_ptr localVarResult(new MapDataSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -28779,18 +28791,19 @@ pplx::task> DefaultApi::srcAppApiLabsGet else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsGetAdminLabOverview: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMapsCreateMap: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiLabsGetLabStatus() const +pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/status"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -28798,7 +28811,6 @@ pplx::task> DefaultApi::srcAppApiLabsGe std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -28819,7 +28831,7 @@ pplx::task> DefaultApi::srcAppApiLabsGe } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetLabStatus does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDeleteMap does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -28846,7 +28858,7 @@ pplx::task> DefaultApi::srcAppApiLabsGe } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsGetLabStatus does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDeleteMap does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -28858,7 +28870,7 @@ pplx::task> DefaultApi::srcAppApiLabsGe } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -28874,7 +28886,7 @@ pplx::task> DefaultApi::srcAppApiLabsGe if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiLabsGetLabStatus: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsDeleteMap: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -28885,7 +28897,7 @@ pplx::task> DefaultApi::srcAppApiLabsGe if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsGetLabStatus: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsDeleteMap: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -28894,33 +28906,16 @@ pplx::task> DefaultApi::srcAppApiLabsGe }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new LabStatusResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsGetLabStatus: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiLabsRequestLabAccess(std::shared_ptr body) const +pplx::task DefaultApi::srcAppApiMapsDownloadMapData(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/labs/request-access"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}/data"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -28928,7 +28923,6 @@ pplx::task> DefaultApi::srcAppApiLabsRe std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -28949,13 +28943,12 @@ pplx::task> DefaultApi::srcAppApiLabsRe } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsRequestLabAccess does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDownloadMapData does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -28965,22 +28958,11 @@ pplx::task> DefaultApi::srcAppApiLabsRe if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(body); - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - localVarMultipart->add(ModelBase::toHttpContent(utility::conversions::to_string_t("body"), body)); - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -28988,19 +28970,11 @@ pplx::task> DefaultApi::srcAppApiLabsRe } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiLabsRequestLabAccess does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDownloadMapData does not consume any supported media type")); } - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -29016,7 +28990,7 @@ pplx::task> DefaultApi::srcAppApiLabsRe if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiLabsRequestLabAccess: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsDownloadMapData: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -29027,7 +29001,7 @@ pplx::task> DefaultApi::srcAppApiLabsRe if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsRequestLabAccess: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsDownloadMapData: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -29036,33 +29010,16 @@ pplx::task> DefaultApi::srcAppApiLabsRe }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new LabAccessResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiLabsRequestLabAccess: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiMapsCreateMap(utility::string_t mapType, boost::optional twinUuid, boost::optional environmentUuid, boost::optional resolution, boost::optional originX, boost::optional originY, boost::optional originZ, boost::optional originRoll, boost::optional originPitch, boost::optional originYaw, boost::optional> metadata, boost::optional> file) const +pplx::task> DefaultApi::srcAppApiMapsFinalizeStreamMap(utility::string_t uuid, boost::optional resolution, boost::optional originX, boost::optional originY, boost::optional originZ, boost::optional originRoll, boost::optional originPitch, boost::optional originYaw, boost::optional> metadata, boost::optional> file) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}/stream-finalize"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -29091,7 +29048,7 @@ pplx::task> DefaultApi::srcAppApiMapsCreateMap(ut } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsCreateMap does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsFinalizeStreamMap does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -29099,17 +29056,6 @@ pplx::task> DefaultApi::srcAppApiMapsCreateMap(ut std::unordered_set localVarConsumeHttpContentTypes; localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); - { - localVarFormParams[ utility::conversions::to_string_t("map_type") ] = ApiClient::parameterToString(mapType); - } - if (twinUuid) - { - localVarFormParams[ utility::conversions::to_string_t("twin_uuid") ] = ApiClient::parameterToString(*twinUuid); - } - if (environmentUuid) - { - localVarFormParams[ utility::conversions::to_string_t("environment_uuid") ] = ApiClient::parameterToString(*environmentUuid); - } if (resolution) { localVarFormParams[ utility::conversions::to_string_t("resolution") ] = ApiClient::parameterToString(*resolution); @@ -29166,7 +29112,7 @@ pplx::task> DefaultApi::srcAppApiMapsCreateMap(ut } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsCreateMap does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsFinalizeStreamMap does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -29194,7 +29140,7 @@ pplx::task> DefaultApi::srcAppApiMapsCreateMap(ut if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsCreateMap: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsFinalizeStreamMap: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -29205,7 +29151,7 @@ pplx::task> DefaultApi::srcAppApiMapsCreateMap(ut if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsCreateMap: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsFinalizeStreamMap: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -29229,13 +29175,13 @@ pplx::task> DefaultApi::srcAppApiMapsCreateMap(ut else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsCreateMap: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMapsFinalizeStreamMap: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiMapsGetMap(utility::string_t uuid) const { @@ -29249,6 +29195,7 @@ pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) cons std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -29269,7 +29216,7 @@ pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) cons } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDeleteMap does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMap does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -29296,19 +29243,11 @@ pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) cons } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDeleteMap does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMap does not consume any supported media type")); } - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -29324,7 +29263,7 @@ pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) cons if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsDeleteMap: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsGetMap: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -29335,7 +29274,7 @@ pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) cons if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsDeleteMap: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsGetMap: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -29344,15 +29283,33 @@ pplx::task DefaultApi::srcAppApiMapsDeleteMap(utility::string_t uuid) cons }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new MapDataSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiMapsGetMap: unsupported response type")); + } + + return localVarResult; }); } -pplx::task DefaultApi::srcAppApiMapsDownloadMapData(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiMapsGetMapImage(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}/data"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}/image"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -29381,7 +29338,7 @@ pplx::task DefaultApi::srcAppApiMapsDownloadMapData(utility::string_t uuid } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDownloadMapData does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMapImage does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -29408,7 +29365,7 @@ pplx::task DefaultApi::srcAppApiMapsDownloadMapData(utility::string_t uuid } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsDownloadMapData does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMapImage does not consume any supported media type")); } @@ -29428,7 +29385,7 @@ pplx::task DefaultApi::srcAppApiMapsDownloadMapData(utility::string_t uuid if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsDownloadMapData: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsGetMapImage: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -29439,7 +29396,7 @@ pplx::task DefaultApi::srcAppApiMapsDownloadMapData(utility::string_t uuid if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsDownloadMapData: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsGetMapImage: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -29451,12 +29408,12 @@ pplx::task DefaultApi::srcAppApiMapsDownloadMapData(utility::string_t uuid return void(); }); } -pplx::task> DefaultApi::srcAppApiMapsFinalizeStreamMap(utility::string_t uuid, boost::optional resolution, boost::optional originX, boost::optional originY, boost::optional originZ, boost::optional originRoll, boost::optional originPitch, boost::optional originYaw, boost::optional> metadata, boost::optional> file) const +pplx::task>> DefaultApi::srcAppApiMapsListEnvironmentMaps(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}/stream-finalize"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/environments/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -29486,50 +29443,13 @@ pplx::task> DefaultApi::srcAppApiMapsFinalizeStre } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsFinalizeStreamMap does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListEnvironmentMaps does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); - if (resolution) - { - localVarFormParams[ utility::conversions::to_string_t("resolution") ] = ApiClient::parameterToString(*resolution); - } - if (originX) - { - localVarFormParams[ utility::conversions::to_string_t("origin_x") ] = ApiClient::parameterToString(*originX); - } - if (originY) - { - localVarFormParams[ utility::conversions::to_string_t("origin_y") ] = ApiClient::parameterToString(*originY); - } - if (originZ) - { - localVarFormParams[ utility::conversions::to_string_t("origin_z") ] = ApiClient::parameterToString(*originZ); - } - if (originRoll) - { - localVarFormParams[ utility::conversions::to_string_t("origin_roll") ] = ApiClient::parameterToString(*originRoll); - } - if (originPitch) - { - localVarFormParams[ utility::conversions::to_string_t("origin_pitch") ] = ApiClient::parameterToString(*originPitch); - } - if (originYaw) - { - localVarFormParams[ utility::conversions::to_string_t("origin_yaw") ] = ApiClient::parameterToString(*originYaw); - } - if (metadata && *metadata != nullptr) - { - localVarFormParams[ utility::conversions::to_string_t("metadata") ] = ApiClient::parameterToString(*metadata); - } - if (file && *file != nullptr) - { - localVarFileParams[ utility::conversions::to_string_t("file") ] = *file; - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -29550,7 +29470,7 @@ pplx::task> DefaultApi::srcAppApiMapsFinalizeStre } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsFinalizeStreamMap does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListEnvironmentMaps does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -29562,7 +29482,7 @@ pplx::task> DefaultApi::srcAppApiMapsFinalizeStre } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -29578,7 +29498,7 @@ pplx::task> DefaultApi::srcAppApiMapsFinalizeStre if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsFinalizeStreamMap: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsListEnvironmentMaps: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -29589,7 +29509,7 @@ pplx::task> DefaultApi::srcAppApiMapsFinalizeStre if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsFinalizeStreamMap: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsListEnvironmentMaps: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -29598,13 +29518,17 @@ pplx::task> DefaultApi::srcAppApiMapsFinalizeStre }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new MapDataSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -29613,19 +29537,18 @@ pplx::task> DefaultApi::srcAppApiMapsFinalizeStre else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsFinalizeStreamMap: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMapsListEnvironmentMaps: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiMapsGetMap(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiMapsListMaps() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -29654,7 +29577,7 @@ pplx::task> DefaultApi::srcAppApiMapsGetMap(utili } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMap does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListMaps does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -29681,9 +29604,17 @@ pplx::task> DefaultApi::srcAppApiMapsGetMap(utili } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMap does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListMaps does not consume any supported media type")); } + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) @@ -29701,7 +29632,7 @@ pplx::task> DefaultApi::srcAppApiMapsGetMap(utili if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsGetMap: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsListMaps: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -29712,7 +29643,7 @@ pplx::task> DefaultApi::srcAppApiMapsGetMap(utili if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsGetMap: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsListMaps: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -29721,13 +29652,17 @@ pplx::task> DefaultApi::srcAppApiMapsGetMap(utili }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new MapDataSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -29736,122 +29671,18 @@ pplx::task> DefaultApi::srcAppApiMapsGetMap(utili else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsGetMap: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMapsListMaps: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiMapsGetMapImage(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/{uuid}/image"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMapImage does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsGetMapImage does not consume any supported media type")); - } - - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsGetMapImage: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsGetMapImage: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task>> DefaultApi::srcAppApiMapsListEnvironmentMaps(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiMapsListTwinMaps(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/environments/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/twins/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -29881,7 +29712,7 @@ pplx::task>> DefaultApi::srcAppApiMap } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListEnvironmentMaps does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListTwinMaps does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -29908,7 +29739,7 @@ pplx::task>> DefaultApi::srcAppApiMap } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListEnvironmentMaps does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListTwinMaps does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -29936,7 +29767,7 @@ pplx::task>> DefaultApi::srcAppApiMap if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsListEnvironmentMaps: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsListTwinMaps: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -29947,7 +29778,7 @@ pplx::task>> DefaultApi::srcAppApiMap if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsListEnvironmentMaps: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsListTwinMaps: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -29975,18 +29806,24 @@ pplx::task>> DefaultApi::srcAppApiMap else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsListEnvironmentMaps: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMapsListTwinMaps: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiMapsListMaps() const +pplx::task> DefaultApi::srcAppApiMapsStartMapFromStream(std::shared_ptr mapStreamStartSchema) const { + // verify the required parameter 'mapStreamStartSchema' is set + if (mapStreamStartSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'mapStreamStartSchema' when calling DefaultApi->srcAppApiMapsStartMapFromStream")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/stream-start"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -30015,12 +29852,13 @@ pplx::task>> DefaultApi::srcAppApiMap } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListMaps does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStartMapFromStream does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -30030,11 +29868,27 @@ pplx::task>> DefaultApi::srcAppApiMap if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(mapStreamStartSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(mapStreamStartSchema.get()) + { + mapStreamStartSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("mapStreamStartSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -30042,7 +29896,7 @@ pplx::task>> DefaultApi::srcAppApiMap } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListMaps does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStartMapFromStream does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -30054,7 +29908,7 @@ pplx::task>> DefaultApi::srcAppApiMap } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -30070,7 +29924,7 @@ pplx::task>> DefaultApi::srcAppApiMap if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsListMaps: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsStartMapFromStream: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -30081,7 +29935,7 @@ pplx::task>> DefaultApi::srcAppApiMap if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsListMaps: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsStartMapFromStream: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -30090,17 +29944,13 @@ pplx::task>> DefaultApi::srcAppApiMap }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new MapDataSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -30109,19 +29959,24 @@ pplx::task>> DefaultApi::srcAppApiMap else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsListMaps: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMapsStartMapFromStream: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiMapsListTwinMaps(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiMapsStopMapFromStream(std::shared_ptr mapStreamStopSchema) const { + // verify the required parameter 'mapStreamStopSchema' is set + if (mapStreamStopSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'mapStreamStopSchema' when calling DefaultApi->srcAppApiMapsStopMapFromStream")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/twins/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/stream-stop"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -30150,12 +30005,13 @@ pplx::task>> DefaultApi::srcAppApiMap } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListTwinMaps does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStopMapFromStream does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -30165,11 +30021,27 @@ pplx::task>> DefaultApi::srcAppApiMap if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(mapStreamStopSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(mapStreamStopSchema.get()) + { + mapStreamStopSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("mapStreamStopSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -30177,7 +30049,7 @@ pplx::task>> DefaultApi::srcAppApiMap } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsListTwinMaps does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStopMapFromStream does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -30189,7 +30061,7 @@ pplx::task>> DefaultApi::srcAppApiMap } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -30205,7 +30077,7 @@ pplx::task>> DefaultApi::srcAppApiMap if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsListTwinMaps: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMapsStopMapFromStream: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -30216,7 +30088,7 @@ pplx::task>> DefaultApi::srcAppApiMap if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsListTwinMaps: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMapsStopMapFromStream: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -30225,17 +30097,13 @@ pplx::task>> DefaultApi::srcAppApiMap }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new MapDataSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -30244,24 +30112,19 @@ pplx::task>> DefaultApi::srcAppApiMap else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsListTwinMaps: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMapsStopMapFromStream: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiMapsStartMapFromStream(std::shared_ptr mapStreamStartSchema) const +pplx::task> DefaultApi::srcAppApiMetricsAiGetAiMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const { - // verify the required parameter 'mapStreamStartSchema' is set - if (mapStreamStartSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'mapStreamStartSchema' when calling DefaultApi->srcAppApiMapsStartMapFromStream")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/stream-start"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/ai/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -30290,14 +30153,21 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStartMapFromStream does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetAiMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + if (startTimestamp) + { + localVarQueryParams[utility::conversions::to_string_t("start_timestamp")] = ApiClient::parameterToString(*startTimestamp); + } + if (endTimestamp) + { + localVarQueryParams[utility::conversions::to_string_t("end_timestamp")] = ApiClient::parameterToString(*endTimestamp); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -30306,27 +30176,11 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(mapStreamStartSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(mapStreamStartSchema.get()) - { - mapStreamStartSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("mapStreamStartSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -30334,7 +30188,7 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStartMapFromStream does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetAiMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -30346,7 +30200,7 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -30362,7 +30216,7 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsStartMapFromStream: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetAiMetrics: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -30373,7 +30227,7 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsStartMapFromStream: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetAiMetrics: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -30382,7 +30236,7 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new MapDataSchema()); + std::shared_ptr localVarResult(new AIMetricsSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -30397,24 +30251,19 @@ pplx::task> DefaultApi::srcAppApiMapsStartMapFrom else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsStartMapFromStream: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetAiMetrics: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiMapsStopMapFromStream(std::shared_ptr mapStreamStopSchema) const +pplx::task> DefaultApi::srcAppApiMetricsAiGetOrganizationAiMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const { - // verify the required parameter 'mapStreamStopSchema' is set - if (mapStreamStopSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'mapStreamStopSchema' when calling DefaultApi->srcAppApiMapsStopMapFromStream")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/maps/stream-stop"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/ai/organizations/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -30443,14 +30292,21 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStopMapFromStream does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetOrganizationAiMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + if (startTimestamp) + { + localVarQueryParams[utility::conversions::to_string_t("start_timestamp")] = ApiClient::parameterToString(*startTimestamp); + } + if (endTimestamp) + { + localVarQueryParams[utility::conversions::to_string_t("end_timestamp")] = ApiClient::parameterToString(*endTimestamp); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -30459,27 +30315,11 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(mapStreamStopSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(mapStreamStopSchema.get()) - { - mapStreamStopSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("mapStreamStopSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -30487,7 +30327,7 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMapsStopMapFromStream does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetOrganizationAiMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -30499,7 +30339,7 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -30515,7 +30355,7 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMapsStopMapFromStream: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetOrganizationAiMetrics: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -30526,7 +30366,7 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsStopMapFromStream: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetOrganizationAiMetrics: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -30535,7 +30375,7 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new MapDataSchema()); + std::shared_ptr localVarResult(new AIMetricsSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -30550,18 +30390,18 @@ pplx::task> DefaultApi::srcAppApiMapsStopMapFromS else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMapsStopMapFromStream: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetOrganizationAiMetrics: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiMetricsAiGetAiMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const +pplx::task> DefaultApi::srcAppApiMetricsComputeGetComputeMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/ai/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/compute/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -30591,7 +30431,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetAi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetAiMetrics does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetComputeMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -30626,7 +30466,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetAi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetAiMetrics does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetComputeMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -30654,7 +30494,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetAi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetAiMetrics: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetComputeMetrics: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -30665,7 +30505,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetAi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetAiMetrics: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetComputeMetrics: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -30674,7 +30514,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetAi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new AIMetricsSchema()); + std::shared_ptr localVarResult(new ComputeMetricsSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -30689,18 +30529,18 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetAi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetAiMetrics: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetComputeMetrics: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiMetricsAiGetOrganizationAiMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const +pplx::task> DefaultApi::srcAppApiMetricsComputeGetOrganizationComputeMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/ai/organizations/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/compute/organizations/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -30730,7 +30570,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetOr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetOrganizationAiMetrics does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetOrganizationComputeMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -30765,7 +30605,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetOr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsAiGetOrganizationAiMetrics does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetOrganizationComputeMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -30793,7 +30633,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetOr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetOrganizationAiMetrics: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetOrganizationComputeMetrics: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -30804,7 +30644,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetOr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetOrganizationAiMetrics: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetOrganizationComputeMetrics: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -30813,7 +30653,7 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetOr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new AIMetricsSchema()); + std::shared_ptr localVarResult(new ComputeMetricsSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -30828,18 +30668,18 @@ pplx::task> DefaultApi::srcAppApiMetricsAiGetOr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsAiGetOrganizationAiMetrics: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetOrganizationComputeMetrics: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiMetricsComputeGetComputeMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const +pplx::task> DefaultApi::srcAppApiMetricsEventsGetEventMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/compute/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/events/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -30869,7 +30709,7 @@ pplx::task> DefaultApi::srcAppApiMetricsCo } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetComputeMetrics does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetEventMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -30904,7 +30744,7 @@ pplx::task> DefaultApi::srcAppApiMetricsCo } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetComputeMetrics does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetEventMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -30932,7 +30772,7 @@ pplx::task> DefaultApi::srcAppApiMetricsCo if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetComputeMetrics: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiMetricsEventsGetEventMetrics: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -30943,7 +30783,7 @@ pplx::task> DefaultApi::srcAppApiMetricsCo if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetComputeMetrics: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiMetricsEventsGetEventMetrics: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -30952,7 +30792,7 @@ pplx::task> DefaultApi::srcAppApiMetricsCo }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ComputeMetricsSchema()); + std::shared_ptr localVarResult(new EventMetricsSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -30967,18 +30807,18 @@ pplx::task> DefaultApi::srcAppApiMetricsCo else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetComputeMetrics: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiMetricsEventsGetEventMetrics: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiMetricsComputeGetOrganizationComputeMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const +pplx::task> DefaultApi::srcAppApiMetricsEventsGetOrganizationEventMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/compute/organizations/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/events/organizations/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -31008,7 +30848,7 @@ pplx::task> DefaultApi::srcAppApiMetricsCo } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetOrganizationComputeMetrics does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetOrganizationEventMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -31043,285 +30883,7 @@ pplx::task> DefaultApi::srcAppApiMetricsCo } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsComputeGetOrganizationComputeMetrics does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetOrganizationComputeMetrics: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetOrganizationComputeMetrics: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new ComputeMetricsSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsComputeGetOrganizationComputeMetrics: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiMetricsEventsGetEventMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/events/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetEventMetrics does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (startTimestamp) - { - localVarQueryParams[utility::conversions::to_string_t("start_timestamp")] = ApiClient::parameterToString(*startTimestamp); - } - if (endTimestamp) - { - localVarQueryParams[utility::conversions::to_string_t("end_timestamp")] = ApiClient::parameterToString(*endTimestamp); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetEventMetrics does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiMetricsEventsGetEventMetrics: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsEventsGetEventMetrics: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new EventMetricsSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiMetricsEventsGetEventMetrics: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiMetricsEventsGetOrganizationEventMetrics(utility::string_t uuid, boost::optional startTimestamp, boost::optional endTimestamp) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/metrics/events/organizations/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetOrganizationEventMetrics does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (startTimestamp) - { - localVarQueryParams[utility::conversions::to_string_t("start_timestamp")] = ApiClient::parameterToString(*startTimestamp); - } - if (endTimestamp) - { - localVarQueryParams[utility::conversions::to_string_t("end_timestamp")] = ApiClient::parameterToString(*endTimestamp); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetOrganizationEventMetrics does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiMetricsEventsGetOrganizationEventMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -34650,7 +34212,7 @@ pplx::task>> DefaultA return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiMlmodelsListMlmodels(boost::optional deployment, boost::optional edgeCompatible, boost::optional modelExternalId, boost::optional supportedLevel, boost::optional isTrainable, boost::optional catalogSeedId) const +pplx::task>> DefaultApi::srcAppApiMlmodelsListMlmodels(boost::optional deployment, boost::optional edgeCompatible, boost::optional modelExternalId, boost::optional supportedLevel, boost::optional isTrainable, boost::optional catalogSeedId, boost::optional limit, boost::optional offset) const { @@ -34715,6 +34277,14 @@ pplx::task>> DefaultApi::srcAppApiMlm { localVarQueryParams[utility::conversions::to_string_t("catalog_seed_id")] = ApiClient::parameterToString(*catalogSeedId); } + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + } + if (offset) + { + localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -34808,7 +34378,7 @@ pplx::task>> DefaultApi::srcAppApiMlm return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiMlmodelsListPublicMlmodels(boost::optional deployment) const +pplx::task>> DefaultApi::srcAppApiMlmodelsListPublicMlmodels(boost::optional deployment, boost::optional limit, boost::optional offset) const { @@ -34853,6 +34423,14 @@ pplx::task>> DefaultApi::srcAppApiMlm { localVarQueryParams[utility::conversions::to_string_t("deployment")] = ApiClient::parameterToString(*deployment); } + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + } + if (offset) + { + localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -37094,19 +36672,19 @@ pplx::task> DefaultAp return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiOrdersCreateHardwareOrder(utility::string_t workspaceUuid, std::shared_ptr hardwareOrderCreateSchema) const +pplx::task> DefaultApi::srcAppApiPaymentsChargeSavedCard(utility::string_t uuid, std::shared_ptr chargeSavedCardRequestSchema) const { - // verify the required parameter 'hardwareOrderCreateSchema' is set - if (hardwareOrderCreateSchema == nullptr) + // verify the required parameter 'chargeSavedCardRequestSchema' is set + if (chargeSavedCardRequestSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'hardwareOrderCreateSchema' when calling DefaultApi->srcAppApiOrdersCreateHardwareOrder")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'chargeSavedCardRequestSchema' when calling DefaultApi->srcAppApiPaymentsChargeSavedCard")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workspaces/{workspace_uuid}/orders"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("workspace_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(workspaceUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/charge-saved-card"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -37135,7 +36713,7 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersCreateHardwareOrder does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsChargeSavedCard does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -37153,7 +36731,7 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(hardwareOrderCreateSchema); + localVarJson = ModelBase::toJson(chargeSavedCardRequestSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -37164,9 +36742,9 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(hardwareOrderCreateSchema.get()) + if(chargeSavedCardRequestSchema.get()) { - hardwareOrderCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("hardwareOrderCreateSchema")); + chargeSavedCardRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("chargeSavedCardRequestSchema")); } @@ -37179,7 +36757,7 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersCreateHardwareOrder does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsChargeSavedCard does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -37207,7 +36785,7 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiOrdersCreateHardwareOrder: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsChargeSavedCard: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -37218,7 +36796,7 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersCreateHardwareOrder: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsChargeSavedCard: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -37227,7 +36805,7 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new HardwareOrderSchema()); + std::shared_ptr localVarResult(new ChargeSavedCardResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -37242,20 +36820,19 @@ pplx::task> DefaultApi::srcAppApiOrdersCrea else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersCreateHardwareOrder: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsChargeSavedCard: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiOrdersGetHardwareOrder(utility::string_t workspaceUuid, utility::string_t orderUuid) const +pplx::task> DefaultApi::srcAppApiPaymentsCreateSetupIntent(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workspaces/{workspace_uuid}/orders/{order_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("workspace_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(workspaceUuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("order_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(orderUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/setup-intent"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -37284,7 +36861,7 @@ pplx::task> DefaultApi::srcAppApiOrdersGetH } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersGetHardwareOrder does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateSetupIntent does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -37311,7 +36888,7 @@ pplx::task> DefaultApi::srcAppApiOrdersGetH } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersGetHardwareOrder does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateSetupIntent does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -37323,7 +36900,7 @@ pplx::task> DefaultApi::srcAppApiOrdersGetH } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -37339,7 +36916,7 @@ pplx::task> DefaultApi::srcAppApiOrdersGetH if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiOrdersGetHardwareOrder: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateSetupIntent: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -37350,7 +36927,7 @@ pplx::task> DefaultApi::srcAppApiOrdersGetH if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersGetHardwareOrder: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateSetupIntent: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -37359,7 +36936,7 @@ pplx::task> DefaultApi::srcAppApiOrdersGetH }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new HardwareOrderSchema()); + std::shared_ptr localVarResult(new SetupIntentResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -37374,18 +36951,25 @@ pplx::task> DefaultApi::srcAppApiOrdersGetH else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersGetHardwareOrder: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateSetupIntent: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiOrdersListAllHardwareOrders(boost::optional status) const +pplx::task> DefaultApi::srcAppApiPaymentsCreateTopupIntent(utility::string_t uuid, std::shared_ptr topupIntentRequestSchema) const { + // verify the required parameter 'topupIntentRequestSchema' is set + if (topupIntentRequestSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'topupIntentRequestSchema' when calling DefaultApi->srcAppApiPaymentsCreateTopupIntent")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/admin/orders"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/topup-intent"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -37414,17 +36998,14 @@ pplx::task>> DefaultApi::s } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersListAllHardwareOrders does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateTopupIntent does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - if (status) - { - localVarQueryParams[utility::conversions::to_string_t("status")] = ApiClient::parameterToString(*status); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -37433,11 +37014,27 @@ pplx::task>> DefaultApi::s if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(topupIntentRequestSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(topupIntentRequestSchema.get()) + { + topupIntentRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("topupIntentRequestSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -37445,7 +37042,7 @@ pplx::task>> DefaultApi::s } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersListAllHardwareOrders does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateTopupIntent does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -37457,7 +37054,7 @@ pplx::task>> DefaultApi::s } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -37473,7 +37070,7 @@ pplx::task>> DefaultApi::s if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiOrdersListAllHardwareOrders: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateTopupIntent: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -37484,7 +37081,7 @@ pplx::task>> DefaultApi::s if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersListAllHardwareOrders: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateTopupIntent: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -37493,17 +37090,13 @@ pplx::task>> DefaultApi::s }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new TopupIntentResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -37512,19 +37105,20 @@ pplx::task>> DefaultApi::s else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersListAllHardwareOrders: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateTopupIntent: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiOrdersListHardwareOrders(utility::string_t workspaceUuid) const +pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::string_t uuid, utility::string_t methodId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workspaces/{workspace_uuid}/orders"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("workspace_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(workspaceUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/methods/{method_id}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("method_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(methodId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -37532,7 +37126,6 @@ pplx::task>> DefaultApi::srcApp std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -37553,7 +37146,7 @@ pplx::task>> DefaultApi::srcApp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersListHardwareOrders does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDetachPaymentMethod does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -37580,7 +37173,7 @@ pplx::task>> DefaultApi::srcApp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersListHardwareOrders does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDetachPaymentMethod does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -37592,7 +37185,7 @@ pplx::task>> DefaultApi::srcApp } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -37608,7 +37201,7 @@ pplx::task>> DefaultApi::srcApp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiOrdersListHardwareOrders: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsDetachPaymentMethod: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -37619,7 +37212,7 @@ pplx::task>> DefaultApi::srcApp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersListHardwareOrders: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsDetachPaymentMethod: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -37628,45 +37221,134 @@ pplx::task>> DefaultApi::srcApp }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + return void(); + }); +} +pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t uuid) const +{ - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/auto-topup"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDisableAutoTopup does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDisableAutoTopup does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersListHardwareOrders: unsupported response type")); + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); } - return localVarResult; + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsDisableAutoTopup: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiPaymentsDisableAutoTopup: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + return void(); }); } -pplx::task> DefaultApi::srcAppApiOrdersUpdateHardwareOrderLineItem(utility::string_t orderUuid, utility::string_t lineItemUuid, std::shared_ptr hardwareOrderLineItemUpdateSchema) const +pplx::task> DefaultApi::srcAppApiPaymentsFinalizeTopup(utility::string_t uuid, std::shared_ptr finalizeTopupRequestSchema) const { - // verify the required parameter 'hardwareOrderLineItemUpdateSchema' is set - if (hardwareOrderLineItemUpdateSchema == nullptr) + // verify the required parameter 'finalizeTopupRequestSchema' is set + if (finalizeTopupRequestSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'hardwareOrderLineItemUpdateSchema' when calling DefaultApi->srcAppApiOrdersUpdateHardwareOrderLineItem")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'finalizeTopupRequestSchema' when calling DefaultApi->srcAppApiPaymentsFinalizeTopup")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/admin/orders/{order_uuid}/line-items/{line_item_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("order_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(orderUuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("line_item_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(lineItemUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/finalize-topup"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -37695,7 +37377,7 @@ pplx::task> DefaultApi::srcAppApiOrder } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersUpdateHardwareOrderLineItem does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsFinalizeTopup does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -37713,7 +37395,7 @@ pplx::task> DefaultApi::srcAppApiOrder localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(hardwareOrderLineItemUpdateSchema); + localVarJson = ModelBase::toJson(finalizeTopupRequestSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -37724,9 +37406,9 @@ pplx::task> DefaultApi::srcAppApiOrder localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(hardwareOrderLineItemUpdateSchema.get()) + if(finalizeTopupRequestSchema.get()) { - hardwareOrderLineItemUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("hardwareOrderLineItemUpdateSchema")); + finalizeTopupRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("finalizeTopupRequestSchema")); } @@ -37739,7 +37421,7 @@ pplx::task> DefaultApi::srcAppApiOrder } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersUpdateHardwareOrderLineItem does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsFinalizeTopup does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -37751,7 +37433,7 @@ pplx::task> DefaultApi::srcAppApiOrder } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -37767,7 +37449,7 @@ pplx::task> DefaultApi::srcAppApiOrder if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiOrdersUpdateHardwareOrderLineItem: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsFinalizeTopup: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -37778,7 +37460,7 @@ pplx::task> DefaultApi::srcAppApiOrder if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersUpdateHardwareOrderLineItem: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsFinalizeTopup: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -37787,7 +37469,7 @@ pplx::task> DefaultApi::srcAppApiOrder }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new HardwareOrderAdminSchema()); + std::shared_ptr localVarResult(new FinalizeTopupResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -37802,25 +37484,25 @@ pplx::task> DefaultApi::srcAppApiOrder else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersUpdateHardwareOrderLineItem: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsFinalizeTopup: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiOrdersUpdateHardwareOrderStatus(utility::string_t orderUuid, std::shared_ptr hardwareOrderStatusUpdateSchema) const +pplx::task> DefaultApi::srcAppApiPaymentsGeneratePromoCode(utility::string_t uuid, std::shared_ptr generatePromoCodeRequestSchema) const { - // verify the required parameter 'hardwareOrderStatusUpdateSchema' is set - if (hardwareOrderStatusUpdateSchema == nullptr) + // verify the required parameter 'generatePromoCodeRequestSchema' is set + if (generatePromoCodeRequestSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'hardwareOrderStatusUpdateSchema' when calling DefaultApi->srcAppApiOrdersUpdateHardwareOrderStatus")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'generatePromoCodeRequestSchema' when calling DefaultApi->srcAppApiPaymentsGeneratePromoCode")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/admin/orders/{order_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("order_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(orderUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/promo-codes"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -37849,7 +37531,7 @@ pplx::task> DefaultApi::srcAppApiOrder } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersUpdateHardwareOrderStatus does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGeneratePromoCode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -37867,7 +37549,7 @@ pplx::task> DefaultApi::srcAppApiOrder localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(hardwareOrderStatusUpdateSchema); + localVarJson = ModelBase::toJson(generatePromoCodeRequestSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -37878,9 +37560,9 @@ pplx::task> DefaultApi::srcAppApiOrder localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(hardwareOrderStatusUpdateSchema.get()) + if(generatePromoCodeRequestSchema.get()) { - hardwareOrderStatusUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("hardwareOrderStatusUpdateSchema")); + generatePromoCodeRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("generatePromoCodeRequestSchema")); } @@ -37893,7 +37575,7 @@ pplx::task> DefaultApi::srcAppApiOrder } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiOrdersUpdateHardwareOrderStatus does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGeneratePromoCode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -37905,7 +37587,7 @@ pplx::task> DefaultApi::srcAppApiOrder } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -37921,7 +37603,7 @@ pplx::task> DefaultApi::srcAppApiOrder if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiOrdersUpdateHardwareOrderStatus: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGeneratePromoCode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -37932,7 +37614,7 @@ pplx::task> DefaultApi::srcAppApiOrder if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersUpdateHardwareOrderStatus: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGeneratePromoCode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -37941,7 +37623,7 @@ pplx::task> DefaultApi::srcAppApiOrder }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new HardwareOrderAdminSchema()); + std::shared_ptr localVarResult(new PromoCodeSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -37956,24 +37638,18 @@ pplx::task> DefaultApi::srcAppApiOrder else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiOrdersUpdateHardwareOrderStatus: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGeneratePromoCode: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsChargeSavedCard(utility::string_t uuid, std::shared_ptr chargeSavedCardRequestSchema) const +pplx::task> DefaultApi::srcAppApiPaymentsGetAutoTopupConfig(utility::string_t uuid) const { - // verify the required parameter 'chargeSavedCardRequestSchema' is set - if (chargeSavedCardRequestSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'chargeSavedCardRequestSchema' when calling DefaultApi->srcAppApiPaymentsChargeSavedCard")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/charge-saved-card"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/auto-topup"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -38003,13 +37679,12 @@ pplx::task> DefaultApi::srcAppApi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsChargeSavedCard does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetAutoTopupConfig does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -38019,27 +37694,11 @@ pplx::task> DefaultApi::srcAppApi if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(chargeSavedCardRequestSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(chargeSavedCardRequestSchema.get()) - { - chargeSavedCardRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("chargeSavedCardRequestSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -38047,7 +37706,7 @@ pplx::task> DefaultApi::srcAppApi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsChargeSavedCard does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetAutoTopupConfig does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -38059,7 +37718,7 @@ pplx::task> DefaultApi::srcAppApi } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -38075,7 +37734,7 @@ pplx::task> DefaultApi::srcAppApi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsChargeSavedCard: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetAutoTopupConfig: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -38086,7 +37745,7 @@ pplx::task> DefaultApi::srcAppApi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsChargeSavedCard: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetAutoTopupConfig: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -38095,7 +37754,7 @@ pplx::task> DefaultApi::srcAppApi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ChargeSavedCardResponseSchema()); + std::shared_ptr localVarResult(new AutoTopupConfigSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -38110,19 +37769,18 @@ pplx::task> DefaultApi::srcAppApi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsChargeSavedCard: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetAutoTopupConfig: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsCreateSetupIntent(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiPaymentsGetPaymentConfig() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/setup-intent"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/payments/config"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -38151,7 +37809,7 @@ pplx::task> DefaultApi::srcAppApiPaym } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateSetupIntent does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetPaymentConfig does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -38178,19 +37836,11 @@ pplx::task> DefaultApi::srcAppApiPaym } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateSetupIntent does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetPaymentConfig does not consume any supported media type")); } - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -38206,7 +37856,7 @@ pplx::task> DefaultApi::srcAppApiPaym if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateSetupIntent: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetPaymentConfig: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -38217,7 +37867,7 @@ pplx::task> DefaultApi::srcAppApiPaym if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateSetupIntent: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetPaymentConfig: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -38226,7 +37876,7 @@ pplx::task> DefaultApi::srcAppApiPaym }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new SetupIntentResponseSchema()); + std::shared_ptr localVarResult(new PaymentConfigSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -38241,25 +37891,20 @@ pplx::task> DefaultApi::srcAppApiPaym else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateSetupIntent: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetPaymentConfig: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsCreateTopupIntent(utility::string_t uuid, std::shared_ptr topupIntentRequestSchema) const +pplx::task> DefaultApi::srcAppApiPaymentsGetTransactionInvoice(utility::string_t uuid, utility::string_t transactionUuid) const { - // verify the required parameter 'topupIntentRequestSchema' is set - if (topupIntentRequestSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'topupIntentRequestSchema' when calling DefaultApi->srcAppApiPaymentsCreateTopupIntent")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/topup-intent"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/transactions/{transaction_uuid}/invoice"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("transaction_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(transactionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -38288,13 +37933,12 @@ pplx::task> DefaultApi::srcAppApiPaym } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateTopupIntent does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetTransactionInvoice does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -38304,27 +37948,11 @@ pplx::task> DefaultApi::srcAppApiPaym if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(topupIntentRequestSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(topupIntentRequestSchema.get()) - { - topupIntentRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("topupIntentRequestSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -38332,7 +37960,7 @@ pplx::task> DefaultApi::srcAppApiPaym } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsCreateTopupIntent does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetTransactionInvoice does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -38344,7 +37972,7 @@ pplx::task> DefaultApi::srcAppApiPaym } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -38360,7 +37988,7 @@ pplx::task> DefaultApi::srcAppApiPaym if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateTopupIntent: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetTransactionInvoice: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -38371,7 +37999,7 @@ pplx::task> DefaultApi::srcAppApiPaym if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateTopupIntent: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetTransactionInvoice: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -38380,7 +38008,7 @@ pplx::task> DefaultApi::srcAppApiPaym }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TopupIntentResponseSchema()); + std::shared_ptr localVarResult(new TransactionInvoiceSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -38395,20 +38023,19 @@ pplx::task> DefaultApi::srcAppApiPaym else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsCreateTopupIntent: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetTransactionInvoice: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::string_t uuid, utility::string_t methodId) const +pplx::task>> DefaultApi::srcAppApiPaymentsListPaymentMethods(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/methods/{method_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/methods"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("method_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(methodId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -38416,6 +38043,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::strin std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -38436,7 +38064,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::strin } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDetachPaymentMethod does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPaymentMethods does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -38463,7 +38091,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::strin } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDetachPaymentMethod does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPaymentMethods does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -38475,7 +38103,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::strin } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -38491,7 +38119,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::strin if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsDetachPaymentMethod: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPaymentMethods: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -38502,7 +38130,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::strin if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsDetachPaymentMethod: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPaymentMethods: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -38511,15 +38139,37 @@ pplx::task DefaultApi::srcAppApiPaymentsDetachPaymentMethod(utility::strin }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::vector> localVarResult; + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPaymentMethods: unsupported response type")); + } + + return localVarResult; }); } -pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiPaymentsListPromoCodes(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/auto-topup"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/promo-codes"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -38528,6 +38178,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -38548,7 +38199,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDisableAutoTopup does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPromoCodes does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -38575,7 +38226,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsDisableAutoTopup does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPromoCodes does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -38587,7 +38238,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -38603,7 +38254,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsDisableAutoTopup: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPromoCodes: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -38614,7 +38265,7 @@ pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsDisableAutoTopup: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPromoCodes: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -38623,21 +38274,43 @@ pplx::task DefaultApi::srcAppApiPaymentsDisableAutoTopup(utility::string_t }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::vector> localVarResult; + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPromoCodes: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsFinalizeTopup(utility::string_t uuid, std::shared_ptr finalizeTopupRequestSchema) const +pplx::task> DefaultApi::srcAppApiPaymentsPreviewTax(utility::string_t uuid, std::shared_ptr taxPreviewRequestSchema) const { - // verify the required parameter 'finalizeTopupRequestSchema' is set - if (finalizeTopupRequestSchema == nullptr) + // verify the required parameter 'taxPreviewRequestSchema' is set + if (taxPreviewRequestSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'finalizeTopupRequestSchema' when calling DefaultApi->srcAppApiPaymentsFinalizeTopup")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'taxPreviewRequestSchema' when calling DefaultApi->srcAppApiPaymentsPreviewTax")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/finalize-topup"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/preview-tax"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -38667,7 +38340,7 @@ pplx::task> DefaultApi::srcAppApiPa } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsFinalizeTopup does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsPreviewTax does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -38685,7 +38358,7 @@ pplx::task> DefaultApi::srcAppApiPa localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(finalizeTopupRequestSchema); + localVarJson = ModelBase::toJson(taxPreviewRequestSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -38696,9 +38369,9 @@ pplx::task> DefaultApi::srcAppApiPa localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(finalizeTopupRequestSchema.get()) + if(taxPreviewRequestSchema.get()) { - finalizeTopupRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("finalizeTopupRequestSchema")); + taxPreviewRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("taxPreviewRequestSchema")); } @@ -38711,7 +38384,7 @@ pplx::task> DefaultApi::srcAppApiPa } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsFinalizeTopup does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsPreviewTax does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -38739,7 +38412,7 @@ pplx::task> DefaultApi::srcAppApiPa if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsFinalizeTopup: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsPreviewTax: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -38750,7 +38423,7 @@ pplx::task> DefaultApi::srcAppApiPa if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsFinalizeTopup: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsPreviewTax: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -38759,7 +38432,7 @@ pplx::task> DefaultApi::srcAppApiPa }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new FinalizeTopupResponseSchema()); + std::shared_ptr localVarResult(new TaxPreviewResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -38774,24 +38447,24 @@ pplx::task> DefaultApi::srcAppApiPa else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsFinalizeTopup: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsPreviewTax: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsGeneratePromoCode(utility::string_t uuid, std::shared_ptr generatePromoCodeRequestSchema) const +pplx::task> DefaultApi::srcAppApiPaymentsRedeemCoupon(utility::string_t uuid, std::shared_ptr redeemCouponRequestSchema) const { - // verify the required parameter 'generatePromoCodeRequestSchema' is set - if (generatePromoCodeRequestSchema == nullptr) + // verify the required parameter 'redeemCouponRequestSchema' is set + if (redeemCouponRequestSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'generatePromoCodeRequestSchema' when calling DefaultApi->srcAppApiPaymentsGeneratePromoCode")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'redeemCouponRequestSchema' when calling DefaultApi->srcAppApiPaymentsRedeemCoupon")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/promo-codes"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/redeem-coupon"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -38821,7 +38494,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGeneratePromoCode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRedeemCoupon does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -38839,7 +38512,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(generatePromoCodeRequestSchema); + localVarJson = ModelBase::toJson(redeemCouponRequestSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -38850,9 +38523,9 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(generatePromoCodeRequestSchema.get()) + if(redeemCouponRequestSchema.get()) { - generatePromoCodeRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("generatePromoCodeRequestSchema")); + redeemCouponRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("redeemCouponRequestSchema")); } @@ -38865,7 +38538,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGeneratePromoCode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRedeemCoupon does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -38893,7 +38566,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGeneratePromoCode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsRedeemCoupon: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -38904,7 +38577,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGeneratePromoCode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsRedeemCoupon: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -38913,7 +38586,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new PromoCodeSchema()); + std::shared_ptr localVarResult(new RedeemCouponResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -38928,19 +38601,20 @@ pplx::task> DefaultApi::srcAppApiPaymentsGenera else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGeneratePromoCode: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsRedeemCoupon: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsGetAutoTopupConfig(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiPaymentsRevokePromoCode(utility::string_t uuid, utility::string_t promoCodeId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/auto-topup"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/promo-codes/{promo_code_id}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("promo_code_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(promoCodeId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -38948,7 +38622,6 @@ pplx::task> DefaultApi::srcAppApiPayments std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -38969,7 +38642,7 @@ pplx::task> DefaultApi::srcAppApiPayments } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetAutoTopupConfig does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRevokePromoCode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -38996,7 +38669,7 @@ pplx::task> DefaultApi::srcAppApiPayments } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetAutoTopupConfig does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRevokePromoCode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -39008,7 +38681,7 @@ pplx::task> DefaultApi::srcAppApiPayments } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -39024,7 +38697,7 @@ pplx::task> DefaultApi::srcAppApiPayments if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetAutoTopupConfig: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsRevokePromoCode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39035,7 +38708,7 @@ pplx::task> DefaultApi::srcAppApiPayments if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetAutoTopupConfig: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsRevokePromoCode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -39044,33 +38717,22 @@ pplx::task> DefaultApi::srcAppApiPayments }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new AutoTopupConfigSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetAutoTopupConfig: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiPaymentsGetPaymentConfig() const +pplx::task> DefaultApi::srcAppApiPaymentsUpdateAutoTopupConfig(utility::string_t uuid, std::shared_ptr autoTopupUpdateSchema) const { + // verify the required parameter 'autoTopupUpdateSchema' is set + if (autoTopupUpdateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'autoTopupUpdateSchema' when calling DefaultApi->srcAppApiPaymentsUpdateAutoTopupConfig")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/payments/config"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/auto-topup"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -39099,12 +38761,13 @@ pplx::task> DefaultApi::srcAppApiPaymentsGe } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetPaymentConfig does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsUpdateAutoTopupConfig does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -39114,11 +38777,27 @@ pplx::task> DefaultApi::srcAppApiPaymentsGe if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(autoTopupUpdateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(autoTopupUpdateSchema.get()) + { + autoTopupUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("autoTopupUpdateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -39126,11 +38805,19 @@ pplx::task> DefaultApi::srcAppApiPaymentsGe } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetPaymentConfig does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsUpdateAutoTopupConfig does not consume any supported media type")); } + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -39146,7 +38833,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGe if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetPaymentConfig: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiPaymentsUpdateAutoTopupConfig: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39157,7 +38844,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGe if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetPaymentConfig: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiPaymentsUpdateAutoTopupConfig: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -39166,7 +38853,7 @@ pplx::task> DefaultApi::srcAppApiPaymentsGe }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new PaymentConfigSchema()); + std::shared_ptr localVarResult(new AutoTopupConfigSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -39181,20 +38868,20 @@ pplx::task> DefaultApi::srcAppApiPaymentsGe else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetPaymentConfig: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiPaymentsUpdateAutoTopupConfig: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsGetTransactionInvoice(utility::string_t uuid, utility::string_t transactionUuid) const +pplx::task> DefaultApi::srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate(utility::string_t r_namespace, utility::string_t templateName, boost::optional version) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/transactions/{transaction_uuid}/invoice"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("transaction_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(transactionUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/procedural-primitives/templates/{namespace}/{template_name}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("namespace") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(r_namespace))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("template_name") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(templateName))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -39223,13 +38910,17 @@ pplx::task> DefaultApi::srcAppApiPayme } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetTransactionInvoice does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (version) + { + localVarQueryParams[utility::conversions::to_string_t("version")] = ApiClient::parameterToString(*version); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -39250,7 +38941,7 @@ pplx::task> DefaultApi::srcAppApiPayme } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsGetTransactionInvoice does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -39278,7 +38969,7 @@ pplx::task> DefaultApi::srcAppApiPayme if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetTransactionInvoice: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39289,7 +38980,7 @@ pplx::task> DefaultApi::srcAppApiPayme if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetTransactionInvoice: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -39298,7 +38989,7 @@ pplx::task> DefaultApi::srcAppApiPayme }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TransactionInvoiceSchema()); + std::shared_ptr localVarResult(new ProceduralPrimitiveTemplateSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -39313,19 +39004,19 @@ pplx::task> DefaultApi::srcAppApiPayme else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsGetTransactionInvoice: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiPaymentsListPaymentMethods(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate(utility::string_t templateKey, boost::optional version) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/methods"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/procedural-primitives/templates/{template_key}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("template_key") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(templateKey))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -39354,13 +39045,17 @@ pplx::task>> DefaultApi::srcApp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPaymentMethods does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (version) + { + localVarQueryParams[utility::conversions::to_string_t("version")] = ApiClient::parameterToString(*version); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -39381,7 +39076,7 @@ pplx::task>> DefaultApi::srcApp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPaymentMethods does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -39409,7 +39104,7 @@ pplx::task>> DefaultApi::srcApp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPaymentMethods: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39420,7 +39115,7 @@ pplx::task>> DefaultApi::srcApp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPaymentMethods: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -39429,17 +39124,13 @@ pplx::task>> DefaultApi::srcApp }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new ProceduralPrimitiveTemplateSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -39448,19 +39139,18 @@ pplx::task>> DefaultApi::srcApp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPaymentMethods: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiPaymentsListPromoCodes(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates(boost::optional search, boost::optional limit) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/promo-codes"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/procedural-primitives/templates"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -39489,13 +39179,21 @@ pplx::task>> DefaultApi::srcAppApiP } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPromoCodes does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (search) + { + localVarQueryParams[utility::conversions::to_string_t("search")] = ApiClient::parameterToString(*search); + } + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -39516,7 +39214,7 @@ pplx::task>> DefaultApi::srcAppApiP } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsListPromoCodes does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -39544,7 +39242,7 @@ pplx::task>> DefaultApi::srcAppApiP if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPromoCodes: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39555,7 +39253,7 @@ pplx::task>> DefaultApi::srcAppApiP if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPromoCodes: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -39564,14 +39262,14 @@ pplx::task>> DefaultApi::srcAppApiP }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -39583,25 +39281,24 @@ pplx::task>> DefaultApi::srcAppApiP else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsListPromoCodes: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsPreviewTax(utility::string_t uuid, std::shared_ptr taxPreviewRequestSchema) const +pplx::task> DefaultApi::srcAppApiProjectsCreateProject(std::shared_ptr projectCreateSchema) const { - // verify the required parameter 'taxPreviewRequestSchema' is set - if (taxPreviewRequestSchema == nullptr) + // verify the required parameter 'projectCreateSchema' is set + if (projectCreateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'taxPreviewRequestSchema' when calling DefaultApi->srcAppApiPaymentsPreviewTax")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'projectCreateSchema' when calling DefaultApi->srcAppApiProjectsCreateProject")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/preview-tax"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -39630,7 +39327,7 @@ pplx::task> DefaultApi::srcAppApiPayme } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsPreviewTax does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -39648,7 +39345,7 @@ pplx::task> DefaultApi::srcAppApiPayme localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(taxPreviewRequestSchema); + localVarJson = ModelBase::toJson(projectCreateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -39659,9 +39356,9 @@ pplx::task> DefaultApi::srcAppApiPayme localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(taxPreviewRequestSchema.get()) + if(projectCreateSchema.get()) { - taxPreviewRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("taxPreviewRequestSchema")); + projectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("projectCreateSchema")); } @@ -39674,7 +39371,7 @@ pplx::task> DefaultApi::srcAppApiPayme } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsPreviewTax does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -39702,7 +39399,7 @@ pplx::task> DefaultApi::srcAppApiPayme if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsPreviewTax: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39713,7 +39410,7 @@ pplx::task> DefaultApi::srcAppApiPayme if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsPreviewTax: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -39722,7 +39419,7 @@ pplx::task> DefaultApi::srcAppApiPayme }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaxPreviewResponseSchema()); + std::shared_ptr localVarResult(new ProjectSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -39737,24 +39434,24 @@ pplx::task> DefaultApi::srcAppApiPayme else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsPreviewTax: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiPaymentsRedeemCoupon(utility::string_t uuid, std::shared_ptr redeemCouponRequestSchema) const +pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_t uuid, std::shared_ptr linkShareCreateSchema) const { - // verify the required parameter 'redeemCouponRequestSchema' is set - if (redeemCouponRequestSchema == nullptr) + // verify the required parameter 'linkShareCreateSchema' is set + if (linkShareCreateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'redeemCouponRequestSchema' when calling DefaultApi->srcAppApiPaymentsRedeemCoupon")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'linkShareCreateSchema' when calling DefaultApi->srcAppApiProjectsCreateProjectLink")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/redeem-coupon"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/create-link"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -39763,7 +39460,6 @@ pplx::task> DefaultApi::srcAppApiPay std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -39784,7 +39480,7 @@ pplx::task> DefaultApi::srcAppApiPay } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRedeemCoupon does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProjectLink does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -39802,7 +39498,7 @@ pplx::task> DefaultApi::srcAppApiPay localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(redeemCouponRequestSchema); + localVarJson = ModelBase::toJson(linkShareCreateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -39813,9 +39509,9 @@ pplx::task> DefaultApi::srcAppApiPay localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(redeemCouponRequestSchema.get()) + if(linkShareCreateSchema.get()) { - redeemCouponRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("redeemCouponRequestSchema")); + linkShareCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("linkShareCreateSchema")); } @@ -39828,7 +39524,7 @@ pplx::task> DefaultApi::srcAppApiPay } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRedeemCoupon does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProjectLink does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -39856,7 +39552,7 @@ pplx::task> DefaultApi::srcAppApiPay if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsRedeemCoupon: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProjectLink: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39867,7 +39563,7 @@ pplx::task> DefaultApi::srcAppApiPay if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsRedeemCoupon: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProjectLink: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -39876,35 +39572,16 @@ pplx::task> DefaultApi::srcAppApiPay }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RedeemCouponResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsRedeemCoupon: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task DefaultApi::srcAppApiPaymentsRevokePromoCode(utility::string_t uuid, utility::string_t promoCodeId) const +pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/credits/promo-codes/{promo_code_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("promo_code_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(promoCodeId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -39932,7 +39609,7 @@ pplx::task DefaultApi::srcAppApiPaymentsRevokePromoCode(utility::string_t } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRevokePromoCode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsDeleteProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -39959,7 +39636,7 @@ pplx::task DefaultApi::srcAppApiPaymentsRevokePromoCode(utility::string_t } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsRevokePromoCode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsDeleteProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -39987,7 +39664,7 @@ pplx::task DefaultApi::srcAppApiPaymentsRevokePromoCode(utility::string_t if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsRevokePromoCode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsDeleteProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -39998,7 +39675,7 @@ pplx::task DefaultApi::srcAppApiPaymentsRevokePromoCode(utility::string_t if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsRevokePromoCode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsDeleteProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40010,18 +39687,12 @@ pplx::task DefaultApi::srcAppApiPaymentsRevokePromoCode(utility::string_t return void(); }); } -pplx::task> DefaultApi::srcAppApiPaymentsUpdateAutoTopupConfig(utility::string_t uuid, std::shared_ptr autoTopupUpdateSchema) const +pplx::task> DefaultApi::srcAppApiProjectsGetMyProjectPermissions(utility::string_t uuid) const { - // verify the required parameter 'autoTopupUpdateSchema' is set - if (autoTopupUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'autoTopupUpdateSchema' when calling DefaultApi->srcAppApiPaymentsUpdateAutoTopupConfig")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/organizations/{uuid}/payments/auto-topup"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/my-permissions"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -40051,13 +39722,12 @@ pplx::task> DefaultApi::srcAppApiPayments } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsUpdateAutoTopupConfig does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetMyProjectPermissions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -40067,27 +39737,11 @@ pplx::task> DefaultApi::srcAppApiPayments if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(autoTopupUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(autoTopupUpdateSchema.get()) - { - autoTopupUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("autoTopupUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -40095,7 +39749,7 @@ pplx::task> DefaultApi::srcAppApiPayments } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiPaymentsUpdateAutoTopupConfig does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetMyProjectPermissions does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -40107,7 +39761,7 @@ pplx::task> DefaultApi::srcAppApiPayments } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -40123,7 +39777,7 @@ pplx::task> DefaultApi::srcAppApiPayments if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiPaymentsUpdateAutoTopupConfig: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetMyProjectPermissions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -40134,7 +39788,7 @@ pplx::task> DefaultApi::srcAppApiPayments if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsUpdateAutoTopupConfig: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetMyProjectPermissions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40143,7 +39797,7 @@ pplx::task> DefaultApi::srcAppApiPayments }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new AutoTopupConfigSchema()); + std::shared_ptr localVarResult(new PermissionsSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -40158,20 +39812,19 @@ pplx::task> DefaultApi::srcAppApiPayments else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiPaymentsUpdateAutoTopupConfig: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetMyProjectPermissions: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate(utility::string_t r_namespace, utility::string_t templateName, boost::optional version) const +pplx::task> DefaultApi::srcAppApiProjectsGetProject(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/procedural-primitives/templates/{namespace}/{template_name}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("namespace") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(r_namespace))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("template_name") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(templateName))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -40200,17 +39853,13 @@ pplx::task> DefaultApi::srcAp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (version) - { - localVarQueryParams[utility::conversions::to_string_t("version")] = ApiClient::parameterToString(*version); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -40231,7 +39880,7 @@ pplx::task> DefaultApi::srcAp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -40259,7 +39908,7 @@ pplx::task> DefaultApi::srcAp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -40270,7 +39919,7 @@ pplx::task> DefaultApi::srcAp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40279,7 +39928,7 @@ pplx::task> DefaultApi::srcAp }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ProceduralPrimitiveTemplateSchema()); + std::shared_ptr localVarResult(new ProjectSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -40294,19 +39943,19 @@ pplx::task> DefaultApi::srcAp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetNamespacedProceduralPrimitiveTemplate: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate(utility::string_t templateKey, boost::optional version) const +pplx::task> DefaultApi::srcAppApiProjectsGetProjectShares(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/procedural-primitives/templates/{template_key}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("template_key") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(templateKey))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/shares"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -40335,17 +39984,13 @@ pplx::task> DefaultApi::srcAp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProjectShares does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (version) - { - localVarQueryParams[utility::conversions::to_string_t("version")] = ApiClient::parameterToString(*version); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -40366,7 +40011,7 @@ pplx::task> DefaultApi::srcAp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProjectShares does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -40394,7 +40039,7 @@ pplx::task> DefaultApi::srcAp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProjectShares: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -40405,7 +40050,7 @@ pplx::task> DefaultApi::srcAp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProjectShares: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40414,7 +40059,7 @@ pplx::task> DefaultApi::srcAp }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ProceduralPrimitiveTemplateSchema()); + std::shared_ptr localVarResult(new SharesResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -40429,18 +40074,19 @@ pplx::task> DefaultApi::srcAp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesGetProceduralPrimitiveTemplate: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProjectShares: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates(boost::optional search, boost::optional limit) const +pplx::task>> DefaultApi::srcAppApiProjectsInviteUserToProject(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/procedural-primitives/templates"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/invite"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -40469,21 +40115,13 @@ pplx::task>> Defa } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsInviteUserToProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (search) - { - localVarQueryParams[utility::conversions::to_string_t("search")] = ApiClient::parameterToString(*search); - } - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -40504,7 +40142,7 @@ pplx::task>> Defa } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsInviteUserToProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -40516,7 +40154,7 @@ pplx::task>> Defa } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -40532,7 +40170,7 @@ pplx::task>> Defa if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsInviteUserToProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -40543,7 +40181,7 @@ pplx::task>> Defa if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsInviteUserToProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40552,16 +40190,17 @@ pplx::task>> Defa }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::map> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) + + for( auto& localVarItem : localVarJson.as_object() ) { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) @@ -40571,21 +40210,15 @@ pplx::task>> Defa else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProceduralPrimitivesListProceduralPrimitiveTemplates: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsInviteUserToProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiProjectsCreateProject(std::shared_ptr projectCreateSchema) const +pplx::task>> DefaultApi::srcAppApiProjectsListProjects() const { - // verify the required parameter 'projectCreateSchema' is set - if (projectCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'projectCreateSchema' when calling DefaultApi->srcAppApiProjectsCreateProject")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects"); @@ -40617,13 +40250,12 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsListProjects does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -40633,27 +40265,11 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(projectCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(projectCreateSchema.get()) - { - projectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("projectCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -40661,7 +40277,7 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsListProjects does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -40673,7 +40289,7 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -40689,7 +40305,7 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsListProjects: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -40700,7 +40316,7 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsListProjects: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40709,13 +40325,17 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ProjectSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -40724,24 +40344,24 @@ pplx::task> DefaultApi::srcAppApiProjectsCreatePr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProject: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsListProjects: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_t uuid, std::shared_ptr linkShareCreateSchema) const +pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_t uuid, std::shared_ptr linkShareRevokeSchema) const { - // verify the required parameter 'linkShareCreateSchema' is set - if (linkShareCreateSchema == nullptr) + // verify the required parameter 'linkShareRevokeSchema' is set + if (linkShareRevokeSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'linkShareCreateSchema' when calling DefaultApi->srcAppApiProjectsCreateProjectLink")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'linkShareRevokeSchema' when calling DefaultApi->srcAppApiProjectsRevokeProjectLink")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/create-link"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/revoke-link"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -40770,7 +40390,7 @@ pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_ } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProjectLink does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsRevokeProjectLink does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -40788,7 +40408,7 @@ pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_ localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(linkShareCreateSchema); + localVarJson = ModelBase::toJson(linkShareRevokeSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -40799,9 +40419,9 @@ pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_ localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(linkShareCreateSchema.get()) + if(linkShareRevokeSchema.get()) { - linkShareCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("linkShareCreateSchema")); + linkShareRevokeSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("linkShareRevokeSchema")); } @@ -40814,7 +40434,7 @@ pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_ } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsCreateProjectLink does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsRevokeProjectLink does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -40842,7 +40462,7 @@ pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_ if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProjectLink: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsRevokeProjectLink: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -40853,7 +40473,7 @@ pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_ if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsCreateProjectLink: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsRevokeProjectLink: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40865,12 +40485,18 @@ pplx::task DefaultApi::srcAppApiProjectsCreateProjectLink(utility::string_ return void(); }); } -pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiProjectsShareProject(utility::string_t uuid, std::shared_ptr shareSchema) const { + // verify the required parameter 'shareSchema' is set + if (shareSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'shareSchema' when calling DefaultApi->srcAppApiProjectsShareProject")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/share"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -40879,6 +40505,7 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -40899,12 +40526,13 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsDeleteProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsShareProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -40914,11 +40542,27 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(shareSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(shareSchema.get()) + { + shareSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("shareSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -40926,7 +40570,7 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsDeleteProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsShareProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -40938,7 +40582,7 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -40954,7 +40598,7 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsDeleteProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsShareProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -40965,7 +40609,7 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsDeleteProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsShareProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -40974,15 +40618,39 @@ pplx::task DefaultApi::srcAppApiProjectsDeleteProject(utility::string_t uu }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new ProjectShareResponseSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiProjectsShareProject: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiProjectsGetMyProjectPermissions(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiProjectsUnshareProject(utility::string_t uuid, std::shared_ptr shareSchema) const { + // verify the required parameter 'shareSchema' is set + if (shareSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'shareSchema' when calling DefaultApi->srcAppApiProjectsUnshareProject")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/my-permissions"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/unshare"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -41012,12 +40680,13 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetMyProjectPermissions does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUnshareProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -41027,11 +40696,27 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(shareSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(shareSchema.get()) + { + shareSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("shareSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -41039,7 +40724,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetMyProjectPermissions does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUnshareProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -41051,7 +40736,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -41067,7 +40752,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetMyProjectPermissions: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsUnshareProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -41078,7 +40763,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetMyProjectPermissions: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsUnshareProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -41087,7 +40772,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new PermissionsSchema()); + std::shared_ptr localVarResult(new ProjectShareResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -41102,15 +40787,21 @@ pplx::task> DefaultApi::srcAppApiProjectsGetM else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetMyProjectPermissions: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsUnshareProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiProjectsGetProject(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiProjectsUpdateProject(utility::string_t uuid, std::shared_ptr projectCreateSchema) const { + // verify the required parameter 'projectCreateSchema' is set + if (projectCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'projectCreateSchema' when calling DefaultApi->srcAppApiProjectsUpdateProject")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}"); @@ -41143,12 +40834,13 @@ pplx::task> DefaultApi::srcAppApiProjectsGetProje } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUpdateProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -41158,11 +40850,27 @@ pplx::task> DefaultApi::srcAppApiProjectsGetProje if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(projectCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(projectCreateSchema.get()) + { + projectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("projectCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -41170,7 +40878,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetProje } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUpdateProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -41182,7 +40890,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetProje } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -41198,7 +40906,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetProje if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiProjectsUpdateProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -41209,7 +40917,7 @@ pplx::task> DefaultApi::srcAppApiProjectsGetProje if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiProjectsUpdateProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -41233,18 +40941,18 @@ pplx::task> DefaultApi::srcAppApiProjectsGetProje else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProject: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiProjectsUpdateProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiProjectsGetProjectShares(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTask(utility::string_t uuid, boost::optional> rLTaskCloneSchema) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/shares"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/clone"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -41274,12 +40982,13 @@ pplx::task> DefaultApi::srcAppApiProjectsG } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProjectShares does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCloneRlTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -41289,11 +40998,27 @@ pplx::task> DefaultApi::srcAppApiProjectsG if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + if (rLTaskCloneSchema) + localVarJson = ModelBase::toJson(*rLTaskCloneSchema); + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskCloneSchema && (*rLTaskCloneSchema).get()) + { + (*rLTaskCloneSchema)->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCloneSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -41301,7 +41026,7 @@ pplx::task> DefaultApi::srcAppApiProjectsG } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsGetProjectShares does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCloneRlTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -41313,7 +41038,7 @@ pplx::task> DefaultApi::srcAppApiProjectsG } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -41329,7 +41054,7 @@ pplx::task> DefaultApi::srcAppApiProjectsG if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProjectShares: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCloneRlTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -41340,7 +41065,7 @@ pplx::task> DefaultApi::srcAppApiProjectsG if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProjectShares: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCloneRlTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -41349,7 +41074,7 @@ pplx::task> DefaultApi::srcAppApiProjectsG }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new SharesResponseSchema()); + std::shared_ptr localVarResult(new RLTaskSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -41364,19 +41089,24 @@ pplx::task> DefaultApi::srcAppApiProjectsG else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsGetProjectShares: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCloneRlTask: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiProjectsInviteUserToProject(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTask(std::shared_ptr rLTaskCreateSchema) const { + // verify the required parameter 'rLTaskCreateSchema' is set + if (rLTaskCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskCreateSchema' when calling DefaultApi->srcAppApiRlTasksCreateRlTask")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/invite"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -41405,12 +41135,13 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsInviteUserToProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -41420,11 +41151,27 @@ pplx::task>> DefaultApi::sr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskCreateSchema.get()) + { + rLTaskCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -41432,7 +41179,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsInviteUserToProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -41460,7 +41207,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsInviteUserToProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -41471,7 +41218,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsInviteUserToProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -41480,18 +41227,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::shared_ptr localVarResult(new RLTaskSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_object() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -41500,18 +41242,18 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsInviteUserToProject: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTask: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiProjectsListProjects() const +pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTaskFromZip(std::shared_ptr zipFile, boost::optional name, boost::optional environmentUuid, boost::optional workspaceUuid, boost::optional stripTopLevelFolder) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/import.zip"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -41540,13 +41282,33 @@ pplx::task>> DefaultApi::srcAppApiPro } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsListProjects does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTaskFromZip does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); + { + localVarFileParams[ utility::conversions::to_string_t("zip_file") ] = zipFile; + } + if (name) + { + localVarQueryParams[utility::conversions::to_string_t("name")] = ApiClient::parameterToString(*name); + } + if (environmentUuid) + { + localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); + } + if (workspaceUuid) + { + localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); + } + if (stripTopLevelFolder) + { + localVarQueryParams[utility::conversions::to_string_t("strip_top_level_folder")] = ApiClient::parameterToString(*stripTopLevelFolder); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -41567,7 +41329,7 @@ pplx::task>> DefaultApi::srcAppApiPro } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsListProjects does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTaskFromZip does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -41579,7 +41341,7 @@ pplx::task>> DefaultApi::srcAppApiPro } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -41595,7 +41357,7 @@ pplx::task>> DefaultApi::srcAppApiPro if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsListProjects: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTaskFromZip: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -41606,7 +41368,7 @@ pplx::task>> DefaultApi::srcAppApiPro if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsListProjects: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTaskFromZip: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -41615,17 +41377,13 @@ pplx::task>> DefaultApi::srcAppApiPro }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new RLTaskImportResultSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -41634,24 +41392,18 @@ pplx::task>> DefaultApi::srcAppApiPro else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsListProjects: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTaskFromZip: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_t uuid, std::shared_ptr linkShareRevokeSchema) const +pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid) const { - // verify the required parameter 'linkShareRevokeSchema' is set - if (linkShareRevokeSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'linkShareRevokeSchema' when calling DefaultApi->srcAppApiProjectsRevokeProjectLink")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/revoke-link"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -41680,13 +41432,12 @@ pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_ } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsRevokeProjectLink does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -41696,27 +41447,11 @@ pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_ if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(linkShareRevokeSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(linkShareRevokeSchema.get()) - { - linkShareRevokeSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("linkShareRevokeSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -41724,7 +41459,7 @@ pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_ } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsRevokeProjectLink does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -41736,7 +41471,7 @@ pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_ } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -41752,7 +41487,7 @@ pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_ if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsRevokeProjectLink: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -41763,7 +41498,7 @@ pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_ if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsRevokeProjectLink: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -41775,18 +41510,12 @@ pplx::task DefaultApi::srcAppApiProjectsRevokeProjectLink(utility::string_ return void(); }); } -pplx::task> DefaultApi::srcAppApiProjectsShareProject(utility::string_t uuid, std::shared_ptr shareSchema) const +pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTaskSourceFile(utility::string_t uuid, utility::string_t path) const { - // verify the required parameter 'shareSchema' is set - if (shareSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'shareSchema' when calling DefaultApi->srcAppApiProjectsShareProject")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/share"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -41795,7 +41524,6 @@ pplx::task> DefaultApi::srcAppApiPro std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -41816,14 +41544,16 @@ pplx::task> DefaultApi::srcAppApiPro } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsShareProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTaskSourceFile does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + { + localVarQueryParams[utility::conversions::to_string_t("path")] = ApiClient::parameterToString(path); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -41832,27 +41562,11 @@ pplx::task> DefaultApi::srcAppApiPro if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(shareSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(shareSchema.get()) - { - shareSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("shareSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -41860,7 +41574,7 @@ pplx::task> DefaultApi::srcAppApiPro } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsShareProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTaskSourceFile does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -41872,7 +41586,7 @@ pplx::task> DefaultApi::srcAppApiPro } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -41888,7 +41602,7 @@ pplx::task> DefaultApi::srcAppApiPro if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsShareProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTaskSourceFile: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -41899,7 +41613,7 @@ pplx::task> DefaultApi::srcAppApiPro if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsShareProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTaskSourceFile: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -41908,39 +41622,15 @@ pplx::task> DefaultApi::srcAppApiPro }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ProjectShareResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsShareProject: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiProjectsUnshareProject(utility::string_t uuid, std::shared_ptr shareSchema) const +pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::string_t uuid) const { - // verify the required parameter 'shareSchema' is set - if (shareSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'shareSchema' when calling DefaultApi->srcAppApiProjectsUnshareProject")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}/unshare"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/export.zip"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -41949,7 +41639,6 @@ pplx::task> DefaultApi::srcAppApiPro std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -41970,13 +41659,12 @@ pplx::task> DefaultApi::srcAppApiPro } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUnshareProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsExportRlTaskZip does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -41986,27 +41674,11 @@ pplx::task> DefaultApi::srcAppApiPro if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(shareSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(shareSchema.get()) - { - shareSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("shareSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -42014,7 +41686,7 @@ pplx::task> DefaultApi::srcAppApiPro } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUnshareProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsExportRlTaskZip does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -42026,7 +41698,7 @@ pplx::task> DefaultApi::srcAppApiPro } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -42042,7 +41714,7 @@ pplx::task> DefaultApi::srcAppApiPro if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsUnshareProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsExportRlTaskZip: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -42053,7 +41725,7 @@ pplx::task> DefaultApi::srcAppApiPro if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsUnshareProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsExportRlTaskZip: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -42062,39 +41734,21 @@ pplx::task> DefaultApi::srcAppApiPro }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ProjectShareResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsUnshareProject: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiProjectsUpdateProject(utility::string_t uuid, std::shared_ptr projectCreateSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg(utility::string_t uuid, std::shared_ptr rLTaskRegenerateSceneSchema) const { - // verify the required parameter 'projectCreateSchema' is set - if (projectCreateSchema == nullptr) + // verify the required parameter 'rLTaskRegenerateSceneSchema' is set + if (rLTaskRegenerateSceneSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'projectCreateSchema' when calling DefaultApi->srcAppApiProjectsUpdateProject")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskRegenerateSceneSchema' when calling DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/projects/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/regenerate-scene-cfg"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -42124,7 +41778,7 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUpdateProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -42142,7 +41796,7 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(projectCreateSchema); + localVarJson = ModelBase::toJson(rLTaskRegenerateSceneSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -42153,9 +41807,9 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(projectCreateSchema.get()) + if(rLTaskRegenerateSceneSchema.get()) { - projectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("projectCreateSchema")); + rLTaskRegenerateSceneSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskRegenerateSceneSchema")); } @@ -42168,7 +41822,7 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiProjectsUpdateProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -42180,7 +41834,7 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -42196,7 +41850,7 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiProjectsUpdateProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -42207,7 +41861,7 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsUpdateProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -42216,7 +41870,7 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new ProjectSchema()); + std::shared_ptr localVarResult(new RLTaskSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -42231,18 +41885,18 @@ pplx::task> DefaultApi::srcAppApiProjectsUpdatePr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiProjectsUpdateProject: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTask(utility::string_t uuid, boost::optional> rLTaskCloneSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/clone"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -42272,13 +41926,12 @@ pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTas } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCloneRlTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -42288,27 +41941,11 @@ pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTas if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - if (rLTaskCloneSchema) - localVarJson = ModelBase::toJson(*rLTaskCloneSchema); - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskCloneSchema && (*rLTaskCloneSchema).get()) - { - (*rLTaskCloneSchema)->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCloneSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -42316,7 +41953,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTas } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCloneRlTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -42328,7 +41965,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTas } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -42344,7 +41981,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTas if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCloneRlTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -42355,7 +41992,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTas if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCloneRlTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -42379,24 +42016,19 @@ pplx::task> DefaultApi::srcAppApiRlTasksCloneRlTas else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCloneRlTask: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTask: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTask(std::shared_ptr rLTaskCreateSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskActions(utility::string_t uuid) const { - // verify the required parameter 'rLTaskCreateSchema' is set - if (rLTaskCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskCreateSchema' when calling DefaultApi->srcAppApiRlTasksCreateRlTask")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/actions"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -42425,13 +42057,12 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskActions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -42441,27 +42072,11 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskCreateSchema.get()) - { - rLTaskCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -42469,7 +42084,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskActions does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -42481,7 +42096,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -42497,7 +42112,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskActions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -42508,7 +42123,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskActions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -42517,7 +42132,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSchema()); + std::shared_ptr localVarResult(new RLTaskActionSpecSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -42532,18 +42147,18 @@ pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTa else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTask: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskActions: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksCreateRlTaskFromZip(std::shared_ptr zipFile, boost::optional name, boost::optional environmentUuid, boost::optional workspaceUuid, boost::optional stripTopLevelFolder) const +pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskBySlug(utility::string_t slug) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/import.zip"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/by-slug"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -42572,32 +42187,15 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTaskFromZip does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskBySlug does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); { - localVarFileParams[ utility::conversions::to_string_t("zip_file") ] = zipFile; - } - if (name) - { - localVarQueryParams[utility::conversions::to_string_t("name")] = ApiClient::parameterToString(*name); - } - if (environmentUuid) - { - localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); - } - if (workspaceUuid) - { - localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); - } - if (stripTopLevelFolder) - { - localVarQueryParams[utility::conversions::to_string_t("strip_top_level_folder")] = ApiClient::parameterToString(*stripTopLevelFolder); + localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); } std::shared_ptr localVarHttpBody; @@ -42619,7 +42217,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksCreateRlTaskFromZip does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskBySlug does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -42631,7 +42229,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -42647,7 +42245,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTaskFromZip: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskBySlug: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -42658,7 +42256,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTaskFromZip: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskBySlug: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -42667,7 +42265,7 @@ pplx::task> DefaultApi::srcAppApiRlTas }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskImportResultSchema()); + std::shared_ptr localVarResult(new RLTaskSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -42682,18 +42280,18 @@ pplx::task> DefaultApi::srcAppApiRlTas else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksCreateRlTaskFromZip: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskBySlug: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskObservations(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/observations"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -42702,6 +42300,7 @@ pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -42722,7 +42321,7 @@ pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskObservations does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -42749,7 +42348,7 @@ pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskObservations does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -42761,7 +42360,7 @@ pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -42777,7 +42376,7 @@ pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskObservations: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -42788,7 +42387,7 @@ pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskObservations: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -42797,134 +42396,33 @@ pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTask(utility::string_t uuid }) .then([=, this](utility::string_t localVarResponse) { - return void(); - }); -} -pplx::task DefaultApi::srcAppApiRlTasksDeleteRlTaskSourceFile(utility::string_t uuid, utility::string_t path, boost::optional force) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTaskSourceFile does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - { - localVarQueryParams[utility::conversions::to_string_t("path")] = ApiClient::parameterToString(path); - } - if (force) - { - localVarQueryParams[utility::conversions::to_string_t("force")] = ApiClient::parameterToString(*force); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksDeleteRlTaskSourceFile does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } + std::shared_ptr localVarResult(new RLTaskObservationSpecSchema()); - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } + web::json::value localVarJson = web::json::value::parse(localVarResponse); - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTaskSourceFile: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); + ModelBase::fromJson(localVarJson, localVarResult); } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksDeleteRlTaskSourceFile: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskObservations: unsupported response type")); } - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); + return localVarResult; }); } -pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskOrchestrationHints(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/export.zip"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/orchestration-hints"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -42933,6 +42431,7 @@ pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::str std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -42953,7 +42452,7 @@ pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::str } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsExportRlTaskZip does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskOrchestrationHints does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -42980,7 +42479,7 @@ pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::str } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsExportRlTaskZip does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskOrchestrationHints does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43008,7 +42507,7 @@ pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::str if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsExportRlTaskZip: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskOrchestrationHints: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43019,7 +42518,7 @@ pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::str if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsExportRlTaskZip: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskOrchestrationHints: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43028,21 +42527,33 @@ pplx::task DefaultApi::srcAppApiRlTasksExportsExportRlTaskZip(utility::str }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new RLTaskOrchestrationHintsSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskOrchestrationHints: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksExportsGenerateRlTaskEnvCfg(utility::string_t uuid, std::shared_ptr rLTaskGenerateEnvCfgSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskRlConfig(utility::string_t uuid) const { - // verify the required parameter 'rLTaskGenerateEnvCfgSchema' is set - if (rLTaskGenerateEnvCfgSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskGenerateEnvCfgSchema' when calling DefaultApi->srcAppApiRlTasksExportsGenerateRlTaskEnvCfg")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/generate-env-cfg"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/rl-config"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -43072,13 +42583,12 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsGenerateRlTaskEnvCfg does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskRlConfig does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -43088,27 +42598,11 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskGenerateEnvCfgSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskGenerateEnvCfgSchema.get()) - { - rLTaskGenerateEnvCfgSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskGenerateEnvCfgSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -43116,7 +42610,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsGenerateRlTaskEnvCfg does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskRlConfig does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43128,7 +42622,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -43144,7 +42638,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsGenerateRlTaskEnvCfg: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskRlConfig: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43155,7 +42649,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsGenerateRlTaskEnvCfg: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskRlConfig: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43164,7 +42658,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSchema()); + std::shared_ptr localVarResult(new RLTaskRLConfigSpecSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -43179,24 +42673,18 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsGen else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsGenerateRlTaskEnvCfg: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskRlConfig: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg(utility::string_t uuid, std::shared_ptr rLTaskRegenerateSceneSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskSourceFile(utility::string_t uuid, utility::string_t path) const { - // verify the required parameter 'rLTaskRegenerateSceneSchema' is set - if (rLTaskRegenerateSceneSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskRegenerateSceneSchema' when calling DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/regenerate-scene-cfg"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files/content"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -43226,14 +42714,16 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskSourceFile does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + { + localVarQueryParams[utility::conversions::to_string_t("path")] = ApiClient::parameterToString(path); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -43242,27 +42732,11 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskRegenerateSceneSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskRegenerateSceneSchema.get()) - { - rLTaskRegenerateSceneSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskRegenerateSceneSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -43270,7 +42744,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskSourceFile does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43282,7 +42756,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -43298,7 +42772,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskSourceFile: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43309,7 +42783,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskSourceFile: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43318,7 +42792,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSchema()); + std::shared_ptr localVarResult(new RLTaskSourceFileSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -43333,18 +42807,24 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskSceneCfg: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskSourceFile: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksExportsRegenerateRlTaskTaskSpec(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksInferenceCreateRlTaskCheckpoint(utility::string_t uuid, std::shared_ptr rLTaskCheckpointCreateSchema) const { + // verify the required parameter 'rLTaskCheckpointCreateSchema' is set + if (rLTaskCheckpointCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskCheckpointCreateSchema' when calling DefaultApi->srcAppApiRlTasksInferenceCreateRlTaskCheckpoint")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/regenerate-task-spec"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -43374,12 +42854,13 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskTaskSpec does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceCreateRlTaskCheckpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -43389,11 +42870,27 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskCheckpointCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskCheckpointCreateSchema.get()) + { + rLTaskCheckpointCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCheckpointCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -43401,7 +42898,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksExportsRegenerateRlTaskTaskSpec does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceCreateRlTaskCheckpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43429,7 +42926,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskTaskSpec: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceCreateRlTaskCheckpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43440,7 +42937,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskTaskSpec: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceCreateRlTaskCheckpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43449,7 +42946,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSchema()); + std::shared_ptr localVarResult(new RLTaskCheckpointSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -43464,19 +42961,20 @@ pplx::task> DefaultApi::srcAppApiRlTasksExportsReg else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksExportsRegenerateRlTaskTaskSpec: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceCreateRlTaskCheckpoint: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint(utility::string_t uuid, utility::string_t checkpointUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/{checkpoint_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("checkpoint_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(checkpointUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -43484,7 +42982,6 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask( std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -43505,7 +43002,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask( } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -43532,7 +43029,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask( } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43544,7 +43041,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask( } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -43560,7 +43057,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask( if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43571,7 +43068,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask( if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43580,34 +43077,17 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTask( }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTask: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskActions(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksInferenceGetRlTaskCheckpoint(utility::string_t uuid, utility::string_t checkpointUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/actions"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/{checkpoint_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("checkpoint_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(checkpointUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -43636,7 +43116,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskActions does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceGetRlTaskCheckpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -43663,7 +43143,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskActions does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceGetRlTaskCheckpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43691,7 +43171,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskActions: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceGetRlTaskCheckpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43702,7 +43182,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskActions: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceGetRlTaskCheckpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43711,7 +43191,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskActionSpecSchema()); + std::shared_ptr localVarResult(new RLTaskCheckpointSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -43726,18 +43206,25 @@ pplx::task> DefaultApi::srcAppApiRlTasks else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskActions: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceGetRlTaskCheckpoint: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskBySlug(utility::string_t slug) const +pplx::task> DefaultApi::srcAppApiRlTasksInferenceLaunchRlTaskInference(utility::string_t uuid, std::shared_ptr rLTaskInferenceLaunchSchema) const { + // verify the required parameter 'rLTaskInferenceLaunchSchema' is set + if (rLTaskInferenceLaunchSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskInferenceLaunchSchema' when calling DefaultApi->srcAppApiRlTasksInferenceLaunchRlTaskInference")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/by-slug"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/inference"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -43766,16 +43253,14 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskBySlug does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceLaunchRlTaskInference does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - { - localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -43784,11 +43269,27 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskInferenceLaunchSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskInferenceLaunchSchema.get()) + { + rLTaskInferenceLaunchSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskInferenceLaunchSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -43796,7 +43297,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskBySlug does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceLaunchRlTaskInference does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43808,7 +43309,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -43824,7 +43325,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskBySlug: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceLaunchRlTaskInference: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43835,7 +43336,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskBySlug: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceLaunchRlTaskInference: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43844,7 +43345,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSchema()); + std::shared_ptr localVarResult(new RLTaskInferenceRunSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -43859,18 +43360,18 @@ pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskB else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskBySlug: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceLaunchRlTaskInference: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskObservations(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiRlTasksInferenceListRlTaskCheckpoints(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/observations"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -43900,7 +43401,7 @@ pplx::task> DefaultApi::srcAppApiRl } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskObservations does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskCheckpoints does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -43927,7 +43428,7 @@ pplx::task> DefaultApi::srcAppApiRl } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskObservations does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskCheckpoints does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -43955,7 +43456,7 @@ pplx::task> DefaultApi::srcAppApiRl if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskObservations: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskCheckpoints: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -43966,7 +43467,7 @@ pplx::task> DefaultApi::srcAppApiRl if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskObservations: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskCheckpoints: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -43975,13 +43476,17 @@ pplx::task> DefaultApi::srcAppApiRl }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskObservationSpecSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -43990,18 +43495,18 @@ pplx::task> DefaultApi::srcAppApiRl else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskObservations: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskCheckpoints: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskOrchestrationHints(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiRlTasksInferenceListRlTaskInferenceRuns(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/orchestration-hints"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/inference"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -44031,7 +43536,7 @@ pplx::task> DefaultApi::srcAppAp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskOrchestrationHints does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskInferenceRuns does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -44058,7 +43563,7 @@ pplx::task> DefaultApi::srcAppAp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskOrchestrationHints does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskInferenceRuns does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -44086,7 +43591,7 @@ pplx::task> DefaultApi::srcAppAp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskOrchestrationHints: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskInferenceRuns: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -44097,7 +43602,7 @@ pplx::task> DefaultApi::srcAppAp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskOrchestrationHints: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskInferenceRuns: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -44106,13 +43611,17 @@ pplx::task> DefaultApi::srcAppAp }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskOrchestrationHintsSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -44121,19 +43630,26 @@ pplx::task> DefaultApi::srcAppAp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskOrchestrationHints: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskInferenceRuns: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskRlConfig(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksInferencePublishCheckpointController(utility::string_t uuid, utility::string_t checkpointUuid, std::shared_ptr rLTaskCheckpointPublishControllerSchema) const { + // verify the required parameter 'rLTaskCheckpointPublishControllerSchema' is set + if (rLTaskCheckpointPublishControllerSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskCheckpointPublishControllerSchema' when calling DefaultApi->srcAppApiRlTasksInferencePublishCheckpointController")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/rl-config"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/{checkpoint_uuid}/publish-controller"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("checkpoint_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(checkpointUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -44162,12 +43678,13 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskRlConfig does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferencePublishCheckpointController does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -44177,11 +43694,27 @@ pplx::task> DefaultApi::srcAppApiRlTas if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskCheckpointPublishControllerSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskCheckpointPublishControllerSchema.get()) + { + rLTaskCheckpointPublishControllerSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCheckpointPublishControllerSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -44189,7 +43722,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskRlConfig does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferencePublishCheckpointController does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -44201,7 +43734,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -44217,7 +43750,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskRlConfig: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferencePublishCheckpointController: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -44228,7 +43761,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskRlConfig: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferencePublishCheckpointController: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -44237,7 +43770,7 @@ pplx::task> DefaultApi::srcAppApiRlTas }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskRLConfigSpecSchema()); + std::shared_ptr localVarResult(new RLTaskCheckpointPublishControllerResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -44252,18 +43785,18 @@ pplx::task> DefaultApi::srcAppApiRlTas else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskRlConfig: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferencePublishCheckpointController: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksGetRlTaskSourceFile(utility::string_t uuid, utility::string_t path) const +pplx::task> DefaultApi::srcAppApiRlTasksInferenceUploadRlTaskCheckpoint(utility::string_t uuid, std::shared_ptr file, boost::optional name, boost::optional description, boost::optional metadata) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files/content"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/upload"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -44293,15 +43826,28 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskSourceFile does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceUploadRlTaskCheckpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); { - localVarQueryParams[utility::conversions::to_string_t("path")] = ApiClient::parameterToString(path); + localVarFileParams[ utility::conversions::to_string_t("file") ] = file; + } + if (name) + { + localVarFormParams[ utility::conversions::to_string_t("name") ] = ApiClient::parameterToString(*name); + } + if (description) + { + localVarFormParams[ utility::conversions::to_string_t("description") ] = ApiClient::parameterToString(*description); + } + if (metadata) + { + localVarFormParams[ utility::conversions::to_string_t("metadata") ] = ApiClient::parameterToString(*metadata); } std::shared_ptr localVarHttpBody; @@ -44323,7 +43869,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksGetRlTaskSourceFile does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceUploadRlTaskCheckpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -44335,7 +43881,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -44351,7 +43897,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskSourceFile: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceUploadRlTaskCheckpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -44362,7 +43908,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskSourceFile: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceUploadRlTaskCheckpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -44371,7 +43917,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSourceFileSchema()); + std::shared_ptr localVarResult(new RLTaskCheckpointSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -44386,24 +43932,18 @@ pplx::task> DefaultApi::srcAppApiRlTasks else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksGetRlTaskSourceFile: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceUploadRlTaskCheckpoint: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksInferenceCreateRlTaskCheckpoint(utility::string_t uuid, std::shared_ptr rLTaskCheckpointCreateSchema) const +pplx::task>> DefaultApi::srcAppApiRlTasksListRlTaskSourceFiles(utility::string_t uuid) const { - // verify the required parameter 'rLTaskCheckpointCreateSchema' is set - if (rLTaskCheckpointCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskCheckpointCreateSchema' when calling DefaultApi->srcAppApiRlTasksInferenceCreateRlTaskCheckpoint")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -44433,13 +43973,12 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceCreateRlTaskCheckpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTaskSourceFiles does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -44449,27 +43988,11 @@ pplx::task> DefaultApi::srcAppApiRlTasks if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskCheckpointCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskCheckpointCreateSchema.get()) - { - rLTaskCheckpointCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCheckpointCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -44477,7 +44000,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceCreateRlTaskCheckpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTaskSourceFiles does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -44489,7 +44012,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -44505,7 +44028,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceCreateRlTaskCheckpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTaskSourceFiles: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -44516,7 +44039,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceCreateRlTaskCheckpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTaskSourceFiles: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -44525,13 +44048,17 @@ pplx::task> DefaultApi::srcAppApiRlTasks }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskCheckpointSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -44540,133 +44067,18 @@ pplx::task> DefaultApi::srcAppApiRlTasks else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceCreateRlTaskCheckpoint: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTaskSourceFiles: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint(utility::string_t uuid, utility::string_t checkpointUuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/{checkpoint_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("checkpoint_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(checkpointUuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceDeleteRlTaskCheckpoint: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task> DefaultApi::srcAppApiRlTasksInferenceGetRlTaskCheckpoint(utility::string_t uuid, utility::string_t checkpointUuid) const +pplx::task>> DefaultApi::srcAppApiRlTasksListRlTasks(boost::optional workspaceUuid, boost::optional environmentUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/{checkpoint_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("checkpoint_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(checkpointUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -44695,13 +44107,21 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceGetRlTaskCheckpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTasks does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (workspaceUuid) + { + localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); + } + if (environmentUuid) + { + localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -44722,7 +44142,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceGetRlTaskCheckpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTasks does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -44750,7 +44170,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceGetRlTaskCheckpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTasks: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -44761,7 +44181,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceGetRlTaskCheckpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTasks: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -44770,13 +44190,17 @@ pplx::task> DefaultApi::srcAppApiRlTasks }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskCheckpointSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -44785,24 +44209,24 @@ pplx::task> DefaultApi::srcAppApiRlTasks else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceGetRlTaskCheckpoint: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTasks: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksInferenceLaunchRlTaskInference(utility::string_t uuid, std::shared_ptr rLTaskInferenceLaunchSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint(utility::string_t uuid, std::shared_ptr rLTaskSceneEntityCreateSchema) const { - // verify the required parameter 'rLTaskInferenceLaunchSchema' is set - if (rLTaskInferenceLaunchSchema == nullptr) + // verify the required parameter 'rLTaskSceneEntityCreateSchema' is set + if (rLTaskSceneEntityCreateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskInferenceLaunchSchema' when calling DefaultApi->srcAppApiRlTasksInferenceLaunchRlTaskInference")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSceneEntityCreateSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/inference"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -44832,7 +44256,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceLaunchRlTaskInference does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -44850,7 +44274,7 @@ pplx::task> DefaultApi::srcAppApiRlTas localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskInferenceLaunchSchema); + localVarJson = ModelBase::toJson(rLTaskSceneEntityCreateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -44861,9 +44285,9 @@ pplx::task> DefaultApi::srcAppApiRlTas localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskInferenceLaunchSchema.get()) + if(rLTaskSceneEntityCreateSchema.get()) { - rLTaskInferenceLaunchSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskInferenceLaunchSchema")); + rLTaskSceneEntityCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSceneEntityCreateSchema")); } @@ -44876,7 +44300,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceLaunchRlTaskInference does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -44904,7 +44328,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceLaunchRlTaskInference: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -44915,7 +44339,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceLaunchRlTaskInference: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -44924,7 +44348,7 @@ pplx::task> DefaultApi::srcAppApiRlTas }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskInferenceRunSchema()); + std::shared_ptr localVarResult(new RLTaskSceneEntitySchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -44939,19 +44363,20 @@ pplx::task> DefaultApi::srcAppApiRlTas else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceLaunchRlTaskInference: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiRlTasksInferenceListRlTaskCheckpoints(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint(utility::string_t uuid, utility::string_t entityUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities/{entity_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("entity_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(entityUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -44959,7 +44384,6 @@ pplx::task>> DefaultApi::src std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -44980,7 +44404,7 @@ pplx::task>> DefaultApi::src } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskCheckpoints does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -45007,7 +44431,7 @@ pplx::task>> DefaultApi::src } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskCheckpoints does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -45019,7 +44443,7 @@ pplx::task>> DefaultApi::src } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -45035,7 +44459,7 @@ pplx::task>> DefaultApi::src if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskCheckpoints: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -45046,7 +44470,7 @@ pplx::task>> DefaultApi::src if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskCheckpoints: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -45055,37 +44479,15 @@ pplx::task>> DefaultApi::src }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskCheckpoints: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task>> DefaultApi::srcAppApiRlTasksInferenceListRlTaskInferenceRuns(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesGetSceneEntityHints(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/inference"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entity-hints"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -45115,7 +44517,7 @@ pplx::task>> DefaultApi::s } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskInferenceRuns does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetSceneEntityHints does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -45142,7 +44544,7 @@ pplx::task>> DefaultApi::s } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceListRlTaskInferenceRuns does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetSceneEntityHints does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -45170,7 +44572,7 @@ pplx::task>> DefaultApi::s if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskInferenceRuns: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetSceneEntityHints: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -45181,7 +44583,7 @@ pplx::task>> DefaultApi::s if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskInferenceRuns: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetSceneEntityHints: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -45190,17 +44592,13 @@ pplx::task>> DefaultApi::s }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new RLTaskSceneEntityHintsResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -45209,26 +44607,19 @@ pplx::task>> DefaultApi::s else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceListRlTaskInferenceRuns: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetSceneEntityHints: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksInferencePublishCheckpointController(utility::string_t uuid, utility::string_t checkpointUuid, std::shared_ptr rLTaskCheckpointPublishControllerSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesGetTaskSpec(utility::string_t uuid) const { - // verify the required parameter 'rLTaskCheckpointPublishControllerSchema' is set - if (rLTaskCheckpointPublishControllerSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskCheckpointPublishControllerSchema' when calling DefaultApi->srcAppApiRlTasksInferencePublishCheckpointController")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/{checkpoint_uuid}/publish-controller"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/task-spec.py"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("checkpoint_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(checkpointUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -45257,13 +44648,12 @@ pplx::task> Def } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferencePublishCheckpointController does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetTaskSpec does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -45273,27 +44663,11 @@ pplx::task> Def if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskCheckpointPublishControllerSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskCheckpointPublishControllerSchema.get()) - { - rLTaskCheckpointPublishControllerSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskCheckpointPublishControllerSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -45301,7 +44675,7 @@ pplx::task> Def } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferencePublishCheckpointController does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetTaskSpec does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -45313,7 +44687,7 @@ pplx::task> Def } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -45329,7 +44703,7 @@ pplx::task> Def if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferencePublishCheckpointController: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetTaskSpec: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -45340,7 +44714,7 @@ pplx::task> Def if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferencePublishCheckpointController: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetTaskSpec: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -45349,7 +44723,7 @@ pplx::task> Def }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskCheckpointPublishControllerResponseSchema()); + std::shared_ptr localVarResult(new RLTaskTaskSpecResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -45364,18 +44738,18 @@ pplx::task> Def else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferencePublishCheckpointController: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetTaskSpec: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksInferenceUploadRlTaskCheckpoint(utility::string_t uuid, std::shared_ptr file, boost::optional name, boost::optional description, boost::optional metadata) const +pplx::task>> DefaultApi::srcAppApiRlTasksSceneEntitiesListSceneEntities(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/checkpoints/upload"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -45405,29 +44779,13 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceUploadRlTaskCheckpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesListSceneEntities does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); - { - localVarFileParams[ utility::conversions::to_string_t("file") ] = file; - } - if (name) - { - localVarFormParams[ utility::conversions::to_string_t("name") ] = ApiClient::parameterToString(*name); - } - if (description) - { - localVarFormParams[ utility::conversions::to_string_t("description") ] = ApiClient::parameterToString(*description); - } - if (metadata) - { - localVarFormParams[ utility::conversions::to_string_t("metadata") ] = ApiClient::parameterToString(*metadata); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -45448,7 +44806,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksInferenceUploadRlTaskCheckpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesListSceneEntities does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -45460,7 +44818,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -45476,7 +44834,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceUploadRlTaskCheckpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesListSceneEntities: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -45487,7 +44845,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceUploadRlTaskCheckpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesListSceneEntities: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -45496,13 +44854,17 @@ pplx::task> DefaultApi::srcAppApiRlTasks }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskCheckpointSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -45511,18 +44873,24 @@ pplx::task> DefaultApi::srcAppApiRlTasks else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksInferenceUploadRlTaskCheckpoint: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesListSceneEntities: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiRlTasksListRlTaskSourceFiles(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiRlTasksSceneEntitiesPutTaskSpec(utility::string_t uuid, std::shared_ptr rLTaskTaskSpecUpsertSchema) const { + // verify the required parameter 'rLTaskTaskSpecUpsertSchema' is set + if (rLTaskTaskSpecUpsertSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskTaskSpecUpsertSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesPutTaskSpec")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/task-spec.py"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -45552,12 +44920,13 @@ pplx::task>> Defaul } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTaskSourceFiles does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesPutTaskSpec does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -45567,11 +44936,27 @@ pplx::task>> Defaul if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskTaskSpecUpsertSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskTaskSpecUpsertSchema.get()) + { + rLTaskTaskSpecUpsertSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskTaskSpecUpsertSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -45579,7 +44964,7 @@ pplx::task>> Defaul } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTaskSourceFiles does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesPutTaskSpec does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -45591,7 +44976,7 @@ pplx::task>> Defaul } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -45607,7 +44992,7 @@ pplx::task>> Defaul if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTaskSourceFiles: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesPutTaskSpec: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -45618,7 +45003,7 @@ pplx::task>> Defaul if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTaskSourceFiles: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesPutTaskSpec: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -45627,14 +45012,14 @@ pplx::task>> Defaul }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -45646,18 +45031,25 @@ pplx::task>> Defaul else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTaskSourceFiles: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesPutTaskSpec: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiRlTasksListRlTasks(boost::optional workspaceUuid, boost::optional environmentUuid) const +pplx::task>> DefaultApi::srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint(utility::string_t uuid, std::shared_ptr rLTaskSceneEntitiesReplaceSchema) const { + // verify the required parameter 'rLTaskSceneEntitiesReplaceSchema' is set + if (rLTaskSceneEntitiesReplaceSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSceneEntitiesReplaceSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -45686,21 +45078,14 @@ pplx::task>> DefaultApi::srcAppApiRlTa } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTasks does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - if (workspaceUuid) - { - localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); - } - if (environmentUuid) - { - localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -45709,11 +45094,27 @@ pplx::task>> DefaultApi::srcAppApiRlTa if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskSceneEntitiesReplaceSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskSceneEntitiesReplaceSchema.get()) + { + rLTaskSceneEntitiesReplaceSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSceneEntitiesReplaceSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -45721,7 +45122,7 @@ pplx::task>> DefaultApi::srcAppApiRlTa } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksListRlTasks does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -45733,7 +45134,7 @@ pplx::task>> DefaultApi::srcAppApiRlTa } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -45749,7 +45150,7 @@ pplx::task>> DefaultApi::srcAppApiRlTa if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTasks: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -45760,7 +45161,7 @@ pplx::task>> DefaultApi::srcAppApiRlTa if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTasks: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -45769,14 +45170,14 @@ pplx::task>> DefaultApi::srcAppApiRlTa }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -45788,25 +45189,26 @@ pplx::task>> DefaultApi::srcAppApiRlTa else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksListRlTasks: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint(utility::string_t uuid, std::shared_ptr rLTaskSceneEntityCreateSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint(utility::string_t uuid, utility::string_t entityUuid, std::shared_ptr rLTaskSceneEntityUpdateSchema) const { - // verify the required parameter 'rLTaskSceneEntityCreateSchema' is set - if (rLTaskSceneEntityCreateSchema == nullptr) + // verify the required parameter 'rLTaskSceneEntityUpdateSchema' is set + if (rLTaskSceneEntityUpdateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSceneEntityCreateSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSceneEntityUpdateSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities/{entity_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("entity_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(entityUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -45835,7 +45237,7 @@ pplx::task> DefaultApi::srcAppApiRlTask } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -45853,7 +45255,7 @@ pplx::task> DefaultApi::srcAppApiRlTask localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskSceneEntityCreateSchema); + localVarJson = ModelBase::toJson(rLTaskSceneEntityUpdateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -45864,9 +45266,9 @@ pplx::task> DefaultApi::srcAppApiRlTask localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskSceneEntityCreateSchema.get()) + if(rLTaskSceneEntityUpdateSchema.get()) { - rLTaskSceneEntityCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSceneEntityCreateSchema")); + rLTaskSceneEntityUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSceneEntityUpdateSchema")); } @@ -45879,7 +45281,7 @@ pplx::task> DefaultApi::srcAppApiRlTask } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -45891,7 +45293,7 @@ pplx::task> DefaultApi::srcAppApiRlTask } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -45907,7 +45309,7 @@ pplx::task> DefaultApi::srcAppApiRlTask if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -45918,7 +45320,7 @@ pplx::task> DefaultApi::srcAppApiRlTask if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -45942,20 +45344,25 @@ pplx::task> DefaultApi::srcAppApiRlTask else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesCreateSceneEntityEndpoint: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint(utility::string_t uuid, utility::string_t entityUuid) const +pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesValidateTaskSpec(utility::string_t uuid, std::shared_ptr rLTaskTaskSpecUpsertSchema) const { + // verify the required parameter 'rLTaskTaskSpecUpsertSchema' is set + if (rLTaskTaskSpecUpsertSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskTaskSpecUpsertSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesValidateTaskSpec")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities/{entity_uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/task-spec/validate"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("entity_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(entityUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -45963,6 +45370,7 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -45983,12 +45391,13 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesValidateTaskSpec does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -45998,11 +45407,27 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskTaskSpecUpsertSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskTaskSpecUpsertSchema.get()) + { + rLTaskTaskSpecUpsertSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskTaskSpecUpsertSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -46010,7 +45435,7 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesValidateTaskSpec does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -46022,7 +45447,7 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -46038,7 +45463,7 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesValidateTaskSpec: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -46049,7 +45474,7 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesValidateTaskSpec: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -46058,15 +45483,39 @@ pplx::task DefaultApi::srcAppApiRlTasksSceneEntitiesDeleteSceneEntityEndpo }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new RLTaskTaskSpecValidateResponseSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesValidateTaskSpec: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesGetSceneEntityHints(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTask(utility::string_t uuid, std::shared_ptr rLTaskUpdateSchema) const { + // verify the required parameter 'rLTaskUpdateSchema' is set + if (rLTaskUpdateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskUpdateSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTask")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entity-hints"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -46096,12 +45545,13 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetSceneEntityHints does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -46111,11 +45561,27 @@ pplx::task> DefaultApi::sr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskUpdateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskUpdateSchema.get()) + { + rLTaskUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskUpdateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -46123,7 +45589,7 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetSceneEntityHints does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -46135,7 +45601,7 @@ pplx::task> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -46151,7 +45617,7 @@ pplx::task> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetSceneEntityHints: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -46162,7 +45628,7 @@ pplx::task> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetSceneEntityHints: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -46171,7 +45637,7 @@ pplx::task> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSceneEntityHintsResponseSchema()); + std::shared_ptr localVarResult(new RLTaskSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -46186,18 +45652,24 @@ pplx::task> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetSceneEntityHints: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTask: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesGetTaskSpec(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskActions(utility::string_t uuid, std::shared_ptr rLTaskActionSpecSchema) const { + // verify the required parameter 'rLTaskActionSpecSchema' is set + if (rLTaskActionSpecSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskActionSpecSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTaskActions")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/task-spec.py"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/actions"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -46227,12 +45699,13 @@ pplx::task> DefaultApi::srcAppApiR } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetTaskSpec does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskActions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -46242,11 +45715,27 @@ pplx::task> DefaultApi::srcAppApiR if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(rLTaskActionSpecSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(rLTaskActionSpecSchema.get()) + { + rLTaskActionSpecSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskActionSpecSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -46254,7 +45743,7 @@ pplx::task> DefaultApi::srcAppApiR } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesGetTaskSpec does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskActions does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -46266,7 +45755,7 @@ pplx::task> DefaultApi::srcAppApiR } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -46282,7 +45771,7 @@ pplx::task> DefaultApi::srcAppApiR if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetTaskSpec: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskActions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -46293,7 +45782,7 @@ pplx::task> DefaultApi::srcAppApiR if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetTaskSpec: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskActions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -46302,7 +45791,7 @@ pplx::task> DefaultApi::srcAppApiR }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskTaskSpecResponseSchema()); + std::shared_ptr localVarResult(new RLTaskActionSpecSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -46317,18 +45806,18 @@ pplx::task> DefaultApi::srcAppApiR else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesGetTaskSpec: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskActions: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiRlTasksSceneEntitiesListSceneEntities(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskFromZip(utility::string_t uuid, std::shared_ptr zipFile, boost::optional replaceExisting, boost::optional stripTopLevelFolder) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/import.zip"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -46358,13 +45847,25 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesListSceneEntities does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskFromZip does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); + { + localVarFileParams[ utility::conversions::to_string_t("zip_file") ] = zipFile; + } + if (replaceExisting) + { + localVarQueryParams[utility::conversions::to_string_t("replace_existing")] = ApiClient::parameterToString(*replaceExisting); + } + if (stripTopLevelFolder) + { + localVarQueryParams[utility::conversions::to_string_t("strip_top_level_folder")] = ApiClient::parameterToString(*stripTopLevelFolder); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -46385,7 +45886,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesListSceneEntities does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskFromZip does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -46397,7 +45898,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -46413,7 +45914,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesListSceneEntities: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskFromZip: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -46424,7 +45925,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesListSceneEntities: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskFromZip: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -46433,17 +45934,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new RLTaskImportResultSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -46452,24 +45949,24 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesListSceneEntities: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskFromZip: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiRlTasksSceneEntitiesPutTaskSpec(utility::string_t uuid, std::shared_ptr rLTaskTaskSpecUpsertSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskObservations(utility::string_t uuid, std::shared_ptr rLTaskObservationSpecSchema) const { - // verify the required parameter 'rLTaskTaskSpecUpsertSchema' is set - if (rLTaskTaskSpecUpsertSchema == nullptr) + // verify the required parameter 'rLTaskObservationSpecSchema' is set + if (rLTaskObservationSpecSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskTaskSpecUpsertSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesPutTaskSpec")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskObservationSpecSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTaskObservations")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/task-spec.py"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/observations"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -46499,7 +45996,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesPutTaskSpec does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskObservations does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -46517,7 +46014,7 @@ pplx::task>> DefaultApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskTaskSpecUpsertSchema); + localVarJson = ModelBase::toJson(rLTaskObservationSpecSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -46528,9 +46025,9 @@ pplx::task>> DefaultApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskTaskSpecUpsertSchema.get()) + if(rLTaskObservationSpecSchema.get()) { - rLTaskTaskSpecUpsertSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskTaskSpecUpsertSchema")); + rLTaskObservationSpecSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskObservationSpecSchema")); } @@ -46543,7 +46040,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesPutTaskSpec does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskObservations does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -46571,7 +46068,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesPutTaskSpec: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskObservations: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -46582,7 +46079,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesPutTaskSpec: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskObservations: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -46591,17 +46088,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new RLTaskObservationSpecSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -46610,24 +46103,24 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesPutTaskSpec: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskObservations: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint(utility::string_t uuid, std::shared_ptr rLTaskSceneEntitiesReplaceSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskRlConfig(utility::string_t uuid, std::shared_ptr rLTaskRLConfigSpecSchema) const { - // verify the required parameter 'rLTaskSceneEntitiesReplaceSchema' is set - if (rLTaskSceneEntitiesReplaceSchema == nullptr) + // verify the required parameter 'rLTaskRLConfigSpecSchema' is set + if (rLTaskRLConfigSpecSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSceneEntitiesReplaceSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskRLConfigSpecSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTaskRlConfig")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/rl-config"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -46657,7 +46150,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskRlConfig does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -46675,7 +46168,7 @@ pplx::task>> DefaultApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskSceneEntitiesReplaceSchema); + localVarJson = ModelBase::toJson(rLTaskRLConfigSpecSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -46686,9 +46179,9 @@ pplx::task>> DefaultApi::sr localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskSceneEntitiesReplaceSchema.get()) + if(rLTaskRLConfigSpecSchema.get()) { - rLTaskSceneEntitiesReplaceSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSceneEntitiesReplaceSchema")); + rLTaskRLConfigSpecSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskRLConfigSpecSchema")); } @@ -46701,7 +46194,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskRlConfig does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -46729,7 +46222,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskRlConfig: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -46740,7 +46233,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskRlConfig: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -46749,17 +46242,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new RLTaskRLConfigSpecSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -46768,26 +46257,25 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesReplaceSceneEntitiesEndpoint: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskRlConfig: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint(utility::string_t uuid, utility::string_t entityUuid, std::shared_ptr rLTaskSceneEntityUpdateSchema) const +pplx::task> DefaultApi::srcAppApiRlTasksUpsertRlTaskSourceFile(utility::string_t uuid, std::shared_ptr rLTaskSourceFileUpsertSchema) const { - // verify the required parameter 'rLTaskSceneEntityUpdateSchema' is set - if (rLTaskSceneEntityUpdateSchema == nullptr) + // verify the required parameter 'rLTaskSourceFileUpsertSchema' is set + if (rLTaskSourceFileUpsertSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSceneEntityUpdateSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSourceFileUpsertSchema' when calling DefaultApi->srcAppApiRlTasksUpsertRlTaskSourceFile")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/scene-entities/{entity_uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("entity_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(entityUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -46816,7 +46304,7 @@ pplx::task> DefaultApi::srcAppApiRlTask } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpsertRlTaskSourceFile does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -46834,7 +46322,7 @@ pplx::task> DefaultApi::srcAppApiRlTask localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskSceneEntityUpdateSchema); + localVarJson = ModelBase::toJson(rLTaskSourceFileUpsertSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -46845,9 +46333,9 @@ pplx::task> DefaultApi::srcAppApiRlTask localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskSceneEntityUpdateSchema.get()) + if(rLTaskSourceFileUpsertSchema.get()) { - rLTaskSceneEntityUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSceneEntityUpdateSchema")); + rLTaskSourceFileUpsertSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSourceFileUpsertSchema")); } @@ -46860,7 +46348,7 @@ pplx::task> DefaultApi::srcAppApiRlTask } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpsertRlTaskSourceFile does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -46872,7 +46360,7 @@ pplx::task> DefaultApi::srcAppApiRlTask } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -46888,7 +46376,7 @@ pplx::task> DefaultApi::srcAppApiRlTask if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpsertRlTaskSourceFile: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -46899,7 +46387,7 @@ pplx::task> DefaultApi::srcAppApiRlTask if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpsertRlTaskSourceFile: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -46908,7 +46396,7 @@ pplx::task> DefaultApi::srcAppApiRlTask }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSceneEntitySchema()); + std::shared_ptr localVarResult(new RLTaskSourceFileSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -46923,25 +46411,18 @@ pplx::task> DefaultApi::srcAppApiRlTask else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesUpdateSceneEntityEndpoint: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpsertRlTaskSourceFile: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksSceneEntitiesValidateTaskSpec(utility::string_t uuid, std::shared_ptr rLTaskTaskSpecUpsertSchema) const +pplx::task> DefaultApi::srcAppApiSlugsCheckEntitySlug(utility::string_t slug, boost::optional entityType) const { - // verify the required parameter 'rLTaskTaskSpecUpsertSchema' is set - if (rLTaskTaskSpecUpsertSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskTaskSpecUpsertSchema' when calling DefaultApi->srcAppApiRlTasksSceneEntitiesValidateTaskSpec")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/task-spec/validate"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/slugs/check"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -46970,14 +46451,20 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesValidateTaskSpec does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiSlugsCheckEntitySlug does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + { + localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); + } + if (entityType) + { + localVarQueryParams[utility::conversions::to_string_t("entity_type")] = ApiClient::parameterToString(*entityType); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -46986,27 +46473,11 @@ pplx::task> DefaultApi::sr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskTaskSpecUpsertSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskTaskSpecUpsertSchema.get()) - { - rLTaskTaskSpecUpsertSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskTaskSpecUpsertSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -47014,19 +46485,11 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksSceneEntitiesValidateTaskSpec does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiSlugsCheckEntitySlug does not consume any supported media type")); } - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -47042,7 +46505,7 @@ pplx::task> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesValidateTaskSpec: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiSlugsCheckEntitySlug: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -47053,7 +46516,7 @@ pplx::task> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesValidateTaskSpec: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiSlugsCheckEntitySlug: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -47062,7 +46525,7 @@ pplx::task> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskTaskSpecValidateResponseSchema()); + std::shared_ptr localVarResult(new SlugCheckSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -47077,25 +46540,24 @@ pplx::task> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksSceneEntitiesValidateTaskSpec: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiSlugsCheckEntitySlug: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTask(utility::string_t uuid, std::shared_ptr rLTaskUpdateSchema) const +pplx::task> DefaultApi::srcAppApiTaggedFramesCreateTaggedFrames(std::shared_ptr taggedFramesCreateSchema) const { - // verify the required parameter 'rLTaskUpdateSchema' is set - if (rLTaskUpdateSchema == nullptr) + // verify the required parameter 'taggedFramesCreateSchema' is set + if (taggedFramesCreateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskUpdateSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTask")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'taggedFramesCreateSchema' when calling DefaultApi->srcAppApiTaggedFramesCreateTaggedFrames")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -47124,7 +46586,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesCreateTaggedFrames does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -47142,7 +46604,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskUpdateSchema); + localVarJson = ModelBase::toJson(taggedFramesCreateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -47153,9 +46615,9 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskUpdateSchema.get()) + if(taggedFramesCreateSchema.get()) { - rLTaskUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskUpdateSchema")); + taggedFramesCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("taggedFramesCreateSchema")); } @@ -47168,7 +46630,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesCreateTaggedFrames does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -47180,7 +46642,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -47196,7 +46658,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesCreateTaggedFrames: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -47207,7 +46669,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesCreateTaggedFrames: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -47216,7 +46678,7 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSchema()); + std::shared_ptr localVarResult(new TaggedFramesSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -47231,24 +46693,18 @@ pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTa else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTask: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesCreateTaggedFrames: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskActions(utility::string_t uuid, std::shared_ptr rLTaskActionSpecSchema) const +pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::string_t uuid) const { - // verify the required parameter 'rLTaskActionSpecSchema' is set - if (rLTaskActionSpecSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskActionSpecSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTaskActions")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/actions"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -47257,7 +46713,6 @@ pplx::task> DefaultApi::srcAppApiRlTasks std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -47278,13 +46733,12 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskActions does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesDeleteTaggedFrames does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -47294,27 +46748,11 @@ pplx::task> DefaultApi::srcAppApiRlTasks if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskActionSpecSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskActionSpecSchema.get()) - { - rLTaskActionSpecSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskActionSpecSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -47322,7 +46760,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskActions does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesDeleteTaggedFrames does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -47334,7 +46772,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -47350,7 +46788,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskActions: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesDeleteTaggedFrames: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -47361,7 +46799,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskActions: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesDeleteTaggedFrames: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -47370,33 +46808,15 @@ pplx::task> DefaultApi::srcAppApiRlTasks }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskActionSpecSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskActions: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskFromZip(utility::string_t uuid, std::shared_ptr zipFile, boost::optional replaceExisting, boost::optional stripTopLevelFolder) const +pplx::task> DefaultApi::srcAppApiTaggedFramesGetTaggedFrames(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/import.zip"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -47426,25 +46846,13 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskFromZip does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesGetTaggedFrames does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); - { - localVarFileParams[ utility::conversions::to_string_t("zip_file") ] = zipFile; - } - if (replaceExisting) - { - localVarQueryParams[utility::conversions::to_string_t("replace_existing")] = ApiClient::parameterToString(*replaceExisting); - } - if (stripTopLevelFolder) - { - localVarQueryParams[utility::conversions::to_string_t("strip_top_level_folder")] = ApiClient::parameterToString(*stripTopLevelFolder); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -47465,7 +46873,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskFromZip does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesGetTaggedFrames does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -47477,7 +46885,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -47493,7 +46901,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskFromZip: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesGetTaggedFrames: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -47504,7 +46912,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskFromZip: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesGetTaggedFrames: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -47513,7 +46921,7 @@ pplx::task> DefaultApi::srcAppApiRlTas }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskImportResultSchema()); + std::shared_ptr localVarResult(new TaggedFramesSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -47528,25 +46936,18 @@ pplx::task> DefaultApi::srcAppApiRlTas else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskFromZip: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesGetTaggedFrames: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskObservations(utility::string_t uuid, std::shared_ptr rLTaskObservationSpecSchema) const +pplx::task>> DefaultApi::srcAppApiTaggedFramesListTaggedFrames(boost::optional recordingUuid) const { - // verify the required parameter 'rLTaskObservationSpecSchema' is set - if (rLTaskObservationSpecSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskObservationSpecSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTaskObservations")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/observations"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -47575,14 +46976,17 @@ pplx::task> DefaultApi::srcAppApiRl } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskObservations does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesListTaggedFrames does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + if (recordingUuid) + { + localVarQueryParams[utility::conversions::to_string_t("recording_uuid")] = ApiClient::parameterToString(*recordingUuid); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -47591,27 +46995,11 @@ pplx::task> DefaultApi::srcAppApiRl if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskObservationSpecSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskObservationSpecSchema.get()) - { - rLTaskObservationSpecSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskObservationSpecSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -47619,7 +47007,7 @@ pplx::task> DefaultApi::srcAppApiRl } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskObservations does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesListTaggedFrames does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -47631,7 +47019,7 @@ pplx::task> DefaultApi::srcAppApiRl } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -47647,7 +47035,7 @@ pplx::task> DefaultApi::srcAppApiRl if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskObservations: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesListTaggedFrames: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -47658,7 +47046,7 @@ pplx::task> DefaultApi::srcAppApiRl if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskObservations: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesListTaggedFrames: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -47667,13 +47055,17 @@ pplx::task> DefaultApi::srcAppApiRl }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskObservationSpecSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -47682,24 +47074,24 @@ pplx::task> DefaultApi::srcAppApiRl else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskObservations: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesListTaggedFrames: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksUpdateRlTaskRlConfig(utility::string_t uuid, std::shared_ptr rLTaskRLConfigSpecSchema) const +pplx::task> DefaultApi::srcAppApiTaggedFramesUpdateTaggedFrames(utility::string_t uuid, std::shared_ptr taggedFramesUpdateSchema) const { - // verify the required parameter 'rLTaskRLConfigSpecSchema' is set - if (rLTaskRLConfigSpecSchema == nullptr) + // verify the required parameter 'taggedFramesUpdateSchema' is set + if (taggedFramesUpdateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskRLConfigSpecSchema' when calling DefaultApi->srcAppApiRlTasksUpdateRlTaskRlConfig")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'taggedFramesUpdateSchema' when calling DefaultApi->srcAppApiTaggedFramesUpdateTaggedFrames")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/rl-config"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -47729,7 +47121,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskRlConfig does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesUpdateTaggedFrames does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -47747,7 +47139,7 @@ pplx::task> DefaultApi::srcAppApiRlTas localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskRLConfigSpecSchema); + localVarJson = ModelBase::toJson(taggedFramesUpdateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -47758,9 +47150,9 @@ pplx::task> DefaultApi::srcAppApiRlTas localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskRLConfigSpecSchema.get()) + if(taggedFramesUpdateSchema.get()) { - rLTaskRLConfigSpecSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskRLConfigSpecSchema")); + taggedFramesUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("taggedFramesUpdateSchema")); } @@ -47773,7 +47165,7 @@ pplx::task> DefaultApi::srcAppApiRlTas } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpdateRlTaskRlConfig does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesUpdateTaggedFrames does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -47801,7 +47193,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskRlConfig: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesUpdateTaggedFrames: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -47812,7 +47204,7 @@ pplx::task> DefaultApi::srcAppApiRlTas if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskRlConfig: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesUpdateTaggedFrames: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -47821,7 +47213,7 @@ pplx::task> DefaultApi::srcAppApiRlTas }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskRLConfigSpecSchema()); + std::shared_ptr localVarResult(new TaggedFramesSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -47836,24 +47228,18 @@ pplx::task> DefaultApi::srcAppApiRlTas else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpdateRlTaskRlConfig: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesUpdateTaggedFrames: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiRlTasksUpsertRlTaskSourceFile(utility::string_t uuid, std::shared_ptr rLTaskSourceFileUpsertSchema) const +pplx::task DefaultApi::srcAppApiTasksCancelTaskExecution(utility::string_t uuid) const { - // verify the required parameter 'rLTaskSourceFileUpsertSchema' is set - if (rLTaskSourceFileUpsertSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskSourceFileUpsertSchema' when calling DefaultApi->srcAppApiRlTasksUpsertRlTaskSourceFile")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/source-files"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/executions/{uuid}/cancel"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -47862,7 +47248,6 @@ pplx::task> DefaultApi::srcAppApiRlTasks std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -47883,13 +47268,12 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpsertRlTaskSourceFile does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCancelTaskExecution does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -47899,27 +47283,11 @@ pplx::task> DefaultApi::srcAppApiRlTasks if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(rLTaskSourceFileUpsertSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(rLTaskSourceFileUpsertSchema.get()) - { - rLTaskSourceFileUpsertSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskSourceFileUpsertSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -47927,7 +47295,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksUpsertRlTaskSourceFile does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCancelTaskExecution does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -47939,7 +47307,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -47955,7 +47323,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpsertRlTaskSourceFile: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksCancelTaskExecution: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -47966,7 +47334,7 @@ pplx::task> DefaultApi::srcAppApiRlTasks if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpsertRlTaskSourceFile: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksCancelTaskExecution: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -47975,40 +47343,21 @@ pplx::task> DefaultApi::srcAppApiRlTasks }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskSourceFileSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksUpsertRlTaskSourceFile: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiRlTasksValidateRlTaskRlConfig(utility::string_t uuid, std::shared_ptr rLTaskRLConfigSpecSchema) const +pplx::task> DefaultApi::srcAppApiTasksCreateTask(std::shared_ptr createTaskSchema) const { - // verify the required parameter 'rLTaskRLConfigSpecSchema' is set - if (rLTaskRLConfigSpecSchema == nullptr) + // verify the required parameter 'createTaskSchema' is set + if (createTaskSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'rLTaskRLConfigSpecSchema' when calling DefaultApi->srcAppApiRlTasksValidateRlTaskRlConfig")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'createTaskSchema' when calling DefaultApi->srcAppApiTasksCreateTask")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/rl-tasks/{uuid}/rl-config/validate"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -48037,7 +47386,7 @@ pplx::task> DefaultApi::srcA } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksValidateRlTaskRlConfig does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCreateTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -48055,7 +47404,7 @@ pplx::task> DefaultApi::srcA localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(rLTaskRLConfigSpecSchema); + localVarJson = ModelBase::toJson(createTaskSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -48066,9 +47415,9 @@ pplx::task> DefaultApi::srcA localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(rLTaskRLConfigSpecSchema.get()) + if(createTaskSchema.get()) { - rLTaskRLConfigSpecSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("rLTaskRLConfigSpecSchema")); + createTaskSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("createTaskSchema")); } @@ -48081,7 +47430,7 @@ pplx::task> DefaultApi::srcA } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiRlTasksValidateRlTaskRlConfig does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCreateTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -48109,7 +47458,7 @@ pplx::task> DefaultApi::srcA if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiRlTasksValidateRlTaskRlConfig: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksCreateTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -48120,7 +47469,7 @@ pplx::task> DefaultApi::srcA if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksValidateRlTaskRlConfig: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksCreateTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -48129,7 +47478,7 @@ pplx::task> DefaultApi::srcA }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RLTaskRLConfigValidateResultSchema()); + std::shared_ptr localVarResult(new TaskSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -48144,18 +47493,19 @@ pplx::task> DefaultApi::srcA else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiRlTasksValidateRlTaskRlConfig: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTasksCreateTask: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiSlugsCheckEntitySlug(utility::string_t slug, boost::optional entityType) const +pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/slugs/check"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -48163,7 +47513,6 @@ pplx::task> DefaultApi::srcAppApiSlugsCheckEnti std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -48184,20 +47533,13 @@ pplx::task> DefaultApi::srcAppApiSlugsCheckEnti } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiSlugsCheckEntitySlug does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksDeleteTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - { - localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); - } - if (entityType) - { - localVarQueryParams[utility::conversions::to_string_t("entity_type")] = ApiClient::parameterToString(*entityType); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -48218,11 +47560,19 @@ pplx::task> DefaultApi::srcAppApiSlugsCheckEnti } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiSlugsCheckEntitySlug does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksDeleteTask does not consume any supported media type")); } + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -48238,7 +47588,7 @@ pplx::task> DefaultApi::srcAppApiSlugsCheckEnti if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiSlugsCheckEntitySlug: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksDeleteTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -48249,7 +47599,7 @@ pplx::task> DefaultApi::srcAppApiSlugsCheckEnti if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiSlugsCheckEntitySlug: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksDeleteTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -48258,39 +47608,22 @@ pplx::task> DefaultApi::srcAppApiSlugsCheckEnti }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new SlugCheckSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiSlugsCheckEntitySlug: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiTaggedFramesCreateTaggedFrames(std::shared_ptr taggedFramesCreateSchema) const +pplx::task> DefaultApi::srcAppApiTasksExecuteTask(utility::string_t uuid, std::shared_ptr executeTaskSchema) const { - // verify the required parameter 'taggedFramesCreateSchema' is set - if (taggedFramesCreateSchema == nullptr) + // verify the required parameter 'executeTaskSchema' is set + if (executeTaskSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'taggedFramesCreateSchema' when calling DefaultApi->srcAppApiTaggedFramesCreateTaggedFrames")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'executeTaskSchema' when calling DefaultApi->srcAppApiTasksExecuteTask")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}/execute"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -48319,7 +47652,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesCreateTaggedFrames does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksExecuteTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -48337,7 +47670,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(taggedFramesCreateSchema); + localVarJson = ModelBase::toJson(executeTaskSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -48348,9 +47681,9 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(taggedFramesCreateSchema.get()) + if(executeTaskSchema.get()) { - taggedFramesCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("taggedFramesCreateSchema")); + executeTaskSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("executeTaskSchema")); } @@ -48363,7 +47696,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesCreateTaggedFrames does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksExecuteTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -48391,7 +47724,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesCreateTaggedFrames: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksExecuteTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -48402,7 +47735,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesCreateTaggedFrames: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksExecuteTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -48411,7 +47744,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaggedFramesSchema()); + std::shared_ptr localVarResult(new TaskExecutionSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -48426,18 +47759,18 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesCreateTaggedFrames: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTasksExecuteTask: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTasksGetTask(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -48446,6 +47779,7 @@ pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::st std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -48466,7 +47800,7 @@ pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::st } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesDeleteTaggedFrames does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -48493,7 +47827,7 @@ pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::st } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesDeleteTaggedFrames does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -48505,7 +47839,7 @@ pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::st } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -48521,7 +47855,7 @@ pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::st if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesDeleteTaggedFrames: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksGetTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -48532,7 +47866,7 @@ pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::st if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesDeleteTaggedFrames: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksGetTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -48541,15 +47875,33 @@ pplx::task DefaultApi::srcAppApiTaggedFramesDeleteTaggedFrames(utility::st }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new TaskSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiTasksGetTask: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTaggedFramesGetTaggedFrames(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTasksGetTaskExecution(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/executions/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -48579,7 +47931,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesGetTaggedFrames does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTaskExecution does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -48606,7 +47958,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesGetTaggedFrames does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTaskExecution does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -48634,7 +47986,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesGetTaggedFrames: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksGetTaskExecution: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -48645,7 +47997,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesGetTaggedFrames: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksGetTaskExecution: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -48654,7 +48006,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaggedFramesSchema()); + std::shared_ptr localVarResult(new TaskExecutionSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -48669,18 +48021,18 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesGetTaggedFrames: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTasksGetTaskExecution: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiTaggedFramesListTaggedFrames(boost::optional recordingUuid) const +pplx::task>> DefaultApi::srcAppApiTasksListTaskQueue(boost::optional status, boost::optional environmentUuid, boost::optional twinUuid, boost::optional taskType, boost::optional limit) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/queue"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -48709,16 +48061,32 @@ pplx::task>> DefaultApi::srcAppA } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesListTaggedFrames does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTaskQueue does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (recordingUuid) + if (status) { - localVarQueryParams[utility::conversions::to_string_t("recording_uuid")] = ApiClient::parameterToString(*recordingUuid); + localVarQueryParams[utility::conversions::to_string_t("status")] = ApiClient::parameterToString(*status); + } + if (environmentUuid) + { + localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); + } + if (twinUuid) + { + localVarQueryParams[utility::conversions::to_string_t("twin_uuid")] = ApiClient::parameterToString(*twinUuid); + } + if (taskType) + { + localVarQueryParams[utility::conversions::to_string_t("task_type")] = ApiClient::parameterToString(*taskType); + } + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); } std::shared_ptr localVarHttpBody; @@ -48740,7 +48108,7 @@ pplx::task>> DefaultApi::srcAppA } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesListTaggedFrames does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTaskQueue does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -48768,7 +48136,7 @@ pplx::task>> DefaultApi::srcAppA if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesListTaggedFrames: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksListTaskQueue: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -48779,7 +48147,7 @@ pplx::task>> DefaultApi::srcAppA if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesListTaggedFrames: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksListTaskQueue: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -48788,14 +48156,14 @@ pplx::task>> DefaultApi::srcAppA }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -48807,25 +48175,18 @@ pplx::task>> DefaultApi::srcAppA else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesListTaggedFrames: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTasksListTaskQueue: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTaggedFramesUpdateTaggedFrames(utility::string_t uuid, std::shared_ptr taggedFramesUpdateSchema) const +pplx::task>> DefaultApi::srcAppApiTasksListTasks(boost::optional workspaceUuid, boost::optional taskType) const { - // verify the required parameter 'taggedFramesUpdateSchema' is set - if (taggedFramesUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'taggedFramesUpdateSchema' when calling DefaultApi->srcAppApiTaggedFramesUpdateTaggedFrames")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tagged-frames/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -48854,14 +48215,21 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesUpdateTaggedFrames does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTasks does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + if (workspaceUuid) + { + localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); + } + if (taskType) + { + localVarQueryParams[utility::conversions::to_string_t("task_type")] = ApiClient::parameterToString(*taskType); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -48870,27 +48238,11 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(taggedFramesUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(taggedFramesUpdateSchema.get()) - { - taggedFramesUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("taggedFramesUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -48898,7 +48250,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTaggedFramesUpdateTaggedFrames does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTasks does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -48910,7 +48262,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -48926,7 +48278,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesUpdateTaggedFrames: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksListTasks: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -48937,7 +48289,7 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesUpdateTaggedFrames: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksListTasks: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -48946,13 +48298,17 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaggedFramesSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -48961,136 +48317,25 @@ pplx::task> DefaultApi::srcAppApiTaggedFrame else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTaggedFramesUpdateTaggedFrames: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTasksListTasks: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiTasksCancelTaskExecution(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/executions/{uuid}/cancel"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCancelTaskExecution does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCancelTaskExecution does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksCancelTaskExecution: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksCancelTaskExecution: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task> DefaultApi::srcAppApiTasksCreateTask(std::shared_ptr createTaskSchema) const +pplx::task> DefaultApi::srcAppApiTasksUpdateTask(utility::string_t uuid, std::shared_ptr updateTaskSchema) const { - // verify the required parameter 'createTaskSchema' is set - if (createTaskSchema == nullptr) + // verify the required parameter 'updateTaskSchema' is set + if (updateTaskSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'createTaskSchema' when calling DefaultApi->srcAppApiTasksCreateTask")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'updateTaskSchema' when calling DefaultApi->srcAppApiTasksUpdateTask")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -49119,7 +48364,7 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCreateTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksUpdateTask does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -49137,7 +48382,7 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(createTaskSchema); + localVarJson = ModelBase::toJson(updateTaskSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -49148,9 +48393,9 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(createTaskSchema.get()) + if(updateTaskSchema.get()) { - createTaskSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("createTaskSchema")); + updateTaskSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("updateTaskSchema")); } @@ -49163,7 +48408,7 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksCreateTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksUpdateTask does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -49175,7 +48420,7 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -49191,7 +48436,7 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksCreateTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTasksUpdateTask: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -49202,7 +48447,7 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksCreateTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTasksUpdateTask: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -49226,19 +48471,20 @@ pplx::task> DefaultApi::srcAppApiTasksCreateTask(std else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksCreateTask: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTasksUpdateTask: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTwinsCancelTwinAction(utility::string_t uuid, utility::string_t actionId) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/actions/{action_id}/cancel"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("action_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(actionId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -49246,6 +48492,7 @@ pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) co std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -49266,7 +48513,7 @@ pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) co } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksDeleteTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCancelTwinAction does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -49293,7 +48540,7 @@ pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) co } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksDeleteTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCancelTwinAction does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -49305,7 +48552,7 @@ pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) co } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -49321,7 +48568,7 @@ pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) co if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksDeleteTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsCancelTwinAction: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -49332,7 +48579,7 @@ pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) co if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksDeleteTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsCancelTwinAction: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -49341,22 +48588,39 @@ pplx::task DefaultApi::srcAppApiTasksDeleteTask(utility::string_t uuid) co }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new TwinActionResponseSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiTwinsCancelTwinAction: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTasksExecuteTask(utility::string_t uuid, std::shared_ptr executeTaskSchema) const +pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std::shared_ptr twinCreateSchema) const { - // verify the required parameter 'executeTaskSchema' is set - if (executeTaskSchema == nullptr) + // verify the required parameter 'twinCreateSchema' is set + if (twinCreateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'executeTaskSchema' when calling DefaultApi->srcAppApiTasksExecuteTask")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinCreateSchema' when calling DefaultApi->srcAppApiTwinsCreateTwin")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}/execute"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -49385,7 +48649,7 @@ pplx::task> DefaultApi::srcAppApiTasksExecu } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksExecuteTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCreateTwin does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -49403,7 +48667,7 @@ pplx::task> DefaultApi::srcAppApiTasksExecu localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(executeTaskSchema); + localVarJson = ModelBase::toJson(twinCreateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -49414,9 +48678,9 @@ pplx::task> DefaultApi::srcAppApiTasksExecu localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(executeTaskSchema.get()) + if(twinCreateSchema.get()) { - executeTaskSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("executeTaskSchema")); + twinCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinCreateSchema")); } @@ -49429,7 +48693,7 @@ pplx::task> DefaultApi::srcAppApiTasksExecu } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksExecuteTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCreateTwin does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -49457,7 +48721,7 @@ pplx::task> DefaultApi::srcAppApiTasksExecu if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksExecuteTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsCreateTwin: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -49468,7 +48732,7 @@ pplx::task> DefaultApi::srcAppApiTasksExecu if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksExecuteTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsCreateTwin: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -49477,7 +48741,7 @@ pplx::task> DefaultApi::srcAppApiTasksExecu }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaskExecutionSchema()); + std::shared_ptr localVarResult(new TwinSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -49492,18 +48756,18 @@ pplx::task> DefaultApi::srcAppApiTasksExecu else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksExecuteTask: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsCreateTwin: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTasksGetTask(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -49512,7 +48776,6 @@ pplx::task> DefaultApi::srcAppApiTasksGetTask(utilit std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -49533,7 +48796,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTask(utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwin does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -49560,7 +48823,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTask(utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwin does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -49572,7 +48835,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTask(utilit } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -49588,7 +48851,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTask(utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksGetTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwin: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -49599,7 +48862,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTask(utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksGetTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwin: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -49608,33 +48871,137 @@ pplx::task> DefaultApi::srcAppApiTasksGetTask(utilit }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaskSchema()); + return void(); + }); +} +pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string_t uuid, boost::optional robotType) const +{ - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/calibration"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwinCalibration does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + if (robotType) + { + localVarQueryParams[utility::conversions::to_string_t("robot_type")] = ApiClient::parameterToString(*robotType); + } + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwinCalibration does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) { - web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } - ModelBase::fromJson(localVarJson, localVarResult); + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksGetTask: unsupported response type")); + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwinCalibration: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); } - return localVarResult; + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwinCalibration: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + return void(); }); } -pplx::task> DefaultApi::srcAppApiTasksGetTaskExecution(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTwinsExecuteTwinAction(utility::string_t uuid, std::shared_ptr twinActionRequestSchema) const { + // verify the required parameter 'twinActionRequestSchema' is set + if (twinActionRequestSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinActionRequestSchema' when calling DefaultApi->srcAppApiTwinsExecuteTwinAction")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/executions/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/actions"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -49664,12 +49031,13 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTaskExecution does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsExecuteTwinAction does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -49679,11 +49047,27 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(twinActionRequestSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(twinActionRequestSchema.get()) + { + twinActionRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinActionRequestSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -49691,7 +49075,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksGetTaskExecution does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsExecuteTwinAction does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -49703,7 +49087,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -49719,7 +49103,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksGetTaskExecution: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsExecuteTwinAction: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -49730,7 +49114,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksGetTaskExecution: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsExecuteTwinAction: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -49739,7 +49123,7 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaskExecutionSchema()); + std::shared_ptr localVarResult(new TwinActionResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -49754,18 +49138,19 @@ pplx::task> DefaultApi::srcAppApiTasksGetTa else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksGetTaskExecution: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsExecuteTwinAction: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiTasksListTaskQueue(boost::optional status, boost::optional environmentUuid, boost::optional twinUuid, boost::optional taskType, boost::optional limit) const +pplx::task> DefaultApi::srcAppApiTwinsGetRecording(utility::string_t recordingUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/queue"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/recordings/{recording_uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("recording_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(recordingUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -49794,33 +49179,13 @@ pplx::task>> DefaultApi::srcApp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTaskQueue does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetRecording does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (status) - { - localVarQueryParams[utility::conversions::to_string_t("status")] = ApiClient::parameterToString(*status); - } - if (environmentUuid) - { - localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); - } - if (twinUuid) - { - localVarQueryParams[utility::conversions::to_string_t("twin_uuid")] = ApiClient::parameterToString(*twinUuid); - } - if (taskType) - { - localVarQueryParams[utility::conversions::to_string_t("task_type")] = ApiClient::parameterToString(*taskType); - } - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -49841,7 +49206,7 @@ pplx::task>> DefaultApi::srcApp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTaskQueue does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetRecording does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -49869,7 +49234,7 @@ pplx::task>> DefaultApi::srcApp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksListTaskQueue: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetRecording: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -49880,7 +49245,7 @@ pplx::task>> DefaultApi::srcApp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksListTaskQueue: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetRecording: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -49889,17 +49254,13 @@ pplx::task>> DefaultApi::srcApp }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new RecordingDetailSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -49908,18 +49269,19 @@ pplx::task>> DefaultApi::srcApp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksListTaskQueue: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetRecording: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiTasksListTasks(boost::optional workspaceUuid, boost::optional taskType) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -49948,21 +49310,13 @@ pplx::task>> DefaultApi::srcAppApiTasksL } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTasks does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwin does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (workspaceUuid) - { - localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); - } - if (taskType) - { - localVarQueryParams[utility::conversions::to_string_t("task_type")] = ApiClient::parameterToString(*taskType); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -49983,7 +49337,7 @@ pplx::task>> DefaultApi::srcAppApiTasksL } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksListTasks does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwin does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50011,7 +49365,7 @@ pplx::task>> DefaultApi::srcAppApiTasksL if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksListTasks: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwin: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50022,7 +49376,7 @@ pplx::task>> DefaultApi::srcAppApiTasksL if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksListTasks: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwin: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50031,17 +49385,13 @@ pplx::task>> DefaultApi::srcAppApiTasksL }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new TwinSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -50050,25 +49400,20 @@ pplx::task>> DefaultApi::srcAppApiTasksL else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksListTasks: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwin: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTasksUpdateTask(utility::string_t uuid, std::shared_ptr updateTaskSchema) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinActionStatus(utility::string_t uuid, utility::string_t actionId) const { - // verify the required parameter 'updateTaskSchema' is set - if (updateTaskSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'updateTaskSchema' when calling DefaultApi->srcAppApiTasksUpdateTask")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/tasks/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/actions/{action_id}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("action_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(actionId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -50097,13 +49442,12 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksUpdateTask does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinActionStatus does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -50113,27 +49457,11 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(updateTaskSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(updateTaskSchema.get()) - { - updateTaskSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("updateTaskSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -50141,7 +49469,7 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTasksUpdateTask does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinActionStatus does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50153,7 +49481,7 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -50169,7 +49497,7 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTasksUpdateTask: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinActionStatus: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50180,7 +49508,7 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksUpdateTask: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinActionStatus: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50189,7 +49517,7 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TaskSchema()); + std::shared_ptr localVarResult(new TwinActionStatusSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -50204,20 +49532,18 @@ pplx::task> DefaultApi::srcAppApiTasksUpdateTask(uti else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTasksUpdateTask: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinActionStatus: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsCancelTwinAction(utility::string_t uuid, utility::string_t actionId) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug(utility::string_t slug) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/actions/{action_id}/cancel"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("action_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(actionId))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/by-slug"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -50246,13 +49572,16 @@ pplx::task> DefaultApi::srcAppApiTwins } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCancelTwinAction does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinBySlug does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + { + localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -50273,7 +49602,7 @@ pplx::task> DefaultApi::srcAppApiTwins } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCancelTwinAction does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinBySlug does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50285,7 +49614,7 @@ pplx::task> DefaultApi::srcAppApiTwins } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -50301,7 +49630,7 @@ pplx::task> DefaultApi::srcAppApiTwins if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsCancelTwinAction: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinBySlug: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50312,7 +49641,7 @@ pplx::task> DefaultApi::srcAppApiTwins if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsCancelTwinAction: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinBySlug: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50321,7 +49650,7 @@ pplx::task> DefaultApi::srcAppApiTwins }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinActionResponseSchema()); + std::shared_ptr localVarResult(new TwinSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -50336,24 +49665,19 @@ pplx::task> DefaultApi::srcAppApiTwins else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsCancelTwinAction: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinBySlug: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std::shared_ptr twinCreateSchema) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinCalibration(utility::string_t uuid) const { - // verify the required parameter 'twinCreateSchema' is set - if (twinCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinCreateSchema' when calling DefaultApi->srcAppApiTwinsCreateTwin")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/calibration"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -50382,13 +49706,12 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCreateTwin does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinCalibration does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -50398,27 +49721,11 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(twinCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(twinCreateSchema.get()) - { - twinCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -50426,7 +49733,7 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsCreateTwin does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinCalibration does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50438,7 +49745,7 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -50454,7 +49761,7 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsCreateTwin: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinCalibration: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50465,7 +49772,7 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsCreateTwin: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinCalibration: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50474,7 +49781,7 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinSchema()); + std::shared_ptr localVarResult(new TwinJointCalibrationSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -50489,18 +49796,18 @@ pplx::task> DefaultApi::srcAppApiTwinsCreateTwin(std else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsCreateTwin: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinCalibration: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiTwinsGetTwinConnectionHistory(utility::string_t uuid, boost::optional limit) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/connection-history"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -50509,6 +49816,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) co std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -50529,13 +49837,17 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) co } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwin does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinConnectionHistory does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -50556,7 +49868,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) co } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwin does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinConnectionHistory does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50568,7 +49880,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) co } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -50584,7 +49896,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) co if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwin: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinConnectionHistory: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50595,7 +49907,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) co if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwin: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinConnectionHistory: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50604,15 +49916,37 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwin(utility::string_t uuid) co }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::vector> localVarResult; + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinConnectionHistory: unsupported response type")); + } + + return localVarResult; }); } -pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string_t uuid, boost::optional robotType) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinDriverLogs(utility::string_t uuid, boost::optional limit, boost::optional offset) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/calibration"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/logs"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -50621,6 +49955,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -50641,16 +49976,20 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwinCalibration does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinDriverLogs does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (robotType) + if (limit) { - localVarQueryParams[utility::conversions::to_string_t("robot_type")] = ApiClient::parameterToString(*robotType); + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + } + if (offset) + { + localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); } std::shared_ptr localVarHttpBody; @@ -50672,7 +50011,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsDeleteTwinCalibration does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinDriverLogs does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50684,7 +50023,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -50700,7 +50039,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwinCalibration: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinDriverLogs: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50711,7 +50050,7 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsDeleteTwinCalibration: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinDriverLogs: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50720,15 +50059,33 @@ pplx::task DefaultApi::srcAppApiTwinsDeleteTwinCalibration(utility::string }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new TwinDriverLogsResponseSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinDriverLogs: unsupported response type")); + } + + return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsEnsureTwinControllerPolicy(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiTwinsGetTwinLatestFrame(utility::string_t uuid, boost::optional mock, boost::optional sensorId, boost::optional sourceType, boost::optional frameBucket) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/ensure-controller-policy"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/latest-frame"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -50737,7 +50094,6 @@ pplx::task> DefaultApi::sr std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -50758,13 +50114,29 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsEnsureTwinControllerPolicy does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestFrame does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (mock) + { + localVarQueryParams[utility::conversions::to_string_t("mock")] = ApiClient::parameterToString(*mock); + } + if (sensorId) + { + localVarQueryParams[utility::conversions::to_string_t("sensor_id")] = ApiClient::parameterToString(*sensorId); + } + if (sourceType) + { + localVarQueryParams[utility::conversions::to_string_t("source_type")] = ApiClient::parameterToString(*sourceType); + } + if (frameBucket) + { + localVarQueryParams[utility::conversions::to_string_t("frame_bucket")] = ApiClient::parameterToString(*frameBucket); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -50785,7 +50157,7 @@ pplx::task> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsEnsureTwinControllerPolicy does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestFrame does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50797,7 +50169,7 @@ pplx::task> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -50813,7 +50185,7 @@ pplx::task> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsEnsureTwinControllerPolicy: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestFrame: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50824,7 +50196,7 @@ pplx::task> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsEnsureTwinControllerPolicy: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestFrame: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50833,39 +50205,15 @@ pplx::task> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new EnsureControllerPolicyResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsEnsureTwinControllerPolicy: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiTwinsExecuteTwinAction(utility::string_t uuid, std::shared_ptr twinActionRequestSchema) const +pplx::task DefaultApi::srcAppApiTwinsGetTwinLatestMetrics(utility::string_t uuid) const { - // verify the required parameter 'twinActionRequestSchema' is set - if (twinActionRequestSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinActionRequestSchema' when calling DefaultApi->srcAppApiTwinsExecuteTwinAction")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/actions"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/metrics/latest"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -50874,7 +50222,6 @@ pplx::task> DefaultApi::srcAppApiTwins std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -50895,13 +50242,12 @@ pplx::task> DefaultApi::srcAppApiTwins } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsExecuteTwinAction does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -50911,27 +50257,11 @@ pplx::task> DefaultApi::srcAppApiTwins if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(twinActionRequestSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(twinActionRequestSchema.get()) - { - twinActionRequestSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinActionRequestSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -50939,7 +50269,7 @@ pplx::task> DefaultApi::srcAppApiTwins } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsExecuteTwinAction does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -50951,7 +50281,7 @@ pplx::task> DefaultApi::srcAppApiTwins } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -50967,7 +50297,7 @@ pplx::task> DefaultApi::srcAppApiTwins if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsExecuteTwinAction: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestMetrics: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -50978,7 +50308,7 @@ pplx::task> DefaultApi::srcAppApiTwins if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsExecuteTwinAction: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestMetrics: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -50987,34 +50317,16 @@ pplx::task> DefaultApi::srcAppApiTwins }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinActionResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsExecuteTwinAction: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiTwinsGetRecording(utility::string_t recordingUuid) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinLatestTrack(utility::string_t uuid, boost::optional sensorId, boost::optional audioFormat) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/recordings/{recording_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("recording_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(recordingUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/latest-track"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -51043,13 +50355,21 @@ pplx::task> DefaultApi::srcAppApiTwinsGet } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetRecording does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestTrack does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (sensorId) + { + localVarQueryParams[utility::conversions::to_string_t("sensor_id")] = ApiClient::parameterToString(*sensorId); + } + if (audioFormat) + { + localVarQueryParams[utility::conversions::to_string_t("audio_format")] = ApiClient::parameterToString(*audioFormat); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -51070,7 +50390,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGet } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetRecording does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestTrack does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -51098,7 +50418,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGet if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetRecording: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestTrack: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -51109,7 +50429,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGet if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetRecording: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestTrack: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -51118,7 +50438,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGet }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RecordingDetailSchema()); + std::shared_ptr localVarResult(new TwinLatestTrackSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -51133,18 +50453,18 @@ pplx::task> DefaultApi::srcAppApiTwinsGet else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetRecording: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestTrack: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinLinks(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/links"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -51174,7 +50494,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utilit } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwin does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLinks does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -51201,7 +50521,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utilit } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwin does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLinks does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -51229,7 +50549,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utilit if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwin: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLinks: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -51240,7 +50560,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utilit if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwin: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLinks: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -51249,13 +50569,17 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utilit }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinSchema()); + std::vector localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + utility::string_t localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -51264,20 +50588,19 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwin(utilit else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwin: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLinks: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsGetTwinActionStatus(utility::string_t uuid, utility::string_t actionId) const +pplx::task>> DefaultApi::srcAppApiTwinsGetTwinMetrics(utility::string_t uuid, boost::optional start, boost::optional end, boost::optional limit) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/actions/{action_id}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/metrics"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("action_id") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(actionId))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -51306,13 +50629,25 @@ pplx::task> DefaultApi::srcAppApiTwinsGe } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinActionStatus does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMetrics does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (start) + { + localVarQueryParams[utility::conversions::to_string_t("start")] = ApiClient::parameterToString(*start); + } + if (end) + { + localVarQueryParams[utility::conversions::to_string_t("end")] = ApiClient::parameterToString(*end); + } + if (limit) + { + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -51333,7 +50668,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGe } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinActionStatus does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMetrics does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -51361,7 +50696,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGe if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinActionStatus: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMetrics: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -51372,7 +50707,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGe if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinActionStatus: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMetrics: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -51381,13 +50716,17 @@ pplx::task> DefaultApi::srcAppApiTwinsGe }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinActionStatusSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -51396,18 +50735,19 @@ pplx::task> DefaultApi::srcAppApiTwinsGe else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinActionStatus: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMetrics: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug(utility::string_t slug) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinMotions(utility::string_t uuid, boost::optional environmentUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/by-slug"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/motions"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -51436,15 +50776,16 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug( } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinBySlug does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMotions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (environmentUuid) { - localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); + localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); } std::shared_ptr localVarHttpBody; @@ -51466,7 +50807,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug( } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinBySlug does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMotions does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -51494,7 +50835,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug( if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinBySlug: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMotions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -51505,7 +50846,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug( if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinBySlug: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMotions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -51514,7 +50855,7 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug( }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinSchema()); + std::shared_ptr localVarResult(new TwinMotionResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -51529,18 +50870,18 @@ pplx::task> DefaultApi::srcAppApiTwinsGetTwinBySlug( else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinBySlug: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMotions: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsGetTwinCalibration(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiTwinsGetTwinNotebook(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/calibration"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/notebook.ipynb"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -51549,7 +50890,6 @@ pplx::task> DefaultApi::srcAppApiTwi std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -51570,7 +50910,7 @@ pplx::task> DefaultApi::srcAppApiTwi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinCalibration does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinNotebook does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -51597,17 +50937,9 @@ pplx::task> DefaultApi::srcAppApiTwi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinCalibration does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinNotebook does not consume any supported media type")); } - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) @@ -51625,7 +50957,7 @@ pplx::task> DefaultApi::srcAppApiTwi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinCalibration: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinNotebook: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -51636,7 +50968,7 @@ pplx::task> DefaultApi::srcAppApiTwi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinCalibration: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinNotebook: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -51645,33 +50977,15 @@ pplx::task> DefaultApi::srcAppApiTwi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinJointCalibrationSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinCalibration: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task>> DefaultApi::srcAppApiTwinsGetTwinConnectionHistory(utility::string_t uuid, boost::optional limit) const +pplx::task>> DefaultApi::srcAppApiTwinsGetTwinRecordings(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/connection-history"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/recordings"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -51701,17 +51015,13 @@ pplx::task>> DefaultApi:: } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinConnectionHistory does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRecordings does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -51732,7 +51042,7 @@ pplx::task>> DefaultApi:: } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinConnectionHistory does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRecordings does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -51760,7 +51070,7 @@ pplx::task>> DefaultApi:: if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinConnectionHistory: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRecordings: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -51771,7 +51081,7 @@ pplx::task>> DefaultApi:: if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinConnectionHistory: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRecordings: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -51799,18 +51109,18 @@ pplx::task>> DefaultApi:: else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinConnectionHistory: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRecordings: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsGetTwinDriverLogs(utility::string_t uuid, boost::optional limit, boost::optional offset) const +pplx::task>> DefaultApi::srcAppApiTwinsGetTwinRelationships(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/logs"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/relationships"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -51840,21 +51150,13 @@ pplx::task> DefaultApi::srcAppApiT } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinDriverLogs does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRelationships does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } - if (offset) - { - localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -51875,7 +51177,7 @@ pplx::task> DefaultApi::srcAppApiT } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinDriverLogs does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRelationships does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -51903,1733 +51205,7 @@ pplx::task> DefaultApi::srcAppApiT if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinDriverLogs: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinDriverLogs: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new TwinDriverLogsResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinDriverLogs: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task DefaultApi::srcAppApiTwinsGetTwinLatestFrame(utility::string_t uuid, boost::optional mock, boost::optional sensorId, boost::optional sourceType, boost::optional frameBucket) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/latest-frame"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestFrame does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (mock) - { - localVarQueryParams[utility::conversions::to_string_t("mock")] = ApiClient::parameterToString(*mock); - } - if (sensorId) - { - localVarQueryParams[utility::conversions::to_string_t("sensor_id")] = ApiClient::parameterToString(*sensorId); - } - if (sourceType) - { - localVarQueryParams[utility::conversions::to_string_t("source_type")] = ApiClient::parameterToString(*sourceType); - } - if (frameBucket) - { - localVarQueryParams[utility::conversions::to_string_t("frame_bucket")] = ApiClient::parameterToString(*frameBucket); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestFrame does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestFrame: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestFrame: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task DefaultApi::srcAppApiTwinsGetTwinLatestMetrics(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/metrics/latest"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestMetrics does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestMetrics does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestMetrics: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestMetrics: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task> DefaultApi::srcAppApiTwinsGetTwinLatestTrack(utility::string_t uuid, boost::optional sensorId, boost::optional audioFormat) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/latest-track"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestTrack does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (sensorId) - { - localVarQueryParams[utility::conversions::to_string_t("sensor_id")] = ApiClient::parameterToString(*sensorId); - } - if (audioFormat) - { - localVarQueryParams[utility::conversions::to_string_t("audio_format")] = ApiClient::parameterToString(*audioFormat); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLatestTrack does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestTrack: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestTrack: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new TwinLatestTrackSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLatestTrack: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiTwinsGetTwinLinks(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/links"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLinks does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinLinks does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLinks: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLinks: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::vector localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - utility::string_t localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinLinks: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task>> DefaultApi::srcAppApiTwinsGetTwinMetrics(utility::string_t uuid, boost::optional start, boost::optional end, boost::optional limit) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/metrics"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMetrics does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (start) - { - localVarQueryParams[utility::conversions::to_string_t("start")] = ApiClient::parameterToString(*start); - } - if (end) - { - localVarQueryParams[utility::conversions::to_string_t("end")] = ApiClient::parameterToString(*end); - } - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMetrics does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMetrics: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMetrics: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::vector> localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMetrics: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiTwinsGetTwinMotions(utility::string_t uuid, boost::optional environmentUuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/motions"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMotions does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (environmentUuid) - { - localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinMotions does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMotions: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMotions: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new TwinMotionResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinMotions: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task DefaultApi::srcAppApiTwinsGetTwinNotebook(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/notebook.ipynb"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinNotebook does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinNotebook does not consume any supported media type")); - } - - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinNotebook: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinNotebook: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task>> DefaultApi::srcAppApiTwinsGetTwinRecordings(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/recordings"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRecordings does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRecordings does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRecordings: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRecordings: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::vector> localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRecordings: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task>> DefaultApi::srcAppApiTwinsGetTwinRelationships(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/relationships"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRelationships does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinRelationships does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRelationships: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRelationships: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::vector> localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRelationships: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiTwinsGetTwinTelemetry(utility::string_t uuid, boost::optional start, boost::optional end, boost::optional eventTypes, boost::optional limit, boost::optional offset) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/telemetry"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinTelemetry does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (start) - { - localVarQueryParams[utility::conversions::to_string_t("start")] = ApiClient::parameterToString(*start); - } - if (end) - { - localVarQueryParams[utility::conversions::to_string_t("end")] = ApiClient::parameterToString(*end); - } - if (eventTypes) - { - localVarQueryParams[utility::conversions::to_string_t("event_types")] = ApiClient::parameterToString(*eventTypes); - } - if (limit) - { - localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); - } - if (offset) - { - localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinTelemetry does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinTelemetry: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinTelemetry: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new TwinTelemetryQueryResponseSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinTelemetry: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task>> DefaultApi::srcAppApiTwinsGetTwinUniversalSchemaAtPath(utility::string_t uuid, boost::optional path) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/universal-schema/at"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinUniversalSchemaAtPath does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - if (path) - { - localVarQueryParams[utility::conversions::to_string_t("path")] = ApiClient::parameterToString(*path); - } - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinUniversalSchemaAtPath does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinUniversalSchemaAtPath: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinUniversalSchemaAtPath: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::map> localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - for( auto& localVarItem : localVarJson.as_object() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinUniversalSchemaAtPath: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task DefaultApi::srcAppApiTwinsLinkOccupancyMap(utility::string_t uuid, std::shared_ptr occupancyMapCreateSchema) const -{ - - // verify the required parameter 'occupancyMapCreateSchema' is set - if (occupancyMapCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'occupancyMapCreateSchema' when calling DefaultApi->srcAppApiTwinsLinkOccupancyMap")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/occupancy-map"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsLinkOccupancyMap does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(occupancyMapCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(occupancyMapCreateSchema.get()) - { - occupancyMapCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("occupancyMapCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsLinkOccupancyMap does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsLinkOccupancyMap: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsLinkOccupancyMap: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task>> DefaultApi::srcAppApiTwinsListAllTwins() const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListAllTwins does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListAllTwins does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsListAllTwins: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRelationships: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -53640,7 +51216,7 @@ pplx::task>> DefaultApi::srcAppApiTwinsL if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsListAllTwins: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRelationships: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -53649,14 +51225,14 @@ pplx::task>> DefaultApi::srcAppApiTwinsL }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -53668,18 +51244,18 @@ pplx::task>> DefaultApi::srcAppApiTwinsL else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsListAllTwins: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinRelationships: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiTwinsListTwinSpatialFilterZones(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTwinsGetTwinTelemetry(utility::string_t uuid, boost::optional start, boost::optional end, boost::optional eventTypes, boost::optional limit, boost::optional offset) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/spatial-filter-zones"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/telemetry"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -53709,156 +51285,34 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListTwinSpatialFilterZones does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinTelemetry does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListTwinSpatialFilterZones does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsListTwinSpatialFilterZones: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsListTwinSpatialFilterZones: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::vector> localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsListTwinSpatialFilterZones: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task>> DefaultApi::srcAppApiTwinsPatchTwinUniversalSchema(utility::string_t uuid, std::shared_ptr twinUniversalSchemaPatchSchema) const -{ - - // verify the required parameter 'twinUniversalSchemaPatchSchema' is set - if (twinUniversalSchemaPatchSchema == nullptr) + if (start) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinUniversalSchemaPatchSchema' when calling DefaultApi->srcAppApiTwinsPatchTwinUniversalSchema")); + localVarQueryParams[utility::conversions::to_string_t("start")] = ApiClient::parameterToString(*start); } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/universal-schema"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) + if (end) { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + localVarQueryParams[utility::conversions::to_string_t("end")] = ApiClient::parameterToString(*end); } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + if (eventTypes) { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + localVarQueryParams[utility::conversions::to_string_t("event_types")] = ApiClient::parameterToString(*eventTypes); } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + if (limit) { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + localVarQueryParams[utility::conversions::to_string_t("limit")] = ApiClient::parameterToString(*limit); } - else + if (offset) { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsPatchTwinUniversalSchema does not produce any supported media type")); + localVarQueryParams[utility::conversions::to_string_t("offset")] = ApiClient::parameterToString(*offset); } - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -53866,27 +51320,11 @@ pplx::task>> DefaultApi::sr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(twinUniversalSchemaPatchSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(twinUniversalSchemaPatchSchema.get()) - { - twinUniversalSchemaPatchSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinUniversalSchemaPatchSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -53894,7 +51332,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsPatchTwinUniversalSchema does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinTelemetry does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -53906,7 +51344,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -53922,7 +51360,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsPatchTwinUniversalSchema: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinTelemetry: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -53933,7 +51371,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsPatchTwinUniversalSchema: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinTelemetry: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -53942,18 +51380,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::shared_ptr localVarResult(new TwinTelemetryQueryResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_object() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -53962,18 +51395,18 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsPatchTwinUniversalSchema: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinTelemetry: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiTwinsReloadTwinCapabilities(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiTwinsGetTwinUniversalSchemaAtPath(utility::string_t uuid, boost::optional path) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/reload-capabilities"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/universal-schema/at"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -54003,156 +51436,18 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinCapabilities does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinUniversalSchemaAtPath does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinCapabilities does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinCapabilities: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinCapabilities: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::map> localVarResult; - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - for( auto& localVarItem : localVarJson.as_object() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinCapabilities: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task>> DefaultApi::srcAppApiTwinsReloadTwinsCapabilitiesBulk(std::shared_ptr reloadCapabilitiesBulkSchema) const -{ - - // verify the required parameter 'reloadCapabilitiesBulkSchema' is set - if (reloadCapabilitiesBulkSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'reloadCapabilitiesBulkSchema' when calling DefaultApi->srcAppApiTwinsReloadTwinsCapabilitiesBulk")); - } - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/reload-capabilities"); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else + if (path) { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinsCapabilitiesBulk does not produce any supported media type")); + localVarQueryParams[utility::conversions::to_string_t("path")] = ApiClient::parameterToString(*path); } - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -54160,27 +51455,11 @@ pplx::task>> DefaultApi::sr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(reloadCapabilitiesBulkSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(reloadCapabilitiesBulkSchema.get()) - { - reloadCapabilitiesBulkSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("reloadCapabilitiesBulkSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -54188,7 +51467,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinsCapabilitiesBulk does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsGetTwinUniversalSchemaAtPath does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -54200,7 +51479,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -54216,7 +51495,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinsCapabilitiesBulk: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinUniversalSchemaAtPath: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -54227,7 +51506,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinsCapabilitiesBulk: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinUniversalSchemaAtPath: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -54256,155 +51535,24 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinsCapabilitiesBulk: unsupported response type")); - } - - return localVarResult; - }); -} -pplx::task> DefaultApi::srcAppApiTwinsRestoreTwin(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/restore"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsRestoreTwin does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsRestoreTwin does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsRestoreTwin: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsRestoreTwin: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - std::shared_ptr localVarResult(new TwinSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsRestoreTwin: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsGetTwinUniversalSchemaAtPath: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverSchema(utility::string_t uuid, std::shared_ptr twinDriverSchemaSetSchema) const +pplx::task DefaultApi::srcAppApiTwinsLinkOccupancyMap(utility::string_t uuid, std::shared_ptr occupancyMapCreateSchema) const { - // verify the required parameter 'twinDriverSchemaSetSchema' is set - if (twinDriverSchemaSetSchema == nullptr) + // verify the required parameter 'occupancyMapCreateSchema' is set + if (occupancyMapCreateSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinDriverSchemaSetSchema' when calling DefaultApi->srcAppApiTwinsSetTwinDriverSchema")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'occupancyMapCreateSchema' when calling DefaultApi->srcAppApiTwinsLinkOccupancyMap")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/driver-schema"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/occupancy-map"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -54413,7 +51561,6 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -54434,7 +51581,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSetTwinDriverSchema does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsLinkOccupancyMap does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -54452,7 +51599,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(twinDriverSchemaSetSchema); + localVarJson = ModelBase::toJson(occupancyMapCreateSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -54463,9 +51610,9 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(twinDriverSchemaSetSchema.get()) + if(occupancyMapCreateSchema.get()) { - twinDriverSchemaSetSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinDriverSchemaSetSchema")); + occupancyMapCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("occupancyMapCreateSchema")); } @@ -54478,7 +51625,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSetTwinDriverSchema does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsLinkOccupancyMap does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -54506,7 +51653,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsSetTwinDriverSchema: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsLinkOccupancyMap: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -54517,7 +51664,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsSetTwinDriverSchema: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsLinkOccupancyMap: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -54526,34 +51673,15 @@ pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverS }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsSetTwinDriverSchema: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiTwinsSyncTwinWithAsset(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiTwinsListAllTwins() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/sync-with-asset"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -54582,7 +51710,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSyncT } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWithAsset does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListAllTwins does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -54609,7 +51737,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSyncT } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWithAsset does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListAllTwins does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -54621,7 +51749,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSyncT } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -54637,7 +51765,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSyncT if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWithAsset: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsListAllTwins: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -54648,7 +51776,7 @@ pplx::task> DefaultApi::srcAppApiTwinsSyncT if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWithAsset: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsListAllTwins: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -54657,13 +51785,17 @@ pplx::task> DefaultApi::srcAppApiTwinsSyncT }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new SyncWithAssetSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -54672,18 +51804,18 @@ pplx::task> DefaultApi::srcAppApiTwinsSyncT else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWithAsset: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsListAllTwins: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsSyncTwinWorkflows(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiTwinsListTwinSpatialFilterZones(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/sync-workflows"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/spatial-filter-zones"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -54713,7 +51845,7 @@ pplx::task> DefaultApi::srcAppA } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWorkflows does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListTwinSpatialFilterZones does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -54740,7 +51872,7 @@ pplx::task> DefaultApi::srcAppA } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWorkflows does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsListTwinSpatialFilterZones does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -54752,7 +51884,7 @@ pplx::task> DefaultApi::srcAppA } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -54768,7 +51900,7 @@ pplx::task> DefaultApi::srcAppA if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWorkflows: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsListTwinSpatialFilterZones: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -54779,7 +51911,7 @@ pplx::task> DefaultApi::srcAppA if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWorkflows: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsListTwinSpatialFilterZones: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -54788,13 +51920,17 @@ pplx::task> DefaultApi::srcAppA }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinSyncWorkflowsResponseSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -54803,24 +51939,24 @@ pplx::task> DefaultApi::srcAppA else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWorkflows: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsListTwinSpatialFilterZones: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(utility::string_t uuid, std::shared_ptr twinCreateSchema) const +pplx::task>> DefaultApi::srcAppApiTwinsPatchTwinUniversalSchema(utility::string_t uuid, std::shared_ptr twinUniversalSchemaPatchSchema) const { - // verify the required parameter 'twinCreateSchema' is set - if (twinCreateSchema == nullptr) + // verify the required parameter 'twinUniversalSchemaPatchSchema' is set + if (twinUniversalSchemaPatchSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinCreateSchema' when calling DefaultApi->srcAppApiTwinsUpdateTwin")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinUniversalSchemaPatchSchema' when calling DefaultApi->srcAppApiTwinsPatchTwinUniversalSchema")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/universal-schema"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -54850,7 +51986,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwin does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsPatchTwinUniversalSchema does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -54868,7 +52004,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(twinCreateSchema); + localVarJson = ModelBase::toJson(twinUniversalSchemaPatchSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -54879,9 +52015,9 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(twinCreateSchema.get()) + if(twinUniversalSchemaPatchSchema.get()) { - twinCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinCreateSchema")); + twinUniversalSchemaPatchSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinUniversalSchemaPatchSchema")); } @@ -54894,7 +52030,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwin does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsPatchTwinUniversalSchema does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -54906,7 +52042,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -54922,7 +52058,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwin: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsPatchTwinUniversalSchema: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -54933,7 +52069,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwin: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsPatchTwinUniversalSchema: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -54942,13 +52078,18 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinSchema()); + std::map> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_object() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -54957,25 +52098,160 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(uti else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwin: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsPatchTwinUniversalSchema: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinCalibration(utility::string_t uuid, std::shared_ptr twinJointCalibrationSchema) const +pplx::task>> DefaultApi::srcAppApiTwinsReloadTwinCapabilities(utility::string_t uuid) const { - // verify the required parameter 'twinJointCalibrationSchema' is set - if (twinJointCalibrationSchema == nullptr) + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/reload-capabilities"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinJointCalibrationSchema' when calling DefaultApi->srcAppApiTwinsUpdateTwinCalibration")); + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinCapabilities does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinCapabilities does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinCapabilities: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinCapabilities: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::map> localVarResult; + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + for( auto& localVarItem : localVarJson.as_object() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinCapabilities: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task>> DefaultApi::srcAppApiTwinsReloadTwinsCapabilitiesBulk(std::shared_ptr reloadCapabilitiesBulkSchema) const +{ + + // verify the required parameter 'reloadCapabilitiesBulkSchema' is set + if (reloadCapabilitiesBulkSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'reloadCapabilitiesBulkSchema' when calling DefaultApi->srcAppApiTwinsReloadTwinsCapabilitiesBulk")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/calibration"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/reload-capabilities"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -55004,7 +52280,7 @@ pplx::task> DefaultApi::srcAppApiTwi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinCalibration does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinsCapabilitiesBulk does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -55022,7 +52298,7 @@ pplx::task> DefaultApi::srcAppApiTwi localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(twinJointCalibrationSchema); + localVarJson = ModelBase::toJson(reloadCapabilitiesBulkSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -55033,9 +52309,9 @@ pplx::task> DefaultApi::srcAppApiTwi localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(twinJointCalibrationSchema.get()) + if(reloadCapabilitiesBulkSchema.get()) { - twinJointCalibrationSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinJointCalibrationSchema")); + reloadCapabilitiesBulkSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("reloadCapabilitiesBulkSchema")); } @@ -55048,7 +52324,7 @@ pplx::task> DefaultApi::srcAppApiTwi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinCalibration does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsReloadTwinsCapabilitiesBulk does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -55076,7 +52352,7 @@ pplx::task> DefaultApi::srcAppApiTwi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinCalibration: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinsCapabilitiesBulk: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -55087,7 +52363,7 @@ pplx::task> DefaultApi::srcAppApiTwi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinCalibration: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinsCapabilitiesBulk: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -55096,13 +52372,18 @@ pplx::task> DefaultApi::srcAppApiTwi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new TwinJointCalibrationSchema()); + std::map> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_object() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -55111,24 +52392,18 @@ pplx::task> DefaultApi::srcAppApiTwi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinCalibration: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsReloadTwinsCapabilitiesBulk: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinState(utility::string_t uuid, std::shared_ptr twinStateUpdateSchema) const +pplx::task> DefaultApi::srcAppApiTwinsRestoreTwin(utility::string_t uuid) const { - // verify the required parameter 'twinStateUpdateSchema' is set - if (twinStateUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinStateUpdateSchema' when calling DefaultApi->srcAppApiTwinsUpdateTwinState")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/state"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/restore"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -55158,13 +52433,12 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinStat } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinState does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsRestoreTwin does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -55174,27 +52448,11 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinStat if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(twinStateUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(twinStateUpdateSchema.get()) - { - twinStateUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinStateUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -55202,7 +52460,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinStat } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinState does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsRestoreTwin does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -55214,7 +52472,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinStat } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -55230,7 +52488,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinStat if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinState: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsRestoreTwin: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -55241,7 +52499,7 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinStat if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinState: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsRestoreTwin: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -55265,24 +52523,24 @@ pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinStat else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinState: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsRestoreTwin: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfCompleteLargeUrdfZipUpload(utility::string_t uuid, std::shared_ptr completeLargeUploadSchema) const +pplx::task> DefaultApi::srcAppApiTwinsSetTwinDriverSchema(utility::string_t uuid, std::shared_ptr twinDriverSchemaSetSchema) const { - // verify the required parameter 'completeLargeUploadSchema' is set - if (completeLargeUploadSchema == nullptr) + // verify the required parameter 'twinDriverSchemaSetSchema' is set + if (twinDriverSchemaSetSchema == nullptr) { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'completeLargeUploadSchema' when calling DefaultApi->srcAppApiUrdfCompleteLargeUrdfZipUpload")); + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinDriverSchemaSetSchema' when calling DefaultApi->srcAppApiTwinsSetTwinDriverSchema")); } std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/complete-large-zip-upload"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/driver-schema"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -55312,7 +52570,7 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCompleteLargeUrdfZipUpload does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSetTwinDriverSchema does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -55330,7 +52588,7 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - localVarJson = ModelBase::toJson(completeLargeUploadSchema); + localVarJson = ModelBase::toJson(twinDriverSchemaSetSchema); localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); @@ -55341,9 +52599,9 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(completeLargeUploadSchema.get()) + if(twinDriverSchemaSetSchema.get()) { - completeLargeUploadSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("completeLargeUploadSchema")); + twinDriverSchemaSetSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinDriverSchemaSetSchema")); } @@ -55356,7 +52614,7 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCompleteLargeUrdfZipUpload does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSetTwinDriverSchema does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -55384,7 +52642,7 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfCompleteLargeUrdfZipUpload: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsSetTwinDriverSchema: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -55395,7 +52653,7 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfCompleteLargeUrdfZipUpload: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsSetTwinDriverSchema: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -55404,7 +52662,7 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new URDFProjectSchema()); + std::shared_ptr localVarResult(new TwinSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -55419,24 +52677,19 @@ pplx::task> DefaultApi::srcAppApiUrdfComplete else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfCompleteLargeUrdfZipUpload: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsSetTwinDriverSchema: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfCreateUrdfProject(std::shared_ptr uRDFProjectCreateSchema) const +pplx::task> DefaultApi::srcAppApiTwinsSyncTwinWithAsset(utility::string_t uuid) const { - // verify the required parameter 'uRDFProjectCreateSchema' is set - if (uRDFProjectCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'uRDFProjectCreateSchema' when calling DefaultApi->srcAppApiUrdfCreateUrdfProject")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/sync-with-asset"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -55465,13 +52718,12 @@ pplx::task> DefaultApi::srcAppApiUrdfCreateUr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCreateUrdfProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWithAsset does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -55481,27 +52733,11 @@ pplx::task> DefaultApi::srcAppApiUrdfCreateUr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(uRDFProjectCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(uRDFProjectCreateSchema.get()) - { - uRDFProjectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("uRDFProjectCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -55509,7 +52745,7 @@ pplx::task> DefaultApi::srcAppApiUrdfCreateUr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCreateUrdfProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWithAsset does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -55537,7 +52773,7 @@ pplx::task> DefaultApi::srcAppApiUrdfCreateUr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfCreateUrdfProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWithAsset: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -55548,7 +52784,7 @@ pplx::task> DefaultApi::srcAppApiUrdfCreateUr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfCreateUrdfProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWithAsset: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -55557,7 +52793,7 @@ pplx::task> DefaultApi::srcAppApiUrdfCreateUr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new URDFProjectSchema()); + std::shared_ptr localVarResult(new SyncWithAssetSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -55572,130 +52808,18 @@ pplx::task> DefaultApi::srcAppApiUrdfCreateUr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfCreateUrdfProject: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWithAsset: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiUrdfDeleteUrdfProject(utility::string_t uuid) const -{ - - - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - - std::map localVarQueryParams; - std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); - std::map localVarFormParams; - std::map> localVarFileParams; - - std::unordered_set localVarResponseHttpContentTypes; - - utility::string_t localVarResponseHttpContentType; - - // use JSON if possible - if ( localVarResponseHttpContentTypes.size() == 0 ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // JSON - else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else - { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfDeleteUrdfProject does not produce any supported media type")); - } - - localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; - - std::unordered_set localVarConsumeHttpContentTypes; - - - std::shared_ptr localVarHttpBody; - utility::string_t localVarRequestHttpContentType; - - // use JSON if possible - if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - } - // multipart formdata - else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - } - else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) - { - localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); - } - else - { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfDeleteUrdfProject does not consume any supported media type")); - } - - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) - .then([=, this](web::http::http_response localVarResponse) - { - if (m_ApiClient->getResponseHandler()) - { - m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); - } - - // 1xx - informational : OK - // 2xx - successful : OK - // 3xx - redirection : OK - // 4xx - client error : not OK - // 5xx - client error : not OK - if (localVarResponse.status_code() >= 400) - { - throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfDeleteUrdfProject: ") + localVarResponse.reason_phrase() - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - - // check response content type - if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) - { - utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; - if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfDeleteUrdfProject: unexpected response type: ") + localVarContentType - , std::make_shared(localVarResponse.extract_utf8string(true).get())); - } - } - - return localVarResponse.extract_string(); - }) - .then([=, this](utility::string_t localVarResponse) - { - return void(); - }); -} -pplx::task> DefaultApi::srcAppApiUrdfFixUrdfProjectSlug(utility::string_t uuid, utility::string_t newSlug, utility::string_t newMainFilePath) const +pplx::task> DefaultApi::srcAppApiTwinsSyncTwinWorkflows(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/fix-slug"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/sync-workflows"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -55725,19 +52849,13 @@ pplx::task> DefaultApi::srcAppApiUrdfFixUrdfP } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfFixUrdfProjectSlug does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWorkflows does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - { - localVarQueryParams[utility::conversions::to_string_t("new_slug")] = ApiClient::parameterToString(newSlug); - } - { - localVarQueryParams[utility::conversions::to_string_t("new_main_file_path")] = ApiClient::parameterToString(newMainFilePath); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -55758,7 +52876,7 @@ pplx::task> DefaultApi::srcAppApiUrdfFixUrdfP } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfFixUrdfProjectSlug does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsSyncTwinWorkflows does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -55786,7 +52904,7 @@ pplx::task> DefaultApi::srcAppApiUrdfFixUrdfP if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfFixUrdfProjectSlug: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWorkflows: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -55797,7 +52915,7 @@ pplx::task> DefaultApi::srcAppApiUrdfFixUrdfP if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfFixUrdfProjectSlug: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWorkflows: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -55806,7 +52924,7 @@ pplx::task> DefaultApi::srcAppApiUrdfFixUrdfP }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new URDFProjectSchema()); + std::shared_ptr localVarResult(new TwinSyncWorkflowsResponseSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -55821,20 +52939,25 @@ pplx::task> DefaultApi::srcAppApiUrdfFixUrdfP else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfFixUrdfProjectSlug: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsSyncTwinWorkflows: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfGetTwinJointState(utility::string_t uuid, utility::string_t jointName) const +pplx::task> DefaultApi::srcAppApiTwinsUpdateTwin(utility::string_t uuid, std::shared_ptr twinCreateSchema) const { + // verify the required parameter 'twinCreateSchema' is set + if (twinCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinCreateSchema' when calling DefaultApi->srcAppApiTwinsUpdateTwin")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joints/{joint_name}/state"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("joint_name") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(jointName))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -55863,12 +52986,13 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointState does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwin does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -55878,11 +53002,27 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(twinCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(twinCreateSchema.get()) + { + twinCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -55890,7 +53030,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointState does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwin does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -55902,7 +53042,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -55918,7 +53058,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointState: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwin: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -55929,7 +53069,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointState: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwin: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -55938,7 +53078,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new JointStateSchema()); + std::shared_ptr localVarResult(new TwinSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -55953,18 +53093,24 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJo else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointState: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwin: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfGetTwinJointStates(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinCalibration(utility::string_t uuid, std::shared_ptr twinJointCalibrationSchema) const { + // verify the required parameter 'twinJointCalibrationSchema' is set + if (twinJointCalibrationSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinJointCalibrationSchema' when calling DefaultApi->srcAppApiTwinsUpdateTwinCalibration")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joint_states"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/calibration"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -55994,12 +53140,13 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointStates does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinCalibration does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -56009,11 +53156,27 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(twinJointCalibrationSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(twinJointCalibrationSchema.get()) + { + twinJointCalibrationSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinJointCalibrationSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -56021,7 +53184,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointStates does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinCalibration does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -56033,7 +53196,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -56049,7 +53212,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointStates: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinCalibration: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -56060,7 +53223,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointStates: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinCalibration: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -56069,7 +53232,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new JointStatesSchema()); + std::shared_ptr localVarResult(new TwinJointCalibrationSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -56084,18 +53247,24 @@ pplx::task> DefaultApi::srcAppApiUrdfGetTwinJ else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointStates: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinCalibration: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiUrdfGetTwinJoints(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiTwinsUpdateTwinState(utility::string_t uuid, std::shared_ptr twinStateUpdateSchema) const { + // verify the required parameter 'twinStateUpdateSchema' is set + if (twinStateUpdateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'twinStateUpdateSchema' when calling DefaultApi->srcAppApiTwinsUpdateTwinState")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joints"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/state"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -56125,12 +53294,13 @@ pplx::task>> DefaultApi::srcAppApiUrdfG } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJoints does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinState does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -56140,11 +53310,27 @@ pplx::task>> DefaultApi::srcAppApiUrdfG if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(twinStateUpdateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(twinStateUpdateSchema.get()) + { + twinStateUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("twinStateUpdateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -56152,7 +53338,7 @@ pplx::task>> DefaultApi::srcAppApiUrdfG } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJoints does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiTwinsUpdateTwinState does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -56164,7 +53350,7 @@ pplx::task>> DefaultApi::srcAppApiUrdfG } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PATCH"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -56180,7 +53366,7 @@ pplx::task>> DefaultApi::srcAppApiUrdfG if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJoints: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinState: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -56191,7 +53377,7 @@ pplx::task>> DefaultApi::srcAppApiUrdfG if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJoints: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinState: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -56200,17 +53386,13 @@ pplx::task>> DefaultApi::srcAppApiUrdfG }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new TwinSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -56219,18 +53401,24 @@ pplx::task>> DefaultApi::srcAppApiUrdfG else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJoints: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiTwinsUpdateTwinState: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfGetTwinRobotDescription(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiUrdfCompleteLargeUrdfZipUpload(utility::string_t uuid, std::shared_ptr completeLargeUploadSchema) const { + // verify the required parameter 'completeLargeUploadSchema' is set + if (completeLargeUploadSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'completeLargeUploadSchema' when calling DefaultApi->srcAppApiUrdfCompleteLargeUrdfZipUpload")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/robot_description"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/complete-large-zip-upload"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -56260,12 +53448,13 @@ pplx::task> DefaultApi::srcAppApiUrdfGet } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinRobotDescription does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCompleteLargeUrdfZipUpload does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -56275,11 +53464,27 @@ pplx::task> DefaultApi::srcAppApiUrdfGet if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(completeLargeUploadSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(completeLargeUploadSchema.get()) + { + completeLargeUploadSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("completeLargeUploadSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -56287,7 +53492,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGet } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinRobotDescription does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCompleteLargeUrdfZipUpload does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -56299,7 +53504,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGet } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -56315,7 +53520,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGet if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinRobotDescription: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfCompleteLargeUrdfZipUpload: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -56326,7 +53531,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGet if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinRobotDescription: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfCompleteLargeUrdfZipUpload: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -56335,7 +53540,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGet }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new RobotDescriptionSchema()); + std::shared_ptr localVarResult(new URDFProjectSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -56350,19 +53555,24 @@ pplx::task> DefaultApi::srcAppApiUrdfGet else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinRobotDescription: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfCompleteLargeUrdfZipUpload: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiUrdfCreateUrdfProject(std::shared_ptr uRDFProjectCreateSchema) const { + // verify the required parameter 'uRDFProjectCreateSchema' is set + if (uRDFProjectCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'uRDFProjectCreateSchema' when calling DefaultApi->srcAppApiUrdfCreateUrdfProject")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/urdf"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -56377,7 +53587,7 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s // use JSON if possible if ( localVarResponseHttpContentTypes.size() == 0 ) { - localVarResponseHttpContentType = utility::conversions::to_string_t("text/plain"); + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); } // JSON else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) @@ -56389,19 +53599,15 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s { localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); } - // plain text - else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("text/plain")) != localVarResponseHttpContentTypes.end() ) - { - localVarResponseHttpContentType = utility::conversions::to_string_t("text/plain"); - } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinUrdfRaw does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCreateUrdfProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -56411,11 +53617,27 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(uRDFProjectCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(uRDFProjectCreateSchema.get()) + { + uRDFProjectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("uRDFProjectCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -56423,7 +53645,7 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinUrdfRaw does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfCreateUrdfProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -56435,7 +53657,7 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -56451,7 +53673,7 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinUrdfRaw: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfCreateUrdfProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -56462,7 +53684,7 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinUrdfRaw: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfCreateUrdfProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -56471,7 +53693,7 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s }) .then([=, this](utility::string_t localVarResponse) { - utility::string_t localVarResult(utility::conversions::to_string_t("")); + std::shared_ptr localVarResult(new URDFProjectSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -56479,10 +53701,6 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s ModelBase::fromJson(localVarJson, localVarResult); } - else if(localVarResponseHttpContentType == utility::conversions::to_string_t("text/plain")) - { - localVarResult = localVarResponse; - } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { // TODO multipart response parsing @@ -56490,13 +53708,13 @@ pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::s else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinUrdfRaw: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfCreateUrdfProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfGetUrdfProject(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiUrdfDeleteUrdfProject(utility::string_t uuid) const { @@ -56510,7 +53728,6 @@ pplx::task> DefaultApi::srcAppApiUrdfGetUrdfP std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -56531,7 +53748,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetUrdfP } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetUrdfProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfDeleteUrdfProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -56558,7 +53775,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetUrdfP } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetUrdfProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfDeleteUrdfProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -56570,7 +53787,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetUrdfP } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -56586,7 +53803,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetUrdfP if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetUrdfProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfDeleteUrdfProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -56597,7 +53814,7 @@ pplx::task> DefaultApi::srcAppApiUrdfGetUrdfP if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetUrdfProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfDeleteUrdfProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -56606,39 +53823,15 @@ pplx::task> DefaultApi::srcAppApiUrdfGetUrdfP }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new URDFProjectSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfGetUrdfProject: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiUrdfInitiateLargeUrdfZipUpload(utility::string_t uuid, std::shared_ptr initiateLargeUploadSchema) const +pplx::task> DefaultApi::srcAppApiUrdfFixUrdfProjectSlug(utility::string_t uuid, utility::string_t newSlug, utility::string_t newMainFilePath) const { - // verify the required parameter 'initiateLargeUploadSchema' is set - if (initiateLargeUploadSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'initiateLargeUploadSchema' when calling DefaultApi->srcAppApiUrdfInitiateLargeUrdfZipUpload")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/initiate-large-zip-upload"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/fix-slug"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -56668,14 +53861,19 @@ pplx::task> DefaultApi::srcAppApiUr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfInitiateLargeUrdfZipUpload does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfFixUrdfProjectSlug does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + { + localVarQueryParams[utility::conversions::to_string_t("new_slug")] = ApiClient::parameterToString(newSlug); + } + { + localVarQueryParams[utility::conversions::to_string_t("new_main_file_path")] = ApiClient::parameterToString(newMainFilePath); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -56684,27 +53882,11 @@ pplx::task> DefaultApi::srcAppApiUr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(initiateLargeUploadSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(initiateLargeUploadSchema.get()) - { - initiateLargeUploadSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("initiateLargeUploadSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -56712,7 +53894,7 @@ pplx::task> DefaultApi::srcAppApiUr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfInitiateLargeUrdfZipUpload does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfFixUrdfProjectSlug does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -56740,7 +53922,7 @@ pplx::task> DefaultApi::srcAppApiUr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfInitiateLargeUrdfZipUpload: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfFixUrdfProjectSlug: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -56751,7 +53933,7 @@ pplx::task> DefaultApi::srcAppApiUr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfInitiateLargeUrdfZipUpload: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfFixUrdfProjectSlug: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -56760,7 +53942,7 @@ pplx::task> DefaultApi::srcAppApiUr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new InitiateLargeUploadResponse()); + std::shared_ptr localVarResult(new URDFProjectSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -56775,18 +53957,20 @@ pplx::task> DefaultApi::srcAppApiUr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfInitiateLargeUrdfZipUpload: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfFixUrdfProjectSlug: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiUrdfListUrdfProjects(boost::optional assetUuid) const +pplx::task> DefaultApi::srcAppApiUrdfGetTwinJointState(utility::string_t uuid, utility::string_t jointName) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joints/{joint_name}/state"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("joint_name") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(jointName))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -56815,17 +53999,13 @@ pplx::task>> DefaultApi::srcAppAp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfListUrdfProjects does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointState does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (assetUuid) - { - localVarQueryParams[utility::conversions::to_string_t("asset_uuid")] = ApiClient::parameterToString(*assetUuid); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -56846,7 +54026,7 @@ pplx::task>> DefaultApi::srcAppAp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfListUrdfProjects does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointState does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -56874,7 +54054,7 @@ pplx::task>> DefaultApi::srcAppAp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfListUrdfProjects: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointState: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -56885,7 +54065,7 @@ pplx::task>> DefaultApi::srcAppAp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfListUrdfProjects: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointState: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -56894,17 +54074,13 @@ pplx::task>> DefaultApi::srcAppAp }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new JointStateSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -56913,26 +54089,19 @@ pplx::task>> DefaultApi::srcAppAp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfListUrdfProjects: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointState: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfUpdateTwinJointState(utility::string_t uuid, utility::string_t jointName, std::shared_ptr jointStateUpdateSchema) const +pplx::task> DefaultApi::srcAppApiUrdfGetTwinJointStates(utility::string_t uuid) const { - // verify the required parameter 'jointStateUpdateSchema' is set - if (jointStateUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'jointStateUpdateSchema' when calling DefaultApi->srcAppApiUrdfUpdateTwinJointState")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joints/{joint_name}/state"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joint_states"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("joint_name") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(jointName))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -56961,13 +54130,12 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointState does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointStates does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -56977,27 +54145,11 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(jointStateUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(jointStateUpdateSchema.get()) - { - jointStateUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("jointStateUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -57005,7 +54157,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointState does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJointStates does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57017,7 +54169,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -57033,7 +54185,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointState: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointStates: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -57044,7 +54196,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointState: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointStates: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -57053,7 +54205,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new JointStateSchema()); + std::shared_ptr localVarResult(new JointStatesSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -57068,24 +54220,18 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTwi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointState: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJointStates: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfUpdateTwinJointStates(utility::string_t uuid, std::shared_ptr bulkJointStatesUpdateSchema) const +pplx::task>> DefaultApi::srcAppApiUrdfGetTwinJoints(utility::string_t uuid) const { - // verify the required parameter 'bulkJointStatesUpdateSchema' is set - if (bulkJointStatesUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'bulkJointStatesUpdateSchema' when calling DefaultApi->srcAppApiUrdfUpdateTwinJointStates")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joint_states"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joints"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -57115,13 +54261,12 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointStates does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJoints does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -57131,27 +54276,11 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(bulkJointStatesUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(bulkJointStatesUpdateSchema.get()) - { - bulkJointStatesUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("bulkJointStatesUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -57159,7 +54288,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointStates does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinJoints does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57171,7 +54300,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -57187,7 +54316,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointStates: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJoints: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -57198,7 +54327,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointStates: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJoints: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -57207,13 +54336,17 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new JointStatesSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -57222,24 +54355,18 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateTw else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointStates: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinJoints: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfUpdateUrdfProject(utility::string_t uuid, std::shared_ptr uRDFProjectCreateSchema) const +pplx::task> DefaultApi::srcAppApiUrdfGetTwinRobotDescription(utility::string_t uuid) const { - // verify the required parameter 'uRDFProjectCreateSchema' is set - if (uRDFProjectCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'uRDFProjectCreateSchema' when calling DefaultApi->srcAppApiUrdfUpdateUrdfProject")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/robot_description"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -57269,13 +54396,12 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateUrdfProject does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinRobotDescription does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -57285,27 +54411,11 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(uRDFProjectCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(uRDFProjectCreateSchema.get()) - { - uRDFProjectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("uRDFProjectCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -57313,7 +54423,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateUrdfProject does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinRobotDescription does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57325,7 +54435,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -57341,7 +54451,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateUrdfProject: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinRobotDescription: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -57352,7 +54462,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateUrdfProject: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinRobotDescription: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -57361,7 +54471,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new URDFProjectSchema()); + std::shared_ptr localVarResult(new RobotDescriptionSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -57376,18 +54486,18 @@ pplx::task> DefaultApi::srcAppApiUrdfUpdateUr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateUrdfProject: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinRobotDescription: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiUrdfUploadZipFile(utility::string_t uuid, std::shared_ptr file) const +pplx::task DefaultApi::srcAppApiUrdfGetTwinUrdfRaw(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/zip-file"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/urdf"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -57403,7 +54513,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi // use JSON if possible if ( localVarResponseHttpContentTypes.size() == 0 ) { - localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + localVarResponseHttpContentType = utility::conversions::to_string_t("text/plain"); } // JSON else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) @@ -57415,19 +54525,20 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi { localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); } + // plain text + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("text/plain")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("text/plain"); + } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUploadZipFile does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinUrdfRaw does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); - { - localVarFileParams[ utility::conversions::to_string_t("file") ] = file; - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -57448,7 +54559,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUploadZipFile does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetTwinUrdfRaw does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57460,7 +54571,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -57476,7 +54587,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiUrdfUploadZipFile: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinUrdfRaw: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -57487,7 +54598,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUploadZipFile: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinUrdfRaw: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -57496,7 +54607,7 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new URDFProjectSchema()); + utility::string_t localVarResult(utility::conversions::to_string_t("")); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -57504,6 +54615,10 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi ModelBase::fromJson(localVarJson, localVarResult); } + else if(localVarResponseHttpContentType == utility::conversions::to_string_t("text/plain")) + { + localVarResult = localVarResponse; + } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { // TODO multipart response parsing @@ -57511,18 +54626,18 @@ pplx::task> DefaultApi::srcAppApiUrdfUploadZi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiUrdfUploadZipFile: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetTwinUrdfRaw: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowRunsCancelWorkflowRun(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiUrdfGetUrdfProject(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflow-runs/{uuid}/cancel"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -57552,7 +54667,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsCancelWorkflowRun does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetUrdfProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -57579,7 +54694,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsCancelWorkflowRun does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfGetUrdfProject does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57591,7 +54706,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -57607,7 +54722,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsCancelWorkflowRun: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetUrdfProject: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -57618,7 +54733,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsCancelWorkflowRun: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetUrdfProject: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -57627,7 +54742,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowRunSchema()); + std::shared_ptr localVarResult(new URDFProjectSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -57642,18 +54757,24 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsCancelWorkflowRun: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfGetUrdfProject: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowRunsGetWorkflowRun(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiUrdfInitiateLargeUrdfZipUpload(utility::string_t uuid, std::shared_ptr initiateLargeUploadSchema) const { + // verify the required parameter 'initiateLargeUploadSchema' is set + if (initiateLargeUploadSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'initiateLargeUploadSchema' when calling DefaultApi->srcAppApiUrdfInitiateLargeUrdfZipUpload")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflow-runs/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/initiate-large-zip-upload"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -57683,12 +54804,13 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsGetWorkflowRun does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfInitiateLargeUrdfZipUpload does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -57698,11 +54820,27 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(initiateLargeUploadSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(initiateLargeUploadSchema.get()) + { + initiateLargeUploadSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("initiateLargeUploadSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -57710,7 +54848,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsGetWorkflowRun does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfInitiateLargeUrdfZipUpload does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57722,7 +54860,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -57738,7 +54876,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsGetWorkflowRun: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfInitiateLargeUrdfZipUpload: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -57749,7 +54887,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsGetWorkflowRun: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfInitiateLargeUrdfZipUpload: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -57758,7 +54896,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowRunSchema()); + std::shared_ptr localVarResult(new InitiateLargeUploadResponse()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -57773,18 +54911,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowRuns else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsGetWorkflowRun: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfInitiateLargeUrdfZipUpload: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowRunsListWorkflowRuns(boost::optional workflowId, boost::optional status) const +pplx::task>> DefaultApi::srcAppApiUrdfListUrdfProjects(boost::optional assetUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflow-runs"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -57813,20 +54951,16 @@ pplx::task>> DefaultApi::srcAppAp } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsListWorkflowRuns does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfListUrdfProjects does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (workflowId) - { - localVarQueryParams[utility::conversions::to_string_t("workflow_id")] = ApiClient::parameterToString(*workflowId); - } - if (status) + if (assetUuid) { - localVarQueryParams[utility::conversions::to_string_t("status")] = ApiClient::parameterToString(*status); + localVarQueryParams[utility::conversions::to_string_t("asset_uuid")] = ApiClient::parameterToString(*assetUuid); } std::shared_ptr localVarHttpBody; @@ -57848,7 +54982,7 @@ pplx::task>> DefaultApi::srcAppAp } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsListWorkflowRuns does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfListUrdfProjects does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57876,7 +55010,7 @@ pplx::task>> DefaultApi::srcAppAp if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsListWorkflowRuns: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfListUrdfProjects: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -57887,7 +55021,7 @@ pplx::task>> DefaultApi::srcAppAp if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsListWorkflowRuns: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfListUrdfProjects: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -57896,14 +55030,14 @@ pplx::task>> DefaultApi::srcAppAp }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -57915,19 +55049,26 @@ pplx::task>> DefaultApi::srcAppAp else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsListWorkflowRuns: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfListUrdfProjects: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsActivateWorkflow(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiUrdfUpdateTwinJointState(utility::string_t uuid, utility::string_t jointName, std::shared_ptr jointStateUpdateSchema) const { + // verify the required parameter 'jointStateUpdateSchema' is set + if (jointStateUpdateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'jointStateUpdateSchema' when calling DefaultApi->srcAppApiUrdfUpdateTwinJointState")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/activate"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joints/{joint_name}/state"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("joint_name") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(jointName))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -57956,12 +55097,13 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsActivateWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointState does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -57971,11 +55113,27 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(jointStateUpdateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(jointStateUpdateSchema.get()) + { + jointStateUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("jointStateUpdateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -57983,7 +55141,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsActivateWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointState does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -57995,7 +55153,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -58011,7 +55169,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsActivateWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointState: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -58022,7 +55180,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsActivateWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointState: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -58031,7 +55189,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowSchema()); + std::shared_ptr localVarResult(new JointStateSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -58046,19 +55204,25 @@ pplx::task> DefaultApi::srcAppApiWorkflowsActiva else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsActivateWorkflow: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointState: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsCancelWorkflowExecution(utility::string_t executionUuid) const +pplx::task> DefaultApi::srcAppApiUrdfUpdateTwinJointStates(utility::string_t uuid, std::shared_ptr bulkJointStatesUpdateSchema) const { + // verify the required parameter 'bulkJointStatesUpdateSchema' is set + if (bulkJointStatesUpdateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'bulkJointStatesUpdateSchema' when calling DefaultApi->srcAppApiUrdfUpdateTwinJointStates")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/executions/{execution_uuid}/cancel"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/twins/{uuid}/joint_states"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -58087,12 +55251,13 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCancelWorkflowExecution does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointStates does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -58102,11 +55267,27 @@ pplx::task> DefaultApi::srcAppApiWorkfl if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(bulkJointStatesUpdateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(bulkJointStatesUpdateSchema.get()) + { + bulkJointStatesUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("bulkJointStatesUpdateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -58114,7 +55295,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCancelWorkflowExecution does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateTwinJointStates does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -58126,7 +55307,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -58142,7 +55323,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCancelWorkflowExecution: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointStates: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -58153,7 +55334,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCancelWorkflowExecution: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointStates: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -58162,7 +55343,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowExecutionSchema()); + std::shared_ptr localVarResult(new JointStatesSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -58177,18 +55358,24 @@ pplx::task> DefaultApi::srcAppApiWorkfl else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCancelWorkflowExecution: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateTwinJointStates: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsCloneWorkflow(utility::string_t uuid, boost::optional> workflowCloneSchema) const +pplx::task> DefaultApi::srcAppApiUrdfUpdateUrdfProject(utility::string_t uuid, std::shared_ptr uRDFProjectCreateSchema) const { + // verify the required parameter 'uRDFProjectCreateSchema' is set + if (uRDFProjectCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'uRDFProjectCreateSchema' when calling DefaultApi->srcAppApiUrdfUpdateUrdfProject")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/clone"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -58218,7 +55405,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCloneWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateUrdfProject does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -58236,8 +55423,8 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); web::json::value localVarJson; - if (workflowCloneSchema) - localVarJson = ModelBase::toJson(*workflowCloneSchema); + localVarJson = ModelBase::toJson(uRDFProjectCreateSchema); + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } @@ -58247,9 +55434,9 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); std::shared_ptr localVarMultipart(new MultipartFormData); - if(workflowCloneSchema && (*workflowCloneSchema).get()) + if(uRDFProjectCreateSchema.get()) { - (*workflowCloneSchema)->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowCloneSchema")); + uRDFProjectCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("uRDFProjectCreateSchema")); } @@ -58262,7 +55449,142 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCloneWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUpdateUrdfProject does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateUrdfProject: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateUrdfProject: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::shared_ptr localVarResult(new URDFProjectSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiUrdfUpdateUrdfProject: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task> DefaultApi::srcAppApiUrdfUploadZipFile(utility::string_t uuid, std::shared_ptr file) const +{ + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/urdf-projects/{uuid}/zip-file"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUploadZipFile does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("multipart/form-data") ); + + { + localVarFileParams[ utility::conversions::to_string_t("file") ] = file; + } + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiUrdfUploadZipFile does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -58290,7 +55612,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCloneWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiUrdfUploadZipFile: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -58301,7 +55623,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCloneWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiUrdfUploadZipFile: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -58310,7 +55632,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowSchema()); + std::shared_ptr localVarResult(new URDFProjectSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -58325,18 +55647,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCloneW else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCloneWorkflow: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiUrdfUploadZipFile: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsCompileWorkflow(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiWorkflowRunsCancelWorkflowRun(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/compile"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflow-runs/{uuid}/cancel"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -58366,7 +55688,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCompileWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsCancelWorkflowRun does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -58393,7 +55715,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCompileWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsCancelWorkflowRun does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -58405,7 +55727,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -58421,7 +55743,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCompileWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsCancelWorkflowRun: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -58432,7 +55754,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCompileWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsCancelWorkflowRun: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -58441,18 +55763,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::shared_ptr localVarResult(new WorkflowRunSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_object() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -58461,24 +55778,19 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCompileWorkflow: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsCancelWorkflowRun: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsCreateWorkflow(std::shared_ptr workflowCreateSchema) const +pplx::task> DefaultApi::srcAppApiWorkflowRunsGetWorkflowRun(utility::string_t uuid) const { - // verify the required parameter 'workflowCreateSchema' is set - if (workflowCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowCreateSchema' when calling DefaultApi->srcAppApiWorkflowsCreateWorkflow")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflow-runs/{uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -58507,13 +55819,12 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsGetWorkflowRun does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -58523,27 +55834,11 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(workflowCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(workflowCreateSchema.get()) - { - workflowCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -58551,7 +55846,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsGetWorkflowRun does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -58563,7 +55858,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -58579,7 +55874,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsGetWorkflowRun: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -58590,7 +55885,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsGetWorkflowRun: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -58599,7 +55894,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowSchema()); + std::shared_ptr localVarResult(new WorkflowRunSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -58614,25 +55909,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCreate else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflow: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsGetWorkflowRun: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsCreateWorkflowConnection(utility::string_t uuid, std::shared_ptr workflowConnectionCreateSchema) const +pplx::task>> DefaultApi::srcAppApiWorkflowRunsListWorkflowRuns(boost::optional workflowId, boost::optional status) const { - // verify the required parameter 'workflowConnectionCreateSchema' is set - if (workflowConnectionCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowConnectionCreateSchema' when calling DefaultApi->srcAppApiWorkflowsCreateWorkflowConnection")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/connections"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflow-runs"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -58661,14 +55949,21 @@ pplx::task> DefaultApi::srcAppApiWorkf } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowConnection does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsListWorkflowRuns does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + if (workflowId) + { + localVarQueryParams[utility::conversions::to_string_t("workflow_id")] = ApiClient::parameterToString(*workflowId); + } + if (status) + { + localVarQueryParams[utility::conversions::to_string_t("status")] = ApiClient::parameterToString(*status); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -58677,27 +55972,146 @@ pplx::task> DefaultApi::srcAppApiWorkf if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(workflowConnectionCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowRunsListWorkflowRuns does not consume any supported media type")); + } - if(workflowConnectionCreateSchema.get()) + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) { - workflowConnectionCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowConnectionCreateSchema")); + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; } - + } - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsListWorkflowRuns: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsListWorkflowRuns: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::vector> localVarResult; + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowRunsListWorkflowRuns: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task> DefaultApi::srcAppApiWorkflowsActivateWorkflow(utility::string_t uuid) const +{ + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/activate"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsActivateWorkflow does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -58705,7 +56119,7 @@ pplx::task> DefaultApi::srcAppApiWorkf } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowConnection does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsActivateWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -58733,7 +56147,7 @@ pplx::task> DefaultApi::srcAppApiWorkf if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowConnection: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsActivateWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -58744,7 +56158,7 @@ pplx::task> DefaultApi::srcAppApiWorkf if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowConnection: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsActivateWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -58753,7 +56167,7 @@ pplx::task> DefaultApi::srcAppApiWorkf }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowConnectionSchema()); + std::shared_ptr localVarResult(new WorkflowSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -58768,25 +56182,19 @@ pplx::task> DefaultApi::srcAppApiWorkf else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowConnection: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsActivateWorkflow: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsCreateWorkflowNode(utility::string_t uuid, std::shared_ptr workflowNodeCreateSchema) const +pplx::task> DefaultApi::srcAppApiWorkflowsCancelWorkflowExecution(utility::string_t executionUuid) const { - // verify the required parameter 'workflowNodeCreateSchema' is set - if (workflowNodeCreateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowNodeCreateSchema' when calling DefaultApi->srcAppApiWorkflowsCreateWorkflowNode")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/executions/{execution_uuid}/cancel"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -58815,13 +56223,12 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowNode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCancelWorkflowExecution does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -58831,27 +56238,11 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCr if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(workflowNodeCreateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(workflowNodeCreateSchema.get()) - { - workflowNodeCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowNodeCreateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -58859,7 +56250,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowNode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCancelWorkflowExecution does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -58887,7 +56278,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowNode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCancelWorkflowExecution: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -58898,7 +56289,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowNode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCancelWorkflowExecution: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -58907,7 +56298,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCr }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowNodeSchema()); + std::shared_ptr localVarResult(new WorkflowExecutionSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -58922,18 +56313,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowsCr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowNode: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCancelWorkflowExecution: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsDeactivateWorkflow(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsCloneWorkflow(utility::string_t uuid, boost::optional> workflowCloneSchema) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/deactivate"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/clone"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -58963,12 +56354,13 @@ pplx::task> DefaultApi::srcAppApiWorkflowsDeacti } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeactivateWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCloneWorkflow does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -58978,11 +56370,27 @@ pplx::task> DefaultApi::srcAppApiWorkflowsDeacti if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + if (workflowCloneSchema) + localVarJson = ModelBase::toJson(*workflowCloneSchema); + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(workflowCloneSchema && (*workflowCloneSchema).get()) + { + (*workflowCloneSchema)->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowCloneSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -58990,7 +56398,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsDeacti } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeactivateWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCloneWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59018,7 +56426,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsDeacti if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeactivateWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCloneWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59029,7 +56437,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsDeacti if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeactivateWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCloneWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59053,18 +56461,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowsDeacti else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeactivateWorkflow: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCloneWorkflow: unsupported response type")); } return localVarResult; }); } -pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiWorkflowsCompileWorkflow(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/compile"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -59073,6 +56481,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -59093,7 +56502,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCompileWorkflow does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -59120,7 +56529,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCompileWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59132,7 +56541,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -59148,7 +56557,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCompileWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59159,7 +56568,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCompileWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59168,17 +56577,44 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::map> localVarResult; + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + for( auto& localVarItem : localVarJson.as_object() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCompileWorkflow: unsupported response type")); + } + + return localVarResult; }); } -pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility::string_t uuid, utility::string_t connectionUuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsCreateWorkflow(std::shared_ptr workflowCreateSchema) const { + // verify the required parameter 'workflowCreateSchema' is set + if (workflowCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowCreateSchema' when calling DefaultApi->srcAppApiWorkflowsCreateWorkflow")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/connections/{connection_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("connection_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(connectionUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -59186,6 +56622,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -59206,12 +56643,13 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowConnection does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflow does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -59221,11 +56659,27 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(workflowCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(workflowCreateSchema.get()) + { + workflowCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -59233,7 +56687,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowConnection does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59245,7 +56699,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -59261,7 +56715,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowConnection: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59272,7 +56726,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowConnection: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59281,17 +56735,40 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility: }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new WorkflowSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflow: unsupported response type")); + } + + return localVarResult; }); } -pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::string_t uuid, utility::string_t nodeUuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsCreateWorkflowConnection(utility::string_t uuid, std::shared_ptr workflowConnectionCreateSchema) const { + // verify the required parameter 'workflowConnectionCreateSchema' is set + if (workflowConnectionCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowConnectionCreateSchema' when calling DefaultApi->srcAppApiWorkflowsCreateWorkflowConnection")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes/{node_uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/connections"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("node_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(nodeUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -59299,6 +56776,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -59319,12 +56797,13 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowNode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowConnection does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -59334,11 +56813,27 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(workflowConnectionCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(workflowConnectionCreateSchema.get()) + { + workflowConnectionCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowConnectionCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -59346,7 +56841,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowNode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowConnection does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59358,7 +56853,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -59374,7 +56869,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowNode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowConnection: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59385,7 +56880,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowNode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowConnection: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59394,15 +56889,39 @@ pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::strin }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new WorkflowConnectionSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowConnection: unsupported response type")); + } + + return localVarResult; }); } -pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsCreateWorkflowNode(utility::string_t uuid, std::shared_ptr workflowNodeCreateSchema) const { + // verify the required parameter 'workflowNodeCreateSchema' is set + if (workflowNodeCreateSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowNodeCreateSchema' when calling DefaultApi->srcAppApiWorkflowsCreateWorkflowNode")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/compile/source"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -59411,6 +56930,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -59431,12 +56951,13 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDownloadWorkflowSource does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowNode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -59446,11 +56967,27 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(workflowNodeCreateSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(workflowNodeCreateSchema.get()) + { + workflowNodeCreateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowNodeCreateSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -59458,7 +56995,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDownloadWorkflowSource does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsCreateWorkflowNode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59470,7 +57007,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -59486,7 +57023,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDownloadWorkflowSource: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowNode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59497,7 +57034,7 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDownloadWorkflowSource: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowNode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59506,16 +57043,34 @@ pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::s }) .then([=, this](utility::string_t localVarResponse) { - return void(); + std::shared_ptr localVarResult(new WorkflowNodeSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsCreateWorkflowNode: unsupported response type")); + } + + return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsEdgeSyncWorkflows(utility::string_t twinUuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsDeactivateWorkflow(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/edge-sync/{twin_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("twin_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(twinUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/deactivate"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -59544,7 +57099,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsEdgeSyncWorkflows does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeactivateWorkflow does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -59571,7 +57126,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsEdgeSyncWorkflows does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeactivateWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59583,7 +57138,7 @@ pplx::task>> DefaultApi::sr } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -59599,7 +57154,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsEdgeSyncWorkflows: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeactivateWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59610,7 +57165,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsEdgeSyncWorkflows: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeactivateWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59619,18 +57174,13 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::map> localVarResult; + std::shared_ptr localVarResult(new WorkflowSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_object() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem.second, localVarItemObj); - localVarResult[localVarItem.first] = localVarItemObj; - } + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -59639,24 +57189,18 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsEdgeSyncWorkflows: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeactivateWorkflow: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsExecuteWorkflow(utility::string_t uuid, std::shared_ptr workflowExecuteSchema) const +pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflow(utility::string_t uuid) const { - // verify the required parameter 'workflowExecuteSchema' is set - if (workflowExecuteSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowExecuteSchema' when calling DefaultApi->srcAppApiWorkflowsExecuteWorkflow")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/execute"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -59665,7 +57209,6 @@ pplx::task> DefaultApi::srcAppApiWorkfl std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -59686,13 +57229,12 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsExecuteWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflow does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -59702,27 +57244,11 @@ pplx::task> DefaultApi::srcAppApiWorkfl if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(workflowExecuteSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(workflowExecuteSchema.get()) - { - workflowExecuteSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowExecuteSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -59730,7 +57256,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsExecuteWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59742,7 +57268,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -59758,7 +57284,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsExecuteWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59769,7 +57295,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsExecuteWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59778,34 +57304,17 @@ pplx::task> DefaultApi::srcAppApiWorkfl }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowExecutionSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsExecuteWorkflow: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task> DefaultApi::srcAppApiWorkflowsFormatWorkflowLayout(utility::string_t uuid) const +pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowConnection(utility::string_t uuid, utility::string_t connectionUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/format-layout"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/connections/{connection_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("connection_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(connectionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -59813,7 +57322,6 @@ pplx::task> DefaultApi::srcAppApiWorkflowsFormat std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -59834,7 +57342,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsFormat } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsFormatWorkflowLayout does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowConnection does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -59861,7 +57369,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsFormat } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsFormatWorkflowLayout does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowConnection does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -59873,7 +57381,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsFormat } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -59889,7 +57397,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsFormat if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsFormatWorkflowLayout: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowConnection: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -59900,7 +57408,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsFormat if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsFormatWorkflowLayout: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowConnection: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -59909,34 +57417,129 @@ pplx::task> DefaultApi::srcAppApiWorkflowsFormat }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowSchema()); + return void(); + }); +} +pplx::task DefaultApi::srcAppApiWorkflowsDeleteWorkflowNode(utility::string_t uuid, utility::string_t nodeUuid) const +{ - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes/{node_uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("node_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(nodeUuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowNode does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDeleteWorkflowNode does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) { - web::json::value localVarJson = web::json::value::parse(localVarResponse); + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } - ModelBase::fromJson(localVarJson, localVarResult); + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsFormatWorkflowLayout: unsupported response type")); + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowNode: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); } - return localVarResult; + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDeleteWorkflowNode: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + return void(); }); } -pplx::task> DefaultApi::srcAppApiWorkflowsGetExecutionByUuid(utility::string_t executionUuid) const +pplx::task DefaultApi::srcAppApiWorkflowsDownloadWorkflowSource(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/executions/{execution_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/compile/source"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -59944,7 +57547,6 @@ pplx::task> DefaultApi::srcAppApiWorkfl std::map> localVarFileParams; std::unordered_set localVarResponseHttpContentTypes; - localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); utility::string_t localVarResponseHttpContentType; @@ -59965,7 +57567,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetExecutionByUuid does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDownloadWorkflowSource does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -59992,7 +57594,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetExecutionByUuid does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsDownloadWorkflowSource does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60020,7 +57622,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetExecutionByUuid: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDownloadWorkflowSource: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60031,7 +57633,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetExecutionByUuid: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsDownloadWorkflowSource: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60040,34 +57642,16 @@ pplx::task> DefaultApi::srcAppApiWorkfl }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowExecutionSchema()); - - if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) - { - web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); - } - // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) - // { - // TODO multipart response parsing - // } - else - { - throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetExecutionByUuid: unsupported response type")); - } - - return localVarResult; + return void(); }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsGetNodeSchema(utility::string_t nodeType, boost::optional nodeSubtype) const +pplx::task>> DefaultApi::srcAppApiWorkflowsEdgeSyncWorkflows(utility::string_t twinUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/node-schemas/{node_type}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("node_type") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(nodeType))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/edge-sync/{twin_uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("twin_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(twinUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -60096,17 +57680,13 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchema does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsEdgeSyncWorkflows does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (nodeSubtype) - { - localVarQueryParams[utility::conversions::to_string_t("node_subtype")] = ApiClient::parameterToString(*nodeSubtype); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -60127,7 +57707,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchema does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsEdgeSyncWorkflows does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60155,7 +57735,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchema: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsEdgeSyncWorkflows: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60166,7 +57746,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchema: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsEdgeSyncWorkflows: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60195,18 +57775,25 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchema: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsEdgeSyncWorkflows: unsupported response type")); } return localVarResult; }); } -pplx::task>>> DefaultApi::srcAppApiWorkflowsGetNodeSchemas() const +pplx::task> DefaultApi::srcAppApiWorkflowsExecuteWorkflow(utility::string_t uuid, std::shared_ptr workflowExecuteSchema) const { + // verify the required parameter 'workflowExecuteSchema' is set + if (workflowExecuteSchema == nullptr) + { + throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowExecuteSchema' when calling DefaultApi->srcAppApiWorkflowsExecuteWorkflow")); + } + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/node-schemas"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/execute"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -60235,12 +57822,13 @@ pplx::task>>> D } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchemas does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsExecuteWorkflow does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); std::shared_ptr localVarHttpBody; @@ -60250,11 +57838,27 @@ pplx::task>>> D if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + web::json::value localVarJson; + + localVarJson = ModelBase::toJson(workflowExecuteSchema); + + + localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + std::shared_ptr localVarMultipart(new MultipartFormData); + + if(workflowExecuteSchema.get()) + { + workflowExecuteSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowExecuteSchema")); + } + + + localVarHttpBody = localVarMultipart; + localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -60262,7 +57866,7 @@ pplx::task>>> D } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchemas does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsExecuteWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60274,7 +57878,7 @@ pplx::task>>> D } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -60290,7 +57894,7 @@ pplx::task>>> D if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchemas: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsExecuteWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60301,7 +57905,7 @@ pplx::task>>> D if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchemas: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsExecuteWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60310,18 +57914,145 @@ pplx::task>>> D }) .then([=, this](utility::string_t localVarResponse) { - std::vector>> localVarResult; + std::shared_ptr localVarResult(new WorkflowExecutionSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) + + ModelBase::fromJson(localVarJson, localVarResult); + } + // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) + // { + // TODO multipart response parsing + // } + else + { + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsExecuteWorkflow: unsupported response type")); + } + + return localVarResult; + }); +} +pplx::task> DefaultApi::srcAppApiWorkflowsFormatWorkflowLayout(utility::string_t uuid) const +{ + + + std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/format-layout"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + + std::map localVarQueryParams; + std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); + std::map localVarFormParams; + std::map> localVarFileParams; + + std::unordered_set localVarResponseHttpContentTypes; + localVarResponseHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + + utility::string_t localVarResponseHttpContentType; + + // use JSON if possible + if ( localVarResponseHttpContentTypes.size() == 0 ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // JSON + else if ( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarResponseHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarResponseHttpContentTypes.end() ) + { + localVarResponseHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else + { + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsFormatWorkflowLayout does not produce any supported media type")); + } + + localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; + + std::unordered_set localVarConsumeHttpContentTypes; + + + std::shared_ptr localVarHttpBody; + utility::string_t localVarRequestHttpContentType; + + // use JSON if possible + if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); + } + // multipart formdata + else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); + } + else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) + { + localVarRequestHttpContentType = utility::conversions::to_string_t("application/x-www-form-urlencoded"); + } + else + { + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsFormatWorkflowLayout does not consume any supported media type")); + } + + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } + + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("POST"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + .then([=, this](web::http::http_response localVarResponse) + { + if (m_ApiClient->getResponseHandler()) + { + m_ApiClient->getResponseHandler()(localVarResponse.status_code(), localVarResponse.headers()); + } + + // 1xx - informational : OK + // 2xx - successful : OK + // 3xx - redirection : OK + // 4xx - client error : not OK + // 5xx - client error : not OK + if (localVarResponse.status_code() >= 400) + { + throw ApiException(localVarResponse.status_code() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsFormatWorkflowLayout: ") + localVarResponse.reason_phrase() + , std::make_shared(localVarResponse.extract_utf8string(true).get())); + } + + // check response content type + if(localVarResponse.headers().has(utility::conversions::to_string_t("Content-Type"))) + { + utility::string_t localVarContentType = localVarResponse.headers()[utility::conversions::to_string_t("Content-Type")]; + if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { - std::map> localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); + throw ApiException(500 + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsFormatWorkflowLayout: unexpected response type: ") + localVarContentType + , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } + + return localVarResponse.extract_string(); + }) + .then([=, this](utility::string_t localVarResponse) + { + std::shared_ptr localVarResult(new WorkflowSchema()); + + if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) + { + web::json::value localVarJson = web::json::value::parse(localVarResponse); + + ModelBase::fromJson(localVarJson, localVarResult); + } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { // TODO multipart response parsing @@ -60329,19 +58060,19 @@ pplx::task>>> D else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchemas: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsFormatWorkflowLayout: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflow(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsGetExecutionByUuid(utility::string_t executionUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/executions/{execution_uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -60370,7 +58101,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflow does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetExecutionByUuid does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -60397,7 +58128,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflow does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetExecutionByUuid does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60425,7 +58156,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflow: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetExecutionByUuid: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60436,7 +58167,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflow: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetExecutionByUuid: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60445,7 +58176,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowSchema()); + std::shared_ptr localVarResult(new WorkflowExecutionSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -60460,18 +58191,19 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflow: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetExecutionByUuid: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowBySlug(utility::string_t slug) const +pplx::task>> DefaultApi::srcAppApiWorkflowsGetNodeSchema(utility::string_t nodeType, boost::optional nodeSubtype) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/by-slug"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/node-schemas/{node_type}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("node_type") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(nodeType))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -60500,15 +58232,16 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowBySlug does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchema does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + if (nodeSubtype) { - localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); + localVarQueryParams[utility::conversions::to_string_t("node_subtype")] = ApiClient::parameterToString(*nodeSubtype); } std::shared_ptr localVarHttpBody; @@ -60530,7 +58263,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowBySlug does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchema does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60558,7 +58291,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowBySlug: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchema: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60569,7 +58302,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowBySlug: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchema: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60578,13 +58311,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowSchema()); + std::map> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_object() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem.second, localVarItemObj); + localVarResult[localVarItem.first] = localVarItemObj; + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -60593,20 +58331,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGetWor else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowBySlug: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchema: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowExecution(utility::string_t uuid, utility::string_t executionUuid) const +pplx::task>>> DefaultApi::srcAppApiWorkflowsGetNodeSchemas() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/executions/{execution_uuid}"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/node-schemas"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -60635,7 +58371,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowExecution does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchemas does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -60662,7 +58398,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowExecution does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetNodeSchemas does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60690,7 +58426,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowExecution: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchemas: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60701,7 +58437,7 @@ pplx::task> DefaultApi::srcAppApiWorkfl if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowExecution: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchemas: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60710,13 +58446,17 @@ pplx::task> DefaultApi::srcAppApiWorkfl }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowExecutionSchema()); + std::vector>> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::map> localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -60725,20 +58465,19 @@ pplx::task> DefaultApi::srcAppApiWorkfl else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowExecution: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetNodeSchemas: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowNode(utility::string_t uuid, utility::string_t nodeUuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflow(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes/{node_uuid}"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("node_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(nodeUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -60767,7 +58506,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGe } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowNode does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflow does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -60794,7 +58533,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGe } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowNode does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflow does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60822,7 +58561,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGe if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowNode: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflow: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60833,7 +58572,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGe if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowNode: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflow: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60842,7 +58581,7 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGe }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowNodeSchema()); + std::shared_ptr localVarResult(new WorkflowSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -60857,19 +58596,18 @@ pplx::task> DefaultApi::srcAppApiWorkflowsGe else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowNode: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflow: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowWorkerSource(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowBySlug(utility::string_t slug) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/worker-source"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/by-slug"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -60898,13 +58636,16 @@ pplx::task> DefaultApi::srcAppApiWor } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowWorkerSource does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowBySlug does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; + { + localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(slug); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -60925,7 +58666,7 @@ pplx::task> DefaultApi::srcAppApiWor } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowWorkerSource does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowBySlug does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -60953,7 +58694,7 @@ pplx::task> DefaultApi::srcAppApiWor if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowWorkerSource: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowBySlug: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -60964,7 +58705,7 @@ pplx::task> DefaultApi::srcAppApiWor if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowWorkerSource: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowBySlug: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -60973,7 +58714,7 @@ pplx::task> DefaultApi::srcAppApiWor }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowWorkerSourceSchema()); + std::shared_ptr localVarResult(new WorkflowSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -60988,18 +58729,20 @@ pplx::task> DefaultApi::srcAppApiWor else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowWorkerSource: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowBySlug: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowsConfig() const +pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowExecution(utility::string_t uuid, utility::string_t executionUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/config"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/executions/{execution_uuid}"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -61028,7 +58771,7 @@ pplx::task> DefaultApi::srcAppApiWorkflow } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowsConfig does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowExecution does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -61055,7 +58798,7 @@ pplx::task> DefaultApi::srcAppApiWorkflow } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowsConfig does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowExecution does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -61083,7 +58826,7 @@ pplx::task> DefaultApi::srcAppApiWorkflow if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowsConfig: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowExecution: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -61094,7 +58837,7 @@ pplx::task> DefaultApi::srcAppApiWorkflow if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowsConfig: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowExecution: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -61103,7 +58846,7 @@ pplx::task> DefaultApi::srcAppApiWorkflow }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowsConfigSchema()); + std::shared_ptr localVarResult(new WorkflowExecutionSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { @@ -61118,19 +58861,20 @@ pplx::task> DefaultApi::srcAppApiWorkflow else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowsConfig: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowExecution: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowConnections(utility::string_t uuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowNode(utility::string_t uuid, utility::string_t nodeUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/connections"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes/{node_uuid}"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("node_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(nodeUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -61159,7 +58903,7 @@ pplx::task>> DefaultApi::s } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowConnections does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowNode does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -61186,7 +58930,7 @@ pplx::task>> DefaultApi::s } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowConnections does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowNode does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -61214,7 +58958,7 @@ pplx::task>> DefaultApi::s if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowConnections: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowNode: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -61225,7 +58969,7 @@ pplx::task>> DefaultApi::s if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowConnections: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowNode: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -61234,17 +58978,13 @@ pplx::task>> DefaultApi::s }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new WorkflowNodeSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -61253,19 +58993,18 @@ pplx::task>> DefaultApi::s else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowConnections: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowNode: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowExecutionCaptures(utility::string_t executionUuid) const +pplx::task> DefaultApi::srcAppApiWorkflowsGetWorkflowsConfig() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/executions/{execution_uuid}/captures"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/config"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -61294,7 +59033,7 @@ pplx::task>> DefaultApi::srcAppApi } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutionCaptures does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowsConfig does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -61321,7 +59060,7 @@ pplx::task>> DefaultApi::srcAppApi } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutionCaptures does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsGetWorkflowsConfig does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -61349,7 +59088,7 @@ pplx::task>> DefaultApi::srcAppApi if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutionCaptures: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowsConfig: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -61360,7 +59099,7 @@ pplx::task>> DefaultApi::srcAppApi if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutionCaptures: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowsConfig: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -61369,17 +59108,13 @@ pplx::task>> DefaultApi::srcAppApi }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::shared_ptr localVarResult(new WorkflowsConfigSchema()); if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - for( auto& localVarItem : localVarJson.as_array() ) - { - std::shared_ptr localVarItemObj; - ModelBase::fromJson(localVarItem, localVarItemObj); - localVarResult.push_back(localVarItemObj); - } + + ModelBase::fromJson(localVarJson, localVarResult); } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -61388,18 +59123,18 @@ pplx::task>> DefaultApi::srcAppApi else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutionCaptures: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsGetWorkflowsConfig: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowExecutions(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowConnections(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/executions"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/connections"); boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; @@ -61429,7 +59164,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutions does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowConnections does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -61456,7 +59191,7 @@ pplx::task>> DefaultApi::sr } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutions does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowConnections does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -61484,7 +59219,7 @@ pplx::task>> DefaultApi::sr if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutions: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowConnections: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -61495,7 +59230,7 @@ pplx::task>> DefaultApi::sr if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutions: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowConnections: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -61504,14 +59239,14 @@ pplx::task>> DefaultApi::sr }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -61523,19 +59258,19 @@ pplx::task>> DefaultApi::sr else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutions: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowConnections: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowNodes(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowExecutionCaptures(utility::string_t executionUuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/executions/{execution_uuid}/captures"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("execution_uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(executionUuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -61564,7 +59299,7 @@ pplx::task>> DefaultApi::srcAppA } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowNodes does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutionCaptures does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -61591,7 +59326,7 @@ pplx::task>> DefaultApi::srcAppA } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowNodes does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutionCaptures does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -61619,7 +59354,7 @@ pplx::task>> DefaultApi::srcAppA if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowNodes: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutionCaptures: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -61630,7 +59365,7 @@ pplx::task>> DefaultApi::srcAppA if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowNodes: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutionCaptures: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -61639,14 +59374,14 @@ pplx::task>> DefaultApi::srcAppA }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -61658,18 +59393,19 @@ pplx::task>> DefaultApi::srcAppA else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowNodes: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutionCaptures: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowTemplates() const +pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowExecutions(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/templates"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/executions"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -61698,7 +59434,7 @@ pplx::task>> DefaultApi::src } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowTemplates does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutions does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -61725,9 +59461,17 @@ pplx::task>> DefaultApi::src } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowTemplates does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowExecutions does not consume any supported media type")); } + // authentication (CustomTokenAuthentication) required + { + utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); + if ( localVarApiKey.size() > 0 ) + { + localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; + } + } return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) @@ -61745,7 +59489,7 @@ pplx::task>> DefaultApi::src if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowTemplates: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutions: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -61756,7 +59500,7 @@ pplx::task>> DefaultApi::src if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowTemplates: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutions: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -61765,14 +59509,14 @@ pplx::task>> DefaultApi::src }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -61784,18 +59528,19 @@ pplx::task>> DefaultApi::src else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowTemplates: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowExecutions: unsupported response type")); } return localVarResult; }); } -pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflows(boost::optional workspaceUuid, boost::optional kind, boost::optional environmentUuid, boost::optional runOnEdge, boost::optional slug) const +pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowNodes(utility::string_t uuid) const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows"); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/nodes"); + boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -61824,33 +59569,13 @@ pplx::task>> DefaultApi::srcAppApiWo } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflows does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowNodes does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - if (workspaceUuid) - { - localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); - } - if (kind) - { - localVarQueryParams[utility::conversions::to_string_t("kind")] = ApiClient::parameterToString(*kind); - } - if (environmentUuid) - { - localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); - } - if (runOnEdge) - { - localVarQueryParams[utility::conversions::to_string_t("run_on_edge")] = ApiClient::parameterToString(*runOnEdge); - } - if (slug) - { - localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(*slug); - } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -61871,7 +59596,7 @@ pplx::task>> DefaultApi::srcAppApiWo } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflows does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowNodes does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -61899,7 +59624,7 @@ pplx::task>> DefaultApi::srcAppApiWo if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflows: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowNodes: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -61910,7 +59635,7 @@ pplx::task>> DefaultApi::srcAppApiWo if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflows: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowNodes: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -61919,14 +59644,14 @@ pplx::task>> DefaultApi::srcAppApiWo }) .then([=, this](utility::string_t localVarResponse) { - std::vector> localVarResult; + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); for( auto& localVarItem : localVarJson.as_array() ) { - std::shared_ptr localVarItemObj; + std::shared_ptr localVarItemObj; ModelBase::fromJson(localVarItem, localVarItemObj); localVarResult.push_back(localVarItemObj); } @@ -61938,19 +59663,18 @@ pplx::task>> DefaultApi::srcAppApiWo else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflows: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowNodes: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsRestoreWorkflowWorkerSource(utility::string_t uuid) const +pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflowTemplates() const { std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/worker-source"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/templates"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -61979,7 +59703,7 @@ pplx::task> DefaultApi::srcAppApiWor } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsRestoreWorkflowWorkerSource does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowTemplates does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; @@ -62006,19 +59730,11 @@ pplx::task> DefaultApi::srcAppApiWor } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsRestoreWorkflowWorkerSource does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflowTemplates does not consume any supported media type")); } - // authentication (CustomTokenAuthentication) required - { - utility::string_t localVarApiKey = localVarApiConfiguration->getApiKey(utility::conversions::to_string_t("CustomTokenAuthentication")); - if ( localVarApiKey.size() > 0 ) - { - localVarHeaderParams[utility::conversions::to_string_t("Authorization")] = localVarApiKey; - } - } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("DELETE"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -62034,7 +59750,7 @@ pplx::task> DefaultApi::srcAppApiWor if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsRestoreWorkflowWorkerSource: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowTemplates: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -62045,7 +59761,7 @@ pplx::task> DefaultApi::srcAppApiWor if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsRestoreWorkflowWorkerSource: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowTemplates: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -62054,13 +59770,17 @@ pplx::task> DefaultApi::srcAppApiWor }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowWorkerSourceSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -62069,25 +59789,18 @@ pplx::task> DefaultApi::srcAppApiWor else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsRestoreWorkflowWorkerSource: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflowTemplates: unsupported response type")); } return localVarResult; }); } -pplx::task> DefaultApi::srcAppApiWorkflowsSaveWorkflowWorkerSource(utility::string_t uuid, std::shared_ptr workflowWorkerSourceUpdateSchema) const +pplx::task>> DefaultApi::srcAppApiWorkflowsListWorkflows(boost::optional workspaceUuid, boost::optional kind, boost::optional environmentUuid, boost::optional runOnEdge, boost::optional slug) const { - // verify the required parameter 'workflowWorkerSourceUpdateSchema' is set - if (workflowWorkerSourceUpdateSchema == nullptr) - { - throw ApiException(400, utility::conversions::to_string_t("Missing required parameter 'workflowWorkerSourceUpdateSchema' when calling DefaultApi->srcAppApiWorkflowsSaveWorkflowWorkerSource")); - } - std::shared_ptr localVarApiConfiguration( m_ApiClient->getConfiguration() ); - utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows/{uuid}/worker-source"); - boost::replace_all(localVarPath, utility::conversions::to_string_t("{") + utility::conversions::to_string_t("uuid") + utility::conversions::to_string_t("}"), web::uri::encode_uri(ApiClient::parameterToString(uuid))); + utility::string_t localVarPath = utility::conversions::to_string_t("/api/v1/workflows"); std::map localVarQueryParams; std::map localVarHeaderParams( localVarApiConfiguration->getDefaultHeaders() ); @@ -62116,14 +59829,33 @@ pplx::task> DefaultApi::srcAppApiWor } else { - throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsSaveWorkflowWorkerSource does not produce any supported media type")); + throw ApiException(400, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflows does not produce any supported media type")); } localVarHeaderParams[utility::conversions::to_string_t("Accept")] = localVarResponseHttpContentType; std::unordered_set localVarConsumeHttpContentTypes; - localVarConsumeHttpContentTypes.insert( utility::conversions::to_string_t("application/json") ); + if (workspaceUuid) + { + localVarQueryParams[utility::conversions::to_string_t("workspace_uuid")] = ApiClient::parameterToString(*workspaceUuid); + } + if (kind) + { + localVarQueryParams[utility::conversions::to_string_t("kind")] = ApiClient::parameterToString(*kind); + } + if (environmentUuid) + { + localVarQueryParams[utility::conversions::to_string_t("environment_uuid")] = ApiClient::parameterToString(*environmentUuid); + } + if (runOnEdge) + { + localVarQueryParams[utility::conversions::to_string_t("run_on_edge")] = ApiClient::parameterToString(*runOnEdge); + } + if (slug) + { + localVarQueryParams[utility::conversions::to_string_t("slug")] = ApiClient::parameterToString(*slug); + } std::shared_ptr localVarHttpBody; utility::string_t localVarRequestHttpContentType; @@ -62132,27 +59864,11 @@ pplx::task> DefaultApi::srcAppApiWor if ( localVarConsumeHttpContentTypes.size() == 0 || localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/json")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("application/json"); - web::json::value localVarJson; - - localVarJson = ModelBase::toJson(workflowWorkerSourceUpdateSchema); - - - localVarHttpBody = std::shared_ptr( new JsonBody( localVarJson ) ); } // multipart formdata else if( localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("multipart/form-data")) != localVarConsumeHttpContentTypes.end() ) { localVarRequestHttpContentType = utility::conversions::to_string_t("multipart/form-data"); - std::shared_ptr localVarMultipart(new MultipartFormData); - - if(workflowWorkerSourceUpdateSchema.get()) - { - workflowWorkerSourceUpdateSchema->toMultipart(localVarMultipart, utility::conversions::to_string_t("workflowWorkerSourceUpdateSchema")); - } - - - localVarHttpBody = localVarMultipart; - localVarRequestHttpContentType += utility::conversions::to_string_t("; boundary=") + localVarMultipart->getBoundary(); } else if (localVarConsumeHttpContentTypes.find(utility::conversions::to_string_t("application/x-www-form-urlencoded")) != localVarConsumeHttpContentTypes.end()) { @@ -62160,7 +59876,7 @@ pplx::task> DefaultApi::srcAppApiWor } else { - throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsSaveWorkflowWorkerSource does not consume any supported media type")); + throw ApiException(415, utility::conversions::to_string_t("DefaultApi->srcAppApiWorkflowsListWorkflows does not consume any supported media type")); } // authentication (CustomTokenAuthentication) required @@ -62172,7 +59888,7 @@ pplx::task> DefaultApi::srcAppApiWor } } - return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("PUT"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) + return m_ApiClient->callApi(localVarPath, utility::conversions::to_string_t("GET"), localVarQueryParams, localVarHttpBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarRequestHttpContentType) .then([=, this](web::http::http_response localVarResponse) { if (m_ApiClient->getResponseHandler()) @@ -62188,7 +59904,7 @@ pplx::task> DefaultApi::srcAppApiWor if (localVarResponse.status_code() >= 400) { throw ApiException(localVarResponse.status_code() - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsSaveWorkflowWorkerSource: ") + localVarResponse.reason_phrase() + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflows: ") + localVarResponse.reason_phrase() , std::make_shared(localVarResponse.extract_utf8string(true).get())); } @@ -62199,7 +59915,7 @@ pplx::task> DefaultApi::srcAppApiWor if( localVarContentType.find(localVarResponseHttpContentType) == std::string::npos ) { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsSaveWorkflowWorkerSource: unexpected response type: ") + localVarContentType + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflows: unexpected response type: ") + localVarContentType , std::make_shared(localVarResponse.extract_utf8string(true).get())); } } @@ -62208,13 +59924,17 @@ pplx::task> DefaultApi::srcAppApiWor }) .then([=, this](utility::string_t localVarResponse) { - std::shared_ptr localVarResult(new WorkflowWorkerSourceSchema()); + std::vector> localVarResult; if(localVarResponseHttpContentType == utility::conversions::to_string_t("application/json")) { web::json::value localVarJson = web::json::value::parse(localVarResponse); - - ModelBase::fromJson(localVarJson, localVarResult); + for( auto& localVarItem : localVarJson.as_array() ) + { + std::shared_ptr localVarItemObj; + ModelBase::fromJson(localVarItem, localVarItemObj); + localVarResult.push_back(localVarItemObj); + } } // else if(localVarResponseHttpContentType == utility::conversions::to_string_t("multipart/form-data")) // { @@ -62223,7 +59943,7 @@ pplx::task> DefaultApi::srcAppApiWor else { throw ApiException(500 - , utility::conversions::to_string_t("error calling srcAppApiWorkflowsSaveWorkflowWorkerSource: unsupported response type")); + , utility::conversions::to_string_t("error calling srcAppApiWorkflowsListWorkflows: unsupported response type")); } return localVarResult; diff --git a/rest/src/model/AttachmentDownloadUrlSchema.cpp b/rest/src/model/AttachmentDownloadUrlSchema.cpp deleted file mode 100644 index 41959ba..0000000 --- a/rest/src/model/AttachmentDownloadUrlSchema.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/AttachmentDownloadUrlSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -AttachmentDownloadUrlSchema::AttachmentDownloadUrlSchema() -{ - m_Url = utility::conversions::to_string_t(""); - m_UrlIsSet = false; -} - -AttachmentDownloadUrlSchema::~AttachmentDownloadUrlSchema() -{ -} - -void AttachmentDownloadUrlSchema::validate() -{ - // TODO: implement validation -} - -web::json::value AttachmentDownloadUrlSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_UrlIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("url"))] = ModelBase::toJson(m_Url); - } - - return val; -} - -bool AttachmentDownloadUrlSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("url")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("url"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUrl; - ok &= ModelBase::fromJson(fieldValue, refVal_setUrl); - setUrl(refVal_setUrl); - - } - } - return ok; -} - -void AttachmentDownloadUrlSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_UrlIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("url")), m_Url)); - } -} - -bool AttachmentDownloadUrlSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("url")))) - { - utility::string_t refVal_setUrl; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("url"))), refVal_setUrl ); - setUrl(refVal_setUrl); - } - return ok; -} - - -utility::string_t AttachmentDownloadUrlSchema::getUrl() const -{ - return m_Url; -} - - -void AttachmentDownloadUrlSchema::setUrl(const utility::string_t& value) -{ - m_Url = value; - m_UrlIsSet = true; -} - -bool AttachmentDownloadUrlSchema::urlIsSet() const -{ - return m_UrlIsSet; -} - -void AttachmentDownloadUrlSchema::unsetUrl() -{ - m_UrlIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/CatalogSeedDetailSchema.cpp b/rest/src/model/CatalogSeedDetailSchema.cpp deleted file mode 100644 index 16dbdbe..0000000 --- a/rest/src/model/CatalogSeedDetailSchema.cpp +++ /dev/null @@ -1,270 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/CatalogSeedDetailSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -CatalogSeedDetailSchema::CatalogSeedDetailSchema() -{ - m_Group = utility::conversions::to_string_t(""); - m_GroupIsSet = false; - m_Key = utility::conversions::to_string_t(""); - m_KeyIsSet = false; - m_Name = utility::conversions::to_string_t(""); - m_NameIsSet = false; - m_DetailIsSet = false; -} - -CatalogSeedDetailSchema::~CatalogSeedDetailSchema() -{ -} - -void CatalogSeedDetailSchema::validate() -{ - // TODO: implement validation -} - -web::json::value CatalogSeedDetailSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_GroupIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("group"))] = ModelBase::toJson(m_Group); - } - if(m_KeyIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("key"))] = ModelBase::toJson(m_Key); - } - if(m_NameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("name"))] = ModelBase::toJson(m_Name); - } - if(m_DetailIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("detail"))] = ModelBase::toJson(m_Detail); - } - - return val; -} - -bool CatalogSeedDetailSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("group")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("group"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setGroup; - ok &= ModelBase::fromJson(fieldValue, refVal_setGroup); - setGroup(refVal_setGroup); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("key")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("key"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setKey; - ok &= ModelBase::fromJson(fieldValue, refVal_setKey); - setKey(refVal_setKey); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromJson(fieldValue, refVal_setName); - setName(refVal_setName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("detail")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("detail"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setDetail; - ok &= ModelBase::fromJson(fieldValue, refVal_setDetail); - setDetail(refVal_setDetail); - - } - } - return ok; -} - -void CatalogSeedDetailSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_GroupIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("group")), m_Group)); - } - if(m_KeyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("key")), m_Key)); - } - if(m_NameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("name")), m_Name)); - } - if(m_DetailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("detail")), m_Detail)); - } -} - -bool CatalogSeedDetailSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("group")))) - { - utility::string_t refVal_setGroup; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("group"))), refVal_setGroup ); - setGroup(refVal_setGroup); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("key")))) - { - utility::string_t refVal_setKey; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("key"))), refVal_setKey ); - setKey(refVal_setKey); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("name")))) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("name"))), refVal_setName ); - setName(refVal_setName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("detail")))) - { - std::map> refVal_setDetail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("detail"))), refVal_setDetail ); - setDetail(refVal_setDetail); - } - return ok; -} - - -utility::string_t CatalogSeedDetailSchema::getGroup() const -{ - return m_Group; -} - - -void CatalogSeedDetailSchema::setGroup(const utility::string_t& value) -{ - m_Group = value; - m_GroupIsSet = true; -} - -bool CatalogSeedDetailSchema::groupIsSet() const -{ - return m_GroupIsSet; -} - -void CatalogSeedDetailSchema::unsetGroup() -{ - m_GroupIsSet = false; -} -utility::string_t CatalogSeedDetailSchema::getKey() const -{ - return m_Key; -} - - -void CatalogSeedDetailSchema::setKey(const utility::string_t& value) -{ - m_Key = value; - m_KeyIsSet = true; -} - -bool CatalogSeedDetailSchema::keyIsSet() const -{ - return m_KeyIsSet; -} - -void CatalogSeedDetailSchema::unsetKey() -{ - m_KeyIsSet = false; -} -utility::string_t CatalogSeedDetailSchema::getName() const -{ - return m_Name; -} - - -void CatalogSeedDetailSchema::setName(const utility::string_t& value) -{ - m_Name = value; - m_NameIsSet = true; -} - -bool CatalogSeedDetailSchema::nameIsSet() const -{ - return m_NameIsSet; -} - -void CatalogSeedDetailSchema::unsetName() -{ - m_NameIsSet = false; -} -std::map> CatalogSeedDetailSchema::getDetail() const -{ - return m_Detail; -} - - -void CatalogSeedDetailSchema::setDetail(const std::map>& value) -{ - m_Detail = value; - m_DetailIsSet = true; -} - -bool CatalogSeedDetailSchema::detailIsSet() const -{ - return m_DetailIsSet; -} - -void CatalogSeedDetailSchema::unsetDetail() -{ - m_DetailIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/CatalogSeedOptionSchema.cpp b/rest/src/model/CatalogSeedOptionSchema.cpp index 47d1572..94e2cc1 100644 --- a/rest/src/model/CatalogSeedOptionSchema.cpp +++ b/rest/src/model/CatalogSeedOptionSchema.cpp @@ -26,8 +26,6 @@ CatalogSeedOptionSchema::CatalogSeedOptionSchema() m_NameIsSet = false; m_Description = utility::conversions::to_string_t(""); m_DescriptionIsSet = false; - m_Is_autogenerated = false; - m_Is_autogeneratedIsSet = false; } CatalogSeedOptionSchema::~CatalogSeedOptionSchema() @@ -72,21 +70,6 @@ web::json::value CatalogSeedOptionSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("template_kind"))] = ModelBase::toJson(m_Template_kind.get()); } - if(m_Registry_id.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("registry_id"))] = ModelBase::toJson(m_Registry_id.get()); - } - if(m_Patch_count.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("patch_count"))] = ModelBase::toJson(m_Patch_count.get()); - } - if(m_Is_autogeneratedIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("is_autogenerated"))] = ModelBase::toJson(m_Is_autogenerated); - } return val; } @@ -160,39 +143,6 @@ bool CatalogSeedOptionSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("registry_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("registry_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRegistryId; - ok &= ModelBase::fromJson(fieldValue, refVal_setRegistryId); - setRegistryId(refVal_setRegistryId); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("patch_count")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("patch_count"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setPatchCount; - ok &= ModelBase::fromJson(fieldValue, refVal_setPatchCount); - setPatchCount(refVal_setPatchCount); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("is_autogenerated")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("is_autogenerated"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsAutogenerated; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsAutogenerated); - setIsAutogenerated(refVal_setIsAutogenerated); - - } - } return ok; } @@ -227,18 +177,6 @@ void CatalogSeedOptionSchema::toMultipart(std::shared_ptr mul { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("template_kind")), m_Template_kind.get())); } - if(m_Registry_id.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("registry_id")), m_Registry_id.get())); - } - if(m_Patch_count.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("patch_count")), m_Patch_count.get())); - } - if(m_Is_autogeneratedIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("is_autogenerated")), m_Is_autogenerated)); - } } bool CatalogSeedOptionSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -286,24 +224,6 @@ bool CatalogSeedOptionSchema::fromMultiPart(std::shared_ptr m ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("template_kind"))), refVal_setTemplateKind ); setTemplateKind(refVal_setTemplateKind); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("registry_id")))) - { - utility::string_t refVal_setRegistryId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("registry_id"))), refVal_setRegistryId ); - setRegistryId(refVal_setRegistryId); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("patch_count")))) - { - int32_t refVal_setPatchCount; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("patch_count"))), refVal_setPatchCount ); - setPatchCount(refVal_setPatchCount); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("is_autogenerated")))) - { - bool refVal_setIsAutogenerated; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("is_autogenerated"))), refVal_setIsAutogenerated ); - setIsAutogenerated(refVal_setIsAutogenerated); - } return ok; } @@ -431,65 +351,6 @@ void CatalogSeedOptionSchema::unsetTemplate_kind() { m_Template_kind.reset(); } -utility::string_t CatalogSeedOptionSchema::getRegistryId() const -{ - return m_Registry_id.get(); -} - - -void CatalogSeedOptionSchema::setRegistryId(const utility::string_t& value) -{ - m_Registry_id = value; -} - -bool CatalogSeedOptionSchema::registryIdIsSet() const -{ - return m_Registry_id.has_value(); -} - -void CatalogSeedOptionSchema::unsetRegistry_id() -{ - m_Registry_id.reset(); -} -int32_t CatalogSeedOptionSchema::getPatchCount() const -{ - return m_Patch_count.get(); -} - -void CatalogSeedOptionSchema::setPatchCount(int32_t value) -{ - m_Patch_count = value; -} - -bool CatalogSeedOptionSchema::patchCountIsSet() const -{ - return m_Patch_count.has_value(); -} - -void CatalogSeedOptionSchema::unsetPatch_count() -{ - m_Patch_count.reset(); -} -bool CatalogSeedOptionSchema::isIsAutogenerated() const -{ - return m_Is_autogenerated; -} - -void CatalogSeedOptionSchema::setIsAutogenerated(bool value) -{ - m_Is_autogenerated = value; - m_Is_autogeneratedIsSet = true; -} - -bool CatalogSeedOptionSchema::isAutogeneratedIsSet() const -{ - return m_Is_autogeneratedIsSet; -} - -void CatalogSeedOptionSchema::unsetIs_autogenerated() -{ - m_Is_autogeneratedIsSet = false; -} } } diff --git a/rest/src/model/CatalogSeedOptionsResponseSchema.cpp b/rest/src/model/CatalogSeedOptionsResponseSchema.cpp index eb06cf8..6051d8a 100644 --- a/rest/src/model/CatalogSeedOptionsResponseSchema.cpp +++ b/rest/src/model/CatalogSeedOptionsResponseSchema.cpp @@ -23,8 +23,6 @@ CatalogSeedOptionsResponseSchema::CatalogSeedOptionsResponseSchema() m_ControllersIsSet = false; m_MlmodelsIsSet = false; m_Workflow_templatesIsSet = false; - m_Asset_patchesIsSet = false; - m_Simplified_meshesIsSet = false; } CatalogSeedOptionsResponseSchema::~CatalogSeedOptionsResponseSchema() @@ -54,16 +52,6 @@ web::json::value CatalogSeedOptionsResponseSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("workflow_templates"))] = ModelBase::toJson(m_Workflow_templates); } - if(m_Asset_patchesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_patches"))] = ModelBase::toJson(m_Asset_patches); - } - if(m_Simplified_meshesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("simplified_meshes"))] = ModelBase::toJson(m_Simplified_meshes); - } return val; } @@ -104,28 +92,6 @@ bool CatalogSeedOptionsResponseSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_patches")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_patches"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setAssetPatches; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetPatches); - setAssetPatches(refVal_setAssetPatches); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setSimplifiedMeshes; - ok &= ModelBase::fromJson(fieldValue, refVal_setSimplifiedMeshes); - setSimplifiedMeshes(refVal_setSimplifiedMeshes); - - } - } return ok; } @@ -148,14 +114,6 @@ void CatalogSeedOptionsResponseSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workflow_templates")), m_Workflow_templates)); } - if(m_Asset_patchesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_patches")), m_Asset_patches)); - } - if(m_Simplified_meshesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("simplified_meshes")), m_Simplified_meshes)); - } } bool CatalogSeedOptionsResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -185,18 +143,6 @@ bool CatalogSeedOptionsResponseSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("workflow_templates"))), refVal_setWorkflowTemplates ); setWorkflowTemplates(refVal_setWorkflowTemplates); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_patches")))) - { - std::vector> refVal_setAssetPatches; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_patches"))), refVal_setAssetPatches ); - setAssetPatches(refVal_setAssetPatches); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes")))) - { - std::vector> refVal_setSimplifiedMeshes; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes"))), refVal_setSimplifiedMeshes ); - setSimplifiedMeshes(refVal_setSimplifiedMeshes); - } return ok; } @@ -264,48 +210,6 @@ void CatalogSeedOptionsResponseSchema::unsetWorkflow_templates() { m_Workflow_templatesIsSet = false; } -std::vector> CatalogSeedOptionsResponseSchema::getAssetPatches() const -{ - return m_Asset_patches; -} - - -void CatalogSeedOptionsResponseSchema::setAssetPatches(const std::vector>& value) -{ - m_Asset_patches = value; - m_Asset_patchesIsSet = true; -} - -bool CatalogSeedOptionsResponseSchema::assetPatchesIsSet() const -{ - return m_Asset_patchesIsSet; -} - -void CatalogSeedOptionsResponseSchema::unsetAsset_patches() -{ - m_Asset_patchesIsSet = false; -} -std::vector> CatalogSeedOptionsResponseSchema::getSimplifiedMeshes() const -{ - return m_Simplified_meshes; -} - - -void CatalogSeedOptionsResponseSchema::setSimplifiedMeshes(const std::vector>& value) -{ - m_Simplified_meshes = value; - m_Simplified_meshesIsSet = true; -} - -bool CatalogSeedOptionsResponseSchema::simplifiedMeshesIsSet() const -{ - return m_Simplified_meshesIsSet; -} - -void CatalogSeedOptionsResponseSchema::unsetSimplified_meshes() -{ - m_Simplified_meshesIsSet = false; -} } } diff --git a/rest/src/model/CatalogSeedRequestSchema.cpp b/rest/src/model/CatalogSeedRequestSchema.cpp index 0649693..70f298a 100644 --- a/rest/src/model/CatalogSeedRequestSchema.cpp +++ b/rest/src/model/CatalogSeedRequestSchema.cpp @@ -26,10 +26,6 @@ CatalogSeedRequestSchema::CatalogSeedRequestSchema() m_Seed_mlmodelsIsSet = false; m_Seed_workflow_templates = false; m_Seed_workflow_templatesIsSet = false; - m_Seed_asset_patches = false; - m_Seed_asset_patchesIsSet = false; - m_Seed_simplified_meshes = false; - m_Seed_simplified_meshesIsSet = false; } CatalogSeedRequestSchema::~CatalogSeedRequestSchema() @@ -64,16 +60,6 @@ web::json::value CatalogSeedRequestSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("seed_workflow_templates"))] = ModelBase::toJson(m_Seed_workflow_templates); } - if(m_Seed_asset_patchesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("seed_asset_patches"))] = ModelBase::toJson(m_Seed_asset_patches); - } - if(m_Seed_simplified_meshesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("seed_simplified_meshes"))] = ModelBase::toJson(m_Seed_simplified_meshes); - } if(m_Controller_keys.has_value()) { @@ -89,16 +75,6 @@ web::json::value CatalogSeedRequestSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("workflow_template_keys"))] = ModelBase::toJson(m_Workflow_template_keys.get()); } - if(m_Asset_patch_keys.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_patch_keys"))] = ModelBase::toJson(m_Asset_patch_keys.get()); - } - if(m_Simplified_mesh_keys.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("simplified_mesh_keys"))] = ModelBase::toJson(m_Simplified_mesh_keys.get()); - } return val; } @@ -150,28 +126,6 @@ bool CatalogSeedRequestSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("seed_asset_patches")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("seed_asset_patches"))); - if(!fieldValue.is_null()) - { - bool refVal_setSeedAssetPatches; - ok &= ModelBase::fromJson(fieldValue, refVal_setSeedAssetPatches); - setSeedAssetPatches(refVal_setSeedAssetPatches); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("seed_simplified_meshes")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("seed_simplified_meshes"))); - if(!fieldValue.is_null()) - { - bool refVal_setSeedSimplifiedMeshes; - ok &= ModelBase::fromJson(fieldValue, refVal_setSeedSimplifiedMeshes); - setSeedSimplifiedMeshes(refVal_setSeedSimplifiedMeshes); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controller_keys")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controller_keys"))); @@ -205,28 +159,6 @@ bool CatalogSeedRequestSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_patch_keys")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_patch_keys"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setAssetPatchKeys; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetPatchKeys); - setAssetPatchKeys(refVal_setAssetPatchKeys); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("simplified_mesh_keys")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("simplified_mesh_keys"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setSimplifiedMeshKeys; - ok &= ModelBase::fromJson(fieldValue, refVal_setSimplifiedMeshKeys); - setSimplifiedMeshKeys(refVal_setSimplifiedMeshKeys); - - } - } return ok; } @@ -253,14 +185,6 @@ void CatalogSeedRequestSchema::toMultipart(std::shared_ptr mu { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("seed_workflow_templates")), m_Seed_workflow_templates)); } - if(m_Seed_asset_patchesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("seed_asset_patches")), m_Seed_asset_patches)); - } - if(m_Seed_simplified_meshesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("seed_simplified_meshes")), m_Seed_simplified_meshes)); - } if(m_Controller_keys.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controller_keys")), m_Controller_keys.get())); @@ -273,14 +197,6 @@ void CatalogSeedRequestSchema::toMultipart(std::shared_ptr mu { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workflow_template_keys")), m_Workflow_template_keys.get())); } - if(m_Asset_patch_keys.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_patch_keys")), m_Asset_patch_keys.get())); - } - if(m_Simplified_mesh_keys.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("simplified_mesh_keys")), m_Simplified_mesh_keys.get())); - } } bool CatalogSeedRequestSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -316,18 +232,6 @@ bool CatalogSeedRequestSchema::fromMultiPart(std::shared_ptr ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("seed_workflow_templates"))), refVal_setSeedWorkflowTemplates ); setSeedWorkflowTemplates(refVal_setSeedWorkflowTemplates); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("seed_asset_patches")))) - { - bool refVal_setSeedAssetPatches; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("seed_asset_patches"))), refVal_setSeedAssetPatches ); - setSeedAssetPatches(refVal_setSeedAssetPatches); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("seed_simplified_meshes")))) - { - bool refVal_setSeedSimplifiedMeshes; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("seed_simplified_meshes"))), refVal_setSeedSimplifiedMeshes ); - setSeedSimplifiedMeshes(refVal_setSeedSimplifiedMeshes); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controller_keys")))) { std::vector refVal_setControllerKeys; @@ -346,18 +250,6 @@ bool CatalogSeedRequestSchema::fromMultiPart(std::shared_ptr ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workflow_template_keys"))), refVal_setWorkflowTemplateKeys ); setWorkflowTemplateKeys(refVal_setWorkflowTemplateKeys); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_patch_keys")))) - { - std::vector refVal_setAssetPatchKeys; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_patch_keys"))), refVal_setAssetPatchKeys ); - setAssetPatchKeys(refVal_setAssetPatchKeys); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("simplified_mesh_keys")))) - { - std::vector refVal_setSimplifiedMeshKeys; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("simplified_mesh_keys"))), refVal_setSimplifiedMeshKeys ); - setSimplifiedMeshKeys(refVal_setSimplifiedMeshKeys); - } return ok; } @@ -442,46 +334,6 @@ void CatalogSeedRequestSchema::unsetSeed_workflow_templates() { m_Seed_workflow_templatesIsSet = false; } -bool CatalogSeedRequestSchema::isSeedAssetPatches() const -{ - return m_Seed_asset_patches; -} - -void CatalogSeedRequestSchema::setSeedAssetPatches(bool value) -{ - m_Seed_asset_patches = value; - m_Seed_asset_patchesIsSet = true; -} - -bool CatalogSeedRequestSchema::seedAssetPatchesIsSet() const -{ - return m_Seed_asset_patchesIsSet; -} - -void CatalogSeedRequestSchema::unsetSeed_asset_patches() -{ - m_Seed_asset_patchesIsSet = false; -} -bool CatalogSeedRequestSchema::isSeedSimplifiedMeshes() const -{ - return m_Seed_simplified_meshes; -} - -void CatalogSeedRequestSchema::setSeedSimplifiedMeshes(bool value) -{ - m_Seed_simplified_meshes = value; - m_Seed_simplified_meshesIsSet = true; -} - -bool CatalogSeedRequestSchema::seedSimplifiedMeshesIsSet() const -{ - return m_Seed_simplified_meshesIsSet; -} - -void CatalogSeedRequestSchema::unsetSeed_simplified_meshes() -{ - m_Seed_simplified_meshesIsSet = false; -} std::vector CatalogSeedRequestSchema::getControllerKeys() const { return m_Controller_keys.get(); @@ -542,46 +394,6 @@ void CatalogSeedRequestSchema::unsetWorkflow_template_keys() { m_Workflow_template_keys.reset(); } -std::vector CatalogSeedRequestSchema::getAssetPatchKeys() const -{ - return m_Asset_patch_keys.get(); -} - - -void CatalogSeedRequestSchema::setAssetPatchKeys(const std::vector& value) -{ - m_Asset_patch_keys = value; -} - -bool CatalogSeedRequestSchema::assetPatchKeysIsSet() const -{ - return m_Asset_patch_keys.has_value(); -} - -void CatalogSeedRequestSchema::unsetAsset_patch_keys() -{ - m_Asset_patch_keys.reset(); -} -std::vector CatalogSeedRequestSchema::getSimplifiedMeshKeys() const -{ - return m_Simplified_mesh_keys.get(); -} - - -void CatalogSeedRequestSchema::setSimplifiedMeshKeys(const std::vector& value) -{ - m_Simplified_mesh_keys = value; -} - -bool CatalogSeedRequestSchema::simplifiedMeshKeysIsSet() const -{ - return m_Simplified_mesh_keys.has_value(); -} - -void CatalogSeedRequestSchema::unsetSimplified_mesh_keys() -{ - m_Simplified_mesh_keys.reset(); -} } } diff --git a/rest/src/model/CatalogSeedResponseSchema.cpp b/rest/src/model/CatalogSeedResponseSchema.cpp index c167b17..ff5e6bf 100644 --- a/rest/src/model/CatalogSeedResponseSchema.cpp +++ b/rest/src/model/CatalogSeedResponseSchema.cpp @@ -25,8 +25,6 @@ CatalogSeedResponseSchema::CatalogSeedResponseSchema() m_ControllersIsSet = false; m_MlmodelsIsSet = false; m_Workflow_templatesIsSet = false; - m_Asset_patchesIsSet = false; - m_Simplified_meshesIsSet = false; } CatalogSeedResponseSchema::~CatalogSeedResponseSchema() @@ -61,16 +59,6 @@ web::json::value CatalogSeedResponseSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("workflow_templates"))] = ModelBase::toJson(m_Workflow_templates); } - if(m_Asset_patchesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_patches"))] = ModelBase::toJson(m_Asset_patches); - } - if(m_Simplified_meshesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("simplified_meshes"))] = ModelBase::toJson(m_Simplified_meshes); - } return val; } @@ -122,28 +110,6 @@ bool CatalogSeedResponseSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_patches")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_patches"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setAssetPatches; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetPatches); - setAssetPatches(refVal_setAssetPatches); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setSimplifiedMeshes; - ok &= ModelBase::fromJson(fieldValue, refVal_setSimplifiedMeshes); - setSimplifiedMeshes(refVal_setSimplifiedMeshes); - - } - } return ok; } @@ -170,14 +136,6 @@ void CatalogSeedResponseSchema::toMultipart(std::shared_ptr m { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workflow_templates")), m_Workflow_templates)); } - if(m_Asset_patchesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_patches")), m_Asset_patches)); - } - if(m_Simplified_meshesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("simplified_meshes")), m_Simplified_meshes)); - } } bool CatalogSeedResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -213,18 +171,6 @@ bool CatalogSeedResponseSchema::fromMultiPart(std::shared_ptr ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workflow_templates"))), refVal_setWorkflowTemplates ); setWorkflowTemplates(refVal_setWorkflowTemplates); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_patches")))) - { - std::shared_ptr refVal_setAssetPatches; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_patches"))), refVal_setAssetPatches ); - setAssetPatches(refVal_setAssetPatches); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes")))) - { - std::shared_ptr refVal_setSimplifiedMeshes; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("simplified_meshes"))), refVal_setSimplifiedMeshes ); - setSimplifiedMeshes(refVal_setSimplifiedMeshes); - } return ok; } @@ -313,48 +259,6 @@ void CatalogSeedResponseSchema::unsetWorkflow_templates() { m_Workflow_templatesIsSet = false; } -std::shared_ptr CatalogSeedResponseSchema::getAssetPatches() const -{ - return m_Asset_patches; -} - - -void CatalogSeedResponseSchema::setAssetPatches(const std::shared_ptr& value) -{ - m_Asset_patches = value; - m_Asset_patchesIsSet = true; -} - -bool CatalogSeedResponseSchema::assetPatchesIsSet() const -{ - return m_Asset_patchesIsSet; -} - -void CatalogSeedResponseSchema::unsetAsset_patches() -{ - m_Asset_patchesIsSet = false; -} -std::shared_ptr CatalogSeedResponseSchema::getSimplifiedMeshes() const -{ - return m_Simplified_meshes; -} - - -void CatalogSeedResponseSchema::setSimplifiedMeshes(const std::shared_ptr& value) -{ - m_Simplified_meshes = value; - m_Simplified_meshesIsSet = true; -} - -bool CatalogSeedResponseSchema::simplifiedMeshesIsSet() const -{ - return m_Simplified_meshesIsSet; -} - -void CatalogSeedResponseSchema::unsetSimplified_meshes() -{ - m_Simplified_meshesIsSet = false; -} } } diff --git a/rest/src/model/ControllerPolicyCreateSchema.cpp b/rest/src/model/ControllerPolicyCreateSchema.cpp index 6484908..cca21d5 100644 --- a/rest/src/model/ControllerPolicyCreateSchema.cpp +++ b/rest/src/model/ControllerPolicyCreateSchema.cpp @@ -29,7 +29,6 @@ ControllerPolicyCreateSchema::ControllerPolicyCreateSchema() m_Controller_type = utility::conversions::to_string_t(""); m_Controller_typeIsSet = false; m_Asset_uuidsIsSet = false; - m_Asset_registry_idsIsSet = false; } ControllerPolicyCreateSchema::~ControllerPolicyCreateSchema() @@ -84,11 +83,6 @@ web::json::value ControllerPolicyCreateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("asset_uuids"))] = ModelBase::toJson(m_Asset_uuids); } - if(m_Asset_registry_idsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids"))] = ModelBase::toJson(m_Asset_registry_ids); - } if(m_Device.has_value()) { @@ -189,17 +183,6 @@ bool ControllerPolicyCreateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setAssetRegistryIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetRegistryIds); - setAssetRegistryIds(refVal_setAssetRegistryIds); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("device")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("device"))); @@ -253,10 +236,6 @@ void ControllerPolicyCreateSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_uuids")), m_Asset_uuids)); } - if(m_Asset_registry_idsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids")), m_Asset_registry_ids)); - } if(m_Device.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("device")), m_Device.get())); @@ -320,12 +299,6 @@ bool ControllerPolicyCreateSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuids"))), refVal_setAssetUuids ); setAssetUuids(refVal_setAssetUuids); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids")))) - { - std::vector refVal_setAssetRegistryIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids"))), refVal_setAssetRegistryIds ); - setAssetRegistryIds(refVal_setAssetRegistryIds); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("device")))) { utility::string_t refVal_setDevice; @@ -501,27 +474,6 @@ void ControllerPolicyCreateSchema::unsetAsset_uuids() { m_Asset_uuidsIsSet = false; } -std::vector ControllerPolicyCreateSchema::getAssetRegistryIds() const -{ - return m_Asset_registry_ids; -} - - -void ControllerPolicyCreateSchema::setAssetRegistryIds(const std::vector& value) -{ - m_Asset_registry_ids = value; - m_Asset_registry_idsIsSet = true; -} - -bool ControllerPolicyCreateSchema::assetRegistryIdsIsSet() const -{ - return m_Asset_registry_idsIsSet; -} - -void ControllerPolicyCreateSchema::unsetAsset_registry_ids() -{ - m_Asset_registry_idsIsSet = false; -} utility::string_t ControllerPolicyCreateSchema::getDevice() const { return m_Device.get(); diff --git a/rest/src/model/ControllerPolicyExecuteSchema.cpp b/rest/src/model/ControllerPolicyExecuteSchema.cpp index 5ef9102..91477a0 100644 --- a/rest/src/model/ControllerPolicyExecuteSchema.cpp +++ b/rest/src/model/ControllerPolicyExecuteSchema.cpp @@ -24,8 +24,6 @@ ControllerPolicyExecuteSchema::ControllerPolicyExecuteSchema() m_Twin_uuidIsSet = false; m_Execution = utility::conversions::to_string_t(""); m_ExecutionIsSet = false; - m_Confirm_live = false; - m_Confirm_liveIsSet = false; m_PayloadIsSet = false; m_Server_mode = false; m_Server_modeIsSet = false; @@ -60,18 +58,6 @@ web::json::value ControllerPolicyExecuteSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("mode"))] = ModelBase::toJson(refVal); } - if(m_Transport.has_value()) - { - - utility::string_t refVal = fromTransportEnum(m_Transport.get()); - val[utility::conversions::to_string_t(_XPLATSTR("transport"))] = ModelBase::toJson(refVal); - - } - if(m_Confirm_liveIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("confirm_live"))] = ModelBase::toJson(m_Confirm_live); - } if(m_Runtime_kind.has_value()) { @@ -170,16 +156,6 @@ web::json::value ControllerPolicyExecuteSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("server_mode"))] = ModelBase::toJson(m_Server_mode); } - if(m_Inference_command.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command"))] = ModelBase::toJson(m_Inference_command.get()); - } - if(m_Runtime_params.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("runtime_params"))] = ModelBase::toJson(m_Runtime_params.get()); - } return val; } @@ -221,29 +197,6 @@ bool ControllerPolicyExecuteSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("transport")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("transport"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTransport; - ok &= ModelBase::fromJson(fieldValue, refVal_setTransport); - - setTransport(toTransportEnum(refVal_setTransport)); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("confirm_live")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("confirm_live"))); - if(!fieldValue.is_null()) - { - bool refVal_setConfirmLive; - ok &= ModelBase::fromJson(fieldValue, refVal_setConfirmLive); - setConfirmLive(refVal_setConfirmLive); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("runtime_kind")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("runtime_kind"))); @@ -446,28 +399,6 @@ bool ControllerPolicyExecuteSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setInferenceCommand; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommand); - setInferenceCommand(refVal_setInferenceCommand); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("runtime_params")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("runtime_params"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setRuntimeParams; - ok &= ModelBase::fromJson(fieldValue, refVal_setRuntimeParams); - setRuntimeParams(refVal_setRuntimeParams); - - } - } return ok; } @@ -490,14 +421,6 @@ void ControllerPolicyExecuteSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("mode")), fromModeEnum(m_Mode.get()))); } - if(m_Transport.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("transport")), fromTransportEnum(m_Transport.get()))); - } - if(m_Confirm_liveIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("confirm_live")), m_Confirm_live)); - } if(m_Runtime_kind.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("runtime_kind")), fromRuntime_kindEnum(m_Runtime_kind.get()))); @@ -570,14 +493,6 @@ void ControllerPolicyExecuteSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("server_mode")), m_Server_mode)); } - if(m_Inference_command.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command")), m_Inference_command.get())); - } - if(m_Runtime_params.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("runtime_params")), m_Runtime_params.get())); - } } bool ControllerPolicyExecuteSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -607,18 +522,6 @@ bool ControllerPolicyExecuteSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("mode"))), refVal_setMode ); setMode(toModeEnum(refVal_setMode)); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("transport")))) - { - utility::string_t refVal_setTransport; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("transport"))), refVal_setTransport ); - setTransport(toTransportEnum(refVal_setTransport)); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("confirm_live")))) - { - bool refVal_setConfirmLive; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("confirm_live"))), refVal_setConfirmLive ); - setConfirmLive(refVal_setConfirmLive); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("runtime_kind")))) { utility::string_t refVal_setRuntimeKind; @@ -727,18 +630,6 @@ bool ControllerPolicyExecuteSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("server_mode"))), refVal_setServerMode ); setServerMode(refVal_setServerMode); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command")))) - { - std::map> refVal_setInferenceCommand; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command"))), refVal_setInferenceCommand ); - setInferenceCommand(refVal_setInferenceCommand); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("runtime_params")))) - { - std::map> refVal_setRuntimeParams; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("runtime_params"))), refVal_setRuntimeParams ); - setRuntimeParams(refVal_setRuntimeParams); - } return ok; } @@ -769,33 +660,6 @@ const utility::string_t ControllerPolicyExecuteSchema::fromModeEnum(const ModeEn } } -ControllerPolicyExecuteSchema::TransportEnum ControllerPolicyExecuteSchema::toTransportEnum(const utility::string_t& value) const -{ - - if (value == utility::conversions::to_string_t("zenoh")) { - return TransportEnum::ZENOH; - } - - if (value == utility::conversions::to_string_t("mqtt")) { - return TransportEnum::MQTT; - } - - throw std::invalid_argument("Invalid value for conversion to TransportEnum"); -} - - -const utility::string_t ControllerPolicyExecuteSchema::fromTransportEnum(const TransportEnum value) const -{ - switch(value) - { - - case TransportEnum::ZENOH: return utility::conversions::to_string_t("zenoh"); - - case TransportEnum::MQTT: return utility::conversions::to_string_t("mqtt"); - - } -} - ControllerPolicyExecuteSchema::Runtime_kindEnum ControllerPolicyExecuteSchema::toRuntime_kindEnum(const utility::string_t& value) const { @@ -985,46 +849,6 @@ void ControllerPolicyExecuteSchema::unsetMode() { m_Mode.reset(); } -ControllerPolicyExecuteSchema::TransportEnum ControllerPolicyExecuteSchema::getTransport() const -{ - return m_Transport.get(); -} - - -void ControllerPolicyExecuteSchema::setTransport(const TransportEnum value) -{ - m_Transport = value; -} - -bool ControllerPolicyExecuteSchema::transportIsSet() const -{ - return m_Transport.has_value(); -} - -void ControllerPolicyExecuteSchema::unsetTransport() -{ - m_Transport.reset(); -} -bool ControllerPolicyExecuteSchema::isConfirmLive() const -{ - return m_Confirm_live; -} - -void ControllerPolicyExecuteSchema::setConfirmLive(bool value) -{ - m_Confirm_live = value; - m_Confirm_liveIsSet = true; -} - -bool ControllerPolicyExecuteSchema::confirmLiveIsSet() const -{ - return m_Confirm_liveIsSet; -} - -void ControllerPolicyExecuteSchema::unsetConfirm_live() -{ - m_Confirm_liveIsSet = false; -} ControllerPolicyExecuteSchema::Runtime_kindEnum ControllerPolicyExecuteSchema::getRuntimeKind() const { return m_Runtime_kind.get(); @@ -1378,46 +1202,6 @@ void ControllerPolicyExecuteSchema::unsetServer_mode() { m_Server_modeIsSet = false; } -std::map> ControllerPolicyExecuteSchema::getInferenceCommand() const -{ - return m_Inference_command.get(); -} - - -void ControllerPolicyExecuteSchema::setInferenceCommand(const std::map>& value) -{ - m_Inference_command = value; -} - -bool ControllerPolicyExecuteSchema::inferenceCommandIsSet() const -{ - return m_Inference_command.has_value(); -} - -void ControllerPolicyExecuteSchema::unsetInference_command() -{ - m_Inference_command.reset(); -} -std::map> ControllerPolicyExecuteSchema::getRuntimeParams() const -{ - return m_Runtime_params.get(); -} - - -void ControllerPolicyExecuteSchema::setRuntimeParams(const std::map>& value) -{ - m_Runtime_params = value; -} - -bool ControllerPolicyExecuteSchema::runtimeParamsIsSet() const -{ - return m_Runtime_params.has_value(); -} - -void ControllerPolicyExecuteSchema::unsetRuntime_params() -{ - m_Runtime_params.reset(); -} } } diff --git a/rest/src/model/ControllerPolicyInferenceCommandResponseSchema.cpp b/rest/src/model/ControllerPolicyInferenceCommandResponseSchema.cpp deleted file mode 100644 index 2dc2d28..0000000 --- a/rest/src/model/ControllerPolicyInferenceCommandResponseSchema.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandResponseSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -ControllerPolicyInferenceCommandResponseSchema::ControllerPolicyInferenceCommandResponseSchema() -{ - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; - m_Topic = utility::conversions::to_string_t(""); - m_TopicIsSet = false; - m_Payload_sentIsSet = false; -} - -ControllerPolicyInferenceCommandResponseSchema::~ControllerPolicyInferenceCommandResponseSchema() -{ -} - -void ControllerPolicyInferenceCommandResponseSchema::validate() -{ - // TODO: implement validation -} - -web::json::value ControllerPolicyInferenceCommandResponseSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_StatusIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("status"))] = ModelBase::toJson(m_Status); - } - if(m_TopicIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("topic"))] = ModelBase::toJson(m_Topic); - } - if(m_Payload_sentIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("payload_sent"))] = ModelBase::toJson(m_Payload_sent); - } - - return val; -} - -bool ControllerPolicyInferenceCommandResponseSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("topic")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("topic"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTopic; - ok &= ModelBase::fromJson(fieldValue, refVal_setTopic); - setTopic(refVal_setTopic); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("payload_sent")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("payload_sent"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setPayloadSent; - ok &= ModelBase::fromJson(fieldValue, refVal_setPayloadSent); - setPayloadSent(refVal_setPayloadSent); - - } - } - return ok; -} - -void ControllerPolicyInferenceCommandResponseSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("status")), m_Status)); - } - if(m_TopicIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("topic")), m_Topic)); - } - if(m_Payload_sentIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("payload_sent")), m_Payload_sent)); - } -} - -bool ControllerPolicyInferenceCommandResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("topic")))) - { - utility::string_t refVal_setTopic; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("topic"))), refVal_setTopic ); - setTopic(refVal_setTopic); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("payload_sent")))) - { - std::map> refVal_setPayloadSent; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("payload_sent"))), refVal_setPayloadSent ); - setPayloadSent(refVal_setPayloadSent); - } - return ok; -} - - -utility::string_t ControllerPolicyInferenceCommandResponseSchema::getStatus() const -{ - return m_Status; -} - - -void ControllerPolicyInferenceCommandResponseSchema::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool ControllerPolicyInferenceCommandResponseSchema::statusIsSet() const -{ - return m_StatusIsSet; -} - -void ControllerPolicyInferenceCommandResponseSchema::unsetStatus() -{ - m_StatusIsSet = false; -} -utility::string_t ControllerPolicyInferenceCommandResponseSchema::getTopic() const -{ - return m_Topic; -} - - -void ControllerPolicyInferenceCommandResponseSchema::setTopic(const utility::string_t& value) -{ - m_Topic = value; - m_TopicIsSet = true; -} - -bool ControllerPolicyInferenceCommandResponseSchema::topicIsSet() const -{ - return m_TopicIsSet; -} - -void ControllerPolicyInferenceCommandResponseSchema::unsetTopic() -{ - m_TopicIsSet = false; -} -std::map> ControllerPolicyInferenceCommandResponseSchema::getPayloadSent() const -{ - return m_Payload_sent; -} - - -void ControllerPolicyInferenceCommandResponseSchema::setPayloadSent(const std::map>& value) -{ - m_Payload_sent = value; - m_Payload_sentIsSet = true; -} - -bool ControllerPolicyInferenceCommandResponseSchema::payloadSentIsSet() const -{ - return m_Payload_sentIsSet; -} - -void ControllerPolicyInferenceCommandResponseSchema::unsetPayload_sent() -{ - m_Payload_sentIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/ControllerPolicyInferenceCommandSchema.cpp b/rest/src/model/ControllerPolicyInferenceCommandSchema.cpp deleted file mode 100644 index b926c55..0000000 --- a/rest/src/model/ControllerPolicyInferenceCommandSchema.cpp +++ /dev/null @@ -1,218 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/ControllerPolicyInferenceCommandSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -ControllerPolicyInferenceCommandSchema::ControllerPolicyInferenceCommandSchema() -{ - m_Twin_uuid = utility::conversions::to_string_t(""); - m_Twin_uuidIsSet = false; - m_PayloadIsSet = false; -} - -ControllerPolicyInferenceCommandSchema::~ControllerPolicyInferenceCommandSchema() -{ -} - -void ControllerPolicyInferenceCommandSchema::validate() -{ - // TODO: implement validation -} - -web::json::value ControllerPolicyInferenceCommandSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Twin_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("twin_uuid"))] = ModelBase::toJson(m_Twin_uuid); - } - if(m_Command_name.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("command_name"))] = ModelBase::toJson(m_Command_name.get()); - } - if(m_PayloadIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("payload"))] = ModelBase::toJson(m_Payload); - } - - return val; -} - -bool ControllerPolicyInferenceCommandSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("twin_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("twin_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTwinUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setTwinUuid); - setTwinUuid(refVal_setTwinUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("command_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("command_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCommandName; - ok &= ModelBase::fromJson(fieldValue, refVal_setCommandName); - setCommandName(refVal_setCommandName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("payload")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("payload"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setPayload; - ok &= ModelBase::fromJson(fieldValue, refVal_setPayload); - setPayload(refVal_setPayload); - - } - } - return ok; -} - -void ControllerPolicyInferenceCommandSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Twin_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("twin_uuid")), m_Twin_uuid)); - } - if(m_Command_name.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("command_name")), m_Command_name.get())); - } - if(m_PayloadIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("payload")), m_Payload)); - } -} - -bool ControllerPolicyInferenceCommandSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("twin_uuid")))) - { - utility::string_t refVal_setTwinUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("twin_uuid"))), refVal_setTwinUuid ); - setTwinUuid(refVal_setTwinUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("command_name")))) - { - utility::string_t refVal_setCommandName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("command_name"))), refVal_setCommandName ); - setCommandName(refVal_setCommandName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("payload")))) - { - std::map> refVal_setPayload; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("payload"))), refVal_setPayload ); - setPayload(refVal_setPayload); - } - return ok; -} - - -utility::string_t ControllerPolicyInferenceCommandSchema::getTwinUuid() const -{ - return m_Twin_uuid; -} - - -void ControllerPolicyInferenceCommandSchema::setTwinUuid(const utility::string_t& value) -{ - m_Twin_uuid = value; - m_Twin_uuidIsSet = true; -} - -bool ControllerPolicyInferenceCommandSchema::twinUuidIsSet() const -{ - return m_Twin_uuidIsSet; -} - -void ControllerPolicyInferenceCommandSchema::unsetTwin_uuid() -{ - m_Twin_uuidIsSet = false; -} -utility::string_t ControllerPolicyInferenceCommandSchema::getCommandName() const -{ - return m_Command_name.get(); -} - - -void ControllerPolicyInferenceCommandSchema::setCommandName(const utility::string_t& value) -{ - m_Command_name = value; -} - -bool ControllerPolicyInferenceCommandSchema::commandNameIsSet() const -{ - return m_Command_name.has_value(); -} - -void ControllerPolicyInferenceCommandSchema::unsetCommand_name() -{ - m_Command_name.reset(); -} -std::map> ControllerPolicyInferenceCommandSchema::getPayload() const -{ - return m_Payload; -} - - -void ControllerPolicyInferenceCommandSchema::setPayload(const std::map>& value) -{ - m_Payload = value; - m_PayloadIsSet = true; -} - -bool ControllerPolicyInferenceCommandSchema::payloadIsSet() const -{ - return m_PayloadIsSet; -} - -void ControllerPolicyInferenceCommandSchema::unsetPayload() -{ - m_PayloadIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/ControllerPolicyUpdateSchema.cpp b/rest/src/model/ControllerPolicyUpdateSchema.cpp index 34ed2a1..53a5549 100644 --- a/rest/src/model/ControllerPolicyUpdateSchema.cpp +++ b/rest/src/model/ControllerPolicyUpdateSchema.cpp @@ -64,11 +64,6 @@ web::json::value ControllerPolicyUpdateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("asset_uuids"))] = ModelBase::toJson(m_Asset_uuids.get()); } - if(m_Asset_registry_ids.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids"))] = ModelBase::toJson(m_Asset_registry_ids.get()); - } if(m_Device.has_value()) { @@ -147,17 +142,6 @@ bool ControllerPolicyUpdateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setAssetRegistryIds; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetRegistryIds); - setAssetRegistryIds(refVal_setAssetRegistryIds); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("device")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("device"))); @@ -203,10 +187,6 @@ void ControllerPolicyUpdateSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_uuids")), m_Asset_uuids.get())); } - if(m_Asset_registry_ids.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids")), m_Asset_registry_ids.get())); - } if(m_Device.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("device")), m_Device.get())); @@ -258,12 +238,6 @@ bool ControllerPolicyUpdateSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuids"))), refVal_setAssetUuids ); setAssetUuids(refVal_setAssetUuids); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids")))) - { - std::vector refVal_setAssetRegistryIds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_registry_ids"))), refVal_setAssetRegistryIds ); - setAssetRegistryIds(refVal_setAssetRegistryIds); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("device")))) { utility::string_t refVal_setDevice; @@ -394,26 +368,6 @@ void ControllerPolicyUpdateSchema::unsetAsset_uuids() { m_Asset_uuids.reset(); } -std::vector ControllerPolicyUpdateSchema::getAssetRegistryIds() const -{ - return m_Asset_registry_ids.get(); -} - - -void ControllerPolicyUpdateSchema::setAssetRegistryIds(const std::vector& value) -{ - m_Asset_registry_ids = value; -} - -bool ControllerPolicyUpdateSchema::assetRegistryIdsIsSet() const -{ - return m_Asset_registry_ids.has_value(); -} - -void ControllerPolicyUpdateSchema::unsetAsset_registry_ids() -{ - m_Asset_registry_ids.reset(); -} utility::string_t ControllerPolicyUpdateSchema::getDevice() const { return m_Device.get(); diff --git a/rest/src/model/DatasetCreateSchema.cpp b/rest/src/model/DatasetCreateSchema.cpp index 6d5e26b..668da0d 100644 --- a/rest/src/model/DatasetCreateSchema.cpp +++ b/rest/src/model/DatasetCreateSchema.cpp @@ -50,11 +50,6 @@ web::json::value DatasetCreateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata.get()); } - if(m_Include_audio.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("include_audio"))] = ModelBase::toJson(m_Include_audio.get()); - } return val; } @@ -95,17 +90,6 @@ bool DatasetCreateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("include_audio")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("include_audio"))); - if(!fieldValue.is_null()) - { - bool refVal_setIncludeAudio; - ok &= ModelBase::fromJson(fieldValue, refVal_setIncludeAudio); - setIncludeAudio(refVal_setIncludeAudio); - - } - } return ok; } @@ -128,10 +112,6 @@ void DatasetCreateSchema::toMultipart(std::shared_ptr multipa { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata.get())); } - if(m_Include_audio.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("include_audio")), m_Include_audio.get())); - } } bool DatasetCreateSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -161,12 +141,6 @@ bool DatasetCreateSchema::fromMultiPart(std::shared_ptr multi ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); setMetadata(refVal_setMetadata); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("include_audio")))) - { - bool refVal_setIncludeAudio; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("include_audio"))), refVal_setIncludeAudio ); - setIncludeAudio(refVal_setIncludeAudio); - } return ok; } @@ -232,25 +206,6 @@ void DatasetCreateSchema::unsetMetadata() { m_Metadata.reset(); } -bool DatasetCreateSchema::isIncludeAudio() const -{ - return m_Include_audio.get(); -} - -void DatasetCreateSchema::setIncludeAudio(bool value) -{ - m_Include_audio = value; -} - -bool DatasetCreateSchema::includeAudioIsSet() const -{ - return m_Include_audio.has_value(); -} - -void DatasetCreateSchema::unsetInclude_audio() -{ - m_Include_audio.reset(); -} } } diff --git a/rest/src/model/DriverControllerAssetSchema.cpp b/rest/src/model/DriverControllerAssetSchema.cpp deleted file mode 100644 index 7a7b96e..0000000 --- a/rest/src/model/DriverControllerAssetSchema.cpp +++ /dev/null @@ -1,504 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/DriverControllerAssetSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -DriverControllerAssetSchema::DriverControllerAssetSchema() -{ - m_Asset_uuid = utility::conversions::to_string_t(""); - m_Asset_uuidIsSet = false; - m_Name = utility::conversions::to_string_t(""); - m_NameIsSet = false; - m_Catalog_key = utility::conversions::to_string_t(""); - m_Catalog_keyIsSet = false; - m_Mqtt_command_schemaIsSet = false; - m_Controllable_joint_namesIsSet = false; - m_Already_seeded = false; - m_Already_seededIsSet = false; -} - -DriverControllerAssetSchema::~DriverControllerAssetSchema() -{ -} - -void DriverControllerAssetSchema::validate() -{ - // TODO: implement validation -} - -web::json::value DriverControllerAssetSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Asset_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))] = ModelBase::toJson(m_Asset_uuid); - } - if(m_NameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("name"))] = ModelBase::toJson(m_Name); - } - if(m_Slug.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("slug"))] = ModelBase::toJson(m_Slug.get()); - } - if(m_Registry_id.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("registry_id"))] = ModelBase::toJson(m_Registry_id.get()); - } - if(m_Catalog_keyIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("catalog_key"))] = ModelBase::toJson(m_Catalog_key); - } - if(m_Mqtt_command_schemaIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema"))] = ModelBase::toJson(m_Mqtt_command_schema); - } - if(m_Controllable_joint_namesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names"))] = ModelBase::toJson(m_Controllable_joint_names); - } - if(m_Already_seededIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("already_seeded"))] = ModelBase::toJson(m_Already_seeded); - } - if(m_Controller_policy_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid"))] = ModelBase::toJson(m_Controller_policy_uuid.get()); - } - - return val; -} - -bool DriverControllerAssetSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetUuid); - setAssetUuid(refVal_setAssetUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromJson(fieldValue, refVal_setName); - setName(refVal_setName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("slug")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("slug"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setSlug; - ok &= ModelBase::fromJson(fieldValue, refVal_setSlug); - setSlug(refVal_setSlug); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("registry_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("registry_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setRegistryId; - ok &= ModelBase::fromJson(fieldValue, refVal_setRegistryId); - setRegistryId(refVal_setRegistryId); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("catalog_key")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("catalog_key"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCatalogKey; - ok &= ModelBase::fromJson(fieldValue, refVal_setCatalogKey); - setCatalogKey(refVal_setCatalogKey); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setMqttCommandSchema; - ok &= ModelBase::fromJson(fieldValue, refVal_setMqttCommandSchema); - setMqttCommandSchema(refVal_setMqttCommandSchema); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setControllableJointNames; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllableJointNames); - setControllableJointNames(refVal_setControllableJointNames); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("already_seeded")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("already_seeded"))); - if(!fieldValue.is_null()) - { - bool refVal_setAlreadySeeded; - ok &= ModelBase::fromJson(fieldValue, refVal_setAlreadySeeded); - setAlreadySeeded(refVal_setAlreadySeeded); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setControllerPolicyUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllerPolicyUuid); - setControllerPolicyUuid(refVal_setControllerPolicyUuid); - - } - } - return ok; -} - -void DriverControllerAssetSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Asset_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_uuid")), m_Asset_uuid)); - } - if(m_NameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("name")), m_Name)); - } - if(m_Slug.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("slug")), m_Slug.get())); - } - if(m_Registry_id.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("registry_id")), m_Registry_id.get())); - } - if(m_Catalog_keyIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("catalog_key")), m_Catalog_key)); - } - if(m_Mqtt_command_schemaIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema")), m_Mqtt_command_schema)); - } - if(m_Controllable_joint_namesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names")), m_Controllable_joint_names)); - } - if(m_Already_seededIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("already_seeded")), m_Already_seeded)); - } - if(m_Controller_policy_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid")), m_Controller_policy_uuid.get())); - } -} - -bool DriverControllerAssetSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))), refVal_setAssetUuid ); - setAssetUuid(refVal_setAssetUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("name")))) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("name"))), refVal_setName ); - setName(refVal_setName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("slug")))) - { - utility::string_t refVal_setSlug; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("slug"))), refVal_setSlug ); - setSlug(refVal_setSlug); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("registry_id")))) - { - utility::string_t refVal_setRegistryId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("registry_id"))), refVal_setRegistryId ); - setRegistryId(refVal_setRegistryId); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("catalog_key")))) - { - utility::string_t refVal_setCatalogKey; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("catalog_key"))), refVal_setCatalogKey ); - setCatalogKey(refVal_setCatalogKey); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema")))) - { - std::map> refVal_setMqttCommandSchema; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema"))), refVal_setMqttCommandSchema ); - setMqttCommandSchema(refVal_setMqttCommandSchema); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names")))) - { - std::vector refVal_setControllableJointNames; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names"))), refVal_setControllableJointNames ); - setControllableJointNames(refVal_setControllableJointNames); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("already_seeded")))) - { - bool refVal_setAlreadySeeded; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("already_seeded"))), refVal_setAlreadySeeded ); - setAlreadySeeded(refVal_setAlreadySeeded); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid")))) - { - utility::string_t refVal_setControllerPolicyUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid"))), refVal_setControllerPolicyUuid ); - setControllerPolicyUuid(refVal_setControllerPolicyUuid); - } - return ok; -} - - -utility::string_t DriverControllerAssetSchema::getAssetUuid() const -{ - return m_Asset_uuid; -} - - -void DriverControllerAssetSchema::setAssetUuid(const utility::string_t& value) -{ - m_Asset_uuid = value; - m_Asset_uuidIsSet = true; -} - -bool DriverControllerAssetSchema::assetUuidIsSet() const -{ - return m_Asset_uuidIsSet; -} - -void DriverControllerAssetSchema::unsetAsset_uuid() -{ - m_Asset_uuidIsSet = false; -} -utility::string_t DriverControllerAssetSchema::getName() const -{ - return m_Name; -} - - -void DriverControllerAssetSchema::setName(const utility::string_t& value) -{ - m_Name = value; - m_NameIsSet = true; -} - -bool DriverControllerAssetSchema::nameIsSet() const -{ - return m_NameIsSet; -} - -void DriverControllerAssetSchema::unsetName() -{ - m_NameIsSet = false; -} -utility::string_t DriverControllerAssetSchema::getSlug() const -{ - return m_Slug.get(); -} - - -void DriverControllerAssetSchema::setSlug(const utility::string_t& value) -{ - m_Slug = value; -} - -bool DriverControllerAssetSchema::slugIsSet() const -{ - return m_Slug.has_value(); -} - -void DriverControllerAssetSchema::unsetSlug() -{ - m_Slug.reset(); -} -utility::string_t DriverControllerAssetSchema::getRegistryId() const -{ - return m_Registry_id.get(); -} - - -void DriverControllerAssetSchema::setRegistryId(const utility::string_t& value) -{ - m_Registry_id = value; -} - -bool DriverControllerAssetSchema::registryIdIsSet() const -{ - return m_Registry_id.has_value(); -} - -void DriverControllerAssetSchema::unsetRegistry_id() -{ - m_Registry_id.reset(); -} -utility::string_t DriverControllerAssetSchema::getCatalogKey() const -{ - return m_Catalog_key; -} - - -void DriverControllerAssetSchema::setCatalogKey(const utility::string_t& value) -{ - m_Catalog_key = value; - m_Catalog_keyIsSet = true; -} - -bool DriverControllerAssetSchema::catalogKeyIsSet() const -{ - return m_Catalog_keyIsSet; -} - -void DriverControllerAssetSchema::unsetCatalog_key() -{ - m_Catalog_keyIsSet = false; -} -std::map> DriverControllerAssetSchema::getMqttCommandSchema() const -{ - return m_Mqtt_command_schema; -} - - -void DriverControllerAssetSchema::setMqttCommandSchema(const std::map>& value) -{ - m_Mqtt_command_schema = value; - m_Mqtt_command_schemaIsSet = true; -} - -bool DriverControllerAssetSchema::mqttCommandSchemaIsSet() const -{ - return m_Mqtt_command_schemaIsSet; -} - -void DriverControllerAssetSchema::unsetMqtt_command_schema() -{ - m_Mqtt_command_schemaIsSet = false; -} -std::vector DriverControllerAssetSchema::getControllableJointNames() const -{ - return m_Controllable_joint_names; -} - - -void DriverControllerAssetSchema::setControllableJointNames(const std::vector& value) -{ - m_Controllable_joint_names = value; - m_Controllable_joint_namesIsSet = true; -} - -bool DriverControllerAssetSchema::controllableJointNamesIsSet() const -{ - return m_Controllable_joint_namesIsSet; -} - -void DriverControllerAssetSchema::unsetControllable_joint_names() -{ - m_Controllable_joint_namesIsSet = false; -} -bool DriverControllerAssetSchema::isAlreadySeeded() const -{ - return m_Already_seeded; -} - -void DriverControllerAssetSchema::setAlreadySeeded(bool value) -{ - m_Already_seeded = value; - m_Already_seededIsSet = true; -} - -bool DriverControllerAssetSchema::alreadySeededIsSet() const -{ - return m_Already_seededIsSet; -} - -void DriverControllerAssetSchema::unsetAlready_seeded() -{ - m_Already_seededIsSet = false; -} -utility::string_t DriverControllerAssetSchema::getControllerPolicyUuid() const -{ - return m_Controller_policy_uuid.get(); -} - - -void DriverControllerAssetSchema::setControllerPolicyUuid(const utility::string_t& value) -{ - m_Controller_policy_uuid = value; -} - -bool DriverControllerAssetSchema::controllerPolicyUuidIsSet() const -{ - return m_Controller_policy_uuid.has_value(); -} - -void DriverControllerAssetSchema::unsetController_policy_uuid() -{ - m_Controller_policy_uuid.reset(); -} - -} -} -} -} - - diff --git a/rest/src/model/DriverControllerAssetsResponseSchema.cpp b/rest/src/model/DriverControllerAssetsResponseSchema.cpp deleted file mode 100644 index decb7d1..0000000 --- a/rest/src/model/DriverControllerAssetsResponseSchema.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/DriverControllerAssetsResponseSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -DriverControllerAssetsResponseSchema::DriverControllerAssetsResponseSchema() -{ - m_AssetsIsSet = false; -} - -DriverControllerAssetsResponseSchema::~DriverControllerAssetsResponseSchema() -{ -} - -void DriverControllerAssetsResponseSchema::validate() -{ - // TODO: implement validation -} - -web::json::value DriverControllerAssetsResponseSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_AssetsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("assets"))] = ModelBase::toJson(m_Assets); - } - - return val; -} - -bool DriverControllerAssetsResponseSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("assets")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("assets"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setAssets; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssets); - setAssets(refVal_setAssets); - - } - } - return ok; -} - -void DriverControllerAssetsResponseSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_AssetsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("assets")), m_Assets)); - } -} - -bool DriverControllerAssetsResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("assets")))) - { - std::vector> refVal_setAssets; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("assets"))), refVal_setAssets ); - setAssets(refVal_setAssets); - } - return ok; -} - - -std::vector> DriverControllerAssetsResponseSchema::getAssets() const -{ - return m_Assets; -} - - -void DriverControllerAssetsResponseSchema::setAssets(const std::vector>& value) -{ - m_Assets = value; - m_AssetsIsSet = true; -} - -bool DriverControllerAssetsResponseSchema::assetsIsSet() const -{ - return m_AssetsIsSet; -} - -void DriverControllerAssetsResponseSchema::unsetAssets() -{ - m_AssetsIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/DriverControllerSeedItemSchema.cpp b/rest/src/model/DriverControllerSeedItemSchema.cpp deleted file mode 100644 index a5e392d..0000000 --- a/rest/src/model/DriverControllerSeedItemSchema.cpp +++ /dev/null @@ -1,361 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/DriverControllerSeedItemSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -DriverControllerSeedItemSchema::DriverControllerSeedItemSchema() -{ - m_Asset_uuid = utility::conversions::to_string_t(""); - m_Asset_uuidIsSet = false; - m_Keyboard_bindingsIsSet = false; - m_Joint_mode = utility::conversions::to_string_t(""); - m_Joint_modeIsSet = false; - m_Control_surfacesIsSet = false; -} - -DriverControllerSeedItemSchema::~DriverControllerSeedItemSchema() -{ -} - -void DriverControllerSeedItemSchema::validate() -{ - // TODO: implement validation -} - -web::json::value DriverControllerSeedItemSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Asset_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))] = ModelBase::toJson(m_Asset_uuid); - } - if(m_Name.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("name"))] = ModelBase::toJson(m_Name.get()); - } - if(m_Description.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("description"))] = ModelBase::toJson(m_Description.get()); - } - if(m_Keyboard_bindingsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("keyboard_bindings"))] = ModelBase::toJson(m_Keyboard_bindings); - } - if(m_Joint_modeIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("joint_mode"))] = ModelBase::toJson(m_Joint_mode); - } - if(m_Control_surfacesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("control_surfaces"))] = ModelBase::toJson(m_Control_surfaces); - } - - return val; -} - -bool DriverControllerSeedItemSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetUuid); - setAssetUuid(refVal_setAssetUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromJson(fieldValue, refVal_setName); - setName(refVal_setName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("description")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("description"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromJson(fieldValue, refVal_setDescription); - setDescription(refVal_setDescription); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("keyboard_bindings")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("keyboard_bindings"))); - if(!fieldValue.is_null()) - { - std::vector>> refVal_setKeyboardBindings; - ok &= ModelBase::fromJson(fieldValue, refVal_setKeyboardBindings); - setKeyboardBindings(refVal_setKeyboardBindings); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("joint_mode")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("joint_mode"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setJointMode; - ok &= ModelBase::fromJson(fieldValue, refVal_setJointMode); - setJointMode(refVal_setJointMode); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("control_surfaces")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("control_surfaces"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setControlSurfaces; - ok &= ModelBase::fromJson(fieldValue, refVal_setControlSurfaces); - setControlSurfaces(refVal_setControlSurfaces); - - } - } - return ok; -} - -void DriverControllerSeedItemSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Asset_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_uuid")), m_Asset_uuid)); - } - if(m_Name.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("name")), m_Name.get())); - } - if(m_Description.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("description")), m_Description.get())); - } - if(m_Keyboard_bindingsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("keyboard_bindings")), m_Keyboard_bindings)); - } - if(m_Joint_modeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("joint_mode")), m_Joint_mode)); - } - if(m_Control_surfacesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("control_surfaces")), m_Control_surfaces)); - } -} - -bool DriverControllerSeedItemSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))), refVal_setAssetUuid ); - setAssetUuid(refVal_setAssetUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("name")))) - { - utility::string_t refVal_setName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("name"))), refVal_setName ); - setName(refVal_setName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("description")))) - { - utility::string_t refVal_setDescription; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("description"))), refVal_setDescription ); - setDescription(refVal_setDescription); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("keyboard_bindings")))) - { - std::vector>> refVal_setKeyboardBindings; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("keyboard_bindings"))), refVal_setKeyboardBindings ); - setKeyboardBindings(refVal_setKeyboardBindings); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("joint_mode")))) - { - utility::string_t refVal_setJointMode; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("joint_mode"))), refVal_setJointMode ); - setJointMode(refVal_setJointMode); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("control_surfaces")))) - { - std::vector refVal_setControlSurfaces; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("control_surfaces"))), refVal_setControlSurfaces ); - setControlSurfaces(refVal_setControlSurfaces); - } - return ok; -} - - -utility::string_t DriverControllerSeedItemSchema::getAssetUuid() const -{ - return m_Asset_uuid; -} - - -void DriverControllerSeedItemSchema::setAssetUuid(const utility::string_t& value) -{ - m_Asset_uuid = value; - m_Asset_uuidIsSet = true; -} - -bool DriverControllerSeedItemSchema::assetUuidIsSet() const -{ - return m_Asset_uuidIsSet; -} - -void DriverControllerSeedItemSchema::unsetAsset_uuid() -{ - m_Asset_uuidIsSet = false; -} -utility::string_t DriverControllerSeedItemSchema::getName() const -{ - return m_Name.get(); -} - - -void DriverControllerSeedItemSchema::setName(const utility::string_t& value) -{ - m_Name = value; -} - -bool DriverControllerSeedItemSchema::nameIsSet() const -{ - return m_Name.has_value(); -} - -void DriverControllerSeedItemSchema::unsetName() -{ - m_Name.reset(); -} -utility::string_t DriverControllerSeedItemSchema::getDescription() const -{ - return m_Description.get(); -} - - -void DriverControllerSeedItemSchema::setDescription(const utility::string_t& value) -{ - m_Description = value; -} - -bool DriverControllerSeedItemSchema::descriptionIsSet() const -{ - return m_Description.has_value(); -} - -void DriverControllerSeedItemSchema::unsetDescription() -{ - m_Description.reset(); -} -std::vector>> DriverControllerSeedItemSchema::getKeyboardBindings() const -{ - return m_Keyboard_bindings; -} - - -void DriverControllerSeedItemSchema::setKeyboardBindings(const std::vector>>& value) -{ - m_Keyboard_bindings = value; - m_Keyboard_bindingsIsSet = true; -} - -bool DriverControllerSeedItemSchema::keyboardBindingsIsSet() const -{ - return m_Keyboard_bindingsIsSet; -} - -void DriverControllerSeedItemSchema::unsetKeyboard_bindings() -{ - m_Keyboard_bindingsIsSet = false; -} -utility::string_t DriverControllerSeedItemSchema::getJointMode() const -{ - return m_Joint_mode; -} - - -void DriverControllerSeedItemSchema::setJointMode(const utility::string_t& value) -{ - m_Joint_mode = value; - m_Joint_modeIsSet = true; -} - -bool DriverControllerSeedItemSchema::jointModeIsSet() const -{ - return m_Joint_modeIsSet; -} - -void DriverControllerSeedItemSchema::unsetJoint_mode() -{ - m_Joint_modeIsSet = false; -} -std::vector DriverControllerSeedItemSchema::getControlSurfaces() const -{ - return m_Control_surfaces; -} - - -void DriverControllerSeedItemSchema::setControlSurfaces(const std::vector& value) -{ - m_Control_surfaces = value; - m_Control_surfacesIsSet = true; -} - -bool DriverControllerSeedItemSchema::controlSurfacesIsSet() const -{ - return m_Control_surfacesIsSet; -} - -void DriverControllerSeedItemSchema::unsetControl_surfaces() -{ - m_Control_surfacesIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/DriverControllerSeedRequestSchema.cpp b/rest/src/model/DriverControllerSeedRequestSchema.cpp deleted file mode 100644 index 7f94cbe..0000000 --- a/rest/src/model/DriverControllerSeedRequestSchema.cpp +++ /dev/null @@ -1,217 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/DriverControllerSeedRequestSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -DriverControllerSeedRequestSchema::DriverControllerSeedRequestSchema() -{ - m_Ensure_template = false; - m_Ensure_templateIsSet = false; - m_ControllersIsSet = false; -} - -DriverControllerSeedRequestSchema::~DriverControllerSeedRequestSchema() -{ -} - -void DriverControllerSeedRequestSchema::validate() -{ - // TODO: implement validation -} - -web::json::value DriverControllerSeedRequestSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Workspace_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))] = ModelBase::toJson(m_Workspace_uuid.get()); - } - if(m_Ensure_templateIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("ensure_template"))] = ModelBase::toJson(m_Ensure_template); - } - if(m_ControllersIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controllers"))] = ModelBase::toJson(m_Controllers); - } - - return val; -} - -bool DriverControllerSeedRequestSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkspaceUuid); - setWorkspaceUuid(refVal_setWorkspaceUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("ensure_template")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("ensure_template"))); - if(!fieldValue.is_null()) - { - bool refVal_setEnsureTemplate; - ok &= ModelBase::fromJson(fieldValue, refVal_setEnsureTemplate); - setEnsureTemplate(refVal_setEnsureTemplate); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controllers")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controllers"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setControllers; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllers); - setControllers(refVal_setControllers); - - } - } - return ok; -} - -void DriverControllerSeedRequestSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Workspace_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")), m_Workspace_uuid.get())); - } - if(m_Ensure_templateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("ensure_template")), m_Ensure_template)); - } - if(m_ControllersIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controllers")), m_Controllers)); - } -} - -bool DriverControllerSeedRequestSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))), refVal_setWorkspaceUuid ); - setWorkspaceUuid(refVal_setWorkspaceUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("ensure_template")))) - { - bool refVal_setEnsureTemplate; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("ensure_template"))), refVal_setEnsureTemplate ); - setEnsureTemplate(refVal_setEnsureTemplate); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controllers")))) - { - std::vector> refVal_setControllers; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controllers"))), refVal_setControllers ); - setControllers(refVal_setControllers); - } - return ok; -} - - -utility::string_t DriverControllerSeedRequestSchema::getWorkspaceUuid() const -{ - return m_Workspace_uuid.get(); -} - - -void DriverControllerSeedRequestSchema::setWorkspaceUuid(const utility::string_t& value) -{ - m_Workspace_uuid = value; -} - -bool DriverControllerSeedRequestSchema::workspaceUuidIsSet() const -{ - return m_Workspace_uuid.has_value(); -} - -void DriverControllerSeedRequestSchema::unsetWorkspace_uuid() -{ - m_Workspace_uuid.reset(); -} -bool DriverControllerSeedRequestSchema::isEnsureTemplate() const -{ - return m_Ensure_template; -} - -void DriverControllerSeedRequestSchema::setEnsureTemplate(bool value) -{ - m_Ensure_template = value; - m_Ensure_templateIsSet = true; -} - -bool DriverControllerSeedRequestSchema::ensureTemplateIsSet() const -{ - return m_Ensure_templateIsSet; -} - -void DriverControllerSeedRequestSchema::unsetEnsure_template() -{ - m_Ensure_templateIsSet = false; -} -std::vector> DriverControllerSeedRequestSchema::getControllers() const -{ - return m_Controllers; -} - - -void DriverControllerSeedRequestSchema::setControllers(const std::vector>& value) -{ - m_Controllers = value; - m_ControllersIsSet = true; -} - -bool DriverControllerSeedRequestSchema::controllersIsSet() const -{ - return m_ControllersIsSet; -} - -void DriverControllerSeedRequestSchema::unsetControllers() -{ - m_ControllersIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/DriverControllerSeedResponseSchema.cpp b/rest/src/model/DriverControllerSeedResponseSchema.cpp deleted file mode 100644 index ff21da2..0000000 --- a/rest/src/model/DriverControllerSeedResponseSchema.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/DriverControllerSeedResponseSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -DriverControllerSeedResponseSchema::DriverControllerSeedResponseSchema() -{ - m_Workspace_uuid = utility::conversions::to_string_t(""); - m_Workspace_uuidIsSet = false; - m_r_templateIsSet = false; - m_ControllersIsSet = false; -} - -DriverControllerSeedResponseSchema::~DriverControllerSeedResponseSchema() -{ -} - -void DriverControllerSeedResponseSchema::validate() -{ - // TODO: implement validation -} - -web::json::value DriverControllerSeedResponseSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Workspace_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))] = ModelBase::toJson(m_Workspace_uuid); - } - if(m_r_templateIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("template"))] = ModelBase::toJson(m_r_template); - } - if(m_ControllersIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controllers"))] = ModelBase::toJson(m_Controllers); - } - - return val; -} - -bool DriverControllerSeedResponseSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkspaceUuid); - setWorkspaceUuid(refVal_setWorkspaceUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("template")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("template"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setRTemplate; - ok &= ModelBase::fromJson(fieldValue, refVal_setRTemplate); - setRTemplate(refVal_setRTemplate); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controllers")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controllers"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setControllers; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllers); - setControllers(refVal_setControllers); - - } - } - return ok; -} - -void DriverControllerSeedResponseSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Workspace_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")), m_Workspace_uuid)); - } - if(m_r_templateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("template")), m_r_template)); - } - if(m_ControllersIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controllers")), m_Controllers)); - } -} - -bool DriverControllerSeedResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))), refVal_setWorkspaceUuid ); - setWorkspaceUuid(refVal_setWorkspaceUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("template")))) - { - std::shared_ptr refVal_setRTemplate; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("template"))), refVal_setRTemplate ); - setRTemplate(refVal_setRTemplate); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controllers")))) - { - std::shared_ptr refVal_setControllers; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controllers"))), refVal_setControllers ); - setControllers(refVal_setControllers); - } - return ok; -} - - -utility::string_t DriverControllerSeedResponseSchema::getWorkspaceUuid() const -{ - return m_Workspace_uuid; -} - - -void DriverControllerSeedResponseSchema::setWorkspaceUuid(const utility::string_t& value) -{ - m_Workspace_uuid = value; - m_Workspace_uuidIsSet = true; -} - -bool DriverControllerSeedResponseSchema::workspaceUuidIsSet() const -{ - return m_Workspace_uuidIsSet; -} - -void DriverControllerSeedResponseSchema::unsetWorkspace_uuid() -{ - m_Workspace_uuidIsSet = false; -} -std::shared_ptr DriverControllerSeedResponseSchema::getRTemplate() const -{ - return m_r_template; -} - - -void DriverControllerSeedResponseSchema::setRTemplate(const std::shared_ptr& value) -{ - m_r_template = value; - m_r_templateIsSet = true; -} - -bool DriverControllerSeedResponseSchema::rTemplateIsSet() const -{ - return m_r_templateIsSet; -} - -void DriverControllerSeedResponseSchema::unsetr_template() -{ - m_r_templateIsSet = false; -} -std::shared_ptr DriverControllerSeedResponseSchema::getControllers() const -{ - return m_Controllers; -} - - -void DriverControllerSeedResponseSchema::setControllers(const std::shared_ptr& value) -{ - m_Controllers = value; - m_ControllersIsSet = true; -} - -bool DriverControllerSeedResponseSchema::controllersIsSet() const -{ - return m_ControllersIsSet; -} - -void DriverControllerSeedResponseSchema::unsetControllers() -{ - m_ControllersIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/EnsureControllerPolicyResponseSchema.cpp b/rest/src/model/EnsureControllerPolicyResponseSchema.cpp deleted file mode 100644 index db64d79..0000000 --- a/rest/src/model/EnsureControllerPolicyResponseSchema.cpp +++ /dev/null @@ -1,309 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/EnsureControllerPolicyResponseSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -EnsureControllerPolicyResponseSchema::EnsureControllerPolicyResponseSchema() -{ - m_Attached = false; - m_AttachedIsSet = false; - m_Auto_attached = false; - m_Auto_attachedIsSet = false; -} - -EnsureControllerPolicyResponseSchema::~EnsureControllerPolicyResponseSchema() -{ -} - -void EnsureControllerPolicyResponseSchema::validate() -{ - // TODO: implement validation -} - -web::json::value EnsureControllerPolicyResponseSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_AttachedIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("attached"))] = ModelBase::toJson(m_Attached); - } - if(m_Auto_attachedIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("auto_attached"))] = ModelBase::toJson(m_Auto_attached); - } - if(m_Controller_policy_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid"))] = ModelBase::toJson(m_Controller_policy_uuid.get()); - } - if(m_Controller_policy_name.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controller_policy_name"))] = ModelBase::toJson(m_Controller_policy_name.get()); - } - if(m_Message.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("message"))] = ModelBase::toJson(m_Message.get()); - } - - return val; -} - -bool EnsureControllerPolicyResponseSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("attached")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("attached"))); - if(!fieldValue.is_null()) - { - bool refVal_setAttached; - ok &= ModelBase::fromJson(fieldValue, refVal_setAttached); - setAttached(refVal_setAttached); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("auto_attached")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("auto_attached"))); - if(!fieldValue.is_null()) - { - bool refVal_setAutoAttached; - ok &= ModelBase::fromJson(fieldValue, refVal_setAutoAttached); - setAutoAttached(refVal_setAutoAttached); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setControllerPolicyUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllerPolicyUuid); - setControllerPolicyUuid(refVal_setControllerPolicyUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controller_policy_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controller_policy_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setControllerPolicyName; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllerPolicyName); - setControllerPolicyName(refVal_setControllerPolicyName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("message")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("message"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessage); - setMessage(refVal_setMessage); - - } - } - return ok; -} - -void EnsureControllerPolicyResponseSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_AttachedIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("attached")), m_Attached)); - } - if(m_Auto_attachedIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("auto_attached")), m_Auto_attached)); - } - if(m_Controller_policy_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid")), m_Controller_policy_uuid.get())); - } - if(m_Controller_policy_name.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controller_policy_name")), m_Controller_policy_name.get())); - } - if(m_Message.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("message")), m_Message.get())); - } -} - -bool EnsureControllerPolicyResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("attached")))) - { - bool refVal_setAttached; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("attached"))), refVal_setAttached ); - setAttached(refVal_setAttached); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("auto_attached")))) - { - bool refVal_setAutoAttached; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("auto_attached"))), refVal_setAutoAttached ); - setAutoAttached(refVal_setAutoAttached); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid")))) - { - utility::string_t refVal_setControllerPolicyUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controller_policy_uuid"))), refVal_setControllerPolicyUuid ); - setControllerPolicyUuid(refVal_setControllerPolicyUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controller_policy_name")))) - { - utility::string_t refVal_setControllerPolicyName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controller_policy_name"))), refVal_setControllerPolicyName ); - setControllerPolicyName(refVal_setControllerPolicyName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("message")))) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("message"))), refVal_setMessage ); - setMessage(refVal_setMessage); - } - return ok; -} - - -bool EnsureControllerPolicyResponseSchema::isAttached() const -{ - return m_Attached; -} - -void EnsureControllerPolicyResponseSchema::setAttached(bool value) -{ - m_Attached = value; - m_AttachedIsSet = true; -} - -bool EnsureControllerPolicyResponseSchema::attachedIsSet() const -{ - return m_AttachedIsSet; -} - -void EnsureControllerPolicyResponseSchema::unsetAttached() -{ - m_AttachedIsSet = false; -} -bool EnsureControllerPolicyResponseSchema::isAutoAttached() const -{ - return m_Auto_attached; -} - -void EnsureControllerPolicyResponseSchema::setAutoAttached(bool value) -{ - m_Auto_attached = value; - m_Auto_attachedIsSet = true; -} - -bool EnsureControllerPolicyResponseSchema::autoAttachedIsSet() const -{ - return m_Auto_attachedIsSet; -} - -void EnsureControllerPolicyResponseSchema::unsetAuto_attached() -{ - m_Auto_attachedIsSet = false; -} -utility::string_t EnsureControllerPolicyResponseSchema::getControllerPolicyUuid() const -{ - return m_Controller_policy_uuid.get(); -} - - -void EnsureControllerPolicyResponseSchema::setControllerPolicyUuid(const utility::string_t& value) -{ - m_Controller_policy_uuid = value; -} - -bool EnsureControllerPolicyResponseSchema::controllerPolicyUuidIsSet() const -{ - return m_Controller_policy_uuid.has_value(); -} - -void EnsureControllerPolicyResponseSchema::unsetController_policy_uuid() -{ - m_Controller_policy_uuid.reset(); -} -utility::string_t EnsureControllerPolicyResponseSchema::getControllerPolicyName() const -{ - return m_Controller_policy_name.get(); -} - - -void EnsureControllerPolicyResponseSchema::setControllerPolicyName(const utility::string_t& value) -{ - m_Controller_policy_name = value; -} - -bool EnsureControllerPolicyResponseSchema::controllerPolicyNameIsSet() const -{ - return m_Controller_policy_name.has_value(); -} - -void EnsureControllerPolicyResponseSchema::unsetController_policy_name() -{ - m_Controller_policy_name.reset(); -} -utility::string_t EnsureControllerPolicyResponseSchema::getMessage() const -{ - return m_Message.get(); -} - - -void EnsureControllerPolicyResponseSchema::setMessage(const utility::string_t& value) -{ - m_Message = value; -} - -bool EnsureControllerPolicyResponseSchema::messageIsSet() const -{ - return m_Message.has_value(); -} - -void EnsureControllerPolicyResponseSchema::unsetMessage() -{ - m_Message.reset(); -} - -} -} -} -} - - diff --git a/rest/src/model/EpisodeSchema.cpp b/rest/src/model/EpisodeSchema.cpp index 69d16cc..6f02560 100644 --- a/rest/src/model/EpisodeSchema.cpp +++ b/rest/src/model/EpisodeSchema.cpp @@ -34,7 +34,6 @@ EpisodeSchema::EpisodeSchema() m_Created_atIsSet = false; m_Updated_at = utility::datetime(); m_Updated_atIsSet = false; - m_AudioIsSet = false; } EpisodeSchema::~EpisodeSchema() @@ -99,11 +98,6 @@ web::json::value EpisodeSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("updated_by"))] = ModelBase::toJson(m_Updated_by.get()); } - if(m_AudioIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("audio"))] = ModelBase::toJson(m_Audio); - } return val; } @@ -221,17 +215,6 @@ bool EpisodeSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("audio")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("audio"))); - if(!fieldValue.is_null()) - { - std::vector>> refVal_setAudio; - ok &= ModelBase::fromJson(fieldValue, refVal_setAudio); - setAudio(refVal_setAudio); - - } - } return ok; } @@ -282,10 +265,6 @@ void EpisodeSchema::toMultipart(std::shared_ptr multipart, co { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("updated_by")), m_Updated_by.get())); } - if(m_AudioIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("audio")), m_Audio)); - } } bool EpisodeSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -357,12 +336,6 @@ bool EpisodeSchema::fromMultiPart(std::shared_ptr multipart, ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("updated_by"))), refVal_setUpdatedBy ); setUpdatedBy(refVal_setUpdatedBy); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("audio")))) - { - std::vector>> refVal_setAudio; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("audio"))), refVal_setAudio ); - setAudio(refVal_setAudio); - } return ok; } @@ -573,27 +546,6 @@ void EpisodeSchema::unsetUpdated_by() { m_Updated_by.reset(); } -std::vector>> EpisodeSchema::getAudio() const -{ - return m_Audio; -} - - -void EpisodeSchema::setAudio(const std::vector>>& value) -{ - m_Audio = value; - m_AudioIsSet = true; -} - -bool EpisodeSchema::audioIsSet() const -{ - return m_AudioIsSet; -} - -void EpisodeSchema::unsetAudio() -{ - m_AudioIsSet = false; -} } } diff --git a/rest/src/model/HardwareOrderAdminSchema.cpp b/rest/src/model/HardwareOrderAdminSchema.cpp deleted file mode 100644 index 975a37e..0000000 --- a/rest/src/model/HardwareOrderAdminSchema.cpp +++ /dev/null @@ -1,1344 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/HardwareOrderAdminSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HardwareOrderAdminSchema::HardwareOrderAdminSchema() -{ - m_Uuid = utility::conversions::to_string_t(""); - m_UuidIsSet = false; - m_Organization_uuid = utility::conversions::to_string_t(""); - m_Organization_uuidIsSet = false; - m_Workspace_uuid = utility::conversions::to_string_t(""); - m_Workspace_uuidIsSet = false; - m_Created_by_uuid = utility::conversions::to_string_t(""); - m_Created_by_uuidIsSet = false; - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; - m_Purchase_type = utility::conversions::to_string_t(""); - m_Purchase_typeIsSet = false; - m_Total_cost_credits = utility::conversions::to_string_t(""); - m_Total_cost_creditsIsSet = false; - m_Tracking_number = utility::conversions::to_string_t(""); - m_Tracking_numberIsSet = false; - m_Shipping_label = utility::conversions::to_string_t(""); - m_Shipping_labelIsSet = false; - m_Shipping_contact_name = utility::conversions::to_string_t(""); - m_Shipping_contact_nameIsSet = false; - m_Shipping_contact_phone = utility::conversions::to_string_t(""); - m_Shipping_contact_phoneIsSet = false; - m_Shipping_contact_email = utility::conversions::to_string_t(""); - m_Shipping_contact_emailIsSet = false; - m_Shipping_address_line1 = utility::conversions::to_string_t(""); - m_Shipping_address_line1IsSet = false; - m_Shipping_address_line2 = utility::conversions::to_string_t(""); - m_Shipping_address_line2IsSet = false; - m_Shipping_city = utility::conversions::to_string_t(""); - m_Shipping_cityIsSet = false; - m_Shipping_state = utility::conversions::to_string_t(""); - m_Shipping_stateIsSet = false; - m_Shipping_postal_code = utility::conversions::to_string_t(""); - m_Shipping_postal_codeIsSet = false; - m_Shipping_country = utility::conversions::to_string_t(""); - m_Shipping_countryIsSet = false; - m_MetadataIsSet = false; - m_Created_at = utility::conversions::to_string_t(""); - m_Created_atIsSet = false; - m_Updated_at = utility::conversions::to_string_t(""); - m_Updated_atIsSet = false; - m_Line_itemsIsSet = false; - m_Organization_name = utility::conversions::to_string_t(""); - m_Organization_nameIsSet = false; - m_Workspace_name = utility::conversions::to_string_t(""); - m_Workspace_nameIsSet = false; - m_Created_by_email = utility::conversions::to_string_t(""); - m_Created_by_emailIsSet = false; -} - -HardwareOrderAdminSchema::~HardwareOrderAdminSchema() -{ -} - -void HardwareOrderAdminSchema::validate() -{ - // TODO: implement validation -} - -web::json::value HardwareOrderAdminSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_UuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("uuid"))] = ModelBase::toJson(m_Uuid); - } - if(m_Organization_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("organization_uuid"))] = ModelBase::toJson(m_Organization_uuid); - } - if(m_Workspace_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))] = ModelBase::toJson(m_Workspace_uuid); - } - if(m_Created_by_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("created_by_uuid"))] = ModelBase::toJson(m_Created_by_uuid); - } - if(m_StatusIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("status"))] = ModelBase::toJson(m_Status); - } - if(m_Purchase_typeIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("purchase_type"))] = ModelBase::toJson(m_Purchase_type); - } - if(m_Total_cost_creditsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("total_cost_credits"))] = ModelBase::toJson(m_Total_cost_credits); - } - if(m_Tracking_numberIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("tracking_number"))] = ModelBase::toJson(m_Tracking_number); - } - if(m_Delivery_address_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))] = ModelBase::toJson(m_Delivery_address_uuid.get()); - } - if(m_Shipping_labelIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_label"))] = ModelBase::toJson(m_Shipping_label); - } - if(m_Shipping_contact_nameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))] = ModelBase::toJson(m_Shipping_contact_name); - } - if(m_Shipping_contact_phoneIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))] = ModelBase::toJson(m_Shipping_contact_phone); - } - if(m_Shipping_contact_emailIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))] = ModelBase::toJson(m_Shipping_contact_email); - } - if(m_Shipping_address_line1IsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))] = ModelBase::toJson(m_Shipping_address_line1); - } - if(m_Shipping_address_line2IsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))] = ModelBase::toJson(m_Shipping_address_line2); - } - if(m_Shipping_cityIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_city"))] = ModelBase::toJson(m_Shipping_city); - } - if(m_Shipping_stateIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_state"))] = ModelBase::toJson(m_Shipping_state); - } - if(m_Shipping_postal_codeIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))] = ModelBase::toJson(m_Shipping_postal_code); - } - if(m_Shipping_countryIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_country"))] = ModelBase::toJson(m_Shipping_country); - } - if(m_MetadataIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata); - } - if(m_Created_atIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("created_at"))] = ModelBase::toJson(m_Created_at); - } - if(m_Updated_atIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("updated_at"))] = ModelBase::toJson(m_Updated_at); - } - if(m_Line_itemsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("line_items"))] = ModelBase::toJson(m_Line_items); - } - if(m_Organization_nameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("organization_name"))] = ModelBase::toJson(m_Organization_name); - } - if(m_Workspace_nameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workspace_name"))] = ModelBase::toJson(m_Workspace_name); - } - if(m_Created_by_emailIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("created_by_email"))] = ModelBase::toJson(m_Created_by_email); - } - - return val; -} - -bool HardwareOrderAdminSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); - setUuid(refVal_setUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("organization_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("organization_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setOrganizationUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationUuid); - setOrganizationUuid(refVal_setOrganizationUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkspaceUuid); - setWorkspaceUuid(refVal_setWorkspaceUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCreatedByUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setCreatedByUuid); - setCreatedByUuid(refVal_setCreatedByUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("purchase_type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("purchase_type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPurchaseType; - ok &= ModelBase::fromJson(fieldValue, refVal_setPurchaseType); - setPurchaseType(refVal_setPurchaseType); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTotalCostCredits; - ok &= ModelBase::fromJson(fieldValue, refVal_setTotalCostCredits); - setTotalCostCredits(refVal_setTotalCostCredits); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrackingNumber); - setTrackingNumber(refVal_setTrackingNumber); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDeliveryAddressUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setDeliveryAddressUuid); - setDeliveryAddressUuid(refVal_setDeliveryAddressUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_label")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_label"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingLabel; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingLabel); - setShippingLabel(refVal_setShippingLabel); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactName; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactName); - setShippingContactName(refVal_setShippingContactName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactPhone); - setShippingContactPhone(refVal_setShippingContactPhone); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactEmail; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactEmail); - setShippingContactEmail(refVal_setShippingContactEmail); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingAddressLine1; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingAddressLine1); - setShippingAddressLine1(refVal_setShippingAddressLine1); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingAddressLine2; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingAddressLine2); - setShippingAddressLine2(refVal_setShippingAddressLine2); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_city")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_city"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingCity; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingCity); - setShippingCity(refVal_setShippingCity); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_state")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_state"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingState; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingState); - setShippingState(refVal_setShippingState); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingPostalCode; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingPostalCode); - setShippingPostalCode(refVal_setShippingPostalCode); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_country")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_country"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingCountry; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingCountry); - setShippingCountry(refVal_setShippingCountry); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("metadata"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromJson(fieldValue, refVal_setMetadata); - setMetadata(refVal_setMetadata); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("created_at")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("created_at"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCreatedAt; - ok &= ModelBase::fromJson(fieldValue, refVal_setCreatedAt); - setCreatedAt(refVal_setCreatedAt); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("updated_at")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("updated_at"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUpdatedAt; - ok &= ModelBase::fromJson(fieldValue, refVal_setUpdatedAt); - setUpdatedAt(refVal_setUpdatedAt); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("line_items")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("line_items"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setLineItems; - ok &= ModelBase::fromJson(fieldValue, refVal_setLineItems); - setLineItems(refVal_setLineItems); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("organization_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("organization_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setOrganizationName; - ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationName); - setOrganizationName(refVal_setOrganizationName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workspace_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workspace_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkspaceName; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkspaceName); - setWorkspaceName(refVal_setWorkspaceName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("created_by_email")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("created_by_email"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCreatedByEmail; - ok &= ModelBase::fromJson(fieldValue, refVal_setCreatedByEmail); - setCreatedByEmail(refVal_setCreatedByEmail); - - } - } - return ok; -} - -void HardwareOrderAdminSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_UuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("uuid")), m_Uuid)); - } - if(m_Organization_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("organization_uuid")), m_Organization_uuid)); - } - if(m_Workspace_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")), m_Workspace_uuid)); - } - if(m_Created_by_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("created_by_uuid")), m_Created_by_uuid)); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("status")), m_Status)); - } - if(m_Purchase_typeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("purchase_type")), m_Purchase_type)); - } - if(m_Total_cost_creditsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("total_cost_credits")), m_Total_cost_credits)); - } - if(m_Tracking_numberIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("tracking_number")), m_Tracking_number)); - } - if(m_Delivery_address_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")), m_Delivery_address_uuid.get())); - } - if(m_Shipping_labelIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_label")), m_Shipping_label)); - } - if(m_Shipping_contact_nameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")), m_Shipping_contact_name)); - } - if(m_Shipping_contact_phoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")), m_Shipping_contact_phone)); - } - if(m_Shipping_contact_emailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")), m_Shipping_contact_email)); - } - if(m_Shipping_address_line1IsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")), m_Shipping_address_line1)); - } - if(m_Shipping_address_line2IsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")), m_Shipping_address_line2)); - } - if(m_Shipping_cityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_city")), m_Shipping_city)); - } - if(m_Shipping_stateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_state")), m_Shipping_state)); - } - if(m_Shipping_postal_codeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")), m_Shipping_postal_code)); - } - if(m_Shipping_countryIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_country")), m_Shipping_country)); - } - if(m_MetadataIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata)); - } - if(m_Created_atIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("created_at")), m_Created_at)); - } - if(m_Updated_atIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("updated_at")), m_Updated_at)); - } - if(m_Line_itemsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("line_items")), m_Line_items)); - } - if(m_Organization_nameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("organization_name")), m_Organization_name)); - } - if(m_Workspace_nameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workspace_name")), m_Workspace_name)); - } - if(m_Created_by_emailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("created_by_email")), m_Created_by_email)); - } -} - -bool HardwareOrderAdminSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("uuid")))) - { - utility::string_t refVal_setUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("uuid"))), refVal_setUuid ); - setUuid(refVal_setUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("organization_uuid")))) - { - utility::string_t refVal_setOrganizationUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("organization_uuid"))), refVal_setOrganizationUuid ); - setOrganizationUuid(refVal_setOrganizationUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))), refVal_setWorkspaceUuid ); - setWorkspaceUuid(refVal_setWorkspaceUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid")))) - { - utility::string_t refVal_setCreatedByUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid"))), refVal_setCreatedByUuid ); - setCreatedByUuid(refVal_setCreatedByUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("purchase_type")))) - { - utility::string_t refVal_setPurchaseType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("purchase_type"))), refVal_setPurchaseType ); - setPurchaseType(refVal_setPurchaseType); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits")))) - { - utility::string_t refVal_setTotalCostCredits; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits"))), refVal_setTotalCostCredits ); - setTotalCostCredits(refVal_setTotalCostCredits); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))), refVal_setTrackingNumber ); - setTrackingNumber(refVal_setTrackingNumber); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")))) - { - utility::string_t refVal_setDeliveryAddressUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))), refVal_setDeliveryAddressUuid ); - setDeliveryAddressUuid(refVal_setDeliveryAddressUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_label")))) - { - utility::string_t refVal_setShippingLabel; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_label"))), refVal_setShippingLabel ); - setShippingLabel(refVal_setShippingLabel); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")))) - { - utility::string_t refVal_setShippingContactName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))), refVal_setShippingContactName ); - setShippingContactName(refVal_setShippingContactName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")))) - { - utility::string_t refVal_setShippingContactPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))), refVal_setShippingContactPhone ); - setShippingContactPhone(refVal_setShippingContactPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")))) - { - utility::string_t refVal_setShippingContactEmail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))), refVal_setShippingContactEmail ); - setShippingContactEmail(refVal_setShippingContactEmail); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")))) - { - utility::string_t refVal_setShippingAddressLine1; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))), refVal_setShippingAddressLine1 ); - setShippingAddressLine1(refVal_setShippingAddressLine1); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")))) - { - utility::string_t refVal_setShippingAddressLine2; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))), refVal_setShippingAddressLine2 ); - setShippingAddressLine2(refVal_setShippingAddressLine2); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_city")))) - { - utility::string_t refVal_setShippingCity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_city"))), refVal_setShippingCity ); - setShippingCity(refVal_setShippingCity); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_state")))) - { - utility::string_t refVal_setShippingState; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_state"))), refVal_setShippingState ); - setShippingState(refVal_setShippingState); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")))) - { - utility::string_t refVal_setShippingPostalCode; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))), refVal_setShippingPostalCode ); - setShippingPostalCode(refVal_setShippingPostalCode); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_country")))) - { - utility::string_t refVal_setShippingCountry; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_country"))), refVal_setShippingCountry ); - setShippingCountry(refVal_setShippingCountry); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); - setMetadata(refVal_setMetadata); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("created_at")))) - { - utility::string_t refVal_setCreatedAt; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("created_at"))), refVal_setCreatedAt ); - setCreatedAt(refVal_setCreatedAt); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("updated_at")))) - { - utility::string_t refVal_setUpdatedAt; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("updated_at"))), refVal_setUpdatedAt ); - setUpdatedAt(refVal_setUpdatedAt); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("line_items")))) - { - std::vector> refVal_setLineItems; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("line_items"))), refVal_setLineItems ); - setLineItems(refVal_setLineItems); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("organization_name")))) - { - utility::string_t refVal_setOrganizationName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("organization_name"))), refVal_setOrganizationName ); - setOrganizationName(refVal_setOrganizationName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workspace_name")))) - { - utility::string_t refVal_setWorkspaceName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workspace_name"))), refVal_setWorkspaceName ); - setWorkspaceName(refVal_setWorkspaceName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("created_by_email")))) - { - utility::string_t refVal_setCreatedByEmail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("created_by_email"))), refVal_setCreatedByEmail ); - setCreatedByEmail(refVal_setCreatedByEmail); - } - return ok; -} - - -utility::string_t HardwareOrderAdminSchema::getUuid() const -{ - return m_Uuid; -} - - -void HardwareOrderAdminSchema::setUuid(const utility::string_t& value) -{ - m_Uuid = value; - m_UuidIsSet = true; -} - -bool HardwareOrderAdminSchema::uuidIsSet() const -{ - return m_UuidIsSet; -} - -void HardwareOrderAdminSchema::unsetUuid() -{ - m_UuidIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getOrganizationUuid() const -{ - return m_Organization_uuid; -} - - -void HardwareOrderAdminSchema::setOrganizationUuid(const utility::string_t& value) -{ - m_Organization_uuid = value; - m_Organization_uuidIsSet = true; -} - -bool HardwareOrderAdminSchema::organizationUuidIsSet() const -{ - return m_Organization_uuidIsSet; -} - -void HardwareOrderAdminSchema::unsetOrganization_uuid() -{ - m_Organization_uuidIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getWorkspaceUuid() const -{ - return m_Workspace_uuid; -} - - -void HardwareOrderAdminSchema::setWorkspaceUuid(const utility::string_t& value) -{ - m_Workspace_uuid = value; - m_Workspace_uuidIsSet = true; -} - -bool HardwareOrderAdminSchema::workspaceUuidIsSet() const -{ - return m_Workspace_uuidIsSet; -} - -void HardwareOrderAdminSchema::unsetWorkspace_uuid() -{ - m_Workspace_uuidIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getCreatedByUuid() const -{ - return m_Created_by_uuid; -} - - -void HardwareOrderAdminSchema::setCreatedByUuid(const utility::string_t& value) -{ - m_Created_by_uuid = value; - m_Created_by_uuidIsSet = true; -} - -bool HardwareOrderAdminSchema::createdByUuidIsSet() const -{ - return m_Created_by_uuidIsSet; -} - -void HardwareOrderAdminSchema::unsetCreated_by_uuid() -{ - m_Created_by_uuidIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getStatus() const -{ - return m_Status; -} - - -void HardwareOrderAdminSchema::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool HardwareOrderAdminSchema::statusIsSet() const -{ - return m_StatusIsSet; -} - -void HardwareOrderAdminSchema::unsetStatus() -{ - m_StatusIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getPurchaseType() const -{ - return m_Purchase_type; -} - - -void HardwareOrderAdminSchema::setPurchaseType(const utility::string_t& value) -{ - m_Purchase_type = value; - m_Purchase_typeIsSet = true; -} - -bool HardwareOrderAdminSchema::purchaseTypeIsSet() const -{ - return m_Purchase_typeIsSet; -} - -void HardwareOrderAdminSchema::unsetPurchase_type() -{ - m_Purchase_typeIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getTotalCostCredits() const -{ - return m_Total_cost_credits; -} - - -void HardwareOrderAdminSchema::setTotalCostCredits(const utility::string_t& value) -{ - m_Total_cost_credits = value; - m_Total_cost_creditsIsSet = true; -} - -bool HardwareOrderAdminSchema::totalCostCreditsIsSet() const -{ - return m_Total_cost_creditsIsSet; -} - -void HardwareOrderAdminSchema::unsetTotal_cost_credits() -{ - m_Total_cost_creditsIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getTrackingNumber() const -{ - return m_Tracking_number; -} - - -void HardwareOrderAdminSchema::setTrackingNumber(const utility::string_t& value) -{ - m_Tracking_number = value; - m_Tracking_numberIsSet = true; -} - -bool HardwareOrderAdminSchema::trackingNumberIsSet() const -{ - return m_Tracking_numberIsSet; -} - -void HardwareOrderAdminSchema::unsetTracking_number() -{ - m_Tracking_numberIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getDeliveryAddressUuid() const -{ - return m_Delivery_address_uuid.get(); -} - - -void HardwareOrderAdminSchema::setDeliveryAddressUuid(const utility::string_t& value) -{ - m_Delivery_address_uuid = value; -} - -bool HardwareOrderAdminSchema::deliveryAddressUuidIsSet() const -{ - return m_Delivery_address_uuid.has_value(); -} - -void HardwareOrderAdminSchema::unsetDelivery_address_uuid() -{ - m_Delivery_address_uuid.reset(); -} -utility::string_t HardwareOrderAdminSchema::getShippingLabel() const -{ - return m_Shipping_label; -} - - -void HardwareOrderAdminSchema::setShippingLabel(const utility::string_t& value) -{ - m_Shipping_label = value; - m_Shipping_labelIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingLabelIsSet() const -{ - return m_Shipping_labelIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_label() -{ - m_Shipping_labelIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingContactName() const -{ - return m_Shipping_contact_name; -} - - -void HardwareOrderAdminSchema::setShippingContactName(const utility::string_t& value) -{ - m_Shipping_contact_name = value; - m_Shipping_contact_nameIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingContactNameIsSet() const -{ - return m_Shipping_contact_nameIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_contact_name() -{ - m_Shipping_contact_nameIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingContactPhone() const -{ - return m_Shipping_contact_phone; -} - - -void HardwareOrderAdminSchema::setShippingContactPhone(const utility::string_t& value) -{ - m_Shipping_contact_phone = value; - m_Shipping_contact_phoneIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingContactPhoneIsSet() const -{ - return m_Shipping_contact_phoneIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_contact_phone() -{ - m_Shipping_contact_phoneIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingContactEmail() const -{ - return m_Shipping_contact_email; -} - - -void HardwareOrderAdminSchema::setShippingContactEmail(const utility::string_t& value) -{ - m_Shipping_contact_email = value; - m_Shipping_contact_emailIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingContactEmailIsSet() const -{ - return m_Shipping_contact_emailIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_contact_email() -{ - m_Shipping_contact_emailIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingAddressLine1() const -{ - return m_Shipping_address_line1; -} - - -void HardwareOrderAdminSchema::setShippingAddressLine1(const utility::string_t& value) -{ - m_Shipping_address_line1 = value; - m_Shipping_address_line1IsSet = true; -} - -bool HardwareOrderAdminSchema::shippingAddressLine1IsSet() const -{ - return m_Shipping_address_line1IsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_address_line1() -{ - m_Shipping_address_line1IsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingAddressLine2() const -{ - return m_Shipping_address_line2; -} - - -void HardwareOrderAdminSchema::setShippingAddressLine2(const utility::string_t& value) -{ - m_Shipping_address_line2 = value; - m_Shipping_address_line2IsSet = true; -} - -bool HardwareOrderAdminSchema::shippingAddressLine2IsSet() const -{ - return m_Shipping_address_line2IsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_address_line2() -{ - m_Shipping_address_line2IsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingCity() const -{ - return m_Shipping_city; -} - - -void HardwareOrderAdminSchema::setShippingCity(const utility::string_t& value) -{ - m_Shipping_city = value; - m_Shipping_cityIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingCityIsSet() const -{ - return m_Shipping_cityIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_city() -{ - m_Shipping_cityIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingState() const -{ - return m_Shipping_state; -} - - -void HardwareOrderAdminSchema::setShippingState(const utility::string_t& value) -{ - m_Shipping_state = value; - m_Shipping_stateIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingStateIsSet() const -{ - return m_Shipping_stateIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_state() -{ - m_Shipping_stateIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingPostalCode() const -{ - return m_Shipping_postal_code; -} - - -void HardwareOrderAdminSchema::setShippingPostalCode(const utility::string_t& value) -{ - m_Shipping_postal_code = value; - m_Shipping_postal_codeIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingPostalCodeIsSet() const -{ - return m_Shipping_postal_codeIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_postal_code() -{ - m_Shipping_postal_codeIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getShippingCountry() const -{ - return m_Shipping_country; -} - - -void HardwareOrderAdminSchema::setShippingCountry(const utility::string_t& value) -{ - m_Shipping_country = value; - m_Shipping_countryIsSet = true; -} - -bool HardwareOrderAdminSchema::shippingCountryIsSet() const -{ - return m_Shipping_countryIsSet; -} - -void HardwareOrderAdminSchema::unsetShipping_country() -{ - m_Shipping_countryIsSet = false; -} -std::map> HardwareOrderAdminSchema::getMetadata() const -{ - return m_Metadata; -} - - -void HardwareOrderAdminSchema::setMetadata(const std::map>& value) -{ - m_Metadata = value; - m_MetadataIsSet = true; -} - -bool HardwareOrderAdminSchema::metadataIsSet() const -{ - return m_MetadataIsSet; -} - -void HardwareOrderAdminSchema::unsetMetadata() -{ - m_MetadataIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getCreatedAt() const -{ - return m_Created_at; -} - - -void HardwareOrderAdminSchema::setCreatedAt(const utility::string_t& value) -{ - m_Created_at = value; - m_Created_atIsSet = true; -} - -bool HardwareOrderAdminSchema::createdAtIsSet() const -{ - return m_Created_atIsSet; -} - -void HardwareOrderAdminSchema::unsetCreated_at() -{ - m_Created_atIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getUpdatedAt() const -{ - return m_Updated_at; -} - - -void HardwareOrderAdminSchema::setUpdatedAt(const utility::string_t& value) -{ - m_Updated_at = value; - m_Updated_atIsSet = true; -} - -bool HardwareOrderAdminSchema::updatedAtIsSet() const -{ - return m_Updated_atIsSet; -} - -void HardwareOrderAdminSchema::unsetUpdated_at() -{ - m_Updated_atIsSet = false; -} -std::vector> HardwareOrderAdminSchema::getLineItems() const -{ - return m_Line_items; -} - - -void HardwareOrderAdminSchema::setLineItems(const std::vector>& value) -{ - m_Line_items = value; - m_Line_itemsIsSet = true; -} - -bool HardwareOrderAdminSchema::lineItemsIsSet() const -{ - return m_Line_itemsIsSet; -} - -void HardwareOrderAdminSchema::unsetLine_items() -{ - m_Line_itemsIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getOrganizationName() const -{ - return m_Organization_name; -} - - -void HardwareOrderAdminSchema::setOrganizationName(const utility::string_t& value) -{ - m_Organization_name = value; - m_Organization_nameIsSet = true; -} - -bool HardwareOrderAdminSchema::organizationNameIsSet() const -{ - return m_Organization_nameIsSet; -} - -void HardwareOrderAdminSchema::unsetOrganization_name() -{ - m_Organization_nameIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getWorkspaceName() const -{ - return m_Workspace_name; -} - - -void HardwareOrderAdminSchema::setWorkspaceName(const utility::string_t& value) -{ - m_Workspace_name = value; - m_Workspace_nameIsSet = true; -} - -bool HardwareOrderAdminSchema::workspaceNameIsSet() const -{ - return m_Workspace_nameIsSet; -} - -void HardwareOrderAdminSchema::unsetWorkspace_name() -{ - m_Workspace_nameIsSet = false; -} -utility::string_t HardwareOrderAdminSchema::getCreatedByEmail() const -{ - return m_Created_by_email; -} - - -void HardwareOrderAdminSchema::setCreatedByEmail(const utility::string_t& value) -{ - m_Created_by_email = value; - m_Created_by_emailIsSet = true; -} - -bool HardwareOrderAdminSchema::createdByEmailIsSet() const -{ - return m_Created_by_emailIsSet; -} - -void HardwareOrderAdminSchema::unsetCreated_by_email() -{ - m_Created_by_emailIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/HardwareOrderCreateSchema.cpp b/rest/src/model/HardwareOrderCreateSchema.cpp deleted file mode 100644 index 8a8ddb2..0000000 --- a/rest/src/model/HardwareOrderCreateSchema.cpp +++ /dev/null @@ -1,754 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/HardwareOrderCreateSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HardwareOrderCreateSchema::HardwareOrderCreateSchema() -{ - m_Purchase_type = utility::conversions::to_string_t(""); - m_Purchase_typeIsSet = false; - m_ItemsIsSet = false; - m_Shipping_label = utility::conversions::to_string_t(""); - m_Shipping_labelIsSet = false; - m_Shipping_contact_name = utility::conversions::to_string_t(""); - m_Shipping_contact_nameIsSet = false; - m_Shipping_contact_phone = utility::conversions::to_string_t(""); - m_Shipping_contact_phoneIsSet = false; - m_Shipping_contact_email = utility::conversions::to_string_t(""); - m_Shipping_contact_emailIsSet = false; - m_Shipping_address_line1 = utility::conversions::to_string_t(""); - m_Shipping_address_line1IsSet = false; - m_Shipping_address_line2 = utility::conversions::to_string_t(""); - m_Shipping_address_line2IsSet = false; - m_Shipping_city = utility::conversions::to_string_t(""); - m_Shipping_cityIsSet = false; - m_Shipping_state = utility::conversions::to_string_t(""); - m_Shipping_stateIsSet = false; - m_Shipping_postal_code = utility::conversions::to_string_t(""); - m_Shipping_postal_codeIsSet = false; - m_Shipping_country = utility::conversions::to_string_t(""); - m_Shipping_countryIsSet = false; -} - -HardwareOrderCreateSchema::~HardwareOrderCreateSchema() -{ -} - -void HardwareOrderCreateSchema::validate() -{ - // TODO: implement validation -} - -web::json::value HardwareOrderCreateSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Purchase_typeIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("purchase_type"))] = ModelBase::toJson(m_Purchase_type); - } - if(m_ItemsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("items"))] = ModelBase::toJson(m_Items); - } - if(m_Delivery_address_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))] = ModelBase::toJson(m_Delivery_address_uuid.get()); - } - if(m_Shipping_labelIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_label"))] = ModelBase::toJson(m_Shipping_label); - } - if(m_Shipping_contact_nameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))] = ModelBase::toJson(m_Shipping_contact_name); - } - if(m_Shipping_contact_phoneIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))] = ModelBase::toJson(m_Shipping_contact_phone); - } - if(m_Shipping_contact_emailIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))] = ModelBase::toJson(m_Shipping_contact_email); - } - if(m_Shipping_address_line1IsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))] = ModelBase::toJson(m_Shipping_address_line1); - } - if(m_Shipping_address_line2IsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))] = ModelBase::toJson(m_Shipping_address_line2); - } - if(m_Shipping_cityIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_city"))] = ModelBase::toJson(m_Shipping_city); - } - if(m_Shipping_stateIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_state"))] = ModelBase::toJson(m_Shipping_state); - } - if(m_Shipping_postal_codeIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))] = ModelBase::toJson(m_Shipping_postal_code); - } - if(m_Shipping_countryIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_country"))] = ModelBase::toJson(m_Shipping_country); - } - if(m_Metadata.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata.get()); - } - - return val; -} - -bool HardwareOrderCreateSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("purchase_type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("purchase_type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPurchaseType; - ok &= ModelBase::fromJson(fieldValue, refVal_setPurchaseType); - setPurchaseType(refVal_setPurchaseType); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("items")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("items"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setItems; - ok &= ModelBase::fromJson(fieldValue, refVal_setItems); - setItems(refVal_setItems); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDeliveryAddressUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setDeliveryAddressUuid); - setDeliveryAddressUuid(refVal_setDeliveryAddressUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_label")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_label"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingLabel; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingLabel); - setShippingLabel(refVal_setShippingLabel); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactName; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactName); - setShippingContactName(refVal_setShippingContactName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactPhone); - setShippingContactPhone(refVal_setShippingContactPhone); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactEmail; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactEmail); - setShippingContactEmail(refVal_setShippingContactEmail); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingAddressLine1; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingAddressLine1); - setShippingAddressLine1(refVal_setShippingAddressLine1); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingAddressLine2; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingAddressLine2); - setShippingAddressLine2(refVal_setShippingAddressLine2); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_city")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_city"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingCity; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingCity); - setShippingCity(refVal_setShippingCity); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_state")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_state"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingState; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingState); - setShippingState(refVal_setShippingState); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingPostalCode; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingPostalCode); - setShippingPostalCode(refVal_setShippingPostalCode); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_country")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_country"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingCountry; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingCountry); - setShippingCountry(refVal_setShippingCountry); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("metadata"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromJson(fieldValue, refVal_setMetadata); - setMetadata(refVal_setMetadata); - - } - } - return ok; -} - -void HardwareOrderCreateSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Purchase_typeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("purchase_type")), m_Purchase_type)); - } - if(m_ItemsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("items")), m_Items)); - } - if(m_Delivery_address_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")), m_Delivery_address_uuid.get())); - } - if(m_Shipping_labelIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_label")), m_Shipping_label)); - } - if(m_Shipping_contact_nameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")), m_Shipping_contact_name)); - } - if(m_Shipping_contact_phoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")), m_Shipping_contact_phone)); - } - if(m_Shipping_contact_emailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")), m_Shipping_contact_email)); - } - if(m_Shipping_address_line1IsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")), m_Shipping_address_line1)); - } - if(m_Shipping_address_line2IsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")), m_Shipping_address_line2)); - } - if(m_Shipping_cityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_city")), m_Shipping_city)); - } - if(m_Shipping_stateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_state")), m_Shipping_state)); - } - if(m_Shipping_postal_codeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")), m_Shipping_postal_code)); - } - if(m_Shipping_countryIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_country")), m_Shipping_country)); - } - if(m_Metadata.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata.get())); - } -} - -bool HardwareOrderCreateSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("purchase_type")))) - { - utility::string_t refVal_setPurchaseType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("purchase_type"))), refVal_setPurchaseType ); - setPurchaseType(refVal_setPurchaseType); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("items")))) - { - std::vector> refVal_setItems; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("items"))), refVal_setItems ); - setItems(refVal_setItems); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")))) - { - utility::string_t refVal_setDeliveryAddressUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))), refVal_setDeliveryAddressUuid ); - setDeliveryAddressUuid(refVal_setDeliveryAddressUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_label")))) - { - utility::string_t refVal_setShippingLabel; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_label"))), refVal_setShippingLabel ); - setShippingLabel(refVal_setShippingLabel); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")))) - { - utility::string_t refVal_setShippingContactName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))), refVal_setShippingContactName ); - setShippingContactName(refVal_setShippingContactName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")))) - { - utility::string_t refVal_setShippingContactPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))), refVal_setShippingContactPhone ); - setShippingContactPhone(refVal_setShippingContactPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")))) - { - utility::string_t refVal_setShippingContactEmail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))), refVal_setShippingContactEmail ); - setShippingContactEmail(refVal_setShippingContactEmail); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")))) - { - utility::string_t refVal_setShippingAddressLine1; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))), refVal_setShippingAddressLine1 ); - setShippingAddressLine1(refVal_setShippingAddressLine1); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")))) - { - utility::string_t refVal_setShippingAddressLine2; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))), refVal_setShippingAddressLine2 ); - setShippingAddressLine2(refVal_setShippingAddressLine2); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_city")))) - { - utility::string_t refVal_setShippingCity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_city"))), refVal_setShippingCity ); - setShippingCity(refVal_setShippingCity); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_state")))) - { - utility::string_t refVal_setShippingState; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_state"))), refVal_setShippingState ); - setShippingState(refVal_setShippingState); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")))) - { - utility::string_t refVal_setShippingPostalCode; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))), refVal_setShippingPostalCode ); - setShippingPostalCode(refVal_setShippingPostalCode); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_country")))) - { - utility::string_t refVal_setShippingCountry; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_country"))), refVal_setShippingCountry ); - setShippingCountry(refVal_setShippingCountry); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); - setMetadata(refVal_setMetadata); - } - return ok; -} - - -utility::string_t HardwareOrderCreateSchema::getPurchaseType() const -{ - return m_Purchase_type; -} - - -void HardwareOrderCreateSchema::setPurchaseType(const utility::string_t& value) -{ - m_Purchase_type = value; - m_Purchase_typeIsSet = true; -} - -bool HardwareOrderCreateSchema::purchaseTypeIsSet() const -{ - return m_Purchase_typeIsSet; -} - -void HardwareOrderCreateSchema::unsetPurchase_type() -{ - m_Purchase_typeIsSet = false; -} -std::vector> HardwareOrderCreateSchema::getItems() const -{ - return m_Items; -} - - -void HardwareOrderCreateSchema::setItems(const std::vector>& value) -{ - m_Items = value; - m_ItemsIsSet = true; -} - -bool HardwareOrderCreateSchema::itemsIsSet() const -{ - return m_ItemsIsSet; -} - -void HardwareOrderCreateSchema::unsetItems() -{ - m_ItemsIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getDeliveryAddressUuid() const -{ - return m_Delivery_address_uuid.get(); -} - - -void HardwareOrderCreateSchema::setDeliveryAddressUuid(const utility::string_t& value) -{ - m_Delivery_address_uuid = value; -} - -bool HardwareOrderCreateSchema::deliveryAddressUuidIsSet() const -{ - return m_Delivery_address_uuid.has_value(); -} - -void HardwareOrderCreateSchema::unsetDelivery_address_uuid() -{ - m_Delivery_address_uuid.reset(); -} -utility::string_t HardwareOrderCreateSchema::getShippingLabel() const -{ - return m_Shipping_label; -} - - -void HardwareOrderCreateSchema::setShippingLabel(const utility::string_t& value) -{ - m_Shipping_label = value; - m_Shipping_labelIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingLabelIsSet() const -{ - return m_Shipping_labelIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_label() -{ - m_Shipping_labelIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingContactName() const -{ - return m_Shipping_contact_name; -} - - -void HardwareOrderCreateSchema::setShippingContactName(const utility::string_t& value) -{ - m_Shipping_contact_name = value; - m_Shipping_contact_nameIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingContactNameIsSet() const -{ - return m_Shipping_contact_nameIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_contact_name() -{ - m_Shipping_contact_nameIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingContactPhone() const -{ - return m_Shipping_contact_phone; -} - - -void HardwareOrderCreateSchema::setShippingContactPhone(const utility::string_t& value) -{ - m_Shipping_contact_phone = value; - m_Shipping_contact_phoneIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingContactPhoneIsSet() const -{ - return m_Shipping_contact_phoneIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_contact_phone() -{ - m_Shipping_contact_phoneIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingContactEmail() const -{ - return m_Shipping_contact_email; -} - - -void HardwareOrderCreateSchema::setShippingContactEmail(const utility::string_t& value) -{ - m_Shipping_contact_email = value; - m_Shipping_contact_emailIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingContactEmailIsSet() const -{ - return m_Shipping_contact_emailIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_contact_email() -{ - m_Shipping_contact_emailIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingAddressLine1() const -{ - return m_Shipping_address_line1; -} - - -void HardwareOrderCreateSchema::setShippingAddressLine1(const utility::string_t& value) -{ - m_Shipping_address_line1 = value; - m_Shipping_address_line1IsSet = true; -} - -bool HardwareOrderCreateSchema::shippingAddressLine1IsSet() const -{ - return m_Shipping_address_line1IsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_address_line1() -{ - m_Shipping_address_line1IsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingAddressLine2() const -{ - return m_Shipping_address_line2; -} - - -void HardwareOrderCreateSchema::setShippingAddressLine2(const utility::string_t& value) -{ - m_Shipping_address_line2 = value; - m_Shipping_address_line2IsSet = true; -} - -bool HardwareOrderCreateSchema::shippingAddressLine2IsSet() const -{ - return m_Shipping_address_line2IsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_address_line2() -{ - m_Shipping_address_line2IsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingCity() const -{ - return m_Shipping_city; -} - - -void HardwareOrderCreateSchema::setShippingCity(const utility::string_t& value) -{ - m_Shipping_city = value; - m_Shipping_cityIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingCityIsSet() const -{ - return m_Shipping_cityIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_city() -{ - m_Shipping_cityIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingState() const -{ - return m_Shipping_state; -} - - -void HardwareOrderCreateSchema::setShippingState(const utility::string_t& value) -{ - m_Shipping_state = value; - m_Shipping_stateIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingStateIsSet() const -{ - return m_Shipping_stateIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_state() -{ - m_Shipping_stateIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingPostalCode() const -{ - return m_Shipping_postal_code; -} - - -void HardwareOrderCreateSchema::setShippingPostalCode(const utility::string_t& value) -{ - m_Shipping_postal_code = value; - m_Shipping_postal_codeIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingPostalCodeIsSet() const -{ - return m_Shipping_postal_codeIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_postal_code() -{ - m_Shipping_postal_codeIsSet = false; -} -utility::string_t HardwareOrderCreateSchema::getShippingCountry() const -{ - return m_Shipping_country; -} - - -void HardwareOrderCreateSchema::setShippingCountry(const utility::string_t& value) -{ - m_Shipping_country = value; - m_Shipping_countryIsSet = true; -} - -bool HardwareOrderCreateSchema::shippingCountryIsSet() const -{ - return m_Shipping_countryIsSet; -} - -void HardwareOrderCreateSchema::unsetShipping_country() -{ - m_Shipping_countryIsSet = false; -} -std::map> HardwareOrderCreateSchema::getMetadata() const -{ - return m_Metadata.get(); -} - - -void HardwareOrderCreateSchema::setMetadata(const std::map>& value) -{ - m_Metadata = value; -} - -bool HardwareOrderCreateSchema::metadataIsSet() const -{ - return m_Metadata.has_value(); -} - -void HardwareOrderCreateSchema::unsetMetadata() -{ - m_Metadata.reset(); -} - -} -} -} -} - - diff --git a/rest/src/model/HardwareOrderLineItemCreateSchema.cpp b/rest/src/model/HardwareOrderLineItemCreateSchema.cpp deleted file mode 100644 index a211299..0000000 --- a/rest/src/model/HardwareOrderLineItemCreateSchema.cpp +++ /dev/null @@ -1,172 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/HardwareOrderLineItemCreateSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HardwareOrderLineItemCreateSchema::HardwareOrderLineItemCreateSchema() -{ - m_Asset_uuid = utility::conversions::to_string_t(""); - m_Asset_uuidIsSet = false; - m_Quantity = 0; - m_QuantityIsSet = false; -} - -HardwareOrderLineItemCreateSchema::~HardwareOrderLineItemCreateSchema() -{ -} - -void HardwareOrderLineItemCreateSchema::validate() -{ - // TODO: implement validation -} - -web::json::value HardwareOrderLineItemCreateSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Asset_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))] = ModelBase::toJson(m_Asset_uuid); - } - if(m_QuantityIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("quantity"))] = ModelBase::toJson(m_Quantity); - } - - return val; -} - -bool HardwareOrderLineItemCreateSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetUuid); - setAssetUuid(refVal_setAssetUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setQuantity); - setQuantity(refVal_setQuantity); - - } - } - return ok; -} - -void HardwareOrderLineItemCreateSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Asset_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_uuid")), m_Asset_uuid)); - } - if(m_QuantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("quantity")), m_Quantity)); - } -} - -bool HardwareOrderLineItemCreateSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))), refVal_setAssetUuid ); - setAssetUuid(refVal_setAssetUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("quantity")))) - { - int32_t refVal_setQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("quantity"))), refVal_setQuantity ); - setQuantity(refVal_setQuantity); - } - return ok; -} - - -utility::string_t HardwareOrderLineItemCreateSchema::getAssetUuid() const -{ - return m_Asset_uuid; -} - - -void HardwareOrderLineItemCreateSchema::setAssetUuid(const utility::string_t& value) -{ - m_Asset_uuid = value; - m_Asset_uuidIsSet = true; -} - -bool HardwareOrderLineItemCreateSchema::assetUuidIsSet() const -{ - return m_Asset_uuidIsSet; -} - -void HardwareOrderLineItemCreateSchema::unsetAsset_uuid() -{ - m_Asset_uuidIsSet = false; -} -int32_t HardwareOrderLineItemCreateSchema::getQuantity() const -{ - return m_Quantity; -} - -void HardwareOrderLineItemCreateSchema::setQuantity(int32_t value) -{ - m_Quantity = value; - m_QuantityIsSet = true; -} - -bool HardwareOrderLineItemCreateSchema::quantityIsSet() const -{ - return m_QuantityIsSet; -} - -void HardwareOrderLineItemCreateSchema::unsetQuantity() -{ - m_QuantityIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/HardwareOrderLineItemSchema.cpp b/rest/src/model/HardwareOrderLineItemSchema.cpp deleted file mode 100644 index f99f7f9..0000000 --- a/rest/src/model/HardwareOrderLineItemSchema.cpp +++ /dev/null @@ -1,462 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/HardwareOrderLineItemSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HardwareOrderLineItemSchema::HardwareOrderLineItemSchema() -{ - m_Uuid = utility::conversions::to_string_t(""); - m_UuidIsSet = false; - m_Asset_name = utility::conversions::to_string_t(""); - m_Asset_nameIsSet = false; - m_Quantity = 0; - m_QuantityIsSet = false; - m_Unit_price_credits = utility::conversions::to_string_t(""); - m_Unit_price_creditsIsSet = false; - m_Line_total_credits = utility::conversions::to_string_t(""); - m_Line_total_creditsIsSet = false; - m_Tracking_number = utility::conversions::to_string_t(""); - m_Tracking_numberIsSet = false; - m_MetadataIsSet = false; -} - -HardwareOrderLineItemSchema::~HardwareOrderLineItemSchema() -{ -} - -void HardwareOrderLineItemSchema::validate() -{ - // TODO: implement validation -} - -web::json::value HardwareOrderLineItemSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_UuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("uuid"))] = ModelBase::toJson(m_Uuid); - } - if(m_Asset_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))] = ModelBase::toJson(m_Asset_uuid.get()); - } - if(m_Asset_nameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("asset_name"))] = ModelBase::toJson(m_Asset_name); - } - if(m_QuantityIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("quantity"))] = ModelBase::toJson(m_Quantity); - } - if(m_Unit_price_creditsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("unit_price_credits"))] = ModelBase::toJson(m_Unit_price_credits); - } - if(m_Line_total_creditsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("line_total_credits"))] = ModelBase::toJson(m_Line_total_credits); - } - if(m_Tracking_numberIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("tracking_number"))] = ModelBase::toJson(m_Tracking_number); - } - if(m_MetadataIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata); - } - - return val; -} - -bool HardwareOrderLineItemSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); - setUuid(refVal_setUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetUuid); - setAssetUuid(refVal_setAssetUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("asset_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("asset_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAssetName; - ok &= ModelBase::fromJson(fieldValue, refVal_setAssetName); - setAssetName(refVal_setAssetName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("quantity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("quantity"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setQuantity; - ok &= ModelBase::fromJson(fieldValue, refVal_setQuantity); - setQuantity(refVal_setQuantity); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("unit_price_credits")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("unit_price_credits"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUnitPriceCredits; - ok &= ModelBase::fromJson(fieldValue, refVal_setUnitPriceCredits); - setUnitPriceCredits(refVal_setUnitPriceCredits); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("line_total_credits")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("line_total_credits"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setLineTotalCredits; - ok &= ModelBase::fromJson(fieldValue, refVal_setLineTotalCredits); - setLineTotalCredits(refVal_setLineTotalCredits); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrackingNumber); - setTrackingNumber(refVal_setTrackingNumber); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("metadata"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromJson(fieldValue, refVal_setMetadata); - setMetadata(refVal_setMetadata); - - } - } - return ok; -} - -void HardwareOrderLineItemSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_UuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("uuid")), m_Uuid)); - } - if(m_Asset_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_uuid")), m_Asset_uuid.get())); - } - if(m_Asset_nameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("asset_name")), m_Asset_name)); - } - if(m_QuantityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("quantity")), m_Quantity)); - } - if(m_Unit_price_creditsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("unit_price_credits")), m_Unit_price_credits)); - } - if(m_Line_total_creditsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("line_total_credits")), m_Line_total_credits)); - } - if(m_Tracking_numberIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("tracking_number")), m_Tracking_number)); - } - if(m_MetadataIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata)); - } -} - -bool HardwareOrderLineItemSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("uuid")))) - { - utility::string_t refVal_setUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("uuid"))), refVal_setUuid ); - setUuid(refVal_setUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid")))) - { - utility::string_t refVal_setAssetUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_uuid"))), refVal_setAssetUuid ); - setAssetUuid(refVal_setAssetUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("asset_name")))) - { - utility::string_t refVal_setAssetName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("asset_name"))), refVal_setAssetName ); - setAssetName(refVal_setAssetName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("quantity")))) - { - int32_t refVal_setQuantity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("quantity"))), refVal_setQuantity ); - setQuantity(refVal_setQuantity); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("unit_price_credits")))) - { - utility::string_t refVal_setUnitPriceCredits; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("unit_price_credits"))), refVal_setUnitPriceCredits ); - setUnitPriceCredits(refVal_setUnitPriceCredits); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("line_total_credits")))) - { - utility::string_t refVal_setLineTotalCredits; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("line_total_credits"))), refVal_setLineTotalCredits ); - setLineTotalCredits(refVal_setLineTotalCredits); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))), refVal_setTrackingNumber ); - setTrackingNumber(refVal_setTrackingNumber); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); - setMetadata(refVal_setMetadata); - } - return ok; -} - - -utility::string_t HardwareOrderLineItemSchema::getUuid() const -{ - return m_Uuid; -} - - -void HardwareOrderLineItemSchema::setUuid(const utility::string_t& value) -{ - m_Uuid = value; - m_UuidIsSet = true; -} - -bool HardwareOrderLineItemSchema::uuidIsSet() const -{ - return m_UuidIsSet; -} - -void HardwareOrderLineItemSchema::unsetUuid() -{ - m_UuidIsSet = false; -} -utility::string_t HardwareOrderLineItemSchema::getAssetUuid() const -{ - return m_Asset_uuid.get(); -} - - -void HardwareOrderLineItemSchema::setAssetUuid(const utility::string_t& value) -{ - m_Asset_uuid = value; -} - -bool HardwareOrderLineItemSchema::assetUuidIsSet() const -{ - return m_Asset_uuid.has_value(); -} - -void HardwareOrderLineItemSchema::unsetAsset_uuid() -{ - m_Asset_uuid.reset(); -} -utility::string_t HardwareOrderLineItemSchema::getAssetName() const -{ - return m_Asset_name; -} - - -void HardwareOrderLineItemSchema::setAssetName(const utility::string_t& value) -{ - m_Asset_name = value; - m_Asset_nameIsSet = true; -} - -bool HardwareOrderLineItemSchema::assetNameIsSet() const -{ - return m_Asset_nameIsSet; -} - -void HardwareOrderLineItemSchema::unsetAsset_name() -{ - m_Asset_nameIsSet = false; -} -int32_t HardwareOrderLineItemSchema::getQuantity() const -{ - return m_Quantity; -} - -void HardwareOrderLineItemSchema::setQuantity(int32_t value) -{ - m_Quantity = value; - m_QuantityIsSet = true; -} - -bool HardwareOrderLineItemSchema::quantityIsSet() const -{ - return m_QuantityIsSet; -} - -void HardwareOrderLineItemSchema::unsetQuantity() -{ - m_QuantityIsSet = false; -} -utility::string_t HardwareOrderLineItemSchema::getUnitPriceCredits() const -{ - return m_Unit_price_credits; -} - - -void HardwareOrderLineItemSchema::setUnitPriceCredits(const utility::string_t& value) -{ - m_Unit_price_credits = value; - m_Unit_price_creditsIsSet = true; -} - -bool HardwareOrderLineItemSchema::unitPriceCreditsIsSet() const -{ - return m_Unit_price_creditsIsSet; -} - -void HardwareOrderLineItemSchema::unsetUnit_price_credits() -{ - m_Unit_price_creditsIsSet = false; -} -utility::string_t HardwareOrderLineItemSchema::getLineTotalCredits() const -{ - return m_Line_total_credits; -} - - -void HardwareOrderLineItemSchema::setLineTotalCredits(const utility::string_t& value) -{ - m_Line_total_credits = value; - m_Line_total_creditsIsSet = true; -} - -bool HardwareOrderLineItemSchema::lineTotalCreditsIsSet() const -{ - return m_Line_total_creditsIsSet; -} - -void HardwareOrderLineItemSchema::unsetLine_total_credits() -{ - m_Line_total_creditsIsSet = false; -} -utility::string_t HardwareOrderLineItemSchema::getTrackingNumber() const -{ - return m_Tracking_number; -} - - -void HardwareOrderLineItemSchema::setTrackingNumber(const utility::string_t& value) -{ - m_Tracking_number = value; - m_Tracking_numberIsSet = true; -} - -bool HardwareOrderLineItemSchema::trackingNumberIsSet() const -{ - return m_Tracking_numberIsSet; -} - -void HardwareOrderLineItemSchema::unsetTracking_number() -{ - m_Tracking_numberIsSet = false; -} -std::map> HardwareOrderLineItemSchema::getMetadata() const -{ - return m_Metadata; -} - - -void HardwareOrderLineItemSchema::setMetadata(const std::map>& value) -{ - m_Metadata = value; - m_MetadataIsSet = true; -} - -bool HardwareOrderLineItemSchema::metadataIsSet() const -{ - return m_MetadataIsSet; -} - -void HardwareOrderLineItemSchema::unsetMetadata() -{ - m_MetadataIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/HardwareOrderLineItemUpdateSchema.cpp b/rest/src/model/HardwareOrderLineItemUpdateSchema.cpp deleted file mode 100644 index 98ac94a..0000000 --- a/rest/src/model/HardwareOrderLineItemUpdateSchema.cpp +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/HardwareOrderLineItemUpdateSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HardwareOrderLineItemUpdateSchema::HardwareOrderLineItemUpdateSchema() -{ -} - -HardwareOrderLineItemUpdateSchema::~HardwareOrderLineItemUpdateSchema() -{ -} - -void HardwareOrderLineItemUpdateSchema::validate() -{ - // TODO: implement validation -} - -web::json::value HardwareOrderLineItemUpdateSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Tracking_number.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("tracking_number"))] = ModelBase::toJson(m_Tracking_number.get()); - } - if(m_Metadata.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata.get()); - } - - return val; -} - -bool HardwareOrderLineItemUpdateSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrackingNumber); - setTrackingNumber(refVal_setTrackingNumber); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("metadata"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromJson(fieldValue, refVal_setMetadata); - setMetadata(refVal_setMetadata); - - } - } - return ok; -} - -void HardwareOrderLineItemUpdateSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Tracking_number.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("tracking_number")), m_Tracking_number.get())); - } - if(m_Metadata.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata.get())); - } -} - -bool HardwareOrderLineItemUpdateSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))), refVal_setTrackingNumber ); - setTrackingNumber(refVal_setTrackingNumber); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); - setMetadata(refVal_setMetadata); - } - return ok; -} - - -utility::string_t HardwareOrderLineItemUpdateSchema::getTrackingNumber() const -{ - return m_Tracking_number.get(); -} - - -void HardwareOrderLineItemUpdateSchema::setTrackingNumber(const utility::string_t& value) -{ - m_Tracking_number = value; -} - -bool HardwareOrderLineItemUpdateSchema::trackingNumberIsSet() const -{ - return m_Tracking_number.has_value(); -} - -void HardwareOrderLineItemUpdateSchema::unsetTracking_number() -{ - m_Tracking_number.reset(); -} -std::map> HardwareOrderLineItemUpdateSchema::getMetadata() const -{ - return m_Metadata.get(); -} - - -void HardwareOrderLineItemUpdateSchema::setMetadata(const std::map>& value) -{ - m_Metadata = value; -} - -bool HardwareOrderLineItemUpdateSchema::metadataIsSet() const -{ - return m_Metadata.has_value(); -} - -void HardwareOrderLineItemUpdateSchema::unsetMetadata() -{ - m_Metadata.reset(); -} - -} -} -} -} - - diff --git a/rest/src/model/HardwareOrderSchema.cpp b/rest/src/model/HardwareOrderSchema.cpp deleted file mode 100644 index 1cb1037..0000000 --- a/rest/src/model/HardwareOrderSchema.cpp +++ /dev/null @@ -1,1197 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/HardwareOrderSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HardwareOrderSchema::HardwareOrderSchema() -{ - m_Uuid = utility::conversions::to_string_t(""); - m_UuidIsSet = false; - m_Organization_uuid = utility::conversions::to_string_t(""); - m_Organization_uuidIsSet = false; - m_Workspace_uuid = utility::conversions::to_string_t(""); - m_Workspace_uuidIsSet = false; - m_Created_by_uuid = utility::conversions::to_string_t(""); - m_Created_by_uuidIsSet = false; - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; - m_Purchase_type = utility::conversions::to_string_t(""); - m_Purchase_typeIsSet = false; - m_Total_cost_credits = utility::conversions::to_string_t(""); - m_Total_cost_creditsIsSet = false; - m_Tracking_number = utility::conversions::to_string_t(""); - m_Tracking_numberIsSet = false; - m_Shipping_label = utility::conversions::to_string_t(""); - m_Shipping_labelIsSet = false; - m_Shipping_contact_name = utility::conversions::to_string_t(""); - m_Shipping_contact_nameIsSet = false; - m_Shipping_contact_phone = utility::conversions::to_string_t(""); - m_Shipping_contact_phoneIsSet = false; - m_Shipping_contact_email = utility::conversions::to_string_t(""); - m_Shipping_contact_emailIsSet = false; - m_Shipping_address_line1 = utility::conversions::to_string_t(""); - m_Shipping_address_line1IsSet = false; - m_Shipping_address_line2 = utility::conversions::to_string_t(""); - m_Shipping_address_line2IsSet = false; - m_Shipping_city = utility::conversions::to_string_t(""); - m_Shipping_cityIsSet = false; - m_Shipping_state = utility::conversions::to_string_t(""); - m_Shipping_stateIsSet = false; - m_Shipping_postal_code = utility::conversions::to_string_t(""); - m_Shipping_postal_codeIsSet = false; - m_Shipping_country = utility::conversions::to_string_t(""); - m_Shipping_countryIsSet = false; - m_MetadataIsSet = false; - m_Created_at = utility::conversions::to_string_t(""); - m_Created_atIsSet = false; - m_Updated_at = utility::conversions::to_string_t(""); - m_Updated_atIsSet = false; - m_Line_itemsIsSet = false; -} - -HardwareOrderSchema::~HardwareOrderSchema() -{ -} - -void HardwareOrderSchema::validate() -{ - // TODO: implement validation -} - -web::json::value HardwareOrderSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_UuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("uuid"))] = ModelBase::toJson(m_Uuid); - } - if(m_Organization_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("organization_uuid"))] = ModelBase::toJson(m_Organization_uuid); - } - if(m_Workspace_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))] = ModelBase::toJson(m_Workspace_uuid); - } - if(m_Created_by_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("created_by_uuid"))] = ModelBase::toJson(m_Created_by_uuid); - } - if(m_StatusIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("status"))] = ModelBase::toJson(m_Status); - } - if(m_Purchase_typeIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("purchase_type"))] = ModelBase::toJson(m_Purchase_type); - } - if(m_Total_cost_creditsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("total_cost_credits"))] = ModelBase::toJson(m_Total_cost_credits); - } - if(m_Tracking_numberIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("tracking_number"))] = ModelBase::toJson(m_Tracking_number); - } - if(m_Delivery_address_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))] = ModelBase::toJson(m_Delivery_address_uuid.get()); - } - if(m_Shipping_labelIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_label"))] = ModelBase::toJson(m_Shipping_label); - } - if(m_Shipping_contact_nameIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))] = ModelBase::toJson(m_Shipping_contact_name); - } - if(m_Shipping_contact_phoneIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))] = ModelBase::toJson(m_Shipping_contact_phone); - } - if(m_Shipping_contact_emailIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))] = ModelBase::toJson(m_Shipping_contact_email); - } - if(m_Shipping_address_line1IsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))] = ModelBase::toJson(m_Shipping_address_line1); - } - if(m_Shipping_address_line2IsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))] = ModelBase::toJson(m_Shipping_address_line2); - } - if(m_Shipping_cityIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_city"))] = ModelBase::toJson(m_Shipping_city); - } - if(m_Shipping_stateIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_state"))] = ModelBase::toJson(m_Shipping_state); - } - if(m_Shipping_postal_codeIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))] = ModelBase::toJson(m_Shipping_postal_code); - } - if(m_Shipping_countryIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("shipping_country"))] = ModelBase::toJson(m_Shipping_country); - } - if(m_MetadataIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata); - } - if(m_Created_atIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("created_at"))] = ModelBase::toJson(m_Created_at); - } - if(m_Updated_atIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("updated_at"))] = ModelBase::toJson(m_Updated_at); - } - if(m_Line_itemsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("line_items"))] = ModelBase::toJson(m_Line_items); - } - - return val; -} - -bool HardwareOrderSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setUuid); - setUuid(refVal_setUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("organization_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("organization_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setOrganizationUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setOrganizationUuid); - setOrganizationUuid(refVal_setOrganizationUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkspaceUuid); - setWorkspaceUuid(refVal_setWorkspaceUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCreatedByUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setCreatedByUuid); - setCreatedByUuid(refVal_setCreatedByUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("purchase_type")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("purchase_type"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPurchaseType; - ok &= ModelBase::fromJson(fieldValue, refVal_setPurchaseType); - setPurchaseType(refVal_setPurchaseType); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTotalCostCredits; - ok &= ModelBase::fromJson(fieldValue, refVal_setTotalCostCredits); - setTotalCostCredits(refVal_setTotalCostCredits); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrackingNumber); - setTrackingNumber(refVal_setTrackingNumber); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setDeliveryAddressUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setDeliveryAddressUuid); - setDeliveryAddressUuid(refVal_setDeliveryAddressUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_label")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_label"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingLabel; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingLabel); - setShippingLabel(refVal_setShippingLabel); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactName; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactName); - setShippingContactName(refVal_setShippingContactName); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactPhone; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactPhone); - setShippingContactPhone(refVal_setShippingContactPhone); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingContactEmail; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingContactEmail); - setShippingContactEmail(refVal_setShippingContactEmail); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingAddressLine1; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingAddressLine1); - setShippingAddressLine1(refVal_setShippingAddressLine1); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingAddressLine2; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingAddressLine2); - setShippingAddressLine2(refVal_setShippingAddressLine2); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_city")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_city"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingCity; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingCity); - setShippingCity(refVal_setShippingCity); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_state")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_state"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingState; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingState); - setShippingState(refVal_setShippingState); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingPostalCode; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingPostalCode); - setShippingPostalCode(refVal_setShippingPostalCode); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("shipping_country")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("shipping_country"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setShippingCountry; - ok &= ModelBase::fromJson(fieldValue, refVal_setShippingCountry); - setShippingCountry(refVal_setShippingCountry); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("metadata"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromJson(fieldValue, refVal_setMetadata); - setMetadata(refVal_setMetadata); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("created_at")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("created_at"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCreatedAt; - ok &= ModelBase::fromJson(fieldValue, refVal_setCreatedAt); - setCreatedAt(refVal_setCreatedAt); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("updated_at")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("updated_at"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUpdatedAt; - ok &= ModelBase::fromJson(fieldValue, refVal_setUpdatedAt); - setUpdatedAt(refVal_setUpdatedAt); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("line_items")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("line_items"))); - if(!fieldValue.is_null()) - { - std::vector> refVal_setLineItems; - ok &= ModelBase::fromJson(fieldValue, refVal_setLineItems); - setLineItems(refVal_setLineItems); - - } - } - return ok; -} - -void HardwareOrderSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_UuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("uuid")), m_Uuid)); - } - if(m_Organization_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("organization_uuid")), m_Organization_uuid)); - } - if(m_Workspace_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")), m_Workspace_uuid)); - } - if(m_Created_by_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("created_by_uuid")), m_Created_by_uuid)); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("status")), m_Status)); - } - if(m_Purchase_typeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("purchase_type")), m_Purchase_type)); - } - if(m_Total_cost_creditsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("total_cost_credits")), m_Total_cost_credits)); - } - if(m_Tracking_numberIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("tracking_number")), m_Tracking_number)); - } - if(m_Delivery_address_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")), m_Delivery_address_uuid.get())); - } - if(m_Shipping_labelIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_label")), m_Shipping_label)); - } - if(m_Shipping_contact_nameIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")), m_Shipping_contact_name)); - } - if(m_Shipping_contact_phoneIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")), m_Shipping_contact_phone)); - } - if(m_Shipping_contact_emailIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")), m_Shipping_contact_email)); - } - if(m_Shipping_address_line1IsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")), m_Shipping_address_line1)); - } - if(m_Shipping_address_line2IsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")), m_Shipping_address_line2)); - } - if(m_Shipping_cityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_city")), m_Shipping_city)); - } - if(m_Shipping_stateIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_state")), m_Shipping_state)); - } - if(m_Shipping_postal_codeIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")), m_Shipping_postal_code)); - } - if(m_Shipping_countryIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("shipping_country")), m_Shipping_country)); - } - if(m_MetadataIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata)); - } - if(m_Created_atIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("created_at")), m_Created_at)); - } - if(m_Updated_atIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("updated_at")), m_Updated_at)); - } - if(m_Line_itemsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("line_items")), m_Line_items)); - } -} - -bool HardwareOrderSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("uuid")))) - { - utility::string_t refVal_setUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("uuid"))), refVal_setUuid ); - setUuid(refVal_setUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("organization_uuid")))) - { - utility::string_t refVal_setOrganizationUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("organization_uuid"))), refVal_setOrganizationUuid ); - setOrganizationUuid(refVal_setOrganizationUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))), refVal_setWorkspaceUuid ); - setWorkspaceUuid(refVal_setWorkspaceUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid")))) - { - utility::string_t refVal_setCreatedByUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("created_by_uuid"))), refVal_setCreatedByUuid ); - setCreatedByUuid(refVal_setCreatedByUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("purchase_type")))) - { - utility::string_t refVal_setPurchaseType; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("purchase_type"))), refVal_setPurchaseType ); - setPurchaseType(refVal_setPurchaseType); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits")))) - { - utility::string_t refVal_setTotalCostCredits; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("total_cost_credits"))), refVal_setTotalCostCredits ); - setTotalCostCredits(refVal_setTotalCostCredits); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number")))) - { - utility::string_t refVal_setTrackingNumber; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("tracking_number"))), refVal_setTrackingNumber ); - setTrackingNumber(refVal_setTrackingNumber); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid")))) - { - utility::string_t refVal_setDeliveryAddressUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("delivery_address_uuid"))), refVal_setDeliveryAddressUuid ); - setDeliveryAddressUuid(refVal_setDeliveryAddressUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_label")))) - { - utility::string_t refVal_setShippingLabel; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_label"))), refVal_setShippingLabel ); - setShippingLabel(refVal_setShippingLabel); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name")))) - { - utility::string_t refVal_setShippingContactName; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_name"))), refVal_setShippingContactName ); - setShippingContactName(refVal_setShippingContactName); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone")))) - { - utility::string_t refVal_setShippingContactPhone; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_phone"))), refVal_setShippingContactPhone ); - setShippingContactPhone(refVal_setShippingContactPhone); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email")))) - { - utility::string_t refVal_setShippingContactEmail; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_contact_email"))), refVal_setShippingContactEmail ); - setShippingContactEmail(refVal_setShippingContactEmail); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1")))) - { - utility::string_t refVal_setShippingAddressLine1; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line1"))), refVal_setShippingAddressLine1 ); - setShippingAddressLine1(refVal_setShippingAddressLine1); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2")))) - { - utility::string_t refVal_setShippingAddressLine2; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_address_line2"))), refVal_setShippingAddressLine2 ); - setShippingAddressLine2(refVal_setShippingAddressLine2); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_city")))) - { - utility::string_t refVal_setShippingCity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_city"))), refVal_setShippingCity ); - setShippingCity(refVal_setShippingCity); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_state")))) - { - utility::string_t refVal_setShippingState; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_state"))), refVal_setShippingState ); - setShippingState(refVal_setShippingState); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code")))) - { - utility::string_t refVal_setShippingPostalCode; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_postal_code"))), refVal_setShippingPostalCode ); - setShippingPostalCode(refVal_setShippingPostalCode); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("shipping_country")))) - { - utility::string_t refVal_setShippingCountry; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("shipping_country"))), refVal_setShippingCountry ); - setShippingCountry(refVal_setShippingCountry); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("metadata")))) - { - std::map> refVal_setMetadata; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); - setMetadata(refVal_setMetadata); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("created_at")))) - { - utility::string_t refVal_setCreatedAt; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("created_at"))), refVal_setCreatedAt ); - setCreatedAt(refVal_setCreatedAt); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("updated_at")))) - { - utility::string_t refVal_setUpdatedAt; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("updated_at"))), refVal_setUpdatedAt ); - setUpdatedAt(refVal_setUpdatedAt); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("line_items")))) - { - std::vector> refVal_setLineItems; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("line_items"))), refVal_setLineItems ); - setLineItems(refVal_setLineItems); - } - return ok; -} - - -utility::string_t HardwareOrderSchema::getUuid() const -{ - return m_Uuid; -} - - -void HardwareOrderSchema::setUuid(const utility::string_t& value) -{ - m_Uuid = value; - m_UuidIsSet = true; -} - -bool HardwareOrderSchema::uuidIsSet() const -{ - return m_UuidIsSet; -} - -void HardwareOrderSchema::unsetUuid() -{ - m_UuidIsSet = false; -} -utility::string_t HardwareOrderSchema::getOrganizationUuid() const -{ - return m_Organization_uuid; -} - - -void HardwareOrderSchema::setOrganizationUuid(const utility::string_t& value) -{ - m_Organization_uuid = value; - m_Organization_uuidIsSet = true; -} - -bool HardwareOrderSchema::organizationUuidIsSet() const -{ - return m_Organization_uuidIsSet; -} - -void HardwareOrderSchema::unsetOrganization_uuid() -{ - m_Organization_uuidIsSet = false; -} -utility::string_t HardwareOrderSchema::getWorkspaceUuid() const -{ - return m_Workspace_uuid; -} - - -void HardwareOrderSchema::setWorkspaceUuid(const utility::string_t& value) -{ - m_Workspace_uuid = value; - m_Workspace_uuidIsSet = true; -} - -bool HardwareOrderSchema::workspaceUuidIsSet() const -{ - return m_Workspace_uuidIsSet; -} - -void HardwareOrderSchema::unsetWorkspace_uuid() -{ - m_Workspace_uuidIsSet = false; -} -utility::string_t HardwareOrderSchema::getCreatedByUuid() const -{ - return m_Created_by_uuid; -} - - -void HardwareOrderSchema::setCreatedByUuid(const utility::string_t& value) -{ - m_Created_by_uuid = value; - m_Created_by_uuidIsSet = true; -} - -bool HardwareOrderSchema::createdByUuidIsSet() const -{ - return m_Created_by_uuidIsSet; -} - -void HardwareOrderSchema::unsetCreated_by_uuid() -{ - m_Created_by_uuidIsSet = false; -} -utility::string_t HardwareOrderSchema::getStatus() const -{ - return m_Status; -} - - -void HardwareOrderSchema::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool HardwareOrderSchema::statusIsSet() const -{ - return m_StatusIsSet; -} - -void HardwareOrderSchema::unsetStatus() -{ - m_StatusIsSet = false; -} -utility::string_t HardwareOrderSchema::getPurchaseType() const -{ - return m_Purchase_type; -} - - -void HardwareOrderSchema::setPurchaseType(const utility::string_t& value) -{ - m_Purchase_type = value; - m_Purchase_typeIsSet = true; -} - -bool HardwareOrderSchema::purchaseTypeIsSet() const -{ - return m_Purchase_typeIsSet; -} - -void HardwareOrderSchema::unsetPurchase_type() -{ - m_Purchase_typeIsSet = false; -} -utility::string_t HardwareOrderSchema::getTotalCostCredits() const -{ - return m_Total_cost_credits; -} - - -void HardwareOrderSchema::setTotalCostCredits(const utility::string_t& value) -{ - m_Total_cost_credits = value; - m_Total_cost_creditsIsSet = true; -} - -bool HardwareOrderSchema::totalCostCreditsIsSet() const -{ - return m_Total_cost_creditsIsSet; -} - -void HardwareOrderSchema::unsetTotal_cost_credits() -{ - m_Total_cost_creditsIsSet = false; -} -utility::string_t HardwareOrderSchema::getTrackingNumber() const -{ - return m_Tracking_number; -} - - -void HardwareOrderSchema::setTrackingNumber(const utility::string_t& value) -{ - m_Tracking_number = value; - m_Tracking_numberIsSet = true; -} - -bool HardwareOrderSchema::trackingNumberIsSet() const -{ - return m_Tracking_numberIsSet; -} - -void HardwareOrderSchema::unsetTracking_number() -{ - m_Tracking_numberIsSet = false; -} -utility::string_t HardwareOrderSchema::getDeliveryAddressUuid() const -{ - return m_Delivery_address_uuid.get(); -} - - -void HardwareOrderSchema::setDeliveryAddressUuid(const utility::string_t& value) -{ - m_Delivery_address_uuid = value; -} - -bool HardwareOrderSchema::deliveryAddressUuidIsSet() const -{ - return m_Delivery_address_uuid.has_value(); -} - -void HardwareOrderSchema::unsetDelivery_address_uuid() -{ - m_Delivery_address_uuid.reset(); -} -utility::string_t HardwareOrderSchema::getShippingLabel() const -{ - return m_Shipping_label; -} - - -void HardwareOrderSchema::setShippingLabel(const utility::string_t& value) -{ - m_Shipping_label = value; - m_Shipping_labelIsSet = true; -} - -bool HardwareOrderSchema::shippingLabelIsSet() const -{ - return m_Shipping_labelIsSet; -} - -void HardwareOrderSchema::unsetShipping_label() -{ - m_Shipping_labelIsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingContactName() const -{ - return m_Shipping_contact_name; -} - - -void HardwareOrderSchema::setShippingContactName(const utility::string_t& value) -{ - m_Shipping_contact_name = value; - m_Shipping_contact_nameIsSet = true; -} - -bool HardwareOrderSchema::shippingContactNameIsSet() const -{ - return m_Shipping_contact_nameIsSet; -} - -void HardwareOrderSchema::unsetShipping_contact_name() -{ - m_Shipping_contact_nameIsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingContactPhone() const -{ - return m_Shipping_contact_phone; -} - - -void HardwareOrderSchema::setShippingContactPhone(const utility::string_t& value) -{ - m_Shipping_contact_phone = value; - m_Shipping_contact_phoneIsSet = true; -} - -bool HardwareOrderSchema::shippingContactPhoneIsSet() const -{ - return m_Shipping_contact_phoneIsSet; -} - -void HardwareOrderSchema::unsetShipping_contact_phone() -{ - m_Shipping_contact_phoneIsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingContactEmail() const -{ - return m_Shipping_contact_email; -} - - -void HardwareOrderSchema::setShippingContactEmail(const utility::string_t& value) -{ - m_Shipping_contact_email = value; - m_Shipping_contact_emailIsSet = true; -} - -bool HardwareOrderSchema::shippingContactEmailIsSet() const -{ - return m_Shipping_contact_emailIsSet; -} - -void HardwareOrderSchema::unsetShipping_contact_email() -{ - m_Shipping_contact_emailIsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingAddressLine1() const -{ - return m_Shipping_address_line1; -} - - -void HardwareOrderSchema::setShippingAddressLine1(const utility::string_t& value) -{ - m_Shipping_address_line1 = value; - m_Shipping_address_line1IsSet = true; -} - -bool HardwareOrderSchema::shippingAddressLine1IsSet() const -{ - return m_Shipping_address_line1IsSet; -} - -void HardwareOrderSchema::unsetShipping_address_line1() -{ - m_Shipping_address_line1IsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingAddressLine2() const -{ - return m_Shipping_address_line2; -} - - -void HardwareOrderSchema::setShippingAddressLine2(const utility::string_t& value) -{ - m_Shipping_address_line2 = value; - m_Shipping_address_line2IsSet = true; -} - -bool HardwareOrderSchema::shippingAddressLine2IsSet() const -{ - return m_Shipping_address_line2IsSet; -} - -void HardwareOrderSchema::unsetShipping_address_line2() -{ - m_Shipping_address_line2IsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingCity() const -{ - return m_Shipping_city; -} - - -void HardwareOrderSchema::setShippingCity(const utility::string_t& value) -{ - m_Shipping_city = value; - m_Shipping_cityIsSet = true; -} - -bool HardwareOrderSchema::shippingCityIsSet() const -{ - return m_Shipping_cityIsSet; -} - -void HardwareOrderSchema::unsetShipping_city() -{ - m_Shipping_cityIsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingState() const -{ - return m_Shipping_state; -} - - -void HardwareOrderSchema::setShippingState(const utility::string_t& value) -{ - m_Shipping_state = value; - m_Shipping_stateIsSet = true; -} - -bool HardwareOrderSchema::shippingStateIsSet() const -{ - return m_Shipping_stateIsSet; -} - -void HardwareOrderSchema::unsetShipping_state() -{ - m_Shipping_stateIsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingPostalCode() const -{ - return m_Shipping_postal_code; -} - - -void HardwareOrderSchema::setShippingPostalCode(const utility::string_t& value) -{ - m_Shipping_postal_code = value; - m_Shipping_postal_codeIsSet = true; -} - -bool HardwareOrderSchema::shippingPostalCodeIsSet() const -{ - return m_Shipping_postal_codeIsSet; -} - -void HardwareOrderSchema::unsetShipping_postal_code() -{ - m_Shipping_postal_codeIsSet = false; -} -utility::string_t HardwareOrderSchema::getShippingCountry() const -{ - return m_Shipping_country; -} - - -void HardwareOrderSchema::setShippingCountry(const utility::string_t& value) -{ - m_Shipping_country = value; - m_Shipping_countryIsSet = true; -} - -bool HardwareOrderSchema::shippingCountryIsSet() const -{ - return m_Shipping_countryIsSet; -} - -void HardwareOrderSchema::unsetShipping_country() -{ - m_Shipping_countryIsSet = false; -} -std::map> HardwareOrderSchema::getMetadata() const -{ - return m_Metadata; -} - - -void HardwareOrderSchema::setMetadata(const std::map>& value) -{ - m_Metadata = value; - m_MetadataIsSet = true; -} - -bool HardwareOrderSchema::metadataIsSet() const -{ - return m_MetadataIsSet; -} - -void HardwareOrderSchema::unsetMetadata() -{ - m_MetadataIsSet = false; -} -utility::string_t HardwareOrderSchema::getCreatedAt() const -{ - return m_Created_at; -} - - -void HardwareOrderSchema::setCreatedAt(const utility::string_t& value) -{ - m_Created_at = value; - m_Created_atIsSet = true; -} - -bool HardwareOrderSchema::createdAtIsSet() const -{ - return m_Created_atIsSet; -} - -void HardwareOrderSchema::unsetCreated_at() -{ - m_Created_atIsSet = false; -} -utility::string_t HardwareOrderSchema::getUpdatedAt() const -{ - return m_Updated_at; -} - - -void HardwareOrderSchema::setUpdatedAt(const utility::string_t& value) -{ - m_Updated_at = value; - m_Updated_atIsSet = true; -} - -bool HardwareOrderSchema::updatedAtIsSet() const -{ - return m_Updated_atIsSet; -} - -void HardwareOrderSchema::unsetUpdated_at() -{ - m_Updated_atIsSet = false; -} -std::vector> HardwareOrderSchema::getLineItems() const -{ - return m_Line_items; -} - - -void HardwareOrderSchema::setLineItems(const std::vector>& value) -{ - m_Line_items = value; - m_Line_itemsIsSet = true; -} - -bool HardwareOrderSchema::lineItemsIsSet() const -{ - return m_Line_itemsIsSet; -} - -void HardwareOrderSchema::unsetLine_items() -{ - m_Line_itemsIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/HardwareOrderStatusUpdateSchema.cpp b/rest/src/model/HardwareOrderStatusUpdateSchema.cpp deleted file mode 100644 index e31788a..0000000 --- a/rest/src/model/HardwareOrderStatusUpdateSchema.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/HardwareOrderStatusUpdateSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -HardwareOrderStatusUpdateSchema::HardwareOrderStatusUpdateSchema() -{ - m_Status = utility::conversions::to_string_t(""); - m_StatusIsSet = false; -} - -HardwareOrderStatusUpdateSchema::~HardwareOrderStatusUpdateSchema() -{ -} - -void HardwareOrderStatusUpdateSchema::validate() -{ - // TODO: implement validation -} - -web::json::value HardwareOrderStatusUpdateSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_StatusIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("status"))] = ModelBase::toJson(m_Status); - } - - return val; -} - -bool HardwareOrderStatusUpdateSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("status"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromJson(fieldValue, refVal_setStatus); - setStatus(refVal_setStatus); - - } - } - return ok; -} - -void HardwareOrderStatusUpdateSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_StatusIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("status")), m_Status)); - } -} - -bool HardwareOrderStatusUpdateSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("status")))) - { - utility::string_t refVal_setStatus; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("status"))), refVal_setStatus ); - setStatus(refVal_setStatus); - } - return ok; -} - - -utility::string_t HardwareOrderStatusUpdateSchema::getStatus() const -{ - return m_Status; -} - - -void HardwareOrderStatusUpdateSchema::setStatus(const utility::string_t& value) -{ - m_Status = value; - m_StatusIsSet = true; -} - -bool HardwareOrderStatusUpdateSchema::statusIsSet() const -{ - return m_StatusIsSet; -} - -void HardwareOrderStatusUpdateSchema::unsetStatus() -{ - m_StatusIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/NavigationWaypointSchema.cpp b/rest/src/model/NavigationWaypointSchema.cpp index 4ca5819..5157680 100644 --- a/rest/src/model/NavigationWaypointSchema.cpp +++ b/rest/src/model/NavigationWaypointSchema.cpp @@ -55,11 +55,6 @@ web::json::value NavigationWaypointSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("yaw"))] = ModelBase::toJson(m_Yaw.get()); } - if(m_Duration_seconds.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("duration_seconds"))] = ModelBase::toJson(m_Duration_seconds.get()); - } if(m_Actions.has_value()) { @@ -121,17 +116,6 @@ bool NavigationWaypointSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("duration_seconds")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("duration_seconds"))); - if(!fieldValue.is_null()) - { - double refVal_setDurationSeconds; - ok &= ModelBase::fromJson(fieldValue, refVal_setDurationSeconds); - setDurationSeconds(refVal_setDurationSeconds); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("actions")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("actions"))); @@ -180,10 +164,6 @@ void NavigationWaypointSchema::toMultipart(std::shared_ptr mu { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("yaw")), m_Yaw.get())); } - if(m_Duration_seconds.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("duration_seconds")), m_Duration_seconds.get())); - } if(m_Actions.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("actions")), m_Actions.get())); @@ -227,12 +207,6 @@ bool NavigationWaypointSchema::fromMultiPart(std::shared_ptr ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("yaw"))), refVal_setYaw ); setYaw(refVal_setYaw); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("duration_seconds")))) - { - double refVal_setDurationSeconds; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("duration_seconds"))), refVal_setDurationSeconds ); - setDurationSeconds(refVal_setDurationSeconds); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("actions")))) { std::vector> refVal_setActions; @@ -328,25 +302,6 @@ void NavigationWaypointSchema::unsetYaw() { m_Yaw.reset(); } -double NavigationWaypointSchema::getDurationSeconds() const -{ - return m_Duration_seconds.get(); -} - -void NavigationWaypointSchema::setDurationSeconds(double value) -{ - m_Duration_seconds = value; -} - -bool NavigationWaypointSchema::durationSecondsIsSet() const -{ - return m_Duration_seconds.has_value(); -} - -void NavigationWaypointSchema::unsetDuration_seconds() -{ - m_Duration_seconds.reset(); -} std::vector> NavigationWaypointSchema::getActions() const { return m_Actions.get(); diff --git a/rest/src/model/OnlineControllerSessionSchema.cpp b/rest/src/model/OnlineControllerSessionSchema.cpp index 4dc9444..ee9ff1e 100644 --- a/rest/src/model/OnlineControllerSessionSchema.cpp +++ b/rest/src/model/OnlineControllerSessionSchema.cpp @@ -82,11 +82,6 @@ web::json::value OnlineControllerSessionSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("workload_uuid"))] = ModelBase::toJson(m_Workload_uuid.get()); } - if(m_Instance_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("instance_uuid"))] = ModelBase::toJson(m_Instance_uuid.get()); - } if(m_PhaseIsSet) { @@ -190,17 +185,6 @@ bool OnlineControllerSessionSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("instance_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("instance_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setInstanceUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setInstanceUuid); - setInstanceUuid(refVal_setInstanceUuid); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("phase")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("phase"))); @@ -301,10 +285,6 @@ void OnlineControllerSessionSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workload_uuid")), m_Workload_uuid.get())); } - if(m_Instance_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("instance_uuid")), m_Instance_uuid.get())); - } if(m_PhaseIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("phase")), m_Phase)); @@ -376,12 +356,6 @@ bool OnlineControllerSessionSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("workload_uuid"))), refVal_setWorkloadUuid ); setWorkloadUuid(refVal_setWorkloadUuid); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("instance_uuid")))) - { - utility::string_t refVal_setInstanceUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("instance_uuid"))), refVal_setInstanceUuid ); - setInstanceUuid(refVal_setInstanceUuid); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("phase")))) { utility::string_t refVal_setPhase; @@ -547,26 +521,6 @@ void OnlineControllerSessionSchema::unsetWorkload_uuid() { m_Workload_uuid.reset(); } -utility::string_t OnlineControllerSessionSchema::getInstanceUuid() const -{ - return m_Instance_uuid.get(); -} - - -void OnlineControllerSessionSchema::setInstanceUuid(const utility::string_t& value) -{ - m_Instance_uuid = value; -} - -bool OnlineControllerSessionSchema::instanceUuidIsSet() const -{ - return m_Instance_uuid.has_value(); -} - -void OnlineControllerSessionSchema::unsetInstance_uuid() -{ - m_Instance_uuid.reset(); -} utility::string_t OnlineControllerSessionSchema::getPhase() const { return m_Phase; diff --git a/rest/src/model/RLTaskCreateSchema.cpp b/rest/src/model/RLTaskCreateSchema.cpp index 5fd3439..f859973 100644 --- a/rest/src/model/RLTaskCreateSchema.cpp +++ b/rest/src/model/RLTaskCreateSchema.cpp @@ -139,26 +139,6 @@ web::json::value RLTaskCreateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("rl_config_spec"))] = ModelBase::toJson(m_Rl_config_spec.get()); } - if(m_Training_command_spec.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))] = ModelBase::toJson(m_Training_command_spec.get()); - } - if(m_Inference_command_spec.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))] = ModelBase::toJson(m_Inference_command_spec.get()); - } - if(m_Training_command_setup_enabled.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))] = ModelBase::toJson(m_Training_command_setup_enabled.get()); - } - if(m_Inference_command_setup_enabled.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))] = ModelBase::toJson(m_Inference_command_setup_enabled.get()); - } if(m_Initial_source_files.has_value()) { @@ -382,50 +362,6 @@ bool RLTaskCreateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("training_command_spec")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setTrainingCommandSpec; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrainingCommandSpec); - setTrainingCommandSpec(refVal_setTrainingCommandSpec); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSpec); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setTrainingCommandSetupEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrainingCommandSetupEnabled); - setTrainingCommandSetupEnabled(refVal_setTrainingCommandSetupEnabled); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSetupEnabled); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("initial_source_files")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("initial_source_files"))); @@ -523,22 +459,6 @@ void RLTaskCreateSchema::toMultipart(std::shared_ptr multipar { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("rl_config_spec")), m_Rl_config_spec.get())); } - if(m_Training_command_spec.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("training_command_spec")), m_Training_command_spec.get())); - } - if(m_Inference_command_spec.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")), m_Inference_command_spec.get())); - } - if(m_Training_command_setup_enabled.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")), m_Training_command_setup_enabled.get())); - } - if(m_Inference_command_setup_enabled.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")), m_Inference_command_setup_enabled.get())); - } if(m_Initial_source_files.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("initial_source_files")), m_Initial_source_files.get())); @@ -668,30 +588,6 @@ bool RLTaskCreateSchema::fromMultiPart(std::shared_ptr multip ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("rl_config_spec"))), refVal_setRlConfigSpec ); setRlConfigSpec(refVal_setRlConfigSpec); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("training_command_spec")))) - { - std::map> refVal_setTrainingCommandSpec; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))), refVal_setTrainingCommandSpec ); - setTrainingCommandSpec(refVal_setTrainingCommandSpec); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))), refVal_setInferenceCommandSpec ); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")))) - { - bool refVal_setTrainingCommandSetupEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))), refVal_setTrainingCommandSetupEnabled ); - setTrainingCommandSetupEnabled(refVal_setTrainingCommandSetupEnabled); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))), refVal_setInferenceCommandSetupEnabled ); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("initial_source_files")))) { std::vector> refVal_setInitialSourceFiles; @@ -1139,84 +1035,6 @@ void RLTaskCreateSchema::unsetRl_config_spec() { m_Rl_config_spec.reset(); } -std::map> RLTaskCreateSchema::getTrainingCommandSpec() const -{ - return m_Training_command_spec.get(); -} - - -void RLTaskCreateSchema::setTrainingCommandSpec(const std::map>& value) -{ - m_Training_command_spec = value; -} - -bool RLTaskCreateSchema::trainingCommandSpecIsSet() const -{ - return m_Training_command_spec.has_value(); -} - -void RLTaskCreateSchema::unsetTraining_command_spec() -{ - m_Training_command_spec.reset(); -} -std::map> RLTaskCreateSchema::getInferenceCommandSpec() const -{ - return m_Inference_command_spec.get(); -} - - -void RLTaskCreateSchema::setInferenceCommandSpec(const std::map>& value) -{ - m_Inference_command_spec = value; -} - -bool RLTaskCreateSchema::inferenceCommandSpecIsSet() const -{ - return m_Inference_command_spec.has_value(); -} - -void RLTaskCreateSchema::unsetInference_command_spec() -{ - m_Inference_command_spec.reset(); -} -bool RLTaskCreateSchema::isTrainingCommandSetupEnabled() const -{ - return m_Training_command_setup_enabled.get(); -} - -void RLTaskCreateSchema::setTrainingCommandSetupEnabled(bool value) -{ - m_Training_command_setup_enabled = value; -} - -bool RLTaskCreateSchema::trainingCommandSetupEnabledIsSet() const -{ - return m_Training_command_setup_enabled.has_value(); -} - -void RLTaskCreateSchema::unsetTraining_command_setup_enabled() -{ - m_Training_command_setup_enabled.reset(); -} -bool RLTaskCreateSchema::isInferenceCommandSetupEnabled() const -{ - return m_Inference_command_setup_enabled.get(); -} - -void RLTaskCreateSchema::setInferenceCommandSetupEnabled(bool value) -{ - m_Inference_command_setup_enabled = value; -} - -bool RLTaskCreateSchema::inferenceCommandSetupEnabledIsSet() const -{ - return m_Inference_command_setup_enabled.has_value(); -} - -void RLTaskCreateSchema::unsetInference_command_setup_enabled() -{ - m_Inference_command_setup_enabled.reset(); -} std::vector> RLTaskCreateSchema::getInitialSourceFiles() const { return m_Initial_source_files.get(); diff --git a/rest/src/model/RLTaskGenerateEnvCfgSchema.cpp b/rest/src/model/RLTaskGenerateEnvCfgSchema.cpp deleted file mode 100644 index a44ec6c..0000000 --- a/rest/src/model/RLTaskGenerateEnvCfgSchema.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/RLTaskGenerateEnvCfgSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -RLTaskGenerateEnvCfgSchema::RLTaskGenerateEnvCfgSchema() -{ - m_Overwrite = false; - m_OverwriteIsSet = false; -} - -RLTaskGenerateEnvCfgSchema::~RLTaskGenerateEnvCfgSchema() -{ -} - -void RLTaskGenerateEnvCfgSchema::validate() -{ - // TODO: implement validation -} - -web::json::value RLTaskGenerateEnvCfgSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_OverwriteIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("overwrite"))] = ModelBase::toJson(m_Overwrite); - } - - return val; -} - -bool RLTaskGenerateEnvCfgSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("overwrite")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("overwrite"))); - if(!fieldValue.is_null()) - { - bool refVal_setOverwrite; - ok &= ModelBase::fromJson(fieldValue, refVal_setOverwrite); - setOverwrite(refVal_setOverwrite); - - } - } - return ok; -} - -void RLTaskGenerateEnvCfgSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_OverwriteIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("overwrite")), m_Overwrite)); - } -} - -bool RLTaskGenerateEnvCfgSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("overwrite")))) - { - bool refVal_setOverwrite; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("overwrite"))), refVal_setOverwrite ); - setOverwrite(refVal_setOverwrite); - } - return ok; -} - - -bool RLTaskGenerateEnvCfgSchema::isOverwrite() const -{ - return m_Overwrite; -} - -void RLTaskGenerateEnvCfgSchema::setOverwrite(bool value) -{ - m_Overwrite = value; - m_OverwriteIsSet = true; -} - -bool RLTaskGenerateEnvCfgSchema::overwriteIsSet() const -{ - return m_OverwriteIsSet; -} - -void RLTaskGenerateEnvCfgSchema::unsetOverwrite() -{ - m_OverwriteIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/RLTaskPolicyProvenanceSchema.cpp b/rest/src/model/RLTaskPolicyProvenanceSchema.cpp index 694bdb0..b855561 100644 --- a/rest/src/model/RLTaskPolicyProvenanceSchema.cpp +++ b/rest/src/model/RLTaskPolicyProvenanceSchema.cpp @@ -26,8 +26,6 @@ RLTaskPolicyProvenanceSchema::RLTaskPolicyProvenanceSchema() m_Source_statusIsSet = false; m_Source_code_available = false; m_Source_code_availableIsSet = false; - m_Inference_command_setup_enabled = false; - m_Inference_command_setup_enabledIsSet = false; m_WarningsIsSet = false; } @@ -73,16 +71,6 @@ web::json::value RLTaskPolicyProvenanceSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("source_code_available"))] = ModelBase::toJson(m_Source_code_available); } - if(m_Inference_command_setup_enabledIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))] = ModelBase::toJson(m_Inference_command_setup_enabled); - } - if(m_Inference_command_spec.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))] = ModelBase::toJson(m_Inference_command_spec.get()); - } if(m_WarningsIsSet) { @@ -161,28 +149,6 @@ bool RLTaskPolicyProvenanceSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSetupEnabled); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSpec); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("warnings")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("warnings"))); @@ -228,14 +194,6 @@ void RLTaskPolicyProvenanceSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("source_code_available")), m_Source_code_available)); } - if(m_Inference_command_setup_enabledIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")), m_Inference_command_setup_enabled)); - } - if(m_Inference_command_spec.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")), m_Inference_command_spec.get())); - } if(m_WarningsIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("warnings")), m_Warnings)); @@ -287,18 +245,6 @@ bool RLTaskPolicyProvenanceSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("source_code_available"))), refVal_setSourceCodeAvailable ); setSourceCodeAvailable(refVal_setSourceCodeAvailable); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))), refVal_setInferenceCommandSetupEnabled ); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))), refVal_setInferenceCommandSpec ); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("warnings")))) { std::vector refVal_setWarnings; @@ -431,46 +377,6 @@ void RLTaskPolicyProvenanceSchema::unsetSource_code_available() { m_Source_code_availableIsSet = false; } -bool RLTaskPolicyProvenanceSchema::isInferenceCommandSetupEnabled() const -{ - return m_Inference_command_setup_enabled; -} - -void RLTaskPolicyProvenanceSchema::setInferenceCommandSetupEnabled(bool value) -{ - m_Inference_command_setup_enabled = value; - m_Inference_command_setup_enabledIsSet = true; -} - -bool RLTaskPolicyProvenanceSchema::inferenceCommandSetupEnabledIsSet() const -{ - return m_Inference_command_setup_enabledIsSet; -} - -void RLTaskPolicyProvenanceSchema::unsetInference_command_setup_enabled() -{ - m_Inference_command_setup_enabledIsSet = false; -} -std::map> RLTaskPolicyProvenanceSchema::getInferenceCommandSpec() const -{ - return m_Inference_command_spec.get(); -} - - -void RLTaskPolicyProvenanceSchema::setInferenceCommandSpec(const std::map>& value) -{ - m_Inference_command_spec = value; -} - -bool RLTaskPolicyProvenanceSchema::inferenceCommandSpecIsSet() const -{ - return m_Inference_command_spec.has_value(); -} - -void RLTaskPolicyProvenanceSchema::unsetInference_command_spec() -{ - m_Inference_command_spec.reset(); -} std::vector RLTaskPolicyProvenanceSchema::getWarnings() const { return m_Warnings; diff --git a/rest/src/model/RLTaskRLConfigValidateResultSchema.cpp b/rest/src/model/RLTaskRLConfigValidateResultSchema.cpp deleted file mode 100644 index 85ab103..0000000 --- a/rest/src/model/RLTaskRLConfigValidateResultSchema.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/RLTaskRLConfigValidateResultSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -RLTaskRLConfigValidateResultSchema::RLTaskRLConfigValidateResultSchema() -{ - m_Valid = false; - m_ValidIsSet = false; -} - -RLTaskRLConfigValidateResultSchema::~RLTaskRLConfigValidateResultSchema() -{ -} - -void RLTaskRLConfigValidateResultSchema::validate() -{ - // TODO: implement validation -} - -web::json::value RLTaskRLConfigValidateResultSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_ValidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("valid"))] = ModelBase::toJson(m_Valid); - } - if(m_Error.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("error"))] = ModelBase::toJson(m_Error.get()); - } - - return val; -} - -bool RLTaskRLConfigValidateResultSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("valid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("valid"))); - if(!fieldValue.is_null()) - { - bool refVal_setValid; - ok &= ModelBase::fromJson(fieldValue, refVal_setValid); - setValid(refVal_setValid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("error")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("error"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setError; - ok &= ModelBase::fromJson(fieldValue, refVal_setError); - setError(refVal_setError); - - } - } - return ok; -} - -void RLTaskRLConfigValidateResultSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_ValidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("valid")), m_Valid)); - } - if(m_Error.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("error")), m_Error.get())); - } -} - -bool RLTaskRLConfigValidateResultSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("valid")))) - { - bool refVal_setValid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("valid"))), refVal_setValid ); - setValid(refVal_setValid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("error")))) - { - utility::string_t refVal_setError; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("error"))), refVal_setError ); - setError(refVal_setError); - } - return ok; -} - - -bool RLTaskRLConfigValidateResultSchema::isValid() const -{ - return m_Valid; -} - -void RLTaskRLConfigValidateResultSchema::setValid(bool value) -{ - m_Valid = value; - m_ValidIsSet = true; -} - -bool RLTaskRLConfigValidateResultSchema::validIsSet() const -{ - return m_ValidIsSet; -} - -void RLTaskRLConfigValidateResultSchema::unsetValid() -{ - m_ValidIsSet = false; -} -utility::string_t RLTaskRLConfigValidateResultSchema::getError() const -{ - return m_Error.get(); -} - - -void RLTaskRLConfigValidateResultSchema::setError(const utility::string_t& value) -{ - m_Error = value; -} - -bool RLTaskRLConfigValidateResultSchema::errorIsSet() const -{ - return m_Error.has_value(); -} - -void RLTaskRLConfigValidateResultSchema::unsetError() -{ - m_Error.reset(); -} - -} -} -} -} - - diff --git a/rest/src/model/RLTaskSceneEntityCreateSchema.cpp b/rest/src/model/RLTaskSceneEntityCreateSchema.cpp index 4043f24..9abe7ca 100644 --- a/rest/src/model/RLTaskSceneEntityCreateSchema.cpp +++ b/rest/src/model/RLTaskSceneEntityCreateSchema.cpp @@ -69,11 +69,6 @@ web::json::value RLTaskSceneEntityCreateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("twin_name"))] = ModelBase::toJson(m_Twin_name.get()); } - if(m_Environment_object_external_id.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))] = ModelBase::toJson(m_Environment_object_external_id.get()); - } if(m_Initial_state.has_value()) { @@ -183,17 +178,6 @@ bool RLTaskSceneEntityCreateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEnvironmentObjectExternalId; - ok &= ModelBase::fromJson(fieldValue, refVal_setEnvironmentObjectExternalId); - setEnvironmentObjectExternalId(refVal_setEnvironmentObjectExternalId); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("initial_state")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("initial_state"))); @@ -323,10 +307,6 @@ void RLTaskSceneEntityCreateSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("twin_name")), m_Twin_name.get())); } - if(m_Environment_object_external_id.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")), m_Environment_object_external_id.get())); - } if(m_Initial_state.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("initial_state")), m_Initial_state.get())); @@ -404,12 +384,6 @@ bool RLTaskSceneEntityCreateSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("twin_name"))), refVal_setTwinName ); setTwinName(refVal_setTwinName); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")))) - { - utility::string_t refVal_setEnvironmentObjectExternalId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))), refVal_setEnvironmentObjectExternalId ); - setEnvironmentObjectExternalId(refVal_setEnvironmentObjectExternalId); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("initial_state")))) { std::map> refVal_setInitialState; @@ -625,26 +599,6 @@ void RLTaskSceneEntityCreateSchema::unsetTwin_name() { m_Twin_name.reset(); } -utility::string_t RLTaskSceneEntityCreateSchema::getEnvironmentObjectExternalId() const -{ - return m_Environment_object_external_id.get(); -} - - -void RLTaskSceneEntityCreateSchema::setEnvironmentObjectExternalId(const utility::string_t& value) -{ - m_Environment_object_external_id = value; -} - -bool RLTaskSceneEntityCreateSchema::environmentObjectExternalIdIsSet() const -{ - return m_Environment_object_external_id.has_value(); -} - -void RLTaskSceneEntityCreateSchema::unsetEnvironment_object_external_id() -{ - m_Environment_object_external_id.reset(); -} std::map> RLTaskSceneEntityCreateSchema::getInitialState() const { return m_Initial_state.get(); diff --git a/rest/src/model/RLTaskSceneEntitySchema.cpp b/rest/src/model/RLTaskSceneEntitySchema.cpp index 5230608..b624e38 100644 --- a/rest/src/model/RLTaskSceneEntitySchema.cpp +++ b/rest/src/model/RLTaskSceneEntitySchema.cpp @@ -98,11 +98,6 @@ web::json::value RLTaskSceneEntitySchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("twin_name"))] = ModelBase::toJson(m_Twin_name.get()); } - if(m_Environment_object_external_id.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))] = ModelBase::toJson(m_Environment_object_external_id.get()); - } if(m_Initial_stateIsSet) { @@ -244,17 +239,6 @@ bool RLTaskSceneEntitySchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEnvironmentObjectExternalId; - ok &= ModelBase::fromJson(fieldValue, refVal_setEnvironmentObjectExternalId); - setEnvironmentObjectExternalId(refVal_setEnvironmentObjectExternalId); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("initial_state")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("initial_state"))); @@ -414,10 +398,6 @@ void RLTaskSceneEntitySchema::toMultipart(std::shared_ptr mul { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("twin_name")), m_Twin_name.get())); } - if(m_Environment_object_external_id.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")), m_Environment_object_external_id.get())); - } if(m_Initial_stateIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("initial_state")), m_Initial_state)); @@ -515,12 +495,6 @@ bool RLTaskSceneEntitySchema::fromMultiPart(std::shared_ptr m ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("twin_name"))), refVal_setTwinName ); setTwinName(refVal_setTwinName); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")))) - { - utility::string_t refVal_setEnvironmentObjectExternalId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))), refVal_setEnvironmentObjectExternalId ); - setEnvironmentObjectExternalId(refVal_setEnvironmentObjectExternalId); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("initial_state")))) { std::map> refVal_setInitialState; @@ -790,26 +764,6 @@ void RLTaskSceneEntitySchema::unsetTwin_name() { m_Twin_name.reset(); } -utility::string_t RLTaskSceneEntitySchema::getEnvironmentObjectExternalId() const -{ - return m_Environment_object_external_id.get(); -} - - -void RLTaskSceneEntitySchema::setEnvironmentObjectExternalId(const utility::string_t& value) -{ - m_Environment_object_external_id = value; -} - -bool RLTaskSceneEntitySchema::environmentObjectExternalIdIsSet() const -{ - return m_Environment_object_external_id.has_value(); -} - -void RLTaskSceneEntitySchema::unsetEnvironment_object_external_id() -{ - m_Environment_object_external_id.reset(); -} std::map> RLTaskSceneEntitySchema::getInitialState() const { return m_Initial_state; diff --git a/rest/src/model/RLTaskSceneEntityUpdateSchema.cpp b/rest/src/model/RLTaskSceneEntityUpdateSchema.cpp index ddf287b..93e6170 100644 --- a/rest/src/model/RLTaskSceneEntityUpdateSchema.cpp +++ b/rest/src/model/RLTaskSceneEntityUpdateSchema.cpp @@ -63,11 +63,6 @@ web::json::value RLTaskSceneEntityUpdateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("twin_name"))] = ModelBase::toJson(m_Twin_name.get()); } - if(m_Environment_object_external_id.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))] = ModelBase::toJson(m_Environment_object_external_id.get()); - } if(m_Initial_state.has_value()) { @@ -177,17 +172,6 @@ bool RLTaskSceneEntityUpdateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEnvironmentObjectExternalId; - ok &= ModelBase::fromJson(fieldValue, refVal_setEnvironmentObjectExternalId); - setEnvironmentObjectExternalId(refVal_setEnvironmentObjectExternalId); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("initial_state")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("initial_state"))); @@ -317,10 +301,6 @@ void RLTaskSceneEntityUpdateSchema::toMultipart(std::shared_ptradd(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("twin_name")), m_Twin_name.get())); } - if(m_Environment_object_external_id.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")), m_Environment_object_external_id.get())); - } if(m_Initial_state.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("initial_state")), m_Initial_state.get())); @@ -398,12 +378,6 @@ bool RLTaskSceneEntityUpdateSchema::fromMultiPart(std::shared_ptrgetContent(utility::conversions::to_string_t(_XPLATSTR("twin_name"))), refVal_setTwinName ); setTwinName(refVal_setTwinName); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id")))) - { - utility::string_t refVal_setEnvironmentObjectExternalId; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("environment_object_external_id"))), refVal_setEnvironmentObjectExternalId ); - setEnvironmentObjectExternalId(refVal_setEnvironmentObjectExternalId); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("initial_state")))) { std::map> refVal_setInitialState; @@ -616,26 +590,6 @@ void RLTaskSceneEntityUpdateSchema::unsetTwin_name() { m_Twin_name.reset(); } -utility::string_t RLTaskSceneEntityUpdateSchema::getEnvironmentObjectExternalId() const -{ - return m_Environment_object_external_id.get(); -} - - -void RLTaskSceneEntityUpdateSchema::setEnvironmentObjectExternalId(const utility::string_t& value) -{ - m_Environment_object_external_id = value; -} - -bool RLTaskSceneEntityUpdateSchema::environmentObjectExternalIdIsSet() const -{ - return m_Environment_object_external_id.has_value(); -} - -void RLTaskSceneEntityUpdateSchema::unsetEnvironment_object_external_id() -{ - m_Environment_object_external_id.reset(); -} std::map> RLTaskSceneEntityUpdateSchema::getInitialState() const { return m_Initial_state.get(); diff --git a/rest/src/model/RLTaskSchema.cpp b/rest/src/model/RLTaskSchema.cpp index d0ac076..440818a 100644 --- a/rest/src/model/RLTaskSchema.cpp +++ b/rest/src/model/RLTaskSchema.cpp @@ -47,12 +47,6 @@ RLTaskSchema::RLTaskSchema() m_Action_specIsSet = false; m_Observation_specIsSet = false; m_Rl_config_specIsSet = false; - m_Training_command_specIsSet = false; - m_Inference_command_specIsSet = false; - m_Training_command_setup_enabled = false; - m_Training_command_setup_enabledIsSet = false; - m_Inference_command_setup_enabled = false; - m_Inference_command_setup_enabledIsSet = false; m_Has_scene_cfg = false; m_Has_scene_cfgIsSet = false; m_Has_env_entrypoint = false; @@ -207,26 +201,6 @@ web::json::value RLTaskSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("rl_config_spec"))] = ModelBase::toJson(m_Rl_config_spec); } - if(m_Training_command_specIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))] = ModelBase::toJson(m_Training_command_spec); - } - if(m_Inference_command_specIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))] = ModelBase::toJson(m_Inference_command_spec); - } - if(m_Training_command_setup_enabledIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))] = ModelBase::toJson(m_Training_command_setup_enabled); - } - if(m_Inference_command_setup_enabledIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))] = ModelBase::toJson(m_Inference_command_setup_enabled); - } if(m_Has_scene_cfgIsSet) { @@ -555,50 +529,6 @@ bool RLTaskSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("training_command_spec")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setTrainingCommandSpec; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrainingCommandSpec); - setTrainingCommandSpec(refVal_setTrainingCommandSpec); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSpec); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setTrainingCommandSetupEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrainingCommandSetupEnabled); - setTrainingCommandSetupEnabled(refVal_setTrainingCommandSetupEnabled); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSetupEnabled); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("has_scene_cfg")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("has_scene_cfg"))); @@ -826,22 +756,6 @@ void RLTaskSchema::toMultipart(std::shared_ptr multipart, con { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("rl_config_spec")), m_Rl_config_spec)); } - if(m_Training_command_specIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("training_command_spec")), m_Training_command_spec)); - } - if(m_Inference_command_specIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")), m_Inference_command_spec)); - } - if(m_Training_command_setup_enabledIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")), m_Training_command_setup_enabled)); - } - if(m_Inference_command_setup_enabledIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")), m_Inference_command_setup_enabled)); - } if(m_Has_scene_cfgIsSet) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("has_scene_cfg")), m_Has_scene_cfg)); @@ -1041,30 +955,6 @@ bool RLTaskSchema::fromMultiPart(std::shared_ptr multipart, c ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("rl_config_spec"))), refVal_setRlConfigSpec ); setRlConfigSpec(refVal_setRlConfigSpec); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("training_command_spec")))) - { - std::map> refVal_setTrainingCommandSpec; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))), refVal_setTrainingCommandSpec ); - setTrainingCommandSpec(refVal_setTrainingCommandSpec); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))), refVal_setInferenceCommandSpec ); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")))) - { - bool refVal_setTrainingCommandSetupEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))), refVal_setTrainingCommandSetupEnabled ); - setTrainingCommandSetupEnabled(refVal_setTrainingCommandSetupEnabled); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))), refVal_setInferenceCommandSetupEnabled ); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("has_scene_cfg")))) { bool refVal_setHasSceneCfg; @@ -1686,88 +1576,6 @@ void RLTaskSchema::unsetRl_config_spec() { m_Rl_config_specIsSet = false; } -std::map> RLTaskSchema::getTrainingCommandSpec() const -{ - return m_Training_command_spec; -} - - -void RLTaskSchema::setTrainingCommandSpec(const std::map>& value) -{ - m_Training_command_spec = value; - m_Training_command_specIsSet = true; -} - -bool RLTaskSchema::trainingCommandSpecIsSet() const -{ - return m_Training_command_specIsSet; -} - -void RLTaskSchema::unsetTraining_command_spec() -{ - m_Training_command_specIsSet = false; -} -std::map> RLTaskSchema::getInferenceCommandSpec() const -{ - return m_Inference_command_spec; -} - - -void RLTaskSchema::setInferenceCommandSpec(const std::map>& value) -{ - m_Inference_command_spec = value; - m_Inference_command_specIsSet = true; -} - -bool RLTaskSchema::inferenceCommandSpecIsSet() const -{ - return m_Inference_command_specIsSet; -} - -void RLTaskSchema::unsetInference_command_spec() -{ - m_Inference_command_specIsSet = false; -} -bool RLTaskSchema::isTrainingCommandSetupEnabled() const -{ - return m_Training_command_setup_enabled; -} - -void RLTaskSchema::setTrainingCommandSetupEnabled(bool value) -{ - m_Training_command_setup_enabled = value; - m_Training_command_setup_enabledIsSet = true; -} - -bool RLTaskSchema::trainingCommandSetupEnabledIsSet() const -{ - return m_Training_command_setup_enabledIsSet; -} - -void RLTaskSchema::unsetTraining_command_setup_enabled() -{ - m_Training_command_setup_enabledIsSet = false; -} -bool RLTaskSchema::isInferenceCommandSetupEnabled() const -{ - return m_Inference_command_setup_enabled; -} - -void RLTaskSchema::setInferenceCommandSetupEnabled(bool value) -{ - m_Inference_command_setup_enabled = value; - m_Inference_command_setup_enabledIsSet = true; -} - -bool RLTaskSchema::inferenceCommandSetupEnabledIsSet() const -{ - return m_Inference_command_setup_enabledIsSet; -} - -void RLTaskSchema::unsetInference_command_setup_enabled() -{ - m_Inference_command_setup_enabledIsSet = false; -} bool RLTaskSchema::isHasSceneCfg() const { return m_Has_scene_cfg; diff --git a/rest/src/model/RLTaskUpdateSchema.cpp b/rest/src/model/RLTaskUpdateSchema.cpp index 5f33bbf..c308c4d 100644 --- a/rest/src/model/RLTaskUpdateSchema.cpp +++ b/rest/src/model/RLTaskUpdateSchema.cpp @@ -128,26 +128,6 @@ web::json::value RLTaskUpdateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("rl_config_spec"))] = ModelBase::toJson(m_Rl_config_spec.get()); } - if(m_Training_command_spec.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))] = ModelBase::toJson(m_Training_command_spec.get()); - } - if(m_Inference_command_spec.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))] = ModelBase::toJson(m_Inference_command_spec.get()); - } - if(m_Training_command_setup_enabled.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))] = ModelBase::toJson(m_Training_command_setup_enabled.get()); - } - if(m_Inference_command_setup_enabled.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))] = ModelBase::toJson(m_Inference_command_setup_enabled.get()); - } return val; } @@ -355,50 +335,6 @@ bool RLTaskUpdateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("training_command_spec")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setTrainingCommandSpec; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrainingCommandSpec); - setTrainingCommandSpec(refVal_setTrainingCommandSpec); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSpec); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setTrainingCommandSetupEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setTrainingCommandSetupEnabled); - setTrainingCommandSetupEnabled(refVal_setTrainingCommandSetupEnabled); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))); - if(!fieldValue.is_null()) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromJson(fieldValue, refVal_setInferenceCommandSetupEnabled); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - - } - } return ok; } @@ -481,22 +417,6 @@ void RLTaskUpdateSchema::toMultipart(std::shared_ptr multipar { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("rl_config_spec")), m_Rl_config_spec.get())); } - if(m_Training_command_spec.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("training_command_spec")), m_Training_command_spec.get())); - } - if(m_Inference_command_spec.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")), m_Inference_command_spec.get())); - } - if(m_Training_command_setup_enabled.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")), m_Training_command_setup_enabled.get())); - } - if(m_Inference_command_setup_enabled.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")), m_Inference_command_setup_enabled.get())); - } } bool RLTaskUpdateSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -616,30 +536,6 @@ bool RLTaskUpdateSchema::fromMultiPart(std::shared_ptr multip ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("rl_config_spec"))), refVal_setRlConfigSpec ); setRlConfigSpec(refVal_setRlConfigSpec); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("training_command_spec")))) - { - std::map> refVal_setTrainingCommandSpec; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("training_command_spec"))), refVal_setTrainingCommandSpec ); - setTrainingCommandSpec(refVal_setTrainingCommandSpec); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec")))) - { - std::map> refVal_setInferenceCommandSpec; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_spec"))), refVal_setInferenceCommandSpec ); - setInferenceCommandSpec(refVal_setInferenceCommandSpec); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled")))) - { - bool refVal_setTrainingCommandSetupEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("training_command_setup_enabled"))), refVal_setTrainingCommandSetupEnabled ); - setTrainingCommandSetupEnabled(refVal_setTrainingCommandSetupEnabled); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled")))) - { - bool refVal_setInferenceCommandSetupEnabled; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("inference_command_setup_enabled"))), refVal_setInferenceCommandSetupEnabled ); - setInferenceCommandSetupEnabled(refVal_setInferenceCommandSetupEnabled); - } return ok; } @@ -1057,84 +953,6 @@ void RLTaskUpdateSchema::unsetRl_config_spec() { m_Rl_config_spec.reset(); } -std::map> RLTaskUpdateSchema::getTrainingCommandSpec() const -{ - return m_Training_command_spec.get(); -} - - -void RLTaskUpdateSchema::setTrainingCommandSpec(const std::map>& value) -{ - m_Training_command_spec = value; -} - -bool RLTaskUpdateSchema::trainingCommandSpecIsSet() const -{ - return m_Training_command_spec.has_value(); -} - -void RLTaskUpdateSchema::unsetTraining_command_spec() -{ - m_Training_command_spec.reset(); -} -std::map> RLTaskUpdateSchema::getInferenceCommandSpec() const -{ - return m_Inference_command_spec.get(); -} - - -void RLTaskUpdateSchema::setInferenceCommandSpec(const std::map>& value) -{ - m_Inference_command_spec = value; -} - -bool RLTaskUpdateSchema::inferenceCommandSpecIsSet() const -{ - return m_Inference_command_spec.has_value(); -} - -void RLTaskUpdateSchema::unsetInference_command_spec() -{ - m_Inference_command_spec.reset(); -} -bool RLTaskUpdateSchema::isTrainingCommandSetupEnabled() const -{ - return m_Training_command_setup_enabled.get(); -} - -void RLTaskUpdateSchema::setTrainingCommandSetupEnabled(bool value) -{ - m_Training_command_setup_enabled = value; -} - -bool RLTaskUpdateSchema::trainingCommandSetupEnabledIsSet() const -{ - return m_Training_command_setup_enabled.has_value(); -} - -void RLTaskUpdateSchema::unsetTraining_command_setup_enabled() -{ - m_Training_command_setup_enabled.reset(); -} -bool RLTaskUpdateSchema::isInferenceCommandSetupEnabled() const -{ - return m_Inference_command_setup_enabled.get(); -} - -void RLTaskUpdateSchema::setInferenceCommandSetupEnabled(bool value) -{ - m_Inference_command_setup_enabled = value; -} - -bool RLTaskUpdateSchema::inferenceCommandSetupEnabledIsSet() const -{ - return m_Inference_command_setup_enabled.has_value(); -} - -void RLTaskUpdateSchema::unsetInference_command_setup_enabled() -{ - m_Inference_command_setup_enabled.reset(); -} } } diff --git a/rest/src/model/SeedAutogenControllersRequestSchema.cpp b/rest/src/model/SeedAutogenControllersRequestSchema.cpp deleted file mode 100644 index 3059cdd..0000000 --- a/rest/src/model/SeedAutogenControllersRequestSchema.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SeedAutogenControllersRequestSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -SeedAutogenControllersRequestSchema::SeedAutogenControllersRequestSchema() -{ -} - -SeedAutogenControllersRequestSchema::~SeedAutogenControllersRequestSchema() -{ -} - -void SeedAutogenControllersRequestSchema::validate() -{ - // TODO: implement validation -} - -web::json::value SeedAutogenControllersRequestSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Workspace_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))] = ModelBase::toJson(m_Workspace_uuid.get()); - } - - return val; -} - -bool SeedAutogenControllersRequestSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkspaceUuid); - setWorkspaceUuid(refVal_setWorkspaceUuid); - - } - } - return ok; -} - -void SeedAutogenControllersRequestSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Workspace_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")), m_Workspace_uuid.get())); - } -} - -bool SeedAutogenControllersRequestSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))), refVal_setWorkspaceUuid ); - setWorkspaceUuid(refVal_setWorkspaceUuid); - } - return ok; -} - - -utility::string_t SeedAutogenControllersRequestSchema::getWorkspaceUuid() const -{ - return m_Workspace_uuid.get(); -} - - -void SeedAutogenControllersRequestSchema::setWorkspaceUuid(const utility::string_t& value) -{ - m_Workspace_uuid = value; -} - -bool SeedAutogenControllersRequestSchema::workspaceUuidIsSet() const -{ - return m_Workspace_uuid.has_value(); -} - -void SeedAutogenControllersRequestSchema::unsetWorkspace_uuid() -{ - m_Workspace_uuid.reset(); -} - -} -} -} -} - - diff --git a/rest/src/model/SeedAutogenControllersResponseSchema.cpp b/rest/src/model/SeedAutogenControllersResponseSchema.cpp deleted file mode 100644 index 3d4532f..0000000 --- a/rest/src/model/SeedAutogenControllersResponseSchema.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SeedAutogenControllersResponseSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -SeedAutogenControllersResponseSchema::SeedAutogenControllersResponseSchema() -{ - m_Workspace_uuid = utility::conversions::to_string_t(""); - m_Workspace_uuidIsSet = false; - m_ControllersIsSet = false; - m_Autogen_count = 0; - m_Autogen_countIsSet = false; -} - -SeedAutogenControllersResponseSchema::~SeedAutogenControllersResponseSchema() -{ -} - -void SeedAutogenControllersResponseSchema::validate() -{ - // TODO: implement validation -} - -web::json::value SeedAutogenControllersResponseSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Workspace_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))] = ModelBase::toJson(m_Workspace_uuid); - } - if(m_ControllersIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controllers"))] = ModelBase::toJson(m_Controllers); - } - if(m_Autogen_countIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("autogen_count"))] = ModelBase::toJson(m_Autogen_count); - } - - return val; -} - -bool SeedAutogenControllersResponseSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkspaceUuid); - setWorkspaceUuid(refVal_setWorkspaceUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controllers")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controllers"))); - if(!fieldValue.is_null()) - { - std::shared_ptr refVal_setControllers; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllers); - setControllers(refVal_setControllers); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("autogen_count")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("autogen_count"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setAutogenCount; - ok &= ModelBase::fromJson(fieldValue, refVal_setAutogenCount); - setAutogenCount(refVal_setAutogenCount); - - } - } - return ok; -} - -void SeedAutogenControllersResponseSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Workspace_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")), m_Workspace_uuid)); - } - if(m_ControllersIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controllers")), m_Controllers)); - } - if(m_Autogen_countIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("autogen_count")), m_Autogen_count)); - } -} - -bool SeedAutogenControllersResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid")))) - { - utility::string_t refVal_setWorkspaceUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workspace_uuid"))), refVal_setWorkspaceUuid ); - setWorkspaceUuid(refVal_setWorkspaceUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controllers")))) - { - std::shared_ptr refVal_setControllers; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controllers"))), refVal_setControllers ); - setControllers(refVal_setControllers); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("autogen_count")))) - { - int32_t refVal_setAutogenCount; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("autogen_count"))), refVal_setAutogenCount ); - setAutogenCount(refVal_setAutogenCount); - } - return ok; -} - - -utility::string_t SeedAutogenControllersResponseSchema::getWorkspaceUuid() const -{ - return m_Workspace_uuid; -} - - -void SeedAutogenControllersResponseSchema::setWorkspaceUuid(const utility::string_t& value) -{ - m_Workspace_uuid = value; - m_Workspace_uuidIsSet = true; -} - -bool SeedAutogenControllersResponseSchema::workspaceUuidIsSet() const -{ - return m_Workspace_uuidIsSet; -} - -void SeedAutogenControllersResponseSchema::unsetWorkspace_uuid() -{ - m_Workspace_uuidIsSet = false; -} -std::shared_ptr SeedAutogenControllersResponseSchema::getControllers() const -{ - return m_Controllers; -} - - -void SeedAutogenControllersResponseSchema::setControllers(const std::shared_ptr& value) -{ - m_Controllers = value; - m_ControllersIsSet = true; -} - -bool SeedAutogenControllersResponseSchema::controllersIsSet() const -{ - return m_ControllersIsSet; -} - -void SeedAutogenControllersResponseSchema::unsetControllers() -{ - m_ControllersIsSet = false; -} -int32_t SeedAutogenControllersResponseSchema::getAutogenCount() const -{ - return m_Autogen_count; -} - -void SeedAutogenControllersResponseSchema::setAutogenCount(int32_t value) -{ - m_Autogen_count = value; - m_Autogen_countIsSet = true; -} - -bool SeedAutogenControllersResponseSchema::autogenCountIsSet() const -{ - return m_Autogen_countIsSet; -} - -void SeedAutogenControllersResponseSchema::unsetAutogen_count() -{ - m_Autogen_countIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/SimulationStartSchema.cpp b/rest/src/model/SimulationStartSchema.cpp index a8931b0..a94a0e5 100644 --- a/rest/src/model/SimulationStartSchema.cpp +++ b/rest/src/model/SimulationStartSchema.cpp @@ -73,11 +73,6 @@ web::json::value SimulationStartSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("auto_run_controllers"))] = ModelBase::toJson(m_Auto_run_controllers); } - if(m_Stream_profile.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("stream_profile"))] = ModelBase::toJson(m_Stream_profile.get()); - } return val; } @@ -163,17 +158,6 @@ bool SimulationStartSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("stream_profile")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("stream_profile"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setStreamProfile; - ok &= ModelBase::fromJson(fieldValue, refVal_setStreamProfile); - setStreamProfile(refVal_setStreamProfile); - - } - } return ok; } @@ -212,10 +196,6 @@ void SimulationStartSchema::toMultipart(std::shared_ptr multi { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("auto_run_controllers")), m_Auto_run_controllers)); } - if(m_Stream_profile.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("stream_profile")), m_Stream_profile.get())); - } } bool SimulationStartSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -269,12 +249,6 @@ bool SimulationStartSchema::fromMultiPart(std::shared_ptr mul ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("auto_run_controllers"))), refVal_setAutoRunControllers ); setAutoRunControllers(refVal_setAutoRunControllers); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("stream_profile")))) - { - std::map> refVal_setStreamProfile; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("stream_profile"))), refVal_setStreamProfile ); - setStreamProfile(refVal_setStreamProfile); - } return ok; } @@ -450,26 +424,6 @@ void SimulationStartSchema::unsetAuto_run_controllers() { m_Auto_run_controllersIsSet = false; } -std::map> SimulationStartSchema::getStreamProfile() const -{ - return m_Stream_profile.get(); -} - - -void SimulationStartSchema::setStreamProfile(const std::map>& value) -{ - m_Stream_profile = value; -} - -bool SimulationStartSchema::streamProfileIsSet() const -{ - return m_Stream_profile.has_value(); -} - -void SimulationStartSchema::unsetStream_profile() -{ - m_Stream_profile.reset(); -} } } diff --git a/rest/src/model/SimulationStreamProfileSchema.cpp b/rest/src/model/SimulationStreamProfileSchema.cpp deleted file mode 100644 index 5ddf79f..0000000 --- a/rest/src/model/SimulationStreamProfileSchema.cpp +++ /dev/null @@ -1,483 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/SimulationStreamProfileSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -SimulationStreamProfileSchema::SimulationStreamProfileSchema() -{ - m_Version = 0; - m_VersionIsSet = false; - m_Joint_positions = false; - m_Joint_positionsIsSet = false; - m_Joint_velocities = false; - m_Joint_velocitiesIsSet = false; - m_Joint_efforts = false; - m_Joint_effortsIsSet = false; - m_Camera_streams = false; - m_Camera_streamsIsSet = false; - m_PoseIsSet = false; - m_VelocityIsSet = false; -} - -SimulationStreamProfileSchema::~SimulationStreamProfileSchema() -{ -} - -void SimulationStreamProfileSchema::validate() -{ - // TODO: implement validation -} - -web::json::value SimulationStreamProfileSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_VersionIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("version"))] = ModelBase::toJson(m_Version); - } - if(m_Joint_positionsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("joint_positions"))] = ModelBase::toJson(m_Joint_positions); - } - if(m_Joint_velocitiesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("joint_velocities"))] = ModelBase::toJson(m_Joint_velocities); - } - if(m_Joint_effortsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("joint_efforts"))] = ModelBase::toJson(m_Joint_efforts); - } - if(m_Camera_streamsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("camera_streams"))] = ModelBase::toJson(m_Camera_streams); - } - if(m_PoseIsSet) - { - - utility::string_t refVal = fromPoseEnum(m_Pose); - val[utility::conversions::to_string_t(_XPLATSTR("pose"))] = ModelBase::toJson(refVal); - - } - if(m_VelocityIsSet) - { - - utility::string_t refVal = fromVelocityEnum(m_Velocity); - val[utility::conversions::to_string_t(_XPLATSTR("velocity"))] = ModelBase::toJson(refVal); - - } - - return val; -} - -bool SimulationStreamProfileSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("version")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("version"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setVersion; - ok &= ModelBase::fromJson(fieldValue, refVal_setVersion); - setVersion(refVal_setVersion); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("joint_positions")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("joint_positions"))); - if(!fieldValue.is_null()) - { - bool refVal_setJointPositions; - ok &= ModelBase::fromJson(fieldValue, refVal_setJointPositions); - setJointPositions(refVal_setJointPositions); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("joint_velocities")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("joint_velocities"))); - if(!fieldValue.is_null()) - { - bool refVal_setJointVelocities; - ok &= ModelBase::fromJson(fieldValue, refVal_setJointVelocities); - setJointVelocities(refVal_setJointVelocities); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("joint_efforts")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("joint_efforts"))); - if(!fieldValue.is_null()) - { - bool refVal_setJointEfforts; - ok &= ModelBase::fromJson(fieldValue, refVal_setJointEfforts); - setJointEfforts(refVal_setJointEfforts); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("camera_streams")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("camera_streams"))); - if(!fieldValue.is_null()) - { - bool refVal_setCameraStreams; - ok &= ModelBase::fromJson(fieldValue, refVal_setCameraStreams); - setCameraStreams(refVal_setCameraStreams); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("pose")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("pose"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setPose; - ok &= ModelBase::fromJson(fieldValue, refVal_setPose); - - setPose(toPoseEnum(refVal_setPose)); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("velocity")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("velocity"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setVelocity; - ok &= ModelBase::fromJson(fieldValue, refVal_setVelocity); - - setVelocity(toVelocityEnum(refVal_setVelocity)); - - } - } - return ok; -} - -void SimulationStreamProfileSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_VersionIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("version")), m_Version)); - } - if(m_Joint_positionsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("joint_positions")), m_Joint_positions)); - } - if(m_Joint_velocitiesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("joint_velocities")), m_Joint_velocities)); - } - if(m_Joint_effortsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("joint_efforts")), m_Joint_efforts)); - } - if(m_Camera_streamsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("camera_streams")), m_Camera_streams)); - } - if(m_PoseIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("pose")), fromPoseEnum(m_Pose))); - } - if(m_VelocityIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("velocity")), fromVelocityEnum(m_Velocity))); - } -} - -bool SimulationStreamProfileSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("version")))) - { - int32_t refVal_setVersion; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("version"))), refVal_setVersion ); - setVersion(refVal_setVersion); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("joint_positions")))) - { - bool refVal_setJointPositions; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("joint_positions"))), refVal_setJointPositions ); - setJointPositions(refVal_setJointPositions); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("joint_velocities")))) - { - bool refVal_setJointVelocities; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("joint_velocities"))), refVal_setJointVelocities ); - setJointVelocities(refVal_setJointVelocities); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("joint_efforts")))) - { - bool refVal_setJointEfforts; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("joint_efforts"))), refVal_setJointEfforts ); - setJointEfforts(refVal_setJointEfforts); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("camera_streams")))) - { - bool refVal_setCameraStreams; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("camera_streams"))), refVal_setCameraStreams ); - setCameraStreams(refVal_setCameraStreams); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("pose")))) - { - utility::string_t refVal_setPose; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("pose"))), refVal_setPose ); - setPose(toPoseEnum(refVal_setPose)); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("velocity")))) - { - utility::string_t refVal_setVelocity; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("velocity"))), refVal_setVelocity ); - setVelocity(toVelocityEnum(refVal_setVelocity)); - } - return ok; -} - -SimulationStreamProfileSchema::PoseEnum SimulationStreamProfileSchema::toPoseEnum(const utility::string_t& value) const -{ - - if (value == utility::conversions::to_string_t("none")) { - return PoseEnum::NONE; - } - - if (value == utility::conversions::to_string_t("base_link")) { - return PoseEnum::BASE_LINK; - } - - if (value == utility::conversions::to_string_t("all_links")) { - return PoseEnum::ALL_LINKS; - } - - throw std::invalid_argument("Invalid value for conversion to PoseEnum"); -} - - -const utility::string_t SimulationStreamProfileSchema::fromPoseEnum(const PoseEnum value) const -{ - switch(value) - { - - case PoseEnum::NONE: return utility::conversions::to_string_t("none"); - - case PoseEnum::BASE_LINK: return utility::conversions::to_string_t("base_link"); - - case PoseEnum::ALL_LINKS: return utility::conversions::to_string_t("all_links"); - - } -} - -SimulationStreamProfileSchema::VelocityEnum SimulationStreamProfileSchema::toVelocityEnum(const utility::string_t& value) const -{ - - if (value == utility::conversions::to_string_t("none")) { - return VelocityEnum::NONE; - } - - if (value == utility::conversions::to_string_t("base_link")) { - return VelocityEnum::BASE_LINK; - } - - if (value == utility::conversions::to_string_t("all_links")) { - return VelocityEnum::ALL_LINKS; - } - - throw std::invalid_argument("Invalid value for conversion to VelocityEnum"); -} - - -const utility::string_t SimulationStreamProfileSchema::fromVelocityEnum(const VelocityEnum value) const -{ - switch(value) - { - - case VelocityEnum::NONE: return utility::conversions::to_string_t("none"); - - case VelocityEnum::BASE_LINK: return utility::conversions::to_string_t("base_link"); - - case VelocityEnum::ALL_LINKS: return utility::conversions::to_string_t("all_links"); - - } -} - - -int32_t SimulationStreamProfileSchema::getVersion() const -{ - return m_Version; -} - -void SimulationStreamProfileSchema::setVersion(int32_t value) -{ - m_Version = value; - m_VersionIsSet = true; -} - -bool SimulationStreamProfileSchema::versionIsSet() const -{ - return m_VersionIsSet; -} - -void SimulationStreamProfileSchema::unsetVersion() -{ - m_VersionIsSet = false; -} -bool SimulationStreamProfileSchema::isJointPositions() const -{ - return m_Joint_positions; -} - -void SimulationStreamProfileSchema::setJointPositions(bool value) -{ - m_Joint_positions = value; - m_Joint_positionsIsSet = true; -} - -bool SimulationStreamProfileSchema::jointPositionsIsSet() const -{ - return m_Joint_positionsIsSet; -} - -void SimulationStreamProfileSchema::unsetJoint_positions() -{ - m_Joint_positionsIsSet = false; -} -bool SimulationStreamProfileSchema::isJointVelocities() const -{ - return m_Joint_velocities; -} - -void SimulationStreamProfileSchema::setJointVelocities(bool value) -{ - m_Joint_velocities = value; - m_Joint_velocitiesIsSet = true; -} - -bool SimulationStreamProfileSchema::jointVelocitiesIsSet() const -{ - return m_Joint_velocitiesIsSet; -} - -void SimulationStreamProfileSchema::unsetJoint_velocities() -{ - m_Joint_velocitiesIsSet = false; -} -bool SimulationStreamProfileSchema::isJointEfforts() const -{ - return m_Joint_efforts; -} - -void SimulationStreamProfileSchema::setJointEfforts(bool value) -{ - m_Joint_efforts = value; - m_Joint_effortsIsSet = true; -} - -bool SimulationStreamProfileSchema::jointEffortsIsSet() const -{ - return m_Joint_effortsIsSet; -} - -void SimulationStreamProfileSchema::unsetJoint_efforts() -{ - m_Joint_effortsIsSet = false; -} -bool SimulationStreamProfileSchema::isCameraStreams() const -{ - return m_Camera_streams; -} - -void SimulationStreamProfileSchema::setCameraStreams(bool value) -{ - m_Camera_streams = value; - m_Camera_streamsIsSet = true; -} - -bool SimulationStreamProfileSchema::cameraStreamsIsSet() const -{ - return m_Camera_streamsIsSet; -} - -void SimulationStreamProfileSchema::unsetCamera_streams() -{ - m_Camera_streamsIsSet = false; -} -SimulationStreamProfileSchema::PoseEnum SimulationStreamProfileSchema::getPose() const -{ - return m_Pose; -} - - -void SimulationStreamProfileSchema::setPose(const PoseEnum value) -{ - m_Pose = value; - m_PoseIsSet = true; -} - -bool SimulationStreamProfileSchema::poseIsSet() const -{ - return m_PoseIsSet; -} - -void SimulationStreamProfileSchema::unsetPose() -{ - m_PoseIsSet = false; -} -SimulationStreamProfileSchema::VelocityEnum SimulationStreamProfileSchema::getVelocity() const -{ - return m_Velocity; -} - - -void SimulationStreamProfileSchema::setVelocity(const VelocityEnum value) -{ - m_Velocity = value; - m_VelocityIsSet = true; -} - -bool SimulationStreamProfileSchema::velocityIsSet() const -{ - return m_VelocityIsSet; -} - -void SimulationStreamProfileSchema::unsetVelocity() -{ - m_VelocityIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/TriggerAutogenControllersResponseSchema.cpp b/rest/src/model/TriggerAutogenControllersResponseSchema.cpp deleted file mode 100644 index 7eeca03..0000000 --- a/rest/src/model/TriggerAutogenControllersResponseSchema.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/TriggerAutogenControllersResponseSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -TriggerAutogenControllersResponseSchema::TriggerAutogenControllersResponseSchema() -{ - m_Generated_count = 0; - m_Generated_countIsSet = false; - m_Environment = utility::conversions::to_string_t(""); - m_EnvironmentIsSet = false; - m_Message = utility::conversions::to_string_t(""); - m_MessageIsSet = false; -} - -TriggerAutogenControllersResponseSchema::~TriggerAutogenControllersResponseSchema() -{ -} - -void TriggerAutogenControllersResponseSchema::validate() -{ - // TODO: implement validation -} - -web::json::value TriggerAutogenControllersResponseSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Generated_countIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("generated_count"))] = ModelBase::toJson(m_Generated_count); - } - if(m_EnvironmentIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("environment"))] = ModelBase::toJson(m_Environment); - } - if(m_MessageIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("message"))] = ModelBase::toJson(m_Message); - } - - return val; -} - -bool TriggerAutogenControllersResponseSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("generated_count")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("generated_count"))); - if(!fieldValue.is_null()) - { - int32_t refVal_setGeneratedCount; - ok &= ModelBase::fromJson(fieldValue, refVal_setGeneratedCount); - setGeneratedCount(refVal_setGeneratedCount); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("environment")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("environment"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setEnvironment; - ok &= ModelBase::fromJson(fieldValue, refVal_setEnvironment); - setEnvironment(refVal_setEnvironment); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("message")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("message"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromJson(fieldValue, refVal_setMessage); - setMessage(refVal_setMessage); - - } - } - return ok; -} - -void TriggerAutogenControllersResponseSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Generated_countIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("generated_count")), m_Generated_count)); - } - if(m_EnvironmentIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("environment")), m_Environment)); - } - if(m_MessageIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("message")), m_Message)); - } -} - -bool TriggerAutogenControllersResponseSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("generated_count")))) - { - int32_t refVal_setGeneratedCount; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("generated_count"))), refVal_setGeneratedCount ); - setGeneratedCount(refVal_setGeneratedCount); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("environment")))) - { - utility::string_t refVal_setEnvironment; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("environment"))), refVal_setEnvironment ); - setEnvironment(refVal_setEnvironment); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("message")))) - { - utility::string_t refVal_setMessage; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("message"))), refVal_setMessage ); - setMessage(refVal_setMessage); - } - return ok; -} - - -int32_t TriggerAutogenControllersResponseSchema::getGeneratedCount() const -{ - return m_Generated_count; -} - -void TriggerAutogenControllersResponseSchema::setGeneratedCount(int32_t value) -{ - m_Generated_count = value; - m_Generated_countIsSet = true; -} - -bool TriggerAutogenControllersResponseSchema::generatedCountIsSet() const -{ - return m_Generated_countIsSet; -} - -void TriggerAutogenControllersResponseSchema::unsetGenerated_count() -{ - m_Generated_countIsSet = false; -} -utility::string_t TriggerAutogenControllersResponseSchema::getEnvironment() const -{ - return m_Environment; -} - - -void TriggerAutogenControllersResponseSchema::setEnvironment(const utility::string_t& value) -{ - m_Environment = value; - m_EnvironmentIsSet = true; -} - -bool TriggerAutogenControllersResponseSchema::environmentIsSet() const -{ - return m_EnvironmentIsSet; -} - -void TriggerAutogenControllersResponseSchema::unsetEnvironment() -{ - m_EnvironmentIsSet = false; -} -utility::string_t TriggerAutogenControllersResponseSchema::getMessage() const -{ - return m_Message; -} - - -void TriggerAutogenControllersResponseSchema::setMessage(const utility::string_t& value) -{ - m_Message = value; - m_MessageIsSet = true; -} - -bool TriggerAutogenControllersResponseSchema::messageIsSet() const -{ - return m_MessageIsSet; -} - -void TriggerAutogenControllersResponseSchema::unsetMessage() -{ - m_MessageIsSet = false; -} - -} -} -} -} - - diff --git a/rest/src/model/TwinSchema.cpp b/rest/src/model/TwinSchema.cpp index 66dc6c5..24220b2 100644 --- a/rest/src/model/TwinSchema.cpp +++ b/rest/src/model/TwinSchema.cpp @@ -75,8 +75,6 @@ TwinSchema::TwinSchema() m_Fixed_baseIsSet = false; m_Supported_simulation_backendsIsSet = false; m_Export_warningsIsSet = false; - m_Mqtt_command_schemaIsSet = false; - m_Controllable_joint_namesIsSet = false; } TwinSchema::~TwinSchema() @@ -296,16 +294,6 @@ web::json::value TwinSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("export_warnings"))] = ModelBase::toJson(m_Export_warnings); } - if(m_Mqtt_command_schemaIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema"))] = ModelBase::toJson(m_Mqtt_command_schema); - } - if(m_Controllable_joint_namesIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names"))] = ModelBase::toJson(m_Controllable_joint_names); - } return val; } @@ -764,28 +752,6 @@ bool TwinSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema"))); - if(!fieldValue.is_null()) - { - std::map> refVal_setMqttCommandSchema; - ok &= ModelBase::fromJson(fieldValue, refVal_setMqttCommandSchema); - setMqttCommandSchema(refVal_setMqttCommandSchema); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setControllableJointNames; - ok &= ModelBase::fromJson(fieldValue, refVal_setControllableJointNames); - setControllableJointNames(refVal_setControllableJointNames); - - } - } return ok; } @@ -960,14 +926,6 @@ void TwinSchema::toMultipart(std::shared_ptr multipart, const { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("export_warnings")), m_Export_warnings)); } - if(m_Mqtt_command_schemaIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema")), m_Mqtt_command_schema)); - } - if(m_Controllable_joint_namesIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names")), m_Controllable_joint_names)); - } } bool TwinSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) @@ -1225,18 +1183,6 @@ bool TwinSchema::fromMultiPart(std::shared_ptr multipart, con ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("export_warnings"))), refVal_setExportWarnings ); setExportWarnings(refVal_setExportWarnings); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema")))) - { - std::map> refVal_setMqttCommandSchema; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("mqtt_command_schema"))), refVal_setMqttCommandSchema ); - setMqttCommandSchema(refVal_setMqttCommandSchema); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names")))) - { - std::vector refVal_setControllableJointNames; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("controllable_joint_names"))), refVal_setControllableJointNames ); - setControllableJointNames(refVal_setControllableJointNames); - } return ok; } @@ -2073,48 +2019,6 @@ void TwinSchema::unsetExport_warnings() { m_Export_warningsIsSet = false; } -std::map> TwinSchema::getMqttCommandSchema() const -{ - return m_Mqtt_command_schema; -} - - -void TwinSchema::setMqttCommandSchema(const std::map>& value) -{ - m_Mqtt_command_schema = value; - m_Mqtt_command_schemaIsSet = true; -} - -bool TwinSchema::mqttCommandSchemaIsSet() const -{ - return m_Mqtt_command_schemaIsSet; -} - -void TwinSchema::unsetMqtt_command_schema() -{ - m_Mqtt_command_schemaIsSet = false; -} -std::vector TwinSchema::getControllableJointNames() const -{ - return m_Controllable_joint_names; -} - - -void TwinSchema::setControllableJointNames(const std::vector& value) -{ - m_Controllable_joint_names = value; - m_Controllable_joint_namesIsSet = true; -} - -bool TwinSchema::controllableJointNamesIsSet() const -{ - return m_Controllable_joint_namesIsSet; -} - -void TwinSchema::unsetControllable_joint_names() -{ - m_Controllable_joint_namesIsSet = false; -} } } diff --git a/rest/src/model/WorkflowSchema.cpp b/rest/src/model/WorkflowSchema.cpp index 61f2abe..16bc062 100644 --- a/rest/src/model/WorkflowSchema.cpp +++ b/rest/src/model/WorkflowSchema.cpp @@ -46,8 +46,6 @@ WorkflowSchema::WorkflowSchema() m_Updated_at = utility::datetime(); m_Updated_atIsSet = false; m_MetadataIsSet = false; - m_Has_worker_source_override = false; - m_Has_worker_source_overrideIsSet = false; } WorkflowSchema::~WorkflowSchema() @@ -157,11 +155,6 @@ web::json::value WorkflowSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata); } - if(m_Has_worker_source_overrideIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override"))] = ModelBase::toJson(m_Has_worker_source_override); - } if(m_Nodes.has_value()) { @@ -388,17 +381,6 @@ bool WorkflowSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override"))); - if(!fieldValue.is_null()) - { - bool refVal_setHasWorkerSourceOverride; - ok &= ModelBase::fromJson(fieldValue, refVal_setHasWorkerSourceOverride); - setHasWorkerSourceOverride(refVal_setHasWorkerSourceOverride); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("nodes")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("nodes"))); @@ -507,10 +489,6 @@ void WorkflowSchema::toMultipart(std::shared_ptr multipart, c { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata)); } - if(m_Has_worker_source_overrideIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override")), m_Has_worker_source_override)); - } if(m_Nodes.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("nodes")), m_Nodes.get())); @@ -644,12 +622,6 @@ bool WorkflowSchema::fromMultiPart(std::shared_ptr multipart, ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); setMetadata(refVal_setMetadata); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override")))) - { - bool refVal_setHasWorkerSourceOverride; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override"))), refVal_setHasWorkerSourceOverride ); - setHasWorkerSourceOverride(refVal_setHasWorkerSourceOverride); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("nodes")))) { std::vector> refVal_setNodes; @@ -1057,26 +1029,6 @@ void WorkflowSchema::unsetMetadata() { m_MetadataIsSet = false; } -bool WorkflowSchema::isHasWorkerSourceOverride() const -{ - return m_Has_worker_source_override; -} - -void WorkflowSchema::setHasWorkerSourceOverride(bool value) -{ - m_Has_worker_source_override = value; - m_Has_worker_source_overrideIsSet = true; -} - -bool WorkflowSchema::hasWorkerSourceOverrideIsSet() const -{ - return m_Has_worker_source_overrideIsSet; -} - -void WorkflowSchema::unsetHas_worker_source_override() -{ - m_Has_worker_source_overrideIsSet = false; -} std::vector> WorkflowSchema::getNodes() const { return m_Nodes.get(); diff --git a/rest/src/model/WorkflowTemplateSchema.cpp b/rest/src/model/WorkflowTemplateSchema.cpp index 2625174..324a7fc 100644 --- a/rest/src/model/WorkflowTemplateSchema.cpp +++ b/rest/src/model/WorkflowTemplateSchema.cpp @@ -46,8 +46,6 @@ WorkflowTemplateSchema::WorkflowTemplateSchema() m_Updated_at = utility::datetime(); m_Updated_atIsSet = false; m_MetadataIsSet = false; - m_Has_worker_source_override = false; - m_Has_worker_source_overrideIsSet = false; m_Node_count = 0; m_Node_countIsSet = false; } @@ -159,11 +157,6 @@ web::json::value WorkflowTemplateSchema::toJson() const val[utility::conversions::to_string_t(_XPLATSTR("metadata"))] = ModelBase::toJson(m_Metadata); } - if(m_Has_worker_source_overrideIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override"))] = ModelBase::toJson(m_Has_worker_source_override); - } if(m_Nodes.has_value()) { @@ -395,17 +388,6 @@ bool WorkflowTemplateSchema::fromJson(const web::json::value& val) } } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override"))); - if(!fieldValue.is_null()) - { - bool refVal_setHasWorkerSourceOverride; - ok &= ModelBase::fromJson(fieldValue, refVal_setHasWorkerSourceOverride); - setHasWorkerSourceOverride(refVal_setHasWorkerSourceOverride); - - } - } if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("nodes")))) { const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("nodes"))); @@ -525,10 +507,6 @@ void WorkflowTemplateSchema::toMultipart(std::shared_ptr mult { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("metadata")), m_Metadata)); } - if(m_Has_worker_source_overrideIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override")), m_Has_worker_source_override)); - } if(m_Nodes.has_value()) { multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("nodes")), m_Nodes.get())); @@ -666,12 +644,6 @@ bool WorkflowTemplateSchema::fromMultiPart(std::shared_ptr mu ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("metadata"))), refVal_setMetadata ); setMetadata(refVal_setMetadata); } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override")))) - { - bool refVal_setHasWorkerSourceOverride; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("has_worker_source_override"))), refVal_setHasWorkerSourceOverride ); - setHasWorkerSourceOverride(refVal_setHasWorkerSourceOverride); - } if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("nodes")))) { std::vector> refVal_setNodes; @@ -1085,26 +1057,6 @@ void WorkflowTemplateSchema::unsetMetadata() { m_MetadataIsSet = false; } -bool WorkflowTemplateSchema::isHasWorkerSourceOverride() const -{ - return m_Has_worker_source_override; -} - -void WorkflowTemplateSchema::setHasWorkerSourceOverride(bool value) -{ - m_Has_worker_source_override = value; - m_Has_worker_source_overrideIsSet = true; -} - -bool WorkflowTemplateSchema::hasWorkerSourceOverrideIsSet() const -{ - return m_Has_worker_source_overrideIsSet; -} - -void WorkflowTemplateSchema::unsetHas_worker_source_override() -{ - m_Has_worker_source_overrideIsSet = false; -} std::vector> WorkflowTemplateSchema::getNodes() const { return m_Nodes.get(); diff --git a/rest/src/model/WorkflowWorkerSourceSchema.cpp b/rest/src/model/WorkflowWorkerSourceSchema.cpp deleted file mode 100644 index c4d4768..0000000 --- a/rest/src/model/WorkflowWorkerSourceSchema.cpp +++ /dev/null @@ -1,590 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/WorkflowWorkerSourceSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -WorkflowWorkerSourceSchema::WorkflowWorkerSourceSchema() -{ - m_Workflow_uuid = utility::conversions::to_string_t(""); - m_Workflow_uuidIsSet = false; - m_Is_overridden = false; - m_Is_overriddenIsSet = false; - m_Is_stale = false; - m_Is_staleIsSet = false; - m_WarningsIsSet = false; -} - -WorkflowWorkerSourceSchema::~WorkflowWorkerSourceSchema() -{ -} - -void WorkflowWorkerSourceSchema::validate() -{ - // TODO: implement validation -} - -web::json::value WorkflowWorkerSourceSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_Workflow_uuidIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("workflow_uuid"))] = ModelBase::toJson(m_Workflow_uuid); - } - if(m_Filename.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("filename"))] = ModelBase::toJson(m_Filename.get()); - } - if(m_Materialized_source.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("materialized_source"))] = ModelBase::toJson(m_Materialized_source.get()); - } - if(m_Autogenerated_source.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("autogenerated_source"))] = ModelBase::toJson(m_Autogenerated_source.get()); - } - if(m_Is_overriddenIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("is_overridden"))] = ModelBase::toJson(m_Is_overridden); - } - if(m_Is_staleIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("is_stale"))] = ModelBase::toJson(m_Is_stale); - } - if(m_Compiled_kind.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("compiled_kind"))] = ModelBase::toJson(m_Compiled_kind.get()); - } - if(m_Autogen_error.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("autogen_error"))] = ModelBase::toJson(m_Autogen_error.get()); - } - if(m_WarningsIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("warnings"))] = ModelBase::toJson(m_Warnings); - } - if(m_Updated_at.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("updated_at"))] = ModelBase::toJson(m_Updated_at.get()); - } - if(m_Updated_by_uuid.has_value()) - { - - val[utility::conversions::to_string_t(_XPLATSTR("updated_by_uuid"))] = ModelBase::toJson(m_Updated_by_uuid.get()); - } - - return val; -} - -bool WorkflowWorkerSourceSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("workflow_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("workflow_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setWorkflowUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setWorkflowUuid); - setWorkflowUuid(refVal_setWorkflowUuid); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("filename")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("filename"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setFilename; - ok &= ModelBase::fromJson(fieldValue, refVal_setFilename); - setFilename(refVal_setFilename); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("materialized_source")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("materialized_source"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setMaterializedSource; - ok &= ModelBase::fromJson(fieldValue, refVal_setMaterializedSource); - setMaterializedSource(refVal_setMaterializedSource); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("autogenerated_source")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("autogenerated_source"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAutogeneratedSource; - ok &= ModelBase::fromJson(fieldValue, refVal_setAutogeneratedSource); - setAutogeneratedSource(refVal_setAutogeneratedSource); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("is_overridden")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("is_overridden"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsOverridden; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsOverridden); - setIsOverridden(refVal_setIsOverridden); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("is_stale")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("is_stale"))); - if(!fieldValue.is_null()) - { - bool refVal_setIsStale; - ok &= ModelBase::fromJson(fieldValue, refVal_setIsStale); - setIsStale(refVal_setIsStale); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("compiled_kind")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("compiled_kind"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setCompiledKind; - ok &= ModelBase::fromJson(fieldValue, refVal_setCompiledKind); - setCompiledKind(refVal_setCompiledKind); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("autogen_error")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("autogen_error"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setAutogenError; - ok &= ModelBase::fromJson(fieldValue, refVal_setAutogenError); - setAutogenError(refVal_setAutogenError); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("warnings")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("warnings"))); - if(!fieldValue.is_null()) - { - std::vector refVal_setWarnings; - ok &= ModelBase::fromJson(fieldValue, refVal_setWarnings); - setWarnings(refVal_setWarnings); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("updated_at")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("updated_at"))); - if(!fieldValue.is_null()) - { - utility::datetime refVal_setUpdatedAt; - ok &= ModelBase::fromJson(fieldValue, refVal_setUpdatedAt); - setUpdatedAt(refVal_setUpdatedAt); - - } - } - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("updated_by_uuid")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("updated_by_uuid"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setUpdatedByUuid; - ok &= ModelBase::fromJson(fieldValue, refVal_setUpdatedByUuid); - setUpdatedByUuid(refVal_setUpdatedByUuid); - - } - } - return ok; -} - -void WorkflowWorkerSourceSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_Workflow_uuidIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("workflow_uuid")), m_Workflow_uuid)); - } - if(m_Filename.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("filename")), m_Filename.get())); - } - if(m_Materialized_source.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("materialized_source")), m_Materialized_source.get())); - } - if(m_Autogenerated_source.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("autogenerated_source")), m_Autogenerated_source.get())); - } - if(m_Is_overriddenIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("is_overridden")), m_Is_overridden)); - } - if(m_Is_staleIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("is_stale")), m_Is_stale)); - } - if(m_Compiled_kind.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("compiled_kind")), m_Compiled_kind.get())); - } - if(m_Autogen_error.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("autogen_error")), m_Autogen_error.get())); - } - if(m_WarningsIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("warnings")), m_Warnings)); - } - if(m_Updated_at.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("updated_at")), m_Updated_at.get())); - } - if(m_Updated_by_uuid.has_value()) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("updated_by_uuid")), m_Updated_by_uuid.get())); - } -} - -bool WorkflowWorkerSourceSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("workflow_uuid")))) - { - utility::string_t refVal_setWorkflowUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("workflow_uuid"))), refVal_setWorkflowUuid ); - setWorkflowUuid(refVal_setWorkflowUuid); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("filename")))) - { - utility::string_t refVal_setFilename; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("filename"))), refVal_setFilename ); - setFilename(refVal_setFilename); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("materialized_source")))) - { - utility::string_t refVal_setMaterializedSource; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("materialized_source"))), refVal_setMaterializedSource ); - setMaterializedSource(refVal_setMaterializedSource); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("autogenerated_source")))) - { - utility::string_t refVal_setAutogeneratedSource; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("autogenerated_source"))), refVal_setAutogeneratedSource ); - setAutogeneratedSource(refVal_setAutogeneratedSource); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("is_overridden")))) - { - bool refVal_setIsOverridden; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("is_overridden"))), refVal_setIsOverridden ); - setIsOverridden(refVal_setIsOverridden); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("is_stale")))) - { - bool refVal_setIsStale; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("is_stale"))), refVal_setIsStale ); - setIsStale(refVal_setIsStale); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("compiled_kind")))) - { - utility::string_t refVal_setCompiledKind; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("compiled_kind"))), refVal_setCompiledKind ); - setCompiledKind(refVal_setCompiledKind); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("autogen_error")))) - { - utility::string_t refVal_setAutogenError; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("autogen_error"))), refVal_setAutogenError ); - setAutogenError(refVal_setAutogenError); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("warnings")))) - { - std::vector refVal_setWarnings; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("warnings"))), refVal_setWarnings ); - setWarnings(refVal_setWarnings); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("updated_at")))) - { - utility::datetime refVal_setUpdatedAt; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("updated_at"))), refVal_setUpdatedAt ); - setUpdatedAt(refVal_setUpdatedAt); - } - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("updated_by_uuid")))) - { - utility::string_t refVal_setUpdatedByUuid; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("updated_by_uuid"))), refVal_setUpdatedByUuid ); - setUpdatedByUuid(refVal_setUpdatedByUuid); - } - return ok; -} - - -utility::string_t WorkflowWorkerSourceSchema::getWorkflowUuid() const -{ - return m_Workflow_uuid; -} - - -void WorkflowWorkerSourceSchema::setWorkflowUuid(const utility::string_t& value) -{ - m_Workflow_uuid = value; - m_Workflow_uuidIsSet = true; -} - -bool WorkflowWorkerSourceSchema::workflowUuidIsSet() const -{ - return m_Workflow_uuidIsSet; -} - -void WorkflowWorkerSourceSchema::unsetWorkflow_uuid() -{ - m_Workflow_uuidIsSet = false; -} -utility::string_t WorkflowWorkerSourceSchema::getFilename() const -{ - return m_Filename.get(); -} - - -void WorkflowWorkerSourceSchema::setFilename(const utility::string_t& value) -{ - m_Filename = value; -} - -bool WorkflowWorkerSourceSchema::filenameIsSet() const -{ - return m_Filename.has_value(); -} - -void WorkflowWorkerSourceSchema::unsetFilename() -{ - m_Filename.reset(); -} -utility::string_t WorkflowWorkerSourceSchema::getMaterializedSource() const -{ - return m_Materialized_source.get(); -} - - -void WorkflowWorkerSourceSchema::setMaterializedSource(const utility::string_t& value) -{ - m_Materialized_source = value; -} - -bool WorkflowWorkerSourceSchema::materializedSourceIsSet() const -{ - return m_Materialized_source.has_value(); -} - -void WorkflowWorkerSourceSchema::unsetMaterialized_source() -{ - m_Materialized_source.reset(); -} -utility::string_t WorkflowWorkerSourceSchema::getAutogeneratedSource() const -{ - return m_Autogenerated_source.get(); -} - - -void WorkflowWorkerSourceSchema::setAutogeneratedSource(const utility::string_t& value) -{ - m_Autogenerated_source = value; -} - -bool WorkflowWorkerSourceSchema::autogeneratedSourceIsSet() const -{ - return m_Autogenerated_source.has_value(); -} - -void WorkflowWorkerSourceSchema::unsetAutogenerated_source() -{ - m_Autogenerated_source.reset(); -} -bool WorkflowWorkerSourceSchema::isIsOverridden() const -{ - return m_Is_overridden; -} - -void WorkflowWorkerSourceSchema::setIsOverridden(bool value) -{ - m_Is_overridden = value; - m_Is_overriddenIsSet = true; -} - -bool WorkflowWorkerSourceSchema::isOverriddenIsSet() const -{ - return m_Is_overriddenIsSet; -} - -void WorkflowWorkerSourceSchema::unsetIs_overridden() -{ - m_Is_overriddenIsSet = false; -} -bool WorkflowWorkerSourceSchema::isIsStale() const -{ - return m_Is_stale; -} - -void WorkflowWorkerSourceSchema::setIsStale(bool value) -{ - m_Is_stale = value; - m_Is_staleIsSet = true; -} - -bool WorkflowWorkerSourceSchema::isStaleIsSet() const -{ - return m_Is_staleIsSet; -} - -void WorkflowWorkerSourceSchema::unsetIs_stale() -{ - m_Is_staleIsSet = false; -} -utility::string_t WorkflowWorkerSourceSchema::getCompiledKind() const -{ - return m_Compiled_kind.get(); -} - - -void WorkflowWorkerSourceSchema::setCompiledKind(const utility::string_t& value) -{ - m_Compiled_kind = value; -} - -bool WorkflowWorkerSourceSchema::compiledKindIsSet() const -{ - return m_Compiled_kind.has_value(); -} - -void WorkflowWorkerSourceSchema::unsetCompiled_kind() -{ - m_Compiled_kind.reset(); -} -utility::string_t WorkflowWorkerSourceSchema::getAutogenError() const -{ - return m_Autogen_error.get(); -} - - -void WorkflowWorkerSourceSchema::setAutogenError(const utility::string_t& value) -{ - m_Autogen_error = value; -} - -bool WorkflowWorkerSourceSchema::autogenErrorIsSet() const -{ - return m_Autogen_error.has_value(); -} - -void WorkflowWorkerSourceSchema::unsetAutogen_error() -{ - m_Autogen_error.reset(); -} -std::vector WorkflowWorkerSourceSchema::getWarnings() const -{ - return m_Warnings; -} - - -void WorkflowWorkerSourceSchema::setWarnings(const std::vector& value) -{ - m_Warnings = value; - m_WarningsIsSet = true; -} - -bool WorkflowWorkerSourceSchema::warningsIsSet() const -{ - return m_WarningsIsSet; -} - -void WorkflowWorkerSourceSchema::unsetWarnings() -{ - m_WarningsIsSet = false; -} -utility::datetime WorkflowWorkerSourceSchema::getUpdatedAt() const -{ - return m_Updated_at.get(); -} - - -void WorkflowWorkerSourceSchema::setUpdatedAt(const utility::datetime& value) -{ - m_Updated_at = value; -} - -bool WorkflowWorkerSourceSchema::updatedAtIsSet() const -{ - return m_Updated_at.has_value(); -} - -void WorkflowWorkerSourceSchema::unsetUpdated_at() -{ - m_Updated_at.reset(); -} -utility::string_t WorkflowWorkerSourceSchema::getUpdatedByUuid() const -{ - return m_Updated_by_uuid.get(); -} - - -void WorkflowWorkerSourceSchema::setUpdatedByUuid(const utility::string_t& value) -{ - m_Updated_by_uuid = value; -} - -bool WorkflowWorkerSourceSchema::updatedByUuidIsSet() const -{ - return m_Updated_by_uuid.has_value(); -} - -void WorkflowWorkerSourceSchema::unsetUpdated_by_uuid() -{ - m_Updated_by_uuid.reset(); -} - -} -} -} -} - - diff --git a/rest/src/model/WorkflowWorkerSourceUpdateSchema.cpp b/rest/src/model/WorkflowWorkerSourceUpdateSchema.cpp deleted file mode 100644 index 239bba8..0000000 --- a/rest/src/model/WorkflowWorkerSourceUpdateSchema.cpp +++ /dev/null @@ -1,124 +0,0 @@ -/** - * Cyberwave API - * Cyberwave platform REST API. Use 'Bearer YOUR_TOKEN' for authentication. - * - * The version of the OpenAPI document: 1.0.0 - * - * NOTE: This class is auto generated by OpenAPI-Generator 7.24.0-SNAPSHOT. - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - - -#include "CppRestOpenAPIClient/model/WorkflowWorkerSourceUpdateSchema.h" - -namespace org { -namespace openapitools { -namespace client { -namespace model { - -WorkflowWorkerSourceUpdateSchema::WorkflowWorkerSourceUpdateSchema() -{ - m_Source = utility::conversions::to_string_t(""); - m_SourceIsSet = false; -} - -WorkflowWorkerSourceUpdateSchema::~WorkflowWorkerSourceUpdateSchema() -{ -} - -void WorkflowWorkerSourceUpdateSchema::validate() -{ - // TODO: implement validation -} - -web::json::value WorkflowWorkerSourceUpdateSchema::toJson() const -{ - web::json::value val = web::json::value::object(); - if(m_SourceIsSet) - { - - val[utility::conversions::to_string_t(_XPLATSTR("source"))] = ModelBase::toJson(m_Source); - } - - return val; -} - -bool WorkflowWorkerSourceUpdateSchema::fromJson(const web::json::value& val) -{ - bool ok = true; - if(val.has_field(utility::conversions::to_string_t(_XPLATSTR("source")))) - { - const web::json::value& fieldValue = val.at(utility::conversions::to_string_t(_XPLATSTR("source"))); - if(!fieldValue.is_null()) - { - utility::string_t refVal_setSource; - ok &= ModelBase::fromJson(fieldValue, refVal_setSource); - setSource(refVal_setSource); - - } - } - return ok; -} - -void WorkflowWorkerSourceUpdateSchema::toMultipart(std::shared_ptr multipart, const utility::string_t& prefix) const -{ - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - if(m_SourceIsSet) - { - multipart->add(ModelBase::toHttpContent(namePrefix + utility::conversions::to_string_t(_XPLATSTR("source")), m_Source)); - } -} - -bool WorkflowWorkerSourceUpdateSchema::fromMultiPart(std::shared_ptr multipart, const utility::string_t& prefix) -{ - bool ok = true; - utility::string_t namePrefix = prefix; - if(namePrefix.size() > 0 && namePrefix.substr(namePrefix.size() - 1) != utility::conversions::to_string_t(_XPLATSTR("."))) - { - namePrefix += utility::conversions::to_string_t(_XPLATSTR(".")); - } - - if(multipart->hasContent(utility::conversions::to_string_t(_XPLATSTR("source")))) - { - utility::string_t refVal_setSource; - ok &= ModelBase::fromHttpContent(multipart->getContent(utility::conversions::to_string_t(_XPLATSTR("source"))), refVal_setSource ); - setSource(refVal_setSource); - } - return ok; -} - - -utility::string_t WorkflowWorkerSourceUpdateSchema::getSource() const -{ - return m_Source; -} - - -void WorkflowWorkerSourceUpdateSchema::setSource(const utility::string_t& value) -{ - m_Source = value; - m_SourceIsSet = true; -} - -bool WorkflowWorkerSourceUpdateSchema::sourceIsSet() const -{ - return m_SourceIsSet; -} - -void WorkflowWorkerSourceUpdateSchema::unsetSource() -{ - m_SourceIsSet = false; -} - -} -} -} -} - - diff --git a/src/cyberwave/camera_streaming.cpp b/src/cyberwave/camera_streaming.cpp index 5984471..fb799e2 100644 --- a/src/cyberwave/camera_streaming.cpp +++ b/src/cyberwave/camera_streaming.cpp @@ -103,75 +103,11 @@ constexpr double edge_health_stale_timeout_seconds = 60.0; } // namespace // ============================================================================ -// WebRTC producer (libdatachannel) used by camera streamers +// WebRTC producer (libdatachannel) used by CameraStreamer // ============================================================================ using Json = nlohmann::json; -namespace -{ - -struct CameraStreamEdgeHealthState -{ - double stream_started_at_seconds{0.0}; - double last_frame_ts_seconds{0.0}; - std::uint64_t frames_sent{0}; - std::string sensor_name; -}; - -void publish_camera_stream_edge_health(IMqttClient& mqtt, const std::string& twin_uuid, const double now_seconds, - const CameraStreamEdgeHealthState& state) -{ - if (!mqtt.is_connected() || twin_uuid.empty() || state.stream_started_at_seconds <= 0.0) - { - return; - } - - const double uptime_seconds = std::max(0.0, now_seconds - state.stream_started_at_seconds); - const double fps = (uptime_seconds > 0.0) ? (static_cast(state.frames_sent) / uptime_seconds) : 0.0; - const double time_since_last_frame = - (state.last_frame_ts_seconds > 0.0) ? (now_seconds - state.last_frame_ts_seconds) : 0.0; - const bool is_stale = - state.last_frame_ts_seconds <= 0.0 || time_since_last_frame > edge_health_stale_timeout_seconds; - const bool connected = !is_stale; - const std::string camera_id = state.sensor_name.empty() ? "stream" : state.sensor_name; - const double rounded_uptime = std::round(uptime_seconds * 10.0) / 10.0; - const double rounded_fps = std::round(fps * 100.0) / 100.0; - - Json message = {{"type", "edge_health"}, - {"timestamp", now_seconds}, - {"edge_id", twin_uuid}, - {"twin_uuid", twin_uuid}, - {"uptime_seconds", rounded_uptime}, - {"stream_count", 1}, - {"healthy_streams", connected ? 1 : 0}, - {"camera_config", nullptr}, - {"streams", - {{"stream", - {{"camera_id", camera_id}, - {"connection_state", connected ? "connected" : "disconnected"}, - {"ice_connection_state", connected ? "connected" : "new"}, - {"frames_sent", state.frames_sent}, - {"last_frame_ts", state.last_frame_ts_seconds}, - {"fps", rounded_fps}, - {"uptime_seconds", rounded_uptime}, - {"restart_count", 0}, - {"is_stale", is_stale}, - {"is_healthy", !is_stale}}}}}}; - - const std::string topic = mqtt.get_topic_prefix() + "cyberwave/twin/" + twin_uuid + "/edge_health"; - try - { - mqtt.publish(topic, message.dump()); - } - catch (...) - { - // Best-effort health telemetry. - } -} - -} // namespace - class WebRTCAdapter { public: @@ -1158,38 +1094,36 @@ void CameraStreamer::start() { try { - webrtc_mqtt_subscription_ = - mqtt_->subscribe_webrtc_messages_scoped(twin_uuid_, - [this](const std::string& json_payload) - { - if (!webrtc_adapter_) - { - return; - } - try - { - Json msg = Json::parse(json_payload); - if (msg.contains("type") && msg["type"].is_string()) - { - const std::string type = - msg["type"].get(); - if (type == "answer") - { - webrtc_adapter_->handle_answer(msg); - return; - } - if (type == "candidate") - { - webrtc_adapter_->handle_candidate(msg); - return; - } - } - } - catch (...) - { - // ignore malformed payloads - } - }); + mqtt_->subscribe_webrtc_messages(twin_uuid_, + [this](const std::string& json_payload) + { + if (!webrtc_adapter_) + { + return; + } + try + { + Json msg = Json::parse(json_payload); + if (msg.contains("type") && msg["type"].is_string()) + { + const std::string type = msg["type"].get(); + if (type == "answer") + { + webrtc_adapter_->handle_answer(msg); + return; + } + if (type == "candidate") + { + webrtc_adapter_->handle_candidate(msg); + return; + } + } + } + catch (...) + { + // ignore malformed payloads + } + }); webrtc_adapter_ = create_webrtc_adapter(); if (!webrtc_adapter_) @@ -1216,7 +1150,6 @@ void CameraStreamer::start() { // If libdatachannel isn't available at runtime or SDP negotiation fails, // keep MQTT /video publishing working. - webrtc_mqtt_subscription_.reset(); enable_webrtc_ = false; webrtc_adapter_.reset(); } @@ -1254,7 +1187,6 @@ void CameraStreamer::stop() } webrtc_adapter_.reset(); } - webrtc_mqtt_subscription_.reset(); h264_encoder_.reset(); frame_counter_ = 0; @@ -1340,14 +1272,11 @@ void CameraStreamer::stream_loop() } const double now = timestamp_now(); - if (mqtt_ && edge_health_stream_started_at_seconds_ > 0.0 && + if (edge_health_stream_started_at_seconds_ > 0.0 && (edge_health_last_publish_ts_seconds_ <= 0.0 || (now - edge_health_last_publish_ts_seconds_) >= edge_health_publish_interval_seconds)) { - publish_camera_stream_edge_health(*mqtt_, twin_uuid_, now, - {edge_health_stream_started_at_seconds_, - edge_health_last_frame_ts_seconds_, edge_health_frames_sent_, - sensor_name_}); + publish_edge_health(now); edge_health_last_publish_ts_seconds_ = now; } @@ -1360,153 +1289,54 @@ void CameraStreamer::stream_loop() running_ = false; } -// --- EncodedH264CameraStreamer --- -EncodedH264CameraStreamer::EncodedH264CameraStreamer(std::shared_ptr mqtt, const std::string& twin_uuid, - std::string sensor_name, std::string webrtc_stun_url, - std::vector webrtc_turn_servers) - : mqtt_(std::move(mqtt)), twin_uuid_(twin_uuid), sensor_name_(std::move(sensor_name)), - webrtc_stun_url_(std::move(webrtc_stun_url)), webrtc_turn_servers_(std::move(webrtc_turn_servers)) +void CameraStreamer::publish_edge_health(const double now_seconds) { -} - -EncodedH264CameraStreamer::~EncodedH264CameraStreamer() { stop(); } - -void EncodedH264CameraStreamer::set_log_callback(std::function fn) -{ - log_fn_ = std::move(fn); -} - -void EncodedH264CameraStreamer::start() -{ - if (running_.exchange(true)) - return; - if (!mqtt_) + if (!mqtt_ || !mqtt_->is_connected() || twin_uuid_.empty() || edge_health_stream_started_at_seconds_ <= 0.0) { - running_ = false; return; } - try - { - webrtc_mqtt_subscription_ = - mqtt_->subscribe_webrtc_messages_scoped(twin_uuid_, - [this](const std::string& json_payload) - { - if (!webrtc_adapter_) - { - return; - } - try - { - Json msg = Json::parse(json_payload); - if (msg.contains("type") && msg["type"].is_string()) - { - const std::string type = msg["type"].get(); - if (type == "answer") - { - webrtc_adapter_->handle_answer(msg); - return; - } - if (type == "candidate") - { - webrtc_adapter_->handle_candidate(msg); - return; - } - } - } - catch (...) - { - } - }); - - webrtc_adapter_ = create_webrtc_adapter(); - if (!webrtc_adapter_) - { - throw std::runtime_error("WebRTC adapter unavailable (rtc.hpp not available)"); - } - - WebRTCAdapter::Config cfg; - cfg.sensor = sensor_name_; - cfg.stun_url = webrtc_stun_url_; - cfg.turn_servers = webrtc_turn_servers_; - cfg.recording = recording_; - cfg.log_fn = log_fn_; - webrtc_adapter_->start(cfg, - [this](const Json& payload) - { - if (mqtt_) - { - mqtt_->publish_webrtc_message(twin_uuid_, payload.dump()); - } - }); - - edge_health_stream_started_at_seconds_ = timestamp_now(); - edge_health_last_publish_ts_seconds_ = 0.0; - edge_health_last_frame_ts_seconds_ = 0.0; - edge_health_frames_sent_ = 0; - } - catch (...) - { - webrtc_mqtt_subscription_.reset(); - webrtc_adapter_.reset(); - running_ = false; - } -} - -void EncodedH264CameraStreamer::stop() -{ - running_ = false; - if (webrtc_adapter_) - { - try - { - webrtc_adapter_->stop(); - } - catch (...) - { - } - webrtc_adapter_.reset(); - } - webrtc_mqtt_subscription_.reset(); - edge_health_stream_started_at_seconds_ = 0.0; - edge_health_last_publish_ts_seconds_ = 0.0; - edge_health_last_frame_ts_seconds_ = 0.0; - edge_health_frames_sent_ = 0; -} - -bool EncodedH264CameraStreamer::send_frame(const std::vector& annexb_h264, std::uint64_t timestamp_us) -{ - if (!running_ || !webrtc_adapter_ || annexb_h264.empty()) - { - return false; - } + const double uptime_seconds = std::max(0.0, now_seconds - edge_health_stream_started_at_seconds_); + const double fps = (uptime_seconds > 0.0) ? (static_cast(edge_health_frames_sent_) / uptime_seconds) : 0.0; + const double time_since_last_frame = + (edge_health_last_frame_ts_seconds_ > 0.0) ? (now_seconds - edge_health_last_frame_ts_seconds_) : 0.0; + const bool is_stale = + edge_health_last_frame_ts_seconds_ <= 0.0 || time_since_last_frame > edge_health_stale_timeout_seconds; + const bool connected = !is_stale; + const std::string camera_id = sensor_name_.empty() ? "stream" : sensor_name_; + const double rounded_uptime = std::round(uptime_seconds * 10.0) / 10.0; + const double rounded_fps = std::round(fps * 100.0) / 100.0; - // Passthrough carries the robot's RTP clock; the browser jitter buffer expects - // timestamps aligned with wall-clock frame arrival (same as CameraStreamer). - (void)timestamp_us; - const std::uint64_t webrtc_ts_us = static_cast( - std::chrono::duration_cast(std::chrono::steady_clock::now().time_since_epoch()) - .count()); - const bool sent = webrtc_adapter_->send_frame(annexb_h264, webrtc_ts_us); + Json message = {{"type", "edge_health"}, + {"timestamp", now_seconds}, + {"edge_id", twin_uuid_}, + {"twin_uuid", twin_uuid_}, + {"uptime_seconds", rounded_uptime}, + {"stream_count", 1}, + {"healthy_streams", connected ? 1 : 0}, + {"camera_config", nullptr}, + {"streams", + {{"stream", + {{"camera_id", camera_id}, + {"connection_state", connected ? "connected" : "disconnected"}, + {"ice_connection_state", connected ? "connected" : "new"}, + {"frames_sent", edge_health_frames_sent_}, + {"last_frame_ts", edge_health_last_frame_ts_seconds_}, + {"fps", rounded_fps}, + {"uptime_seconds", rounded_uptime}, + {"restart_count", 0}, + {"is_stale", is_stale}, + {"is_healthy", !is_stale}}}}}}; - const double now = timestamp_now(); - if (sent) + const std::string topic = mqtt_->get_topic_prefix() + "cyberwave/twin/" + twin_uuid_ + "/edge_health"; + try { - edge_health_frames_sent_ += 1; - edge_health_last_frame_ts_seconds_ = now; + mqtt_->publish(topic, message.dump()); } - - if (mqtt_ && edge_health_stream_started_at_seconds_ > 0.0 && - (edge_health_last_publish_ts_seconds_ <= 0.0 || - (now - edge_health_last_publish_ts_seconds_) >= edge_health_publish_interval_seconds)) + catch (...) { - publish_camera_stream_edge_health(*mqtt_, twin_uuid_, now, - {edge_health_stream_started_at_seconds_, edge_health_last_frame_ts_seconds_, - edge_health_frames_sent_, sensor_name_}); - edge_health_last_publish_ts_seconds_ = now; + // Best-effort health telemetry. } - - return sent; } // --- VirtualDepthSource --- diff --git a/tests/test_camera_streaming.cpp b/tests/test_camera_streaming.cpp index 8e5ffc5..8196711 100644 --- a/tests/test_camera_streaming.cpp +++ b/tests/test_camera_streaming.cpp @@ -85,23 +85,6 @@ static void test_camera_twin_streaming_with_source() assert(mqtt->publish_count >= 1); } -static void test_encoded_h264_streamer_lifecycle() -{ - auto mqtt = std::make_shared(); - mqtt->topic_prefix_ = ""; - EncodedH264CameraStreamer streamer(mqtt, "twin-1"); - assert(!streamer.running()); - - std::vector annexb = {0x00, 0x00, 0x00, 0x01, 0x67}; - assert(!streamer.send_frame(annexb, 0)); - - streamer.set_log_callback([](const std::string&) {}); - streamer.start(); - streamer.stop(); - assert(!streamer.running()); - assert(!streamer.send_frame(annexb, 0)); -} - static void test_camera_twin_start_without_source_throws() { Config config; @@ -130,7 +113,6 @@ int main() { test_virtual_frame_source(); test_camera_streamer_start_stop(); - test_encoded_h264_streamer_lifecycle(); test_camera_twin_streaming_with_source(); test_camera_twin_start_without_source_throws(); return 0; diff --git a/tests/test_mqtt_interface.cpp b/tests/test_mqtt_interface.cpp index 76c33c1..375fa1b 100644 --- a/tests/test_mqtt_interface.cpp +++ b/tests/test_mqtt_interface.cpp @@ -208,11 +208,6 @@ static void test_webrtc_and_command_topics() assert(m.subscribes[2].topic == "test/cyberwave/twin/twin-1/webrtc-candidate"); assert(m.publishes[1].topic == "test/cyberwave/twin/twin-1/command"); assert(m.subscribes[3].topic == "test/cyberwave/twin/twin-1/command"); - - auto scoped = m.subscribe_webrtc_messages_scoped("twin-2", [](const std::string&) {}); - assert(m.subscribes.size() == 6); - assert(m.subscribes[3].topic == "test/cyberwave/twin/twin-2/webrtc-offer"); - scoped.reset(); } /** Ping / pong topics */