Skip to main content

hanzo_client/models/
projects_project.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 ProjectsProject {
16    /// Analytics is whether the web-analytics beacon is injected into this site's pages. It is ON by default — a project has to opt out — and it is what the static builder reads to decide whether to inject at all.
17    #[serde(rename = "analytics", skip_serializing_if = "Option::is_none")]
18    pub analytics: Option<bool>,
19    /// Bucket is the object-store bucket the site's files are served out of.
20    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
21    pub bucket: Option<String>,
22    /// CacheControl is the Cache-Control policy the edge serves this site's HTML under — how long a reader may hold a stale page before asking again. Assets are content-addressed and are not governed by it.
23    #[serde(rename = "cacheControl", skip_serializing_if = "Option::is_none")]
24    pub cache_control: Option<String>,
25    /// CreatedAt is when the project was created, as Unix seconds.
26    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
27    pub created_at: Option<i32>,
28    /// CurrentDeploymentID names the deployment currently serving, so a caller can ask what is live without scanning the history.
29    #[serde(rename = "currentDeploymentId", skip_serializing_if = "Option::is_none")]
30    pub current_deployment_id: Option<String>,
31    /// Description is the one-line summary, which is copied onto forks of this project and shown on a gallery card.
32    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
33    pub description: Option<String>,
34    /// ForkedFrom is the parent this project was forked from (\"<org>/<slug>\" of a published project, or a catalog template slug) — the attribution edge a gallery credits.
35    #[serde(rename = "forkedFrom", skip_serializing_if = "Option::is_none")]
36    pub forked_from: Option<String>,
37    /// Framework is a BUILD HINT from a closed set, defaulting to static. It tells CI how to build a linked repo and never gates a deploy, so a wrong value costs a build rather than access.
38    #[serde(rename = "framework", skip_serializing_if = "Option::is_none")]
39    pub framework: Option<String>,
40    /// Hidden is PLATFORM MODERATION, and it is a different axis from visibility: it pulls a public project out of the catalogue without editing the publisher's own choice, so un-hiding restores exactly what they asked for. A project is listed only when it is public AND not hidden. Always present, never omitted, for the same reason as visibility.
41    #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
42    pub hidden: Option<bool>,
43    /// HiddenReason is why moderation hid it. Absent when it is not hidden.
44    #[serde(rename = "hiddenReason", skip_serializing_if = "Option::is_none")]
45    pub hidden_reason: Option<String>,
46    /// ID is the project's internal identifier. It is stable across a rename, but it is not what the API addresses this project by — `slug` is.
47    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
48    pub id: Option<String>,
49    /// Key is the project's publishable ingest key, minted at create. It is the value the injected beacon carries and the ONE thing that attributes this site's events; the static-builder reads it beside analytics.  Publishable means it belongs in a page's source: it names a write scope and mints no principal, so it is returned in full rather than masked. Masking it would only mean every caller needed a second endpoint to get the thing the page already ships.
50    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
51    pub key: Option<String>,
52    /// LastPurgeAt is when the edge cache was last cleared, as Unix seconds, so a console can say how fresh what readers see actually is. Absent means never.
53    #[serde(rename = "lastPurgeAt", skip_serializing_if = "Option::is_none")]
54    pub last_purge_at: Option<i32>,
55    /// License is the terms that upstream work carries. Absent has the same reading: undeclared, not unencumbered.
56    #[serde(rename = "license", skip_serializing_if = "Option::is_none")]
57    pub license: Option<String>,
58    /// LiveURL is where the site answers today. Absent until something has been deployed.
59    #[serde(rename = "liveUrl", skip_serializing_if = "Option::is_none")]
60    pub live_url: Option<String>,
61    /// Name is the project's display name, free text a person chose.
62    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
63    pub name: Option<String>,
64    /// Org is the organisation that owns the project, and therefore who pays for it and who may change it. It is also the AUTHORSHIP line a gallery credits; there is no separate author field.
65    #[serde(rename = "org", skip_serializing_if = "Option::is_none")]
66    pub org: Option<String>,
67    /// Repo is the git source this project builds from, empty when it is deployed by uploading an artifact instead.
68    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
69    pub repo: Option<Box<models::ProjectsRepo>>,
70    /// Slug is the identifier that MATTERS: the handle every later call addresses, the S3 key segment the site's objects live under, and the label of the public host `<slug>.hanzo.app`. Because it is a hostname it is constrained and reserved labels such as `api` are refused.
71    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
72    pub slug: Option<String>,
73    /// Space is the project's Base data space, which is where a deployed site's form, forum and data submissions land. Absent means the site stores nothing.
74    #[serde(rename = "space", skip_serializing_if = "Option::is_none")]
75    pub space: Option<String>,
76    /// Starred is THIS CALLER's star, not a property of the project — two people in the same org see different values for the same row, which is the whole point of it. Always present so a client can tell \"not starred\" from \"this API is too old to say\", the same reason visibility and hidden are.
77    #[serde(rename = "starred", skip_serializing_if = "Option::is_none")]
78    pub starred: Option<bool>,
79    /// Status is where the project stands — whether a build has ever succeeded and whether anything is serving right now.
80    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
81    pub status: Option<String>,
82    /// Tags is the site's browser tag config: platform slug → non-secret pixel id (GA measurement, Meta pixel, …) — what track.js injects and the server CAPI reads, per site. Omitted when none are set. The API SECRET is never here (KMS).
83    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
84    pub tags: Option<std::collections::HashMap<String, String>>,
85    /// UpdatedAt is when the project's own record last changed, as Unix seconds. A deploy is not an edit of the project, so this does not move on every publish.
86    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
87    pub updated_at: Option<i32>,
88    /// Upstream credits the third-party work this project was published from — a free-text line, because the honest answer is a name and a title that no enum could hold. Absent means NOBODY HAS SAID, not that there is nothing to say.
89    #[serde(rename = "upstream", skip_serializing_if = "Option::is_none")]
90    pub upstream: Option<String>,
91    /// Visibility is \"public\" or \"private\", and Hidden reports platform moderation. Both are always present (never omitempty) so a consumer can tell a real answer from \"this API is too old to say\" — and so a console never renders a project as public because a field was missing.  Authorship is deliberately absent: it is Org, above.
92    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
93    pub visibility: Option<String>,
94}
95
96impl ProjectsProject {
97    pub fn new() -> ProjectsProject {
98        ProjectsProject {
99            analytics: None,
100            bucket: None,
101            cache_control: None,
102            created_at: None,
103            current_deployment_id: None,
104            description: None,
105            forked_from: None,
106            framework: None,
107            hidden: None,
108            hidden_reason: None,
109            id: None,
110            key: None,
111            last_purge_at: None,
112            license: None,
113            live_url: None,
114            name: None,
115            org: None,
116            repo: None,
117            slug: None,
118            space: None,
119            starred: None,
120            status: None,
121            tags: None,
122            updated_at: None,
123            upstream: None,
124            visibility: None,
125        }
126    }
127}
128