Lines
100 %
Functions
40.85 %
Branches
use serde::Deserialize;
use serde_json::{Map, Value};
#[derive(Deserialize)]
pub struct UnitIdPath {
pub unit_id: String,
}
pub struct UserIdPath {
pub user_id: String,
pub struct PostUnitBody {
pub data: PostUnitData,
pub struct PostUnitData {
pub code: String,
#[serde(rename = "ownerId")]
pub owner_id: Option<String>,
pub name: Option<String>,
pub info: Option<Map<String, Value>>,
pub struct GetUnitCountQuery {
pub owner: Option<String>,
pub member: Option<String>,
pub contains: Option<String>,
#[derive(Clone, Deserialize)]
pub struct GetUnitListQuery {
pub offset: Option<u64>,
pub limit: Option<u64>,
pub sort: Option<String>,
pub format: Option<ListFormat>,
pub struct PatchUnitBody {
pub data: PatchUnitData,
pub struct PatchUnitData {
#[serde(rename = "memberIds")]
pub member_ids: Option<Vec<String>>,
#[derive(Clone, Deserialize, PartialEq)]
pub enum ListFormat {
#[serde(rename = "array")]
Array,
#[serde(rename = "data")]
Data,