Skip to main content

orvanta_api/models/
copilot_conversation_share.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 CopilotConversationShare {
16    #[serde(rename = "conversation_id")]
17    pub conversation_id: uuid::Uuid,
18    /// The recipient — a username in this workspace.
19    #[serde(rename = "shared_with")]
20    pub shared_with: String,
21    /// The authenticated identity that issued the grant. Recorded rather than derived from the conversation's `created_by`, which is an attribution written at save time and not a proof of authorship.
22    #[serde(rename = "shared_by")]
23    pub shared_by: String,
24    /// When access was first handed over. A repeated grant of the same pair does not rewrite it.
25    #[serde(rename = "created_at")]
26    pub created_at: String,
27}
28
29impl CopilotConversationShare {
30    pub fn new(conversation_id: uuid::Uuid, shared_with: String, shared_by: String, created_at: String) -> CopilotConversationShare {
31        CopilotConversationShare {
32            conversation_id,
33            shared_with,
34            shared_by,
35            created_at,
36        }
37    }
38}
39