use s2_common::types::{self, location::LocationName};
use serde::{Deserialize, Serialize};
#[rustfmt::skip]
#[derive(Debug, Clone, Serialize, Deserialize)]
#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
pub struct LocationInfo {
pub name: LocationName,
pub is_private: bool,
}
impl From<types::location::LocationInfo> for LocationInfo {
fn from(value: types::location::LocationInfo) -> Self {
let types::location::LocationInfo { name, is_private } = value;
Self { name, is_private }
}
}
pub type GetDefaultLocationResponse = LocationInfo;
pub type SetDefaultLocationRequest = LocationName;