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

/// DeleteDocumentRequest : Payload for delete request. Documents can be deleted either one by one by specifying the document id or by providing a query object. For more information see  [Delete API](https://manual.manticoresearch.com/Deleting_documents) 
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DeleteDocumentRequest {
    /// Table name
    #[serde(rename = "table")]
    pub table: String,
    /// Cluster name
    #[serde(rename = "cluster", skip_serializing_if = "Option::is_none")]
    pub cluster: Option<String>,
    /// The ID of document for deletion
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<u64>,
    /// Defines the criteria to match documents for deletion
    #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
    pub query: Option<serde_json::Value>,
}

impl DeleteDocumentRequest {
    /// Payload for delete request. Documents can be deleted either one by one by specifying the document id or by providing a query object. For more information see  [Delete API](https://manual.manticoresearch.com/Deleting_documents) 
    pub fn new(table: String) -> DeleteDocumentRequest {
        DeleteDocumentRequest {
            table,
            cluster: None,
            id: None,
            query: None,
        }
    }
}