thingpark_client_rs/
models.rs1#![allow(non_snake_case)]
2
3use std::collections::HashMap;
4
5use serde::Deserialize;
6
7#[derive(Deserialize, Debug)]
8pub struct User {
9 pub id: String,
10 pub r#ref: String,
11 pub firstName: String,
12 pub lastName: String,
13 pub email: String,
14 pub organization: String,
15 pub scopes: Vec<String>,
16}
17
18#[derive(Deserialize, Debug)]
19pub struct Token {
20 pub access_token: String,
21}
22
23#[derive(Deserialize, Debug)]
24pub struct Device {
25 pub r#ref: String,
26 pub name: String,
27 pub EUI: String,
28 pub networkAddress: Option<String>,
29 pub activationType: String,
30 pub deviceClass: Option<String>,
31 pub deviceProfileId: String,
32 pub connectivityPlanId: String,
33 pub processingStrategyId: String,
34 pub applicationEUI: String,
35 pub motionIndicator: String,
36 pub statistics: Option<HashMap<String, String>>,
37 pub commercialDetails: Option<HashMap<String, String>>,
38}
39
40#[derive(Deserialize, Debug)]
41pub struct ApiError {
42 pub code: i32,
43 pub message: String,
44 pub errorId: String,
45}