Skip to main content

hanzo_client/models/
pull_view.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
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 PullView {
16    /// Author is the user who opened it; empty for a caller with no user.
17    #[serde(rename = "author", skip_serializing_if = "Option::is_none")]
18    pub author: Option<String>,
19    /// Base is the branch the work is proposed into.
20    #[serde(rename = "base", skip_serializing_if = "Option::is_none")]
21    pub base: Option<String>,
22    /// Body is the longer description; empty when none was given.
23    #[serde(rename = "body", skip_serializing_if = "Option::is_none")]
24    pub body: Option<String>,
25    /// CreatedAt is RFC 3339 UTC.
26    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
27    pub created_at: Option<String>,
28    /// Head is the branch holding the work.
29    #[serde(rename = "head", skip_serializing_if = "Option::is_none")]
30    pub head: Option<String>,
31    /// MergedRev is what base points at now that the merge landed. Empty while the proposal is open.
32    #[serde(rename = "mergedRev", skip_serializing_if = "Option::is_none")]
33    pub merged_rev: Option<String>,
34    /// Number is the proposal's per-repo handle, dense from 1.
35    #[serde(rename = "number", skip_serializing_if = "Option::is_none")]
36    pub number: Option<i32>,
37    /// Repo is the repository the proposal belongs to.
38    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
39    pub repo: Option<String>,
40    /// State is \"open\" or \"merged\".
41    #[serde(rename = "state", skip_serializing_if = "Option::is_none")]
42    pub state: Option<String>,
43    /// Title is the one-line summary.
44    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
45    pub title: Option<String>,
46    /// UpdatedAt is RFC 3339 UTC.
47    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
48    pub updated_at: Option<String>,
49}
50
51impl PullView {
52    pub fn new() -> PullView {
53        PullView {
54            author: None,
55            base: None,
56            body: None,
57            created_at: None,
58            head: None,
59            merged_rev: None,
60            number: None,
61            repo: None,
62            state: None,
63            title: None,
64            updated_at: None,
65        }
66    }
67}
68