jira_api_v2/models/issue_field_option.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/// IssueFieldOption : Details of the options for a select list issue field.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct IssueFieldOption {
17 /// The unique identifier for the option. This is only unique within the select field's set of options.
18 #[serde(rename = "id")]
19 pub id: i64,
20 /// The option's name, which is displayed in Jira.
21 #[serde(rename = "value")]
22 pub value: String,
23 /// The properties of the object, as arbitrary key-value pairs. These properties can be searched using JQL, if the extractions (see [Issue Field Option Property Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)) are defined in the descriptor for the issue field module.
24 #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
25 pub properties: Option<std::collections::HashMap<String, serde_json::Value>>,
26 #[serde(rename = "config", skip_serializing_if = "Option::is_none")]
27 pub config: Option<Box<models::IssueFieldOptionConfiguration>>,
28}
29
30impl IssueFieldOption {
31 /// Details of the options for a select list issue field.
32 pub fn new(id: i64, value: String) -> IssueFieldOption {
33 IssueFieldOption {
34 id,
35 value,
36 properties: None,
37 config: None,
38 }
39 }
40}
41