bitbucket_cli/models/
user.rs

1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct User {
5    pub uuid: String,
6    pub username: Option<String>,
7    pub display_name: String,
8    pub account_id: Option<String>,
9    #[serde(rename = "type")]
10    pub user_type: String,
11    pub links: Option<UserLinks>,
12}
13
14#[derive(Debug, Clone, Serialize, Deserialize)]
15pub struct UserLinks {
16    pub self_link: Option<Link>,
17    pub html: Option<Link>,
18    pub avatar: Option<Link>,
19}
20
21#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct Link {
23    pub href: String,
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize)]
27pub struct Workspace {
28    pub uuid: String,
29    pub slug: String,
30    pub name: String,
31    #[serde(rename = "type")]
32    pub workspace_type: String,
33    pub links: Option<WorkspaceLinks>,
34}
35
36#[derive(Debug, Clone, Serialize, Deserialize)]
37pub struct WorkspaceLinks {
38    pub html: Option<Link>,
39    pub avatar: Option<Link>,
40}
41
42#[derive(Debug, Clone, Serialize, Deserialize)]
43pub struct Paginated<T> {
44    pub size: Option<u32>,
45    pub page: Option<u32>,
46    pub pagelen: Option<u32>,
47    pub next: Option<String>,
48    pub previous: Option<String>,
49    pub values: Vec<T>,
50}