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.

71 lines
1.4KB

  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. /// CommitDateOptions : CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
  11. #[allow(unused_imports)]
  12. use serde_json::Value;
  13. #[derive(Debug, Serialize, Deserialize)]
  14. pub struct CommitDateOptions {
  15. #[serde(rename = "author")]
  16. author: Option<String>,
  17. #[serde(rename = "committer")]
  18. committer: Option<String>
  19. }
  20. impl CommitDateOptions {
  21. /// CommitDateOptions store dates for GIT_AUTHOR_DATE and GIT_COMMITTER_DATE
  22. pub fn new() -> CommitDateOptions {
  23. CommitDateOptions {
  24. author: None,
  25. committer: None
  26. }
  27. }
  28. pub fn set_author(&mut self, author: String) {
  29. self.author = Some(author);
  30. }
  31. pub fn with_author(mut self, author: String) -> CommitDateOptions {
  32. self.author = Some(author);
  33. self
  34. }
  35. pub fn author(&self) -> Option<&String> {
  36. self.author.as_ref()
  37. }
  38. pub fn reset_author(&mut self) {
  39. self.author = None;
  40. }
  41. pub fn set_committer(&mut self, committer: String) {
  42. self.committer = Some(committer);
  43. }
  44. pub fn with_committer(mut self, committer: String) -> CommitDateOptions {
  45. self.committer = Some(committer);
  46. self
  47. }
  48. pub fn committer(&self) -> Option<&String> {
  49. self.committer.as_ref()
  50. }
  51. pub fn reset_committer(&mut self) {
  52. self.committer = None;
  53. }
  54. }