openapi_github/models/
pulls_update_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 PullsUpdateRequest {
16    /// The title of the pull request.
17    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
18    pub title: Option<String>,
19    /// The contents of the pull request.
20    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
21    pub body: Option<String>,
22    /// State of this Pull Request. Either `open` or `closed`.
23    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
24    pub state: Option<State>,
25    /// The name of the branch you want your changes pulled into. This should be an existing branch on the current repository. You cannot update the base branch on a pull request to point to another repository.
26    #[serde(rename = "base", skip_serializing_if = "Option::is_none")]
27    pub base: Option<String>,
28    /// Indicates whether [maintainers can modify](https://docs.github.com/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.
29    #[serde(rename = "maintainer_can_modify", skip_serializing_if = "Option::is_none")]
30    pub maintainer_can_modify: Option<bool>,
31}
32
33impl PullsUpdateRequest {
34    pub fn new() -> PullsUpdateRequest {
35        PullsUpdateRequest {
36            title: None,
37            body: None,
38            state: None,
39            base: None,
40            maintainer_can_modify: None,
41        }
42    }
43}
44/// State of this Pull Request. Either `open` or `closed`.
45#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
46pub enum State {
47    #[serde(rename = "open")]
48    Open,
49    #[serde(rename = "closed")]
50    Closed,
51}
52
53impl Default for State {
54    fn default() -> State {
55        Self::Open
56    }
57}
58