1use s2_common::types::{self, location::LocationName};
2use serde::{Deserialize, Serialize};
3
4#[rustfmt::skip]
5#[derive(Debug, Clone, Serialize, Deserialize)]
6#[cfg_attr(feature = "utoipa", derive(utoipa::ToSchema))]
7pub struct LocationInfo {
8 pub name: LocationName,
10 pub is_private: bool,
12}
13
14impl From<types::location::LocationInfo> for LocationInfo {
15 fn from(value: types::location::LocationInfo) -> Self {
16 let types::location::LocationInfo { name, is_private } = value;
17
18 Self { name, is_private }
19 }
20}
21
22pub type GetDefaultLocationResponse = LocationInfo;
23
24pub type SetDefaultLocationRequest = LocationName;