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.

52 lines
965B

  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. /// IssueLabelsOption : IssueLabelsOption a collection of labels
  11. #[allow(unused_imports)]
  12. use serde_json::Value;
  13. #[derive(Debug, Serialize, Deserialize)]
  14. pub struct IssueLabelsOption {
  15. /// list of label IDs
  16. #[serde(rename = "labels")]
  17. labels: Option<Vec<i64>>
  18. }
  19. impl IssueLabelsOption {
  20. /// IssueLabelsOption a collection of labels
  21. pub fn new() -> IssueLabelsOption {
  22. IssueLabelsOption {
  23. labels: None
  24. }
  25. }
  26. pub fn set_labels(&mut self, labels: Vec<i64>) {
  27. self.labels = Some(labels);
  28. }
  29. pub fn with_labels(mut self, labels: Vec<i64>) -> IssueLabelsOption {
  30. self.labels = Some(labels);
  31. self
  32. }
  33. pub fn labels(&self) -> Option<&Vec<i64>> {
  34. self.labels.as_ref()
  35. }
  36. pub fn reset_labels(&mut self) {
  37. self.labels = None;
  38. }
  39. }