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};

/// BulkResponse : Success response for bulk search requests
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BulkResponse {
    /// List of results
    #[serde(rename = "items", skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<serde_json::Value>>,
    /// Errors occurred during the bulk operation
    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
    pub errors: Option<bool>,
    /// Error message describing an error if such occurred
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// Number of the row returned in the response
    #[serde(rename = "current_line", skip_serializing_if = "Option::is_none")]
    pub current_line: Option<i32>,
    /// Number of rows skipped in the response
    #[serde(rename = "skipped_lines", skip_serializing_if = "Option::is_none")]
    pub skipped_lines: Option<i32>,
}

impl BulkResponse {
    /// Success response for bulk search requests
    pub fn new() -> BulkResponse {
        BulkResponse {
            items: None,
            errors: None,
            error: None,
            current_line: None,
            skipped_lines: None,
        }
    }
}