cartesia 0.0.1

A Rust library for the Cartesia API.
Documentation
/*
 * Cartesia REST API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2024-06-10
 *
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct JsonDoneResponse {
    /// HTTP status code to allow for error handling. This is for errors encountered while streaming the response.
    #[serde(rename = "status_code", skip_serializing_if = "Option::is_none")]
    pub status_code: Option<StatusCode>,
    /// Whether the model has finished generating audio.
    #[serde(rename = "done", skip_serializing_if = "Option::is_none")]
    pub done: Option<bool>,
}

impl JsonDoneResponse {
    pub fn new() -> JsonDoneResponse {
        JsonDoneResponse {
            status_code: None,
            done: None,
        }
    }
}
/// HTTP status code to allow for error handling. This is for errors encountered while streaming the response.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum StatusCode {
    #[serde(rename = "200")]
    Variant200,
}

impl Default for StatusCode {
    fn default() -> StatusCode {
        Self::Variant200
    }
}