speechmatics 0.4.0

An async rust SDK for the Speechmatics API
Documentation
/*
 * Speechmatics ASR REST API
 *
 * The Speechmatics Automatic Speech Recognition REST API is used to submit ASR jobs and receive the results. 
 *
 * The version of the OpenAPI document: 2.0.0
 * Contact: support@speechmatics.com
 * Generated by: https://openapi-generator.tech
 */

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

/// SentimentSegment : Represents a segment of text and its associated sentiment.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SentimentSegment {
    #[serde(rename = "text", skip_serializing_if = "Option::is_none")]
    pub text: Option<String>,
    #[serde(rename = "start_time", skip_serializing_if = "Option::is_none")]
    pub start_time: Option<f32>,
    #[serde(rename = "end_time", skip_serializing_if = "Option::is_none")]
    pub end_time: Option<f32>,
    #[serde(rename = "sentiment", skip_serializing_if = "Option::is_none")]
    pub sentiment: Option<String>,
    #[serde(rename = "speaker", skip_serializing_if = "Option::is_none")]
    pub speaker: Option<String>,
    #[serde(rename = "channel", skip_serializing_if = "Option::is_none")]
    pub channel: Option<String>,
    #[serde(rename = "confidence", skip_serializing_if = "Option::is_none")]
    pub confidence: Option<f32>,
}

impl SentimentSegment {
    /// Represents a segment of text and its associated sentiment.
    pub fn new() -> SentimentSegment {
        SentimentSegment {
            text: None,
            start_time: None,
            end_time: None,
            sentiment: None,
            speaker: None,
            channel: None,
            confidence: None,
        }
    }
}