dinio_sdk/models/zone_member.rs
1use serde::{Deserialize, Serialize};
2use uuid::Uuid;
3
4/// A user's access to a zone. The creator of a zone is its only `Owner`; the Owner
5/// delegates `Administrator` access to others. Both manage the zone's records; only the
6/// Owner deletes the zone and manages its members.
7#[derive(Debug, Clone, Serialize, Deserialize)]
8pub struct ZoneMember {
9 /// The zone.
10 pub zone_id: Uuid,
11 /// The user.
12 pub user_id: Uuid,
13 /// The user's email; returned by [`ZoneMembers::list`](crate::api::ZoneMembers::list).
14 #[serde(default, skip_serializing_if = "Option::is_none")]
15 pub email: Option<String>,
16 /// `Owner` or `Administrator` (kept as a string for forward compatibility).
17 pub role: String,
18 /// Unix seconds.
19 pub created_at: i64,
20 /// Unix seconds.
21 pub updated_at: i64,
22}