orvanta-api 6.5.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 6.5.0
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CopilotConversation {
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "workspace_id")]
    pub workspace_id: String,
    /// The author. The only identity permitted to append.
    #[serde(rename = "created_by")]
    pub created_by: String,
    #[serde(rename = "title")]
    pub title: String,
    /// copilot mode at last save (script, flow, app, navigator, API, ask)
    #[serde(rename = "mode")]
    pub mode: String,
    /// Best-effort, client-reported paths of the workspace objects the conversation touched. Attribution for the audit read, not proof of deployment.
    #[serde(rename = "touched_paths")]
    pub touched_paths: Vec<String>,
    #[serde(rename = "message_count")]
    pub message_count: i32,
    #[serde(rename = "size_bytes")]
    pub size_bytes: i64,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "updated_at")]
    pub updated_at: String,
    /// 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\".
    #[serde(rename = "redacted_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub redacted_at: Option<Option<String>>,
}

impl CopilotConversation {
    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 {
        CopilotConversation {
            id,
            workspace_id,
            created_by,
            title,
            mode,
            touched_paths,
            message_count,
            size_bytes,
            created_at,
            updated_at,
            redacted_at: None,
        }
    }
}