manticoresearch 2.0.0

Сlient for Manticore Search.
Documentation
/*
 * Manticore Search Client
 *
 * Сlient for Manticore Search. 
 *
 * The version of the OpenAPI document: 5.0.0
 * Contact: info@manticoresearch.com
 * Generated by: https://openapi-generator.tech
 */

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

/// ErrorResponse : Error response object containing information about the error and a status code
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ErrorResponse {
    #[serde(rename = "error")]
    pub error: Box<models::ResponseError>,
    /// HTTP status code of the error response
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<i32>,
}

impl ErrorResponse {
    /// Error response object containing information about the error and a status code
    pub fn new(error: models::ResponseError) -> ErrorResponse {
        ErrorResponse {
            error: Box::new(error),
            status: None,
        }
    }
}