hi_jira2/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
11/// FieldReferenceData : Details of a field that can be used in advanced searches.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, 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 contains the following:   *  for system fields, the field name. For example, `Summary`.  *  for collapsed custom fields, the field name followed by a hyphen and then the field name and field type. For example, `Component - Component[Dropdown]`.  *  for other custom fields, the field name followed by a hyphen and then the custom field ID. For example, `Component - cf[10061]`.
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
59/// Whether the field can be used in a query's `ORDER BY` clause.
60#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
61pub enum Orderable {
62    #[serde(rename = "true")]
63    _True,
64    #[serde(rename = "false")]
65    _False,
66}
67
68impl Default for Orderable {
69    fn default() -> Orderable {
70        Self::_True
71    }
72}
73/// Whether the content of this field can be searched.
74#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
75pub enum Searchable {
76    #[serde(rename = "true")]
77    _True,
78    #[serde(rename = "false")]
79    _False,
80}
81
82impl Default for Searchable {
83    fn default() -> Searchable {
84        Self::_True
85    }
86}
87/// Whether the field provide auto-complete suggestions.
88#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
89pub enum Auto {
90    #[serde(rename = "true")]
91    _True,
92    #[serde(rename = "false")]
93    _False,
94}
95
96impl Default for Auto {
97    fn default() -> Auto {
98        Self::_True
99    }
100}
101