opensearch_client/common/stringified_version_number.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/// StringifiedVersionNumber
14
15/// Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
16/// this behavior while keeping the semantics of the field type.
17///
18/// Depending on the target language, code generators can keep the union or remove it and leniently parse
19/// strings to the target type.
20#[derive(Clone, Debug, Serialize, PartialEq, Deserialize)]
21#[serde(untagged)]
22pub enum StringifiedVersionNumber {
23 VersionNumberValue(u64),
24
25 StringValue(String),
26}
27
28impl Default for StringifiedVersionNumber {
29 fn default() -> StringifiedVersionNumber {
30 Self::VersionNumberValue(0)
31 }
32}