opensearch_client/common/mget.rs
1/*
2 * opensearch-client
3 *
4 * Rust Client for OpenSearch
5 *
6 * The version of the OpenAPI document: 3.1.0
7 * Contact: alberto.paro@gmail.com
8 * Generated by Paro OpenAPI Generator
9 */
10
11use crate::core;
12use crate::common;
13use serde::{Deserialize, Serialize};
14
15/// Mget
16/// Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL.
17
18
19#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
20pub struct Mget {
21 #[serde(rename = "ids", default, skip_serializing_if = "Option::is_none")]
22 pub ids: Option<common::Ids>, /// The documents you want to retrieve. Required if no index is specified in the request URI.
23 #[serde(rename = "docs", default, skip_serializing_if = "Option::is_none")]
24 pub docs: Option<Vec<core::mget::Operation>>,
25}
26
27impl Mget {
28 /// Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL.
29 pub fn new() -> Mget {
30 Mget {
31 ids: None,
32 docs: None,
33 }
34 }
35}