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 JsonErrorResponse {
    /// 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<i32>,
    /// Whether the model has finished generating audio.
    #[serde(rename = "done", skip_serializing_if = "Option::is_none")]
    pub done: Option<bool>,
    /// A human-readable error message.
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
}

impl JsonErrorResponse {
    pub fn new() -> JsonErrorResponse {
        JsonErrorResponse {
            status_code: None,
            done: None,
            error: None,
        }
    }
}