jira_api_v2/models/
custom_field_context_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/// CustomFieldContextOption : Details of the custom field options for a context.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CustomFieldContextOption {
17    /// The ID of the custom field option.
18    #[serde(rename = "id")]
19    pub id: String,
20    /// The value of the custom field option.
21    #[serde(rename = "value")]
22    pub value: String,
23    /// For cascading options, the ID of the custom field option containing the cascading option.
24    #[serde(rename = "optionId", skip_serializing_if = "Option::is_none")]
25    pub option_id: Option<String>,
26    /// Whether the option is disabled.
27    #[serde(rename = "disabled")]
28    pub disabled: bool,
29}
30
31impl CustomFieldContextOption {
32    /// Details of the custom field options for a context.
33    pub fn new(id: String, value: String, disabled: bool) -> CustomFieldContextOption {
34        CustomFieldContextOption {
35            id,
36            value,
37            option_id: None,
38            disabled,
39        }
40    }
41}
42