Skip to main content

hanzo_client/models/
projects_create.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 ProjectsCreate {
16    /// Analytics is the opt-OUT for the wired-by-default analytics beacon: absent (nil) ⇒ ON (the default); explicit false ⇒ off. A pointer so \"unset\" is distinguishable from \"false\" — the only way to turn the default off.
17    #[serde(rename = "analytics", skip_serializing_if = "Option::is_none")]
18    pub analytics: Option<bool>,
19    /// Description is the one-line summary, copied onto anything forked from this project.
20    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
21    pub description: Option<String>,
22    /// 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.
23    #[serde(rename = "framework", skip_serializing_if = "Option::is_none")]
24    pub framework: Option<String>,
25    /// License is the terms that upstream work carries.
26    #[serde(rename = "license", skip_serializing_if = "Option::is_none")]
27    pub license: Option<String>,
28    /// Name is the project's display name and the only REQUIRED field. When slug is omitted it is also what the slug is derived from.
29    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
30    pub name: Option<String>,
31    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
32    pub repo: Option<Box<models::ProjectsCreateRepo>>,
33    /// Slug is the handle everything else addresses this project by: the public host `<slug>.hanzo.app`, the object-store key segment, and the path parameter of every later call. Derived from the name when omitted. It is a hostname label, so it is constrained and reserved labels such as `api` or `admin` are refused.
34    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
35    pub slug: Option<String>,
36    /// Upstream credits the third-party work this project was published from. It is accepted from any caller: giving away credit can only cost the publisher, so it needs no gate.
37    #[serde(rename = "upstream", skip_serializing_if = "Option::is_none")]
38    pub upstream: Option<String>,
39    /// Visibility is \"public\" (the default when absent) or \"private\". Publishing publicly is ungated — that is the point of a community. Going PRIVATE is the paid feature, so an unfunded org asking for it is refused rather than silently downgraded (see resolve).
40    #[serde(rename = "visibility", skip_serializing_if = "Option::is_none")]
41    pub visibility: Option<String>,
42}
43
44impl ProjectsCreate {
45    pub fn new() -> ProjectsCreate {
46        ProjectsCreate {
47            analytics: None,
48            description: None,
49            framework: None,
50            license: None,
51            name: None,
52            repo: None,
53            slug: None,
54            upstream: None,
55            visibility: None,
56        }
57    }
58}
59