openapi_github/models/
issues_create_request.rs

1/*
2 * GitHub's official OpenAPI spec + Octokit extension
3 *
4 * OpenAPI specs from https://github.com/github/rest-api-description with the 'x-octokit' extension required by the Octokit SDKs
5 *
6 * The version of the OpenAPI document: 16.6.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct IssuesCreateRequest {
16    #[serde(rename = "title")]
17    pub title: Box<models::IssuesCreateRequestTitle>,
18    /// The contents of the issue.
19    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
20    pub body: Option<String>,
21    /// Login for the user that this issue should be assigned to. _NOTE: Only users with push access can set the assignee for new issues. The assignee is silently dropped otherwise. **This field is deprecated.**_
22    #[serde(rename = "assignee", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
23    pub assignee: Option<Option<String>>,
24    #[serde(rename = "milestone", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub milestone: Option<Option<Box<models::IssuesCreateRequestMilestone>>>,
26    /// Labels to associate with this issue. _NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise._
27    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
28    pub labels: Option<Vec<models::IssuesCreateRequestLabelsInner>>,
29    /// Logins for Users to assign to this issue. _NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise._
30    #[serde(rename = "assignees", skip_serializing_if = "Option::is_none")]
31    pub assignees: Option<Vec<String>>,
32}
33
34impl IssuesCreateRequest {
35    pub fn new(title: models::IssuesCreateRequestTitle) -> IssuesCreateRequest {
36        IssuesCreateRequest {
37            title: Box::new(title),
38            body: None,
39            assignee: None,
40            milestone: None,
41            labels: None,
42            assignees: None,
43        }
44    }
45}
46