jira_api_v2/models/
jql_query_clause_time_predicate.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/// JqlQueryClauseTimePredicate : A time predicate for a temporal JQL clause.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct JqlQueryClauseTimePredicate {
17    /// The operator between the field and the operand.
18    #[serde(rename = "operator")]
19    pub operator: Operator,
20    #[serde(rename = "operand")]
21    pub operand: Box<models::JqlQueryClauseOperand>,
22}
23
24impl JqlQueryClauseTimePredicate {
25    /// A time predicate for a temporal JQL clause.
26    pub fn new(operator: Operator, operand: models::JqlQueryClauseOperand) -> JqlQueryClauseTimePredicate {
27        JqlQueryClauseTimePredicate {
28            operator,
29            operand: Box::new(operand),
30        }
31    }
32}
33/// The operator between the field and the operand.
34#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
35pub enum Operator {
36    #[serde(rename = "before")]
37    Before,
38    #[serde(rename = "after")]
39    After,
40    #[serde(rename = "from")]
41    From,
42    #[serde(rename = "to")]
43    To,
44    #[serde(rename = "on")]
45    On,
46    #[serde(rename = "during")]
47    During,
48    #[serde(rename = "by")]
49    By,
50}
51
52impl Default for Operator {
53    fn default() -> Operator {
54        Self::Before
55    }
56}
57