hi_jira2/models/
component_with_issue_count.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
11/// ComponentWithIssueCount : Details about a component with a count of the issues it contains.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct ComponentWithIssueCount {
17    /// Count of issues for the component.
18    #[serde(rename = "issueCount", skip_serializing_if = "Option::is_none")]
19    pub issue_count: Option<i64>,
20    /// The user assigned to issues created with this component, when `assigneeType` does not identify a valid assignee.
21    #[serde(rename = "realAssignee", skip_serializing_if = "Option::is_none")]
22    pub real_assignee: Option<crate::models::User>,
23    /// Whether a user is associated with `assigneeType`. For example, if the `assigneeType` is set to `COMPONENT_LEAD` but the component lead is not set, then `false` is returned.
24    #[serde(rename = "isAssigneeTypeValid", skip_serializing_if = "Option::is_none")]
25    pub is_assignee_type_valid: Option<bool>,
26    /// The type of the assignee that is assigned to issues created with this component, when an assignee cannot be set from the `assigneeType`. For example, `assigneeType` is set to `COMPONENT_LEAD` but no component lead is set. This property is set to one of the following values:   *  `PROJECT_LEAD` when `assigneeType` is `PROJECT_LEAD` and the project lead has permission to be assigned issues in the project that the component is in.  *  `COMPONENT_LEAD` when `assignee`Type is `COMPONENT_LEAD` and the component lead has permission to be assigned issues in the project that the component is in.  *  `UNASSIGNED` when `assigneeType` is `UNASSIGNED` and Jira is configured to allow unassigned issues.  *  `PROJECT_DEFAULT` when none of the preceding cases are true.
27    #[serde(rename = "realAssigneeType", skip_serializing_if = "Option::is_none")]
28    pub real_assignee_type: Option<RealAssigneeType>,
29    /// The URL for this count of the issues contained in the component.
30    #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
31    pub _self: Option<String>,
32    /// The nominal user type used to determine the assignee for issues created with this component. See `realAssigneeType` for details on how the type of the user, and hence the user, assigned to issues is determined. Takes the following values:   *  `PROJECT_LEAD` the assignee to any issues created with this component is nominally the lead for the project the component is in.  *  `COMPONENT_LEAD` the assignee to any issues created with this component is nominally the lead for the component.  *  `UNASSIGNED` an assignee is not set for issues created with this component.  *  `PROJECT_DEFAULT` the assignee to any issues created with this component is nominally the default assignee for the project that the component is in.
33    #[serde(rename = "assigneeType", skip_serializing_if = "Option::is_none")]
34    pub assignee_type: Option<AssigneeType>,
35    /// The user details for the component's lead user.
36    #[serde(rename = "lead", skip_serializing_if = "Option::is_none")]
37    pub lead: Option<crate::models::User>,
38    /// The description for the component.
39    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
40    pub description: Option<String>,
41    /// Not used.
42    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
43    pub project_id: Option<i64>,
44    /// The details of the user associated with `assigneeType`, if any. See `realAssignee` for details of the user assigned to issues created with this component.
45    #[serde(rename = "assignee", skip_serializing_if = "Option::is_none")]
46    pub assignee: Option<crate::models::User>,
47    /// The key of the project to which the component is assigned.
48    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
49    pub project: Option<String>,
50    /// The name for the component.
51    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
52    pub name: Option<String>,
53    /// The unique identifier for the component.
54    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
55    pub id: Option<String>,
56}
57
58impl ComponentWithIssueCount {
59    /// Details about a component with a count of the issues it contains.
60    pub fn new() -> ComponentWithIssueCount {
61        ComponentWithIssueCount {
62            issue_count: None,
63            real_assignee: None,
64            is_assignee_type_valid: None,
65            real_assignee_type: None,
66            _self: None,
67            assignee_type: None,
68            lead: None,
69            description: None,
70            project_id: None,
71            assignee: None,
72            project: None,
73            name: None,
74            id: None,
75        }
76    }
77}
78
79/// The type of the assignee that is assigned to issues created with this component, when an assignee cannot be set from the `assigneeType`. For example, `assigneeType` is set to `COMPONENT_LEAD` but no component lead is set. This property is set to one of the following values:   *  `PROJECT_LEAD` when `assigneeType` is `PROJECT_LEAD` and the project lead has permission to be assigned issues in the project that the component is in.  *  `COMPONENT_LEAD` when `assignee`Type is `COMPONENT_LEAD` and the component lead has permission to be assigned issues in the project that the component is in.  *  `UNASSIGNED` when `assigneeType` is `UNASSIGNED` and Jira is configured to allow unassigned issues.  *  `PROJECT_DEFAULT` when none of the preceding cases are true.
80#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
81pub enum RealAssigneeType {
82    #[serde(rename = "PROJECT_DEFAULT")]
83    PROJECTDEFAULT,
84    #[serde(rename = "COMPONENT_LEAD")]
85    COMPONENTLEAD,
86    #[serde(rename = "PROJECT_LEAD")]
87    PROJECTLEAD,
88    #[serde(rename = "UNASSIGNED")]
89    UNASSIGNED,
90}
91
92impl Default for RealAssigneeType {
93    fn default() -> RealAssigneeType {
94        Self::PROJECTDEFAULT
95    }
96}
97/// The nominal user type used to determine the assignee for issues created with this component. See `realAssigneeType` for details on how the type of the user, and hence the user, assigned to issues is determined. Takes the following values:   *  `PROJECT_LEAD` the assignee to any issues created with this component is nominally the lead for the project the component is in.  *  `COMPONENT_LEAD` the assignee to any issues created with this component is nominally the lead for the component.  *  `UNASSIGNED` an assignee is not set for issues created with this component.  *  `PROJECT_DEFAULT` the assignee to any issues created with this component is nominally the default assignee for the project that the component is in.
98#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
99pub enum AssigneeType {
100    #[serde(rename = "PROJECT_DEFAULT")]
101    PROJECTDEFAULT,
102    #[serde(rename = "COMPONENT_LEAD")]
103    COMPONENTLEAD,
104    #[serde(rename = "PROJECT_LEAD")]
105    PROJECTLEAD,
106    #[serde(rename = "UNASSIGNED")]
107    UNASSIGNED,
108}
109
110impl Default for AssigneeType {
111    fn default() -> AssigneeType {
112        Self::PROJECTDEFAULT
113    }
114}
115