gitea-rs/crates/gitea-client/src/models/edit_org_option.rs

65 lines
2.0 KiB
Rust
Raw Normal View History

/*
* 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};
/// EditOrgOption : EditOrgOption options for editing an organization
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EditOrgOption {
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
#[serde(rename = "email", skip_serializing_if = "Option::is_none")]
pub email: Option<String>,
#[serde(rename = "full_name", skip_serializing_if = "Option::is_none")]
pub full_name: Option<String>,
#[serde(rename = "location", skip_serializing_if = "Option::is_none")]
pub location: Option<String>,
#[serde(rename = "repo_admin_change_team_access", skip_serializing_if = "Option::is_none")]
pub repo_admin_change_team_access: Option<bool>,
/// possible values are `public`, `limited` or `private`
#[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
pub visibility: Option<Visibility>,
#[serde(rename = "website", skip_serializing_if = "Option::is_none")]
pub website: Option<String>,
}
impl EditOrgOption {
/// EditOrgOption options for editing an organization
pub fn new() -> EditOrgOption {
EditOrgOption {
description: None,
email: None,
full_name: None,
location: None,
repo_admin_change_team_access: None,
visibility: None,
website: None,
}
}
}
/// possible values are `public`, `limited` or `private`
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Visibility {
#[serde(rename = "public")]
Public,
#[serde(rename = "limited")]
Limited,
#[serde(rename = "private")]
Private,
}
impl Default for Visibility {
fn default() -> Visibility {
Self::Public
}
}