jira_api_v2/models/
version_move_bean.rs

1/*
2 * The Jira Cloud platform REST API
3 *
4 * Jira Cloud platform REST API documentation
5 *
6 * The version of the OpenAPI document: 1001.0.0-SNAPSHOT
7 * Contact: ecosystem@atlassian.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct VersionMoveBean {
16    /// The URL (self link) of the version after which to place the moved version. Cannot be used with `position`.
17    #[serde(rename = "after", skip_serializing_if = "Option::is_none")]
18    pub after: Option<String>,
19    /// An absolute position in which to place the moved version. Cannot be used with `after`.
20    #[serde(rename = "position", skip_serializing_if = "Option::is_none")]
21    pub position: Option<Position>,
22}
23
24impl VersionMoveBean {
25    pub fn new() -> VersionMoveBean {
26        VersionMoveBean {
27            after: None,
28            position: None,
29        }
30    }
31}
32/// An absolute position in which to place the moved version. Cannot be used with `after`.
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum Position {
35    #[serde(rename = "Earlier")]
36    Earlier,
37    #[serde(rename = "Later")]
38    Later,
39    #[serde(rename = "First")]
40    First,
41    #[serde(rename = "Last")]
42    Last,
43}
44
45impl Default for Position {
46    fn default() -> Position {
47        Self::Earlier
48    }
49}
50