Skip to main content

orvanta_api/models/
copilot_conversation.rs

1/*
2 * Orvanta API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 6.5.0
7 * Contact: contact@orvanta.cloud
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 CopilotConversation {
16    #[serde(rename = "id")]
17    pub id: uuid::Uuid,
18    #[serde(rename = "workspace_id")]
19    pub workspace_id: String,
20    /// The author. The only identity permitted to append.
21    #[serde(rename = "created_by")]
22    pub created_by: String,
23    #[serde(rename = "title")]
24    pub title: String,
25    /// copilot mode at last save (script, flow, app, navigator, API, ask)
26    #[serde(rename = "mode")]
27    pub mode: String,
28    /// Best-effort, client-reported paths of the workspace objects the conversation touched. Attribution for the audit read, not proof of deployment.
29    #[serde(rename = "touched_paths")]
30    pub touched_paths: Vec<String>,
31    #[serde(rename = "message_count")]
32    pub message_count: i32,
33    #[serde(rename = "size_bytes")]
34    pub size_bytes: i64,
35    #[serde(rename = "created_at")]
36    pub created_at: String,
37    #[serde(rename = "updated_at")]
38    pub updated_at: String,
39    /// When the retention sweep replaced every message body in this conversation with a tombstone (#1282). Absent/null means the transcript is intact. Appending to a redacted conversation clears it again, because it means \"every body here is a tombstone\", not \"this was redacted once\".
40    #[serde(rename = "redacted_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
41    pub redacted_at: Option<Option<String>>,
42}
43
44impl CopilotConversation {
45    pub fn new(id: uuid::Uuid, workspace_id: String, created_by: String, title: String, mode: String, touched_paths: Vec<String>, message_count: i32, size_bytes: i64, created_at: String, updated_at: String) -> CopilotConversation {
46        CopilotConversation {
47            id,
48            workspace_id,
49            created_by,
50            title,
51            mode,
52            touched_paths,
53            message_count,
54            size_bytes,
55            created_at,
56            updated_at,
57            redacted_at: None,
58        }
59    }
60}
61