jirav2/models/
user_filter.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/// UserFilter : Filter for a User Picker (single) custom field.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct UserFilter {
17    /// Whether the filter is enabled.
18    #[serde(rename = "enabled")]
19    pub enabled: bool,
20    /// User groups autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum of 10 groups can be provided.
21    #[serde(rename = "groups", skip_serializing_if = "Option::is_none")]
22    pub groups: Option<Vec<String>>,
23    /// Roles that autocomplete suggestion users must belong to. If not provided, the default values are used. A maximum of 10 roles can be provided.
24    #[serde(rename = "roleIds", skip_serializing_if = "Option::is_none")]
25    pub role_ids: Option<Vec<i64>>,
26}
27
28impl UserFilter {
29    /// Filter for a User Picker (single) custom field.
30    pub fn new(enabled: bool) -> UserFilter {
31        UserFilter {
32            enabled,
33            groups: None,
34            role_ids: None,
35        }
36    }
37}
38
39