manticore_openapi/models/
delete_document_request.rs

1/*
2 * Manticore Search Client
3 *
4 * Сlient for Manticore Search. 
5 *
6 * The version of the OpenAPI document: 3.3.1
7 * Contact: info@manticoresearch.com
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// 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) 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DeleteDocumentRequest {
17    /// Index name
18    #[serde(rename = "index")]
19    pub index: String,
20    /// cluster name
21    #[serde(rename = "cluster", skip_serializing_if = "Option::is_none")]
22    pub cluster: Option<String>,
23    /// Document ID
24    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
25    pub id: Option<i64>,
26    /// Query tree object
27    #[serde(rename = "query", skip_serializing_if = "Option::is_none")]
28    pub query: Option<serde_json::Value>,
29}
30
31impl DeleteDocumentRequest {
32    /// 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) 
33    pub fn new(index: String) -> DeleteDocumentRequest {
34        DeleteDocumentRequest {
35            index,
36            cluster: None,
37            id: None,
38            query: None,
39        }
40    }
41}
42