Skip to main content

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.825.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 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    /// Started from the flow editor's test panel rather than a deployed run
38    #[serde(rename = "is_test")]
39    pub is_test: bool,
40    #[serde(rename = "running_turn", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
41    pub running_turn: Option<Option<Box<models::FlowConversationRunningTurn>>>,
42}
43
44impl FlowConversation {
45    pub fn new(id: uuid::Uuid, workspace_id: String, flow_path: String, created_at: String, updated_at: String, created_by: String, is_test: bool) -> FlowConversation {
46        FlowConversation {
47            id,
48            workspace_id,
49            flow_path,
50            title: None,
51            created_at,
52            updated_at,
53            created_by,
54            is_test,
55            running_turn: None,
56        }
57    }
58}
59