1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/*
* Hanzo Cloud API
*
* 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/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RepoView {
/// Branches are the repo's branch names. Read live, so the detail view carries them and a list row does not.
#[serde(rename = "branches", skip_serializing_if = "Option::is_none")]
pub branches: Option<Vec<String>>,
/// CloneURL is the HTTPS smart-HTTP remote `git clone` takes.
#[serde(rename = "cloneUrl", skip_serializing_if = "Option::is_none")]
pub clone_url: Option<String>,
/// CreatedAt is RFC 3339 UTC.
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<String>,
/// DefaultBranch is where HEAD points on a fresh repo (\"main\").
#[serde(rename = "defaultBranch", skip_serializing_if = "Option::is_none")]
pub default_branch: Option<String>,
/// Description is the caller-supplied blurb (max 4KiB).
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Head is the resolved HEAD commit, empty on an empty repo.
#[serde(rename = "head", skip_serializing_if = "Option::is_none")]
pub head: Option<String>,
/// ID is the repo's stable, prefixed identifier (\"repo_\" + 128 random bits).
#[serde(rename = "id", skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
/// Name is the org-unique handle, and the last path segment of both URLs below.
#[serde(rename = "name", skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// Org owns the repo — the gateway-minted X-Org-Id, and the isolation key.
#[serde(rename = "org", skip_serializing_if = "Option::is_none")]
pub org: Option<String>,
/// Project is the optional sub-scope the repo lives in; absent for the org's default scope.
#[serde(rename = "project", skip_serializing_if = "Option::is_none")]
pub project: Option<String>,
/// Public grants ANONYMOUS read (fetch) only; push and the whole control plane stay org-authed.
#[serde(rename = "public", skip_serializing_if = "Option::is_none")]
pub public: Option<bool>,
/// SizeBytes is the repo's measured on-disk size, re-measured on create, after each push, and after a gc. This is the number billing meters.
#[serde(rename = "sizeBytes", skip_serializing_if = "Option::is_none")]
pub size_bytes: Option<i32>,
/// SSHURL is the scp-style SSH remote (git@host:org/repo.git).
#[serde(rename = "sshUrl", skip_serializing_if = "Option::is_none")]
pub ssh_url: Option<String>,
/// UpdatedAt is RFC 3339 UTC, empty until the first write.
#[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
pub updated_at: Option<String>,
}
impl RepoView {
pub fn new() -> RepoView {
RepoView {
branches: None,
clone_url: None,
created_at: None,
default_branch: None,
description: None,
head: None,
id: None,
name: None,
org: None,
project: None,
public: None,
size_bytes: None,
ssh_url: None,
updated_at: None,
}
}
}