Skip to main content

orvanta_api/models/
shared_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: 4.1.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 SharedCopilotConversation {
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    #[serde(rename = "shared_by")]
43    pub shared_by: String,
44    #[serde(rename = "shared_at")]
45    pub shared_at: String,
46}
47
48impl SharedCopilotConversation {
49    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, shared_by: String, shared_at: String) -> SharedCopilotConversation {
50        SharedCopilotConversation {
51            id,
52            workspace_id,
53            created_by,
54            title,
55            mode,
56            touched_paths,
57            message_count,
58            size_bytes,
59            created_at,
60            updated_at,
61            redacted_at: None,
62            shared_by,
63            shared_at,
64        }
65    }
66}
67