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 PromptDetail {
    /// CreatedAt is when version 1 was written, RFC 3339 UTC. Appending a version does not move it.
    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
    pub created_at: Option<String>,
    /// Labels is the current version's free-form taxonomy. `[]` when none, never null.
    #[serde(rename = "labels", skip_serializing_if = "Option::is_none")]
    pub labels: Option<Vec<String>>,
    /// UpdatedAt is when the current version was appended, RFC 3339 UTC. Equal to createdAt for a prompt that has only ever had one version.
    #[serde(rename = "lastUpdatedAt", skip_serializing_if = "Option::is_none")]
    pub last_updated_at: Option<String>,
    /// Name is the prompt's org-unique handle and the URL segment it is addressed by.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Prompt is the CURRENT version's template body — the only content this service returns. Earlier versions are listed in versionHistory by number and date, and their bodies are not served in bulk.
    #[serde(rename = "prompt", skip_serializing_if = "Option::is_none")]
    pub prompt: Option<String>,
    /// Tags is the second free-form taxonomy, same rules as Labels.
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// Type labels the current version's kind; \"text\" unless the creator said otherwise.
    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
    pub r#type: Option<String>,
    /// Version is the current version number, starting at 1 and incremented by one on every create against an existing name.
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<i32>,
    /// Versions is the history METADATA, newest first, capped at the last 100 — no bodies, so a long history cannot inflate this response. It always includes the current version as its first entry.
    #[serde(rename = "versionHistory", skip_serializing_if = "Option::is_none")]
    pub version_history: Option<Vec<models::VersionView>>,
}

impl PromptDetail {
    pub fn new() -> PromptDetail {
        PromptDetail {
            created_at: None,
            labels: None,
            last_updated_at: None,
            name: None,
            prompt: None,
            tags: None,
            r#type: None,
            version: None,
            version_history: None,
        }
    }
}