opensearch_client/ingest/simulate/ingest.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::common;
12use serde::{Deserialize, Serialize};
13
14
15
16
17#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
18pub struct Ingest { /// A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the
19 /// number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string.
20 /// representation.
21 #[serde(rename = "timestamp")]
22 pub timestamp: common::DateTime,
23 #[serde(rename = "pipeline", default, skip_serializing_if = "Option::is_none")]
24 pub pipeline: Option<String>,
25}
26
27impl Ingest {
28
29 pub fn new(timestamp: common::DateTime) -> Ingest {
30 Ingest {
31 timestamp,
32 pipeline: None,
33 }
34 }
35}