/*
* OpenAI API
*
* The OpenAI REST API. Please see https://platform.openai.com/docs/api-reference for more details.
*
* The version of the OpenAPI document: 2.3.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// Conversation2 : The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize, bon::Builder)]
pub struct Conversation2 {
/// The unique ID of the conversation that this response was associated with.
#[serde(rename = "id")]
pub id: String,
}
impl Conversation2 {
/// The conversation that this response belonged to. Input items and output items from this response were automatically added to this conversation.
pub fn new(id: String) -> Conversation2 {
Conversation2 { id }
}
}
impl std::fmt::Display for Conversation2 {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match serde_json::to_string(self) {
Ok(s) => write!(f, "{}", s),
Err(_) => Err(std::fmt::Error),
}
}
}