Skip to main content

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