jira_api_v2/models/votes.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/// Votes : The details of votes on an issue.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Votes {
17 /// The URL of these issue vote details.
18 #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
19 pub param_self: Option<String>,
20 /// The number of votes on the issue.
21 #[serde(rename = "votes", skip_serializing_if = "Option::is_none")]
22 pub votes: Option<i64>,
23 /// Whether the user making this request has voted on the issue.
24 #[serde(rename = "hasVoted", skip_serializing_if = "Option::is_none")]
25 pub has_voted: Option<bool>,
26 /// List of the users who have voted on this issue. An empty list is returned when the calling user doesn't have the *View voters and watchers* project permission.
27 #[serde(rename = "voters", skip_serializing_if = "Option::is_none")]
28 pub voters: Option<Vec<models::User>>,
29}
30
31impl Votes {
32 /// The details of votes on an issue.
33 pub fn new() -> Votes {
34 Votes {
35 param_self: None,
36 votes: None,
37 has_voted: None,
38 voters: None,
39 }
40 }
41}
42