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
/*
* 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 AuthorRepo {
/// BadgeMarkdown is the ready-to-paste README snippet, DERIVED for each response from this deployment's badge host and never stored: a \"Deploy on Hanzo\" image linking to the one-click import of this repository. Re-hosting the builder changes every badge without touching a row.
#[serde(rename = "badgeMarkdown", skip_serializing_if = "Option::is_none")]
pub badge_markdown: Option<String>,
/// CreatedAt is unix seconds when the claim was first recorded. It equals verifiedAt on the first proof and then stays put while verifiedAt moves, so the pair reads as \"claimed since / last proven\".
#[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
pub created_at: Option<i32>,
/// Method is HOW ownership was proven: \"oauth\" — an IAM-linked forge token showed admin or push on the repository; \"file\" — a hanzo.json on the default branch carried this author's verify code; or \"maintainer\" — the repository sits in a first-party namespace, where ownership is intrinsic and the treasury author holds it with no proof step. Omitted on a row written before the method was recorded.
#[serde(rename = "method", skip_serializing_if = "Option::is_none")]
pub method: Option<String>,
/// RepoURL is the claim key in canonical form — lowercased \"host/owner/name\", no scheme, no .git, host ∈ {github.com, gitlab.com}. A deploy's source repo is normalized through the same function before attribution, so the two sides can never miss on a cosmetic difference. UNIQUE across every author: first proven claim wins.
#[serde(rename = "repoUrl", skip_serializing_if = "Option::is_none")]
pub repo_url: Option<String>,
/// Verified reports that ownership was proven. Only a proven claim is ever written, so it is true on every row this surface returns; the deploy path re-reads it regardless, because an unverified claim attributes nothing.
#[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
pub verified: Option<bool>,
/// VerifiedAt is unix seconds of the most recent successful proof. Re-verifying refreshes it, and the method beside it, in place.
#[serde(rename = "verifiedAt", skip_serializing_if = "Option::is_none")]
pub verified_at: Option<i32>,
}
impl AuthorRepo {
pub fn new() -> AuthorRepo {
AuthorRepo {
badge_markdown: None,
created_at: None,
method: None,
repo_url: None,
verified: None,
verified_at: None,
}
}
}