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.

91 lines
1.8KB

  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. /// CreateMilestoneOption : CreateMilestoneOption options for creating a milestone
  11. #[allow(unused_imports)]
  12. use serde_json::Value;
  13. #[derive(Debug, Serialize, Deserialize)]
  14. pub struct CreateMilestoneOption {
  15. #[serde(rename = "description")]
  16. description: Option<String>,
  17. #[serde(rename = "due_on")]
  18. due_on: Option<String>,
  19. #[serde(rename = "title")]
  20. title: Option<String>
  21. }
  22. impl CreateMilestoneOption {
  23. /// CreateMilestoneOption options for creating a milestone
  24. pub fn new() -> CreateMilestoneOption {
  25. CreateMilestoneOption {
  26. description: None,
  27. due_on: None,
  28. title: None
  29. }
  30. }
  31. pub fn set_description(&mut self, description: String) {
  32. self.description = Some(description);
  33. }
  34. pub fn with_description(mut self, description: String) -> CreateMilestoneOption {
  35. self.description = Some(description);
  36. self
  37. }
  38. pub fn description(&self) -> Option<&String> {
  39. self.description.as_ref()
  40. }
  41. pub fn reset_description(&mut self) {
  42. self.description = None;
  43. }
  44. pub fn set_due_on(&mut self, due_on: String) {
  45. self.due_on = Some(due_on);
  46. }
  47. pub fn with_due_on(mut self, due_on: String) -> CreateMilestoneOption {
  48. self.due_on = Some(due_on);
  49. self
  50. }
  51. pub fn due_on(&self) -> Option<&String> {
  52. self.due_on.as_ref()
  53. }
  54. pub fn reset_due_on(&mut self) {
  55. self.due_on = None;
  56. }
  57. pub fn set_title(&mut self, title: String) {
  58. self.title = Some(title);
  59. }
  60. pub fn with_title(mut self, title: String) -> CreateMilestoneOption {
  61. self.title = Some(title);
  62. self
  63. }
  64. pub fn title(&self) -> Option<&String> {
  65. self.title.as_ref()
  66. }
  67. pub fn reset_title(&mut self) {
  68. self.title = None;
  69. }
  70. }