fundamentum_edge_mcu_http_client/models/
mod.rs

1//! Fundamentum API's models to interact with the API and the HTTP client.
2//!
3//! ## Basic Fundamentum API's Response
4//!
5//! All of the API's responses share the same basic structure, which is represented
6//! by the [`ApiResponse`]. In case of errors, other API responses are possible.
7//!
8//! API's successful response :
9//!
10//! ```json
11//! {
12//!     "status": "success",
13//!     "data": {
14//!         "configuration": null,
15//!         "mqtt": {
16//!             "host": "mqtts.fundamentum-iot-dev.com",
17//!             "port": 8883
18//!         }
19//!     }
20//! }
21//! ```
22//!
23//! API's unsuccessful response with data :
24//!
25//! ```json
26//! {
27//!     "status": "error",
28//!     "message": "No Registry to provision device on this project",
29//!     "data":  {
30//!         "errors": [
31//!             {
32//!                 "type": "field",
33//!                 "value": "serial_number_1",
34//!                 "msg": "Invalid value",
35//!                 "path": "serial_number",
36//!                 "location": "body"
37//!             }
38//!         ]
39//!     }
40//! }
41//! ```
42
43mod api_response;
44mod device_fqn;
45mod http_request;
46mod provision_request;
47mod provision_response;
48
49pub use api_response::{
50    failed_data::{ApiErrors, ApiResponseFailedData},
51    failed_empty::{ApiResponseFailedEmpty, Empty},
52    ApiResponse, ApiStatus,
53};
54pub use device_fqn::{DeviceFQN, RegistryFQN};
55pub use http_request::{HttpBody, HttpMethod, HttpRequest, StatusCode};
56pub use provision_request::{DeviceIdentity, DeviceIdentityTag, ProvisionRequestV3};
57pub use provision_response::{MqttBroker, ProvisionResponse};