hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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 ProjectsProject {
    /// 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.
    #[serde(rename = "analytics", skip_serializing_if = "Option::is_none")]
    pub analytics: Option<bool>,
    /// Bucket is the object-store bucket the site's files are served out of.
    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
    pub bucket: Option<String>,
    /// 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.
    #[serde(rename = "cacheControl", skip_serializing_if = "Option::is_none")]
    pub cache_control: Option<String>,
    /// CreatedAt is when the project was created, as Unix seconds.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<i32>,
    /// CurrentDeploymentID names the deployment currently serving, so a caller can ask what is live without scanning the history.
    #[serde(rename = "currentDeploymentId", skip_serializing_if = "Option::is_none")]
    pub current_deployment_id: Option<String>,
    /// Description is the one-line summary, which is copied onto forks of this project and shown on a gallery card.
    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
    pub description: Option<String>,
    /// 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.
    #[serde(rename = "forkedFrom", skip_serializing_if = "Option::is_none")]
    pub forked_from: Option<String>,
    /// 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.
    #[serde(rename = "framework", skip_serializing_if = "Option::is_none")]
    pub framework: Option<String>,
    /// 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.
    #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
    pub hidden: Option<bool>,
    /// HiddenReason is why moderation hid it. Absent when it is not hidden.
    #[serde(rename = "hiddenReason", skip_serializing_if = "Option::is_none")]
    pub hidden_reason: Option<String>,
    /// 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.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// 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.
    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
    pub key: Option<String>,
    /// 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.
    #[serde(rename = "lastPurgeAt", skip_serializing_if = "Option::is_none")]
    pub last_purge_at: Option<i32>,
    /// License is the terms that upstream work carries. Absent has the same reading: undeclared, not unencumbered.
    #[serde(rename = "license", skip_serializing_if = "Option::is_none")]
    pub license: Option<String>,
    /// LiveURL is where the site answers today. Absent until something has been deployed.
    #[serde(rename = "liveUrl", skip_serializing_if = "Option::is_none")]
    pub live_url: Option<String>,
    /// Name is the project's display name, free text a person chose.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// 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.
    #[serde(rename = "org", skip_serializing_if = "Option::is_none")]
    pub org: Option<String>,
    /// Repo is the git source this project builds from, empty when it is deployed by uploading an artifact instead.
    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
    pub repo: Option<Box<models::ProjectsRepo>>,
    /// 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.
    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
    pub slug: Option<String>,
    /// 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.
    #[serde(rename = "space", skip_serializing_if = "Option::is_none")]
    pub space: Option<String>,
    /// 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.
    #[serde(rename = "starred", skip_serializing_if = "Option::is_none")]
    pub starred: Option<bool>,
    /// Status is where the project stands — whether a build has ever succeeded and whether anything is serving right now.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// 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).
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<std::collections::HashMap<String, String>>,
    /// 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.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<i32>,
    /// 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.
    #[serde(rename = "upstream", skip_serializing_if = "Option::is_none")]
    pub upstream: Option<String>,
    /// 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.
    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
    pub visibility: Option<String>,
}

impl ProjectsProject {
    pub fn new() -> ProjectsProject {
        ProjectsProject {
            analytics: None,
            bucket: None,
            cache_control: None,
            created_at: None,
            current_deployment_id: None,
            description: None,
            forked_from: None,
            framework: None,
            hidden: None,
            hidden_reason: None,
            id: None,
            key: None,
            last_purge_at: None,
            license: None,
            live_url: None,
            name: None,
            org: None,
            repo: None,
            slug: None,
            space: None,
            starred: None,
            status: None,
            tags: None,
            updated_at: None,
            upstream: None,
            visibility: None,
        }
    }
}