jira_api_v2/models/
create_custom_field_context.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/// CreateCustomFieldContext : The details of a created custom field context.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CreateCustomFieldContext {
17    /// The ID of the context.
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<String>,
20    /// The name of the context.
21    #[serde(rename = "name")]
22    pub name: String,
23    /// The description of the context.
24    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
25    pub description: Option<String>,
26    /// The list of project IDs associated with the context. If the list is empty, the context is global.
27    #[serde(rename = "projectIds", skip_serializing_if = "Option::is_none")]
28    pub project_ids: Option<Vec<String>>,
29    /// The list of issue types IDs for the context. If the list is empty, the context refers to all issue types.
30    #[serde(rename = "issueTypeIds", skip_serializing_if = "Option::is_none")]
31    pub issue_type_ids: Option<Vec<String>>,
32}
33
34impl CreateCustomFieldContext {
35    /// The details of a created custom field context.
36    pub fn new(name: String) -> CreateCustomFieldContext {
37        CreateCustomFieldContext {
38            id: None,
39            name,
40            description: None,
41            project_ids: None,
42            issue_type_ids: None,
43        }
44    }
45}
46