jira_api_v2/models/version.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/// Version : Details about a project version.
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct Version {
17 /// Use [expand](em>#expansion) to include additional information about version in the response. This parameter accepts a comma-separated list. Expand options include: * `operations` Returns the list of operations available for this version. * `issuesstatus` Returns the count of issues in this version for each of the status categories *to do*, *in progress*, *done*, and *unmapped*. The *unmapped* property contains a count of issues with a status other than *to do*, *in progress*, and *done*. Optional for create and update.
18 #[serde(rename = "expand", skip_serializing_if = "Option::is_none")]
19 pub expand: Option<String>,
20 /// The URL of the version.
21 #[serde(rename = "self", skip_serializing_if = "Option::is_none")]
22 pub param_self: Option<String>,
23 /// The ID of the version.
24 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
25 pub id: Option<String>,
26 /// The description of the version. Optional when creating or updating a version.
27 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
28 pub description: Option<String>,
29 /// The unique name of the version. Required when creating a version. Optional when updating a version. The maximum length is 255 characters.
30 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
31 pub name: Option<String>,
32 /// Indicates that the version is archived. Optional when creating or updating a version.
33 #[serde(rename = "archived", skip_serializing_if = "Option::is_none")]
34 pub archived: Option<bool>,
35 /// Indicates that the version is released. If the version is released a request to release again is ignored. Not applicable when creating a version. Optional when updating a version.
36 #[serde(rename = "released", skip_serializing_if = "Option::is_none")]
37 pub released: Option<bool>,
38 /// The start date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version.
39 #[serde(rename = "startDate", skip_serializing_if = "Option::is_none")]
40 pub start_date: Option<String>,
41 /// The release date of the version. Expressed in ISO 8601 format (yyyy-mm-dd). Optional when creating or updating a version.
42 #[serde(rename = "releaseDate", skip_serializing_if = "Option::is_none")]
43 pub release_date: Option<String>,
44 /// Indicates that the version is overdue.
45 #[serde(rename = "overdue", skip_serializing_if = "Option::is_none")]
46 pub overdue: Option<bool>,
47 /// The date on which work on this version is expected to start, expressed in the instance's *Day/Month/Year Format* date format.
48 #[serde(rename = "userStartDate", skip_serializing_if = "Option::is_none")]
49 pub user_start_date: Option<String>,
50 /// The date on which work on this version is expected to finish, expressed in the instance's *Day/Month/Year Format* date format.
51 #[serde(rename = "userReleaseDate", skip_serializing_if = "Option::is_none")]
52 pub user_release_date: Option<String>,
53 /// Deprecated. Use `projectId`.
54 #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
55 pub project: Option<String>,
56 /// The ID of the project to which this version is attached. Required when creating a version. Not applicable when updating a version.
57 #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
58 pub project_id: Option<i64>,
59 /// The URL of the self link to the version to which all unfixed issues are moved when a version is released. Not applicable when creating a version. Optional when updating a version.
60 #[serde(rename = "moveUnfixedIssuesTo", skip_serializing_if = "Option::is_none")]
61 pub move_unfixed_issues_to: Option<String>,
62 /// If the expand option `operations` is used, returns the list of operations available for this version.
63 #[serde(rename = "operations", skip_serializing_if = "Option::is_none")]
64 pub operations: Option<Vec<models::SimpleLink>>,
65 /// If the expand option `issuesstatus` is used, returns the count of issues in this version for each of the status categories *to do*, *in progress*, *done*, and *unmapped*. The *unmapped* property contains a count of issues with a status other than *to do*, *in progress*, and *done*.
66 #[serde(rename = "issuesStatusForFixVersion", skip_serializing_if = "Option::is_none")]
67 pub issues_status_for_fix_version: Option<models::VersionIssuesStatus>,
68}
69
70impl Version {
71 /// Details about a project version.
72 pub fn new() -> Version {
73 Version {
74 expand: None,
75 param_self: None,
76 id: None,
77 description: None,
78 name: None,
79 archived: None,
80 released: None,
81 start_date: None,
82 release_date: None,
83 overdue: None,
84 user_start_date: None,
85 user_release_date: None,
86 project: None,
87 project_id: None,
88 move_unfixed_issues_to: None,
89 operations: None,
90 issues_status_for_fix_version: None,
91 }
92 }
93}
94