Skip to main content

opensearch_client/ml/
client_config.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 ClientConfig {
15    #[serde(
16        rename = "retry_backoff_policy",
17        default,
18        skip_serializing_if = "Option::is_none"
19    )]
20    pub retry_backoff_policy: Option<String>,
21    #[serde(
22        rename = "max_retry_times",
23        default,
24        skip_serializing_if = "Option::is_none"
25    )]
26    pub max_retry_times: Option<u32>,
27    #[serde(
28        rename = "connection_timeout",
29        default,
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub connection_timeout: Option<u32>,
33    #[serde(
34        rename = "read_timeout",
35        default,
36        skip_serializing_if = "Option::is_none"
37    )]
38    pub read_timeout: Option<u32>,
39    #[serde(
40        rename = "retry_backoff_millis",
41        default,
42        skip_serializing_if = "Option::is_none"
43    )]
44    pub retry_backoff_millis: Option<u32>,
45    #[serde(
46        rename = "max_connection",
47        default,
48        skip_serializing_if = "Option::is_none"
49    )]
50    pub max_connection: Option<u32>,
51    #[serde(
52        rename = "retry_timeout_seconds",
53        default,
54        skip_serializing_if = "Option::is_none"
55    )]
56    pub retry_timeout_seconds: Option<u32>,
57}
58
59impl ClientConfig {
60    pub fn new() -> ClientConfig {
61        ClientConfig {
62            retry_backoff_policy: None,
63            max_retry_times: None,
64            connection_timeout: None,
65            read_timeout: None,
66            retry_backoff_millis: None,
67            max_connection: None,
68            retry_timeout_seconds: None,
69        }
70    }
71}