/*
* The Jira Cloud platform REST API
*
* Jira Cloud platform REST API documentation
*
* The version of the OpenAPI document: 1001.0.0-SNAPSHOT
* Contact: ecosystem@atlassian.com
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CustomFieldDefinitionJsonBean {
/// The name of the custom field, which is displayed in Jira. This is not the unique identifier.
#[serde(rename = "name")]
pub name: String,
/// The description of the custom field, which is displayed in Jira.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// 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
#[serde(rename = "type")]
pub r#type: Type,
/// 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`
#[serde(rename = "searcherKey", skip_serializing_if = "Option::is_none")]
pub searcher_key: Option<SearcherKey>,
}
impl CustomFieldDefinitionJsonBean {
pub fn new(name: String, r#type: Type) -> CustomFieldDefinitionJsonBean {
CustomFieldDefinitionJsonBean {
name,
description: None,
r#type,
searcher_key: None,
}
}
}
/// 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
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:cascadingselect")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselect,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:datepicker")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDatepicker,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:datetime")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDatetime,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:float")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonFloat,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:grouppicker")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonGrouppicker,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:importid")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonImportid,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:labels")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonLabels,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMulticheckboxes,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multigrouppicker")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultigrouppicker,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiselect")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiselect,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiuserpicker,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiversion")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiversion,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:project")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonProject,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonRadiobuttons,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:readonlyfield")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonReadonlyfield,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:select")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonSelect,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:textarea")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonTextarea,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:textfield")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonTextfield,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:url")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonUrl,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:userpicker")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonUserpicker,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:version")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonVersion,
}
impl Default for Type {
fn default() -> Type {
Self::ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselect
}
}
/// 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`
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum SearcherKey {
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:cascadingselectsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselectsearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:daterange")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDaterange,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:datetimerange")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonDatetimerange,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:exactnumber")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonExactnumber,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:exacttextsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonExacttextsearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonGrouppickersearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:labelsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonLabelsearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:multiselectsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonMultiselectsearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:numberrange")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonNumberrange,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:projectsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonProjectsearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:textsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonTextsearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:userpickergroupsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonUserpickergroupsearcher,
#[serde(rename = "com.atlassian.jira.plugin.system.customfieldtypes:versionsearcher")]
ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonVersionsearcher,
}
impl Default for SearcherKey {
fn default() -> SearcherKey {
Self::ComPeriodAtlassianPeriodJiraPeriodPluginPeriodSystemPeriodCustomfieldtypesColonCascadingselectsearcher
}
}