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 NewCopilotConversationMessage {
    #[serde(rename = "channel")]
    pub channel: Channel,
    #[serde(rename = "role")]
    pub role: Role,
    /// Arbitrary JSON. Size is measured server-side on the re-serialised value, so a client cannot understate what it stores.
    #[serde(rename = "payload", deserialize_with = "Option::deserialize")]
    pub payload: Option<serde_json::Value>,
}

impl NewCopilotConversationMessage {
    pub fn new(channel: Channel, role: Role, payload: Option<serde_json::Value>) -> NewCopilotConversationMessage {
        NewCopilotConversationMessage {
            channel,
            role,
            payload,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Channel {
    #[serde(rename = "actual")]
    Actual,
    #[serde(rename = "display")]
    Display,
}

impl Default for Channel {
    fn default() -> Channel {
        Self::Actual
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Role {
    #[serde(rename = "user")]
    User,
    #[serde(rename = "assistant")]
    Assistant,
    #[serde(rename = "system")]
    System,
    #[serde(rename = "tool")]
    Tool,
    #[serde(rename = "developer")]
    Developer,
    #[serde(rename = "function")]
    Function,
}

impl Default for Role {
    fn default() -> Role {
        Self::User
    }
}