use crate::batch::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RetrieveTranscriptResponse {
#[serde(rename = "format")]
pub format: String,
#[serde(rename = "job")]
pub job: Box<models::JobInfo>,
#[serde(rename = "metadata")]
pub metadata: Box<models::RecognitionMetadata>,
#[serde(rename = "results")]
pub results: Vec<models::RecognitionResult>,
#[serde(rename = "translations", skip_serializing_if = "Option::is_none")]
pub translations: Option<std::collections::HashMap<String, Vec<models::TranslationSentence>>>,
#[serde(rename = "summary", skip_serializing_if = "Option::is_none")]
pub summary: Option<Box<models::SummarizationResult>>,
#[serde(rename = "sentiment_analysis", skip_serializing_if = "Option::is_none")]
pub sentiment_analysis: Option<Box<models::SentimentAnalysisResult>>,
}
impl RetrieveTranscriptResponse {
pub fn new(format: String, job: models::JobInfo, metadata: models::RecognitionMetadata, results: Vec<models::RecognitionResult>) -> RetrieveTranscriptResponse {
RetrieveTranscriptResponse {
format,
job: Box::new(job),
metadata: Box::new(metadata),
results,
translations: None,
summary: None,
sentiment_analysis: None,
}
}
}