Skip to main content

hanzo_client/models/
push_req.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 PushReq {
16    /// Branch to advance; empty means \"main\". A fresh branch that is the repo's first also becomes HEAD.
17    #[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
18    pub branch: Option<String>,
19    /// Files are added to or overwritten on the branch tip — files already there and not listed SURVIVE. At least one, at most 5000, 32 MiB each.
20    #[serde(rename = "files", skip_serializing_if = "Option::is_none")]
21    pub files: Option<Vec<models::PushFile>>,
22    /// Message is the commit message; empty gets a generated one.
23    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
24    pub message: Option<String>,
25    /// Name is the repo to push into, from the :name path segment. It is CREATED on first push if it does not exist.
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28}
29
30impl PushReq {
31    pub fn new() -> PushReq {
32        PushReq {
33            branch: None,
34            files: None,
35            message: None,
36            name: None,
37        }
38    }
39}
40