Skip to main content

windmill_api/models/
get_shared_ai_artifact_200_response.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.813.0
7 * Contact: contact@windmill.dev
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 GetSharedAiArtifact200Response {
16    #[serde(rename = "id")]
17    pub id: uuid::Uuid,
18    #[serde(rename = "name")]
19    pub name: String,
20    #[serde(rename = "kind")]
21    pub kind: Kind,
22    #[serde(rename = "version")]
23    pub version: i32,
24    #[serde(rename = "created_by")]
25    pub created_by: String,
26    #[serde(rename = "shared_at")]
27    pub shared_at: String,
28    #[serde(rename = "expires_at")]
29    pub expires_at: String,
30    #[serde(rename = "content")]
31    pub content: String,
32    /// whether the caller authored the share or is a workspace admin
33    #[serde(rename = "can_unshare")]
34    pub can_unshare: bool,
35}
36
37impl GetSharedAiArtifact200Response {
38    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 {
39        GetSharedAiArtifact200Response {
40            id,
41            name,
42            kind,
43            version,
44            created_by,
45            shared_at,
46            expires_at,
47            content,
48            can_unshare,
49        }
50    }
51}
52/// 
53#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
54pub enum Kind {
55    #[serde(rename = "md")]
56    Md,
57    #[serde(rename = "html")]
58    Html,
59}
60
61impl Default for Kind {
62    fn default() -> Kind {
63        Self::Md
64    }
65}
66