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.814.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}
41
42impl FlowConversation {
43    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 {
44        FlowConversation {
45            id,
46            workspace_id,
47            flow_path,
48            title: None,
49            created_at,
50            updated_at,
51            created_by,
52            is_test,
53        }
54    }
55}
56