hanzo_client/models/org_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 OrgView {
16 /// BadgeMarkdown is the ready-to-paste README snippet, DERIVED for each response from this deployment's badge host and never stored — here it deep-links the OWNER's template import rather than one repository's.
17 #[serde(rename = "badgeMarkdown", skip_serializing_if = "Option::is_none")]
18 pub badge_markdown: Option<String>,
19 /// CreatedAt is unix seconds when the owner claim was first recorded — equal to verifiedAt on the first proof, then fixed while verifiedAt moves.
20 #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
21 pub created_at: Option<i32>,
22 /// Method is HOW the owner was proven, always against its \".github\" control repository: \"oauth\" — an IAM-linked forge token showed admin or push on it; or \"file\" — a hanzo.json on its default branch carried this author's verify code. The \"maintainer\" shortcut is a per-repository attribution and never appears here. Omitted on a row written before the method was recorded.
23 #[serde(rename = "method", skip_serializing_if = "Option::is_none")]
24 pub method: Option<String>,
25 /// OwnerURL is the claim key in canonical form — lowercased \"host/owner\" with NO repository segment, host ∈ {github.com, gitlab.com}. It covers every repository under that owner, so code with no claim of its own still earns; a per-repository claim outranks it. UNIQUE across every author: first proven claim wins.
26 #[serde(rename = "ownerUrl", skip_serializing_if = "Option::is_none")]
27 pub owner_url: Option<String>,
28 /// Verified reports that ownership of the WHOLE owner was proven — against that owner's \".github\" control repository, which is exactly as strong as a per-repository claim. Only a proven claim is written, so every row returned here is true.
29 #[serde(rename = "verified", skip_serializing_if = "Option::is_none")]
30 pub verified: Option<bool>,
31 /// VerifiedAt is unix seconds of the most recent successful proof of the owner; re-verifying refreshes it, and the method beside it, in place.
32 #[serde(rename = "verifiedAt", skip_serializing_if = "Option::is_none")]
33 pub verified_at: Option<i32>,
34}
35
36impl OrgView {
37 pub fn new() -> OrgView {
38 OrgView {
39 badge_markdown: None,
40 created_at: None,
41 method: None,
42 owner_url: None,
43 verified: None,
44 verified_at: None,
45 }
46 }
47}
48