viiper_client/
types.rs

1// This file is auto-generated by VIIPER codegen. DO NOT EDIT.
2
3// Management API DTO types
4
5
6/// ApiError DTO
7#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
8#[serde(rename_all = "camelCase")]
9pub struct ApiError {
10    pub status: i32,
11
12    pub title: String,
13
14    pub detail: String,
15}
16
17
18/// BusListResponse DTO
19#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
20#[serde(rename_all = "camelCase")]
21pub struct BusListResponse {
22    pub buses: Vec<u32>,
23}
24
25
26/// BusCreateResponse DTO
27#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
28#[serde(rename_all = "camelCase")]
29pub struct BusCreateResponse {
30    #[serde(rename = "busId")]
31    pub bus_id: u32,
32}
33
34
35/// BusRemoveResponse DTO
36#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
37#[serde(rename_all = "camelCase")]
38pub struct BusRemoveResponse {
39    #[serde(rename = "busId")]
40    pub bus_id: u32,
41}
42
43
44/// Device DTO
45#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
46#[serde(rename_all = "camelCase")]
47pub struct Device {
48    #[serde(rename = "busId")]
49    pub bus_id: u32,
50
51    #[serde(rename = "devId")]
52    pub dev_id: String,
53
54    pub vid: String,
55
56    pub pid: String,
57
58    #[serde(rename = "type")]
59    pub r#type: String,
60}
61
62
63/// DevicesListResponse DTO
64#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
65#[serde(rename_all = "camelCase")]
66pub struct DevicesListResponse {
67    pub devices: Vec<Device>,
68}
69
70
71/// DeviceRemoveResponse DTO
72#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
73#[serde(rename_all = "camelCase")]
74pub struct DeviceRemoveResponse {
75    #[serde(rename = "busId")]
76    pub bus_id: u32,
77
78    #[serde(rename = "devId")]
79    pub dev_id: String,
80}
81
82
83/// DeviceCreateRequest DTO
84#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
85#[serde(rename_all = "camelCase")]
86pub struct DeviceCreateRequest {
87    #[serde(skip_serializing_if = "Option::is_none")]
88    #[serde(rename = "type")]
89    pub r#type: Option<String>,
90
91    #[serde(skip_serializing_if = "Option::is_none")]
92    #[serde(rename = "idVendor")]
93    pub id_vendor: Option<u16>,
94
95    #[serde(skip_serializing_if = "Option::is_none")]
96    #[serde(rename = "idProduct")]
97    pub id_product: Option<u16>,
98}
99
100