Rewrite rust (#38)
Co-authored-by: kjuulh <contact@kjuulh.io> Reviewed-on: https://git.front.kjuulh.io/kjuulh/octopush/pulls/38
This commit was merged in pull request #38.
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Gitea API.
|
||||
*
|
||||
* This documentation describes the Gitea API.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.17.3
|
||||
*
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/// CreateMilestoneOption : CreateMilestoneOption options for creating a milestone
|
||||
|
||||
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
|
||||
pub struct CreateMilestoneOption {
|
||||
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
|
||||
pub description: Option<String>,
|
||||
#[serde(rename = "due_on", skip_serializing_if = "Option::is_none")]
|
||||
pub due_on: Option<String>,
|
||||
#[serde(rename = "state", skip_serializing_if = "Option::is_none")]
|
||||
pub state: Option<State>,
|
||||
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
|
||||
pub title: Option<String>,
|
||||
}
|
||||
|
||||
impl CreateMilestoneOption {
|
||||
/// CreateMilestoneOption options for creating a milestone
|
||||
pub fn new() -> CreateMilestoneOption {
|
||||
CreateMilestoneOption {
|
||||
description: None,
|
||||
due_on: None,
|
||||
state: None,
|
||||
title: None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum State {
|
||||
#[serde(rename = "open")]
|
||||
Open,
|
||||
#[serde(rename = "closed")]
|
||||
Closed,
|
||||
}
|
||||
|
||||
impl Default for State {
|
||||
fn default() -> State {
|
||||
Self::Open
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user