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.

51 lines
974B

  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. /// EditGitHookOption : EditGitHookOption options when modifying one Git hook
  11. #[allow(unused_imports)]
  12. use serde_json::Value;
  13. #[derive(Debug, Serialize, Deserialize)]
  14. pub struct EditGitHookOption {
  15. #[serde(rename = "content")]
  16. content: Option<String>
  17. }
  18. impl EditGitHookOption {
  19. /// EditGitHookOption options when modifying one Git hook
  20. pub fn new() -> EditGitHookOption {
  21. EditGitHookOption {
  22. content: None
  23. }
  24. }
  25. pub fn set_content(&mut self, content: String) {
  26. self.content = Some(content);
  27. }
  28. pub fn with_content(mut self, content: String) -> EditGitHookOption {
  29. self.content = Some(content);
  30. self
  31. }
  32. pub fn content(&self) -> Option<&String> {
  33. self.content.as_ref()
  34. }
  35. pub fn reset_content(&mut self) {
  36. self.content = None;
  37. }
  38. }