jira_api_v2/models/
custom_field_definition_json_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 CustomFieldDefinitionJsonBean {
16    /// The name of the custom field, which is displayed in Jira. This is not the unique identifier.
17    #[serde(rename = "name")]
18    pub name: String,
19    /// The description of the custom field, which is displayed in Jira.
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// The type of the custom field. For example, *com.atlassian.jira.plugin.system.customfieldtypes:grouppicker*.   *  `cascadingselect`: Allows multiple values to be selected using two select lists  *  `datepicker`: Stores a date using a picker control  *  `datetime`: Stores a date with a time component  *  `float`: Stores and validates a numeric (floating point) input  *  `grouppicker`: Stores a user group using a picker control  *  `importid`: A read-only field that stores the previous ID of the issue from the system that it was imported from  *  `labels`: Stores labels  *  `multicheckboxes`: Stores multiple values using checkboxes  *  `multigrouppicker`: Stores multiple user groups using a picker control  *  `multiselect`: Stores multiple values using a select list  *  `multiuserpicker`: Stores multiple users using a picker control  *  `multiversion`: Stores multiple versions from the versions available in a project using a picker control  *  `project`: Stores a project from a list of projects that the user is permitted to view  *  `radiobuttons`: Stores a value using radio buttons  *  `readonlyfield`: Stores a read-only text value, which can only be populated via the API  *  `select`: Stores a value from a configurable list of options  *  `textarea`: Stores a long text string using a multiline text area  *  `textfield`: Stores a text string using a single-line text box  *  `url`: Stores a URL  *  `userpicker`: Stores a user using a picker control  *  `version`: Stores a version using a picker control
23    #[serde(rename = "type")]
24    pub r#type: Type,
25    /// The searcher defines the way the field is searched in Jira. For example, *com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher*.   The search UI (basic search and JQL search) will display different operations and values for the field, based on the field searcher. You must specify a searcher that is valid for the field type, as listed below (abbreviated values shown):   *  `cascadingselect`: `cascadingselectsearcher`  *  `datepicker`: `daterange`  *  `datetime`: `datetimerange`  *  `float`: `exactnumber` or `numberrange`  *  `grouppicker`: `grouppickersearcher`  *  `importid`: `exactnumber` or `numberrange`  *  `labels`: `labelsearcher`  *  `multicheckboxes`: `multiselectsearcher`  *  `multigrouppicker`: `multiselectsearcher`  *  `multiselect`: `multiselectsearcher`  *  `multiuserpicker`: `userpickergroupsearcher`  *  `multiversion`: `versionsearcher`  *  `project`: `projectsearcher`  *  `radiobuttons`: `multiselectsearcher`  *  `readonlyfield`: `textsearcher`  *  `select`: `multiselectsearcher`  *  `textarea`: `textsearcher`  *  `textfield`: `textsearcher`  *  `url`: `exacttextsearcher`  *  `userpicker`: `userpickergroupsearcher`  *  `version`: `versionsearcher`
26    #[serde(rename = "searcherKey", skip_serializing_if = "Option::is_none")]
27    pub searcher_key: Option<SearcherKey>,
28}
29
30impl CustomFieldDefinitionJsonBean {
31    pub fn new(name: String, r#type: Type) -> CustomFieldDefinitionJsonBean {
32        CustomFieldDefinitionJsonBean {
33            name,
34            description: None,
35            r#type,
36            searcher_key: None,
37        }
38    }
39}
40/// The type of the custom field. For example, *com.atlassian.jira.plugin.system.customfieldtypes:grouppicker*.   *  `cascadingselect`: Allows multiple values to be selected using two select lists  *  `datepicker`: Stores a date using a picker control  *  `datetime`: Stores a date with a time component  *  `float`: Stores and validates a numeric (floating point) input  *  `grouppicker`: Stores a user group using a picker control  *  `importid`: A read-only field that stores the previous ID of the issue from the system that it was imported from  *  `labels`: Stores labels  *  `multicheckboxes`: Stores multiple values using checkboxes  *  `multigrouppicker`: Stores multiple user groups using a picker control  *  `multiselect`: Stores multiple values using a select list  *  `multiuserpicker`: Stores multiple users using a picker control  *  `multiversion`: Stores multiple versions from the versions available in a project using a picker control  *  `project`: Stores a project from a list of projects that the user is permitted to view  *  `radiobuttons`: Stores a value using radio buttons  *  `readonlyfield`: Stores a read-only text value, which can only be populated via the API  *  `select`: Stores a value from a configurable list of options  *  `textarea`: Stores a long text string using a multiline text area  *  `textfield`: Stores a text string using a single-line text box  *  `url`: Stores a URL  *  `userpicker`: Stores a user using a picker control  *  `version`: Stores a version using a picker control
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Type {
43    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect")]
44    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselect,
45    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:datepicker")]
46    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDatepicker,
47    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:datetime")]
48    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDatetime,
49    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:float")]
50    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonFloat,
51    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:grouppicker")]
52    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonGrouppicker,
53    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:importid")]
54    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonImportid,
55    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:labels")]
56    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonLabels,
57    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes")]
58    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMulticheckboxes,
59    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multigrouppicker")]
60    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultigrouppicker,
61    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiselect")]
62    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiselect,
63    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker")]
64    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiuserpicker,
65    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiversion")]
66    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiversion,
67    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:project")]
68    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonProject,
69    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons")]
70    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonRadiobuttons,
71    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:readonlyfield")]
72    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonReadonlyfield,
73    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:select")]
74    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonSelect,
75    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:textarea")]
76    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonTextarea,
77    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:textfield")]
78    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonTextfield,
79    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:url")]
80    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonUrl,
81    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:userpicker")]
82    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonUserpicker,
83    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:version")]
84    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonVersion,
85}
86
87impl Default for Type {
88    fn default() -> Type {
89        Self::ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselect
90    }
91}
92/// The searcher defines the way the field is searched in Jira. For example, *com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher*.   The search UI (basic search and JQL search) will display different operations and values for the field, based on the field searcher. You must specify a searcher that is valid for the field type, as listed below (abbreviated values shown):   *  `cascadingselect`: `cascadingselectsearcher`  *  `datepicker`: `daterange`  *  `datetime`: `datetimerange`  *  `float`: `exactnumber` or `numberrange`  *  `grouppicker`: `grouppickersearcher`  *  `importid`: `exactnumber` or `numberrange`  *  `labels`: `labelsearcher`  *  `multicheckboxes`: `multiselectsearcher`  *  `multigrouppicker`: `multiselectsearcher`  *  `multiselect`: `multiselectsearcher`  *  `multiuserpicker`: `userpickergroupsearcher`  *  `multiversion`: `versionsearcher`  *  `project`: `projectsearcher`  *  `radiobuttons`: `multiselectsearcher`  *  `readonlyfield`: `textsearcher`  *  `select`: `multiselectsearcher`  *  `textarea`: `textsearcher`  *  `textfield`: `textsearcher`  *  `url`: `exacttextsearcher`  *  `userpicker`: `userpickergroupsearcher`  *  `version`: `versionsearcher`
93#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
94pub enum SearcherKey {
95    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:cascadingselectsearcher")]
96    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselectsearcher,
97    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:daterange")]
98    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDaterange,
99    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:datetimerange")]
100    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDatetimerange,
101    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:exactnumber")]
102    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonExactnumber,
103    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:exacttextsearcher")]
104    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonExacttextsearcher,
105    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher")]
106    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonGrouppickersearcher,
107    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:labelsearcher")]
108    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonLabelsearcher,
109    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiselectsearcher")]
110    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiselectsearcher,
111    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:numberrange")]
112    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonNumberrange,
113    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:projectsearcher")]
114    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonProjectsearcher,
115    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:textsearcher")]
116    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonTextsearcher,
117    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:userpickergroupsearcher")]
118    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonUserpickergroupsearcher,
119    #[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:versionsearcher")]
120    ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonVersionsearcher,
121}
122
123impl Default for SearcherKey {
124    fn default() -> SearcherKey {
125        Self::ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselectsearcher
126    }
127}
128