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 ProjectsDeployment {
    /// Bucket is the object-store bucket its files were written to.
    #[serde(rename = "bucket", skip_serializing_if = "Option::is_none")]
    pub bucket: Option<String>,
    /// Bytes is their total size in bytes.
    #[serde(rename = "bytes", skip_serializing_if = "Option::is_none")]
    pub bytes: Option<i32>,
    /// Commit is the revision that was built, for a deployment that came from a repository. Absent for an uploaded artifact, which has no revision.
    #[serde(rename = "commit", skip_serializing_if = "Option::is_none")]
    pub commit: Option<String>,
    /// CreatedAt is when the deployment was queued, as Unix seconds.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<i32>,
    /// Files is how many objects the deployment published.
    #[serde(rename = "files", skip_serializing_if = "Option::is_none")]
    pub files: Option<i32>,
    /// ID identifies this one deployment attempt, and is what CI quotes back to complete it.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// LiveURL is where this deployment serves, once it is live.
    #[serde(rename = "liveUrl", skip_serializing_if = "Option::is_none")]
    pub live_url: Option<String>,
    /// Message is what happened, in words — the build's own note, or on a failure why it failed.
    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
    pub message: Option<String>,
    /// Prefix is the key prefix within that bucket holding EXACTLY this deployment's objects — the unit an upload grant is scoped to, so a grant for one deployment cannot write over another.
    #[serde(rename = "prefix", skip_serializing_if = "Option::is_none")]
    pub prefix: Option<String>,
    /// ProjectID is the project this deployment belongs to.
    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    /// Source is what caused the deployment — a git push, an uploaded artifact, a generated site.
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    /// Status is where the attempt got to — queued, live, or failed. A deployment that is live is not necessarily the one SERVING: the project's own currentDeploymentId says which is.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    /// UpdatedAt is when it last changed state, as Unix seconds — so the gap between the two is how long the build took.
    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
    pub updated_at: Option<i32>,
    /// Upload is the prefix-scoped, short-lived S3 write grant handed to CI with a queued git deployment, so it needs no bucket credential (grant.go). Present ONLY on the 202 that creates the deployment — it is never stored and never replayed on a later read, so a grant cannot outlive the build it was minted for by being fetched again.
    #[serde(rename = "upload", skip_serializing_if = "Option::is_none")]
    pub upload: Option<Box<models::ProjectsUploadGrant>>,
    /// Version counts deployments of this project from 1, so the history reads as an ordered sequence rather than by timestamp. It is per project, not global.
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<i32>,
}

impl ProjectsDeployment {
    pub fn new() -> ProjectsDeployment {
        ProjectsDeployment {
            bucket: None,
            bytes: None,
            commit: None,
            created_at: None,
            files: None,
            id: None,
            live_url: None,
            message: None,
            prefix: None,
            project_id: None,
            source: None,
            status: None,
            updated_at: None,
            upload: None,
            version: None,
        }
    }
}