jira_api_v2/models/
function_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
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// FunctionReferenceData : Details of functions that can be used in advanced searches.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct FunctionReferenceData {
17    /// The function identifier.
18    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
19    pub value: Option<String>,
20    /// The display name of the function.
21    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
22    pub display_name: Option<String>,
23    /// Whether the function can take a list of arguments.
24    #[serde(rename = "isList", skip_serializing_if = "Option::is_none")]
25    pub is_list: Option<IsList>,
26    /// The data types returned by the function.
27    #[serde(rename = "types", skip_serializing_if = "Option::is_none")]
28    pub types: Option<Vec<String>>,
29}
30
31impl FunctionReferenceData {
32    /// Details of functions that can be used in advanced searches.
33    pub fn new() -> FunctionReferenceData {
34        FunctionReferenceData {
35            value: None,
36            display_name: None,
37            is_list: None,
38            types: None,
39        }
40    }
41}
42/// Whether the function can take a list of arguments.
43#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
44pub enum IsList {
45    #[serde(rename = "true")]
46    True,
47    #[serde(rename = "false")]
48    False,
49}
50
51impl Default for IsList {
52    fn default() -> IsList {
53        Self::True
54    }
55}
56