jirav2/models/filter_details.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/// FilterDetails : Details of a filter.
12
13
14
15#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
16pub struct FilterDetails {
17 /// Expand options that include additional filter details in the response.
18 #[serde(rename = "expand", skip_serializing_if = "Option::is_none")]
19 pub expand: Option<String>,
20 /// The URL of the filter.
21 #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
22 pub _self: Option<String>,
23 /// The unique identifier for the filter.
24 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
25 pub id: Option<String>,
26 /// The name of the filter.
27 #[serde(rename = "name")]
28 pub name: String,
29 /// The description of the filter.
30 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
31 pub description: Option<String>,
32 /// The user who owns the filter. Defaults to the creator of the filter, however, Jira administrators can change the owner of a shared filter in the admin settings.
33 #[serde(rename = "owner", skip_serializing_if = "Option::is_none")]
34 pub owner: Option<crate::models::User>,
35 /// The JQL query for the filter. For example, *project = SSP AND issuetype = Bug*.
36 #[serde(rename = "jql", skip_serializing_if = "Option::is_none")]
37 pub jql: Option<String>,
38 /// A URL to view the filter results in Jira, using the ID of the filter. For example, *https://your-domain.atlassian.net/issues/?filter=10100*.
39 #[serde(rename = "viewUrl", skip_serializing_if = "Option::is_none")]
40 pub view_url: Option<String>,
41 /// A URL to view the filter results in Jira, using the [Search for issues using JQL](#api-rest-api-2-filter-search-get) operation with the filter's JQL string to return the filter results. For example, *https://your-domain.atlassian.net/rest/api/2/search?jql=project+%3D+SSP+AND+issuetype+%3D+Bug*.
42 #[serde(rename = "searchUrl", skip_serializing_if = "Option::is_none")]
43 pub search_url: Option<String>,
44 /// Whether the filter is selected as a favorite by any users, not including the filter owner.
45 #[serde(rename = "favourite", skip_serializing_if = "Option::is_none")]
46 pub favourite: Option<bool>,
47 /// The count of how many users have selected this filter as a favorite, including the filter owner.
48 #[serde(rename = "favouritedCount", skip_serializing_if = "Option::is_none")]
49 pub favourited_count: Option<i64>,
50 /// The groups and projects that the filter is shared with. This can be specified when updating a filter, but not when creating a filter.
51 #[serde(rename = "sharePermissions", skip_serializing_if = "Option::is_none")]
52 pub share_permissions: Option<Vec<crate::models::SharePermission>>,
53 /// The groups and projects that can edit the filter. This can be specified when updating a filter, but not when creating a filter.
54 #[serde(rename = "editPermissions", skip_serializing_if = "Option::is_none")]
55 pub edit_permissions: Option<Vec<crate::models::SharePermission>>,
56 /// The users that are subscribed to the filter.
57 #[serde(rename = "subscriptions", skip_serializing_if = "Option::is_none")]
58 pub subscriptions: Option<Vec<crate::models::FilterSubscription>>,
59}
60
61impl FilterDetails {
62 /// Details of a filter.
63 pub fn new(name: String) -> FilterDetails {
64 FilterDetails {
65 expand: None,
66 _self: None,
67 id: None,
68 name,
69 description: None,
70 owner: None,
71 jql: None,
72 view_url: None,
73 search_url: None,
74 favourite: None,
75 favourited_count: None,
76 share_permissions: None,
77 edit_permissions: None,
78 subscriptions: None,
79 }
80 }
81}
82
83