jira_api_v2/models/
field_reference_data.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/// FieldReferenceData : Details of a field that can be used in advanced searches.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FieldReferenceData {
17    /// The field identifier.
18    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
19    pub value: Option<String>,
20    /// The display name of the field.
21    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
22    pub display_name: Option<String>,
23    /// Whether the field can be used in a query's `ORDER BY` clause.
24    #[serde(rename = "orderable", skip_serializing_if = "Option::is_none")]
25    pub orderable: Option<Orderable>,
26    /// Whether the content of this field can be searched.
27    #[serde(rename = "searchable", skip_serializing_if = "Option::is_none")]
28    pub searchable: Option<Searchable>,
29    /// Whether the field provide auto-complete suggestions.
30    #[serde(rename = "auto", skip_serializing_if = "Option::is_none")]
31    pub auto: Option<Auto>,
32    /// If the item is a custom field, the ID of the custom field.
33    #[serde(rename = "cfid", skip_serializing_if = "Option::is_none")]
34    pub cfid: Option<String>,
35    /// The valid search operators for the field.
36    #[serde(rename = "operators", skip_serializing_if = "Option::is_none")]
37    pub operators: Option<Vec<String>>,
38    /// The data types of items in the field.
39    #[serde(rename = "types", skip_serializing_if = "Option::is_none")]
40    pub types: Option<Vec<String>>,
41}
42
43impl FieldReferenceData {
44    /// Details of a field that can be used in advanced searches.
45    pub fn new() -> FieldReferenceData {
46        FieldReferenceData {
47            value: None,
48            display_name: None,
49            orderable: None,
50            searchable: None,
51            auto: None,
52            cfid: None,
53            operators: None,
54            types: None,
55        }
56    }
57}
58/// Whether the field can be used in a query's `ORDER BY` clause.
59#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
60pub enum Orderable {
61    #[serde(rename = "true")]
62    True,
63    #[serde(rename = "false")]
64    False,
65}
66
67impl Default for Orderable {
68    fn default() -> Orderable {
69        Self::True
70    }
71}
72/// Whether the content of this field can be searched.
73#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
74pub enum Searchable {
75    #[serde(rename = "true")]
76    True,
77    #[serde(rename = "false")]
78    False,
79}
80
81impl Default for Searchable {
82    fn default() -> Searchable {
83        Self::True
84    }
85}
86/// Whether the field provide auto-complete suggestions.
87#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
88pub enum Auto {
89    #[serde(rename = "true")]
90    True,
91    #[serde(rename = "false")]
92    False,
93}
94
95impl Default for Auto {
96    fn default() -> Auto {
97        Self::True
98    }
99}
100