windmill_api/models/
flow_conversation.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.555.2
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 FlowConversation {
16    /// Unique identifier for the conversation
17    #[serde(rename = "id")]
18    pub id: uuid::Uuid,
19    /// The workspace ID where the conversation belongs
20    #[serde(rename = "workspace_id")]
21    pub workspace_id: String,
22    /// Path of the flow this conversation is for
23    #[serde(rename = "flow_path")]
24    pub flow_path: String,
25    /// Optional title for the conversation
26    #[serde(rename = "title", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub title: Option<Option<String>>,
28    /// When the conversation was created
29    #[serde(rename = "created_at")]
30    pub created_at: String,
31    /// When the conversation was last updated
32    #[serde(rename = "updated_at")]
33    pub updated_at: String,
34    /// Username who created the conversation
35    #[serde(rename = "created_by")]
36    pub created_by: String,
37}
38
39impl FlowConversation {
40    pub fn new(id: uuid::Uuid, workspace_id: String, flow_path: String, created_at: String, updated_at: String, created_by: String) -> FlowConversation {
41        FlowConversation {
42            id,
43            workspace_id,
44            flow_path,
45            title: None,
46            created_at,
47            updated_at,
48            created_by,
49        }
50    }
51}
52