/* * Gitea API * * This documentation describes the Gitea API. * * The version of the OpenAPI document: 1.22.1 * * Generated by: https://openapi-generator.tech */ use crate::models; use serde::{Deserialize, Serialize}; /// CreateTeamOption : CreateTeamOption options for creating a team #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] pub struct CreateTeamOption { #[serde(rename = "can_create_org_repo", skip_serializing_if = "Option::is_none")] pub can_create_org_repo: Option, #[serde(rename = "description", skip_serializing_if = "Option::is_none")] pub description: Option, #[serde(rename = "includes_all_repositories", skip_serializing_if = "Option::is_none")] pub includes_all_repositories: Option, #[serde(rename = "name")] pub name: String, #[serde(rename = "permission", skip_serializing_if = "Option::is_none")] pub permission: Option, #[serde(rename = "units", skip_serializing_if = "Option::is_none")] pub units: Option>, #[serde(rename = "units_map", skip_serializing_if = "Option::is_none")] pub units_map: Option>, } impl CreateTeamOption { /// CreateTeamOption options for creating a team pub fn new(name: String) -> CreateTeamOption { CreateTeamOption { can_create_org_repo: None, description: None, includes_all_repositories: None, name, permission: None, units: None, units_map: None, } } } /// #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] pub enum Permission { #[serde(rename = "read")] Read, #[serde(rename = "write")] Write, #[serde(rename = "admin")] Admin, } impl Default for Permission { fn default() -> Permission { Self::Read } }