gitbundle_sdk/models/
pullreq_create_input.rs

1/*
2 * GitBundle API
3 *
4 * GitBundle API documentation.
5 *
6 * The version of the OpenAPI document: 3.3.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PullreqCreateInput {
17    #[serde(rename = "description")]
18    pub description: String,
19    #[serde(rename = "is_draft")]
20    pub is_draft: bool,
21    #[serde(rename = "source_branch")]
22    pub source_branch: String,
23    #[serde(rename = "source_repo_ref")]
24    pub source_repo_ref: String,
25    #[serde(rename = "target_branch")]
26    pub target_branch: String,
27    #[serde(rename = "title")]
28    pub title: String,
29}
30
31impl PullreqCreateInput {
32    pub fn new(
33        description: String,
34        is_draft: bool,
35        source_branch: String,
36        source_repo_ref: String,
37        target_branch: String,
38        title: String,
39    ) -> PullreqCreateInput {
40        PullreqCreateInput {
41            description,
42            is_draft,
43            source_branch,
44            source_repo_ref,
45            target_branch,
46            title,
47        }
48    }
49}