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