windmill-api 1.816.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.816.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetSharedAiArtifact200Response {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "kind")]
    pub kind: Kind,
    #[serde(rename = "version")]
    pub version: i32,
    #[serde(rename = "created_by")]
    pub created_by: String,
    #[serde(rename = "shared_at")]
    pub shared_at: String,
    #[serde(rename = "expires_at")]
    pub expires_at: String,
    #[serde(rename = "content")]
    pub content: String,
    /// whether the caller authored the share or is a workspace admin
    #[serde(rename = "can_unshare")]
    pub can_unshare: bool,
}

impl GetSharedAiArtifact200Response {
    pub fn new(id: uuid::Uuid, name: String, kind: Kind, version: i32, created_by: String, shared_at: String, expires_at: String, content: String, can_unshare: bool) -> GetSharedAiArtifact200Response {
        GetSharedAiArtifact200Response {
            id,
            name,
            kind,
            version,
            created_by,
            shared_at,
            expires_at,
            content,
            can_unshare,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Kind {
    #[serde(rename = "md")]
    Md,
    #[serde(rename = "html")]
    Html,
}

impl Default for Kind {
    fn default() -> Kind {
        Self::Md
    }
}