jira_api_v2/models/
jql_query_clause.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/// JqlQueryClause : A JQL query clause.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct JqlQueryClause {
17    /// The list of nested clauses.
18    #[serde(rename = "clauses")]
19    pub clauses: Vec<models::JqlQueryClause>,
20    /// The operator applied to the field.
21    #[serde(rename = "operator")]
22    pub operator: Operator,
23    #[serde(rename = "field")]
24    pub field: Box<models::JqlQueryField>,
25    #[serde(rename = "operand")]
26    pub operand: Box<models::JqlQueryClauseOperand>,
27    /// The list of time predicates.
28    #[serde(rename = "predicates")]
29    pub predicates: Vec<models::JqlQueryClauseTimePredicate>,
30}
31
32impl JqlQueryClause {
33    /// A JQL query clause.
34    pub fn new(clauses: Vec<models::JqlQueryClause>, operator: Operator, field: models::JqlQueryField, operand: models::JqlQueryClauseOperand, predicates: Vec<models::JqlQueryClauseTimePredicate>) -> JqlQueryClause {
35        JqlQueryClause {
36            clauses,
37            operator,
38            field: Box::new(field),
39            operand: Box::new(operand),
40            predicates,
41        }
42    }
43}
44/// The operator applied to the field.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum Operator {
47    #[serde(rename = "changed")]
48    Changed,
49}
50
51impl Default for Operator {
52    fn default() -> Operator {
53        Self::Changed
54    }
55}
56