opensearch-client 0.3.1

Strongly typed OpenSearch Client
Documentation
/*
 * opensearch-client
 *
 * Rust Client for OpenSearch
 *
 * The version of the OpenAPI document: 3.1.0
 * Contact: alberto.paro@gmail.com
 * Generated by Paro OpenAPI Generator
 */

use crate::common;
use serde::{Deserialize, Serialize};




#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Ingest {  /// A date and time, either as a string whose format depends on the context (defaulting to ISO_8601) or the
  /// number of milliseconds since the epoch. OpenSearch accepts both as an input but will generally output a string.
  /// representation.
    #[serde(rename = "timestamp")]
    pub timestamp: common::DateTime,
    #[serde(rename = "pipeline", default, skip_serializing_if = "Option::is_none")]
    pub pipeline: Option<String>,
}

impl Ingest {
    
    pub fn new(timestamp: common::DateTime) -> Ingest {
        Ingest {
            timestamp,
            pipeline: None,
        }
    }
}