Lines
100 %
Functions
41.77 %
Branches
use serde::Deserialize;
#[derive(Deserialize)]
pub struct RouteIdPath {
pub route_id: String,
}
pub struct PostDeviceRouteBody {
pub data: PostDeviceRouteData,
pub struct PostDeviceRouteData {
#[serde(rename = "deviceId")]
pub device_id: String,
#[serde(rename = "applicationId")]
pub application_id: String,
pub struct PostDeviceRouteBulkBody {
pub data: PostDeviceRouteBulkData,
pub struct PostDeviceRouteBulkData {
#[serde(rename = "networkId")]
pub network_id: String,
#[serde(rename = "networkAddrs")]
pub network_addrs: Vec<String>,
pub struct PostDeviceRouteRangeBody {
pub data: PostDeviceRouteRangeData,
pub struct PostDeviceRouteRangeData {
#[serde(rename = "startAddr")]
pub start_addr: String,
#[serde(rename = "endAddr")]
pub end_addr: String,
pub struct GetDeviceRouteCountQuery {
pub unit: Option<String>,
pub application: Option<String>,
pub network: Option<String>,
pub device: Option<String>,
#[derive(Clone, Deserialize)]
pub struct GetDeviceRouteListQuery {
pub offset: Option<u64>,
pub limit: Option<u64>,
pub sort: Option<String>,
pub format: Option<ListFormat>,
#[derive(Clone, Deserialize, PartialEq)]
pub enum ListFormat {
#[serde(rename = "array")]
Array,
#[serde(rename = "data")]
Data,