Rust API for Gitea, automatically generated https://git.exmods.org/swagger.v1.json
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

211 lines
4.7KB

  1. /*
  2. * Gitea API.
  3. *
  4. * This documentation describes the Gitea API.
  5. *
  6. * OpenAPI spec version: 1.1.1
  7. *
  8. * Generated by: https://github.com/swagger-api/swagger-codegen.git
  9. */
  10. /// Organization : Organization represents an organization
  11. #[allow(unused_imports)]
  12. use serde_json::Value;
  13. #[derive(Debug, Serialize, Deserialize)]
  14. pub struct Organization {
  15. #[serde(rename = "avatar_url")]
  16. avatar_url: Option<String>,
  17. #[serde(rename = "description")]
  18. description: Option<String>,
  19. #[serde(rename = "full_name")]
  20. full_name: Option<String>,
  21. #[serde(rename = "id")]
  22. id: Option<i64>,
  23. #[serde(rename = "location")]
  24. location: Option<String>,
  25. #[serde(rename = "repo_admin_change_team_access")]
  26. repo_admin_change_team_access: Option<bool>,
  27. #[serde(rename = "username")]
  28. username: Option<String>,
  29. #[serde(rename = "visibility")]
  30. visibility: Option<String>,
  31. #[serde(rename = "website")]
  32. website: Option<String>
  33. }
  34. impl Organization {
  35. /// Organization represents an organization
  36. pub fn new() -> Organization {
  37. Organization {
  38. avatar_url: None,
  39. description: None,
  40. full_name: None,
  41. id: None,
  42. location: None,
  43. repo_admin_change_team_access: None,
  44. username: None,
  45. visibility: None,
  46. website: None
  47. }
  48. }
  49. pub fn set_avatar_url(&mut self, avatar_url: String) {
  50. self.avatar_url = Some(avatar_url);
  51. }
  52. pub fn with_avatar_url(mut self, avatar_url: String) -> Organization {
  53. self.avatar_url = Some(avatar_url);
  54. self
  55. }
  56. pub fn avatar_url(&self) -> Option<&String> {
  57. self.avatar_url.as_ref()
  58. }
  59. pub fn reset_avatar_url(&mut self) {
  60. self.avatar_url = None;
  61. }
  62. pub fn set_description(&mut self, description: String) {
  63. self.description = Some(description);
  64. }
  65. pub fn with_description(mut self, description: String) -> Organization {
  66. self.description = Some(description);
  67. self
  68. }
  69. pub fn description(&self) -> Option<&String> {
  70. self.description.as_ref()
  71. }
  72. pub fn reset_description(&mut self) {
  73. self.description = None;
  74. }
  75. pub fn set_full_name(&mut self, full_name: String) {
  76. self.full_name = Some(full_name);
  77. }
  78. pub fn with_full_name(mut self, full_name: String) -> Organization {
  79. self.full_name = Some(full_name);
  80. self
  81. }
  82. pub fn full_name(&self) -> Option<&String> {
  83. self.full_name.as_ref()
  84. }
  85. pub fn reset_full_name(&mut self) {
  86. self.full_name = None;
  87. }
  88. pub fn set_id(&mut self, id: i64) {
  89. self.id = Some(id);
  90. }
  91. pub fn with_id(mut self, id: i64) -> Organization {
  92. self.id = Some(id);
  93. self
  94. }
  95. pub fn id(&self) -> Option<&i64> {
  96. self.id.as_ref()
  97. }
  98. pub fn reset_id(&mut self) {
  99. self.id = None;
  100. }
  101. pub fn set_location(&mut self, location: String) {
  102. self.location = Some(location);
  103. }
  104. pub fn with_location(mut self, location: String) -> Organization {
  105. self.location = Some(location);
  106. self
  107. }
  108. pub fn location(&self) -> Option<&String> {
  109. self.location.as_ref()
  110. }
  111. pub fn reset_location(&mut self) {
  112. self.location = None;
  113. }
  114. pub fn set_repo_admin_change_team_access(&mut self, repo_admin_change_team_access: bool) {
  115. self.repo_admin_change_team_access = Some(repo_admin_change_team_access);
  116. }
  117. pub fn with_repo_admin_change_team_access(mut self, repo_admin_change_team_access: bool) -> Organization {
  118. self.repo_admin_change_team_access = Some(repo_admin_change_team_access);
  119. self
  120. }
  121. pub fn repo_admin_change_team_access(&self) -> Option<&bool> {
  122. self.repo_admin_change_team_access.as_ref()
  123. }
  124. pub fn reset_repo_admin_change_team_access(&mut self) {
  125. self.repo_admin_change_team_access = None;
  126. }
  127. pub fn set_username(&mut self, username: String) {
  128. self.username = Some(username);
  129. }
  130. pub fn with_username(mut self, username: String) -> Organization {
  131. self.username = Some(username);
  132. self
  133. }
  134. pub fn username(&self) -> Option<&String> {
  135. self.username.as_ref()
  136. }
  137. pub fn reset_username(&mut self) {
  138. self.username = None;
  139. }
  140. pub fn set_visibility(&mut self, visibility: String) {
  141. self.visibility = Some(visibility);
  142. }
  143. pub fn with_visibility(mut self, visibility: String) -> Organization {
  144. self.visibility = Some(visibility);
  145. self
  146. }
  147. pub fn visibility(&self) -> Option<&String> {
  148. self.visibility.as_ref()
  149. }
  150. pub fn reset_visibility(&mut self) {
  151. self.visibility = None;
  152. }
  153. pub fn set_website(&mut self, website: String) {
  154. self.website = Some(website);
  155. }
  156. pub fn with_website(mut self, website: String) -> Organization {
  157. self.website = Some(website);
  158. self
  159. }
  160. pub fn website(&self) -> Option<&String> {
  161. self.website.as_ref()
  162. }
  163. pub fn reset_website(&mut self) {
  164. self.website = None;
  165. }
  166. }