opensearch_client/core/search/point_in_time_reference.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 serde::{Deserialize, Serialize};
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct PointInTimeReference {
15 /// A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
16 /// `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
17 #[serde(
18 rename = "keep_alive",
19 default,
20 skip_serializing_if = "Option::is_none"
21 )]
22 pub keep_alive: Option<String>,
23 #[serde(rename = "id")]
24 pub id: String,
25}
26
27impl PointInTimeReference {
28 pub fn new(id: String) -> PointInTimeReference {
29 PointInTimeReference {
30 keep_alive: None,
31 id,
32 }
33 }
34}