Skip to main content

hanzo_client/models/
projects_release.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 ProjectsRelease {
16    /// Active is whether this is the release the site is SERVING right now. Exactly one release of a site is active; the others are kept so they can be activated again, until retention reclaims them.
17    #[serde(rename = "active", skip_serializing_if = "Option::is_none")]
18    pub active: Option<bool>,
19    /// Bytes is their total size in bytes.
20    #[serde(rename = "bytes", skip_serializing_if = "Option::is_none")]
21    pub bytes: Option<i32>,
22    /// CreatedAt is when the release was cut, as Unix seconds — not when it was last activated.
23    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
24    pub created_at: Option<i32>,
25    /// Objects is how many files the release holds.
26    #[serde(rename = "objects", skip_serializing_if = "Option::is_none")]
27    pub objects: Option<i32>,
28    /// ReleaseID is derived from a DIGEST of the release's own manifest, so identical content is the same release and a release can never be confused with another one. Activating an older id IS the rollback.
29    #[serde(rename = "releaseId", skip_serializing_if = "Option::is_none")]
30    pub release_id: Option<String>,
31    /// Slug is the site this release belongs to.
32    #[serde(rename = "slug", skip_serializing_if = "Option::is_none")]
33    pub slug: Option<String>,
34    /// Source is what the release was cut from — the build output or upload it was promoted out of.
35    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
36    pub source: Option<String>,
37    /// URL is where the site serves. Present only on the ACTIVE release, since an inactive one is not answering anywhere.
38    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
39    pub url: Option<String>,
40}
41
42impl ProjectsRelease {
43    pub fn new() -> ProjectsRelease {
44        ProjectsRelease {
45            active: None,
46            bytes: None,
47            created_at: None,
48            objects: None,
49            release_id: None,
50            slug: None,
51            source: None,
52            url: None,
53        }
54    }
55}
56