Skip to main content

hanzo_client/models/
projects_update.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 ProjectsUpdate {
16    /// CacheControl replaces the Cache-Control policy the edge serves this site's HTML under. Absent leaves it.
17    #[serde(rename = "cacheControl", skip_serializing_if = "Option::is_none")]
18    pub cache_control: Option<String>,
19    /// Description replaces the one-line summary. Absent leaves it.
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// Framework replaces the build hint. It affects the NEXT build only — nothing already deployed is rebuilt.
23    #[serde(rename = "framework", skip_serializing_if = "Option::is_none")]
24    pub framework: Option<String>,
25    /// Hidden is MODERATION, and the only admin-gated field on this body: it pulls a public project out of the catalogue from admin.hanzo.ai without editing the publisher's own visibility choice, so un-hiding restores exactly what they asked for. A tenant sending it is ignored.
26    #[serde(rename = "hidden", skip_serializing_if = "Option::is_none")]
27    pub hidden: Option<bool>,
28    /// HiddenReason records WHY moderation hid it, so the action can be explained and reviewed later. Admin-gated like hidden itself.
29    #[serde(rename = "hiddenReason", skip_serializing_if = "Option::is_none")]
30    pub hidden_reason: Option<String>,
31    /// License is the terms that upstream work carries, with the same clear-versus- leave rule.
32    #[serde(rename = "license", skip_serializing_if = "Option::is_none")]
33    pub license: Option<String>,
34    /// Name replaces the display name. Absent leaves it; the slug never moves with it.
35    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
36    pub name: Option<String>,
37    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
38    pub repo: Option<Box<models::ProjectsUpdateRepo>>,
39    /// Slug is the project to update, from the path. The URL is the addressing authority — a `slug` in the body cannot move the write to another project.
40    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
41    pub slug: Option<String>,
42    /// Tags sets the site's browser tag config: platform slug → non-secret pixel id (e.g. {\"ga4\":\"G-…\",\"meta\":\"…\"}). track.js injects these first-party and the server CAPI reads them, per site. Absent LEAVES them; a present object REPLACES the set (send {} to clear). The ids are public — they ship in the page — so this is not the SECRET path (a CAPI token is sealed via POST /v1/destination).
43    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
44    pub tags: Option<std::collections::HashMap<String, String>>,
45    /// Upstream credits the third-party work this project was published from, and is settable after the fact because the live demos are the ones that most need crediting. An explicit empty string CLEARS the credit; absent leaves it.
46    #[serde(rename = "upstream", skip_serializing_if = "Option::is_none")]
47    pub upstream: Option<String>,
48    /// Visibility flips an existing project between \"public\" and \"private\". Same ONE rule as at create: public is free, private needs a paid plan.
49    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
50    pub visibility: Option<String>,
51}
52
53impl ProjectsUpdate {
54    pub fn new() -> ProjectsUpdate {
55        ProjectsUpdate {
56            cache_control: None,
57            description: None,
58            framework: None,
59            hidden: None,
60            hidden_reason: None,
61            license: None,
62            name: None,
63            repo: None,
64            slug: None,
65            tags: None,
66            upstream: None,
67            visibility: None,
68        }
69    }
70}
71