1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Additional options for the domain endpoint, such as whether to require HTTPS for all traffic.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct AwsElasticsearchDomainDomainEndpointOptions {
    /// <p>Whether to require that all traffic to the domain arrive over HTTPS.</p>
    pub enforce_https: bool,
    /// <p>The TLS security policy to apply to the HTTPS endpoint of the OpenSearch domain.</p>
    /// <p>Valid values:</p>
    /// <ul>
    /// <li> <p> <code>Policy-Min-TLS-1-0-2019-07</code>, which supports TLSv1.0 and higher</p> </li>
    /// <li> <p> <code>Policy-Min-TLS-1-2-2019-07</code>, which only supports TLSv1.2</p> </li>
    /// </ul>
    pub tls_security_policy: ::std::option::Option<::std::string::String>,
}
impl AwsElasticsearchDomainDomainEndpointOptions {
    /// <p>Whether to require that all traffic to the domain arrive over HTTPS.</p>
    pub fn enforce_https(&self) -> bool {
        self.enforce_https
    }
    /// <p>The TLS security policy to apply to the HTTPS endpoint of the OpenSearch domain.</p>
    /// <p>Valid values:</p>
    /// <ul>
    /// <li> <p> <code>Policy-Min-TLS-1-0-2019-07</code>, which supports TLSv1.0 and higher</p> </li>
    /// <li> <p> <code>Policy-Min-TLS-1-2-2019-07</code>, which only supports TLSv1.2</p> </li>
    /// </ul>
    pub fn tls_security_policy(&self) -> ::std::option::Option<&str> {
        self.tls_security_policy.as_deref()
    }
}
impl AwsElasticsearchDomainDomainEndpointOptions {
    /// Creates a new builder-style object to manufacture [`AwsElasticsearchDomainDomainEndpointOptions`](crate::types::AwsElasticsearchDomainDomainEndpointOptions).
    pub fn builder() -> crate::types::builders::AwsElasticsearchDomainDomainEndpointOptionsBuilder {
        crate::types::builders::AwsElasticsearchDomainDomainEndpointOptionsBuilder::default()
    }
}

/// A builder for [`AwsElasticsearchDomainDomainEndpointOptions`](crate::types::AwsElasticsearchDomainDomainEndpointOptions).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct AwsElasticsearchDomainDomainEndpointOptionsBuilder {
    pub(crate) enforce_https: ::std::option::Option<bool>,
    pub(crate) tls_security_policy: ::std::option::Option<::std::string::String>,
}
impl AwsElasticsearchDomainDomainEndpointOptionsBuilder {
    /// <p>Whether to require that all traffic to the domain arrive over HTTPS.</p>
    pub fn enforce_https(mut self, input: bool) -> Self {
        self.enforce_https = ::std::option::Option::Some(input);
        self
    }
    /// <p>Whether to require that all traffic to the domain arrive over HTTPS.</p>
    pub fn set_enforce_https(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enforce_https = input;
        self
    }
    /// <p>Whether to require that all traffic to the domain arrive over HTTPS.</p>
    pub fn get_enforce_https(&self) -> &::std::option::Option<bool> {
        &self.enforce_https
    }
    /// <p>The TLS security policy to apply to the HTTPS endpoint of the OpenSearch domain.</p>
    /// <p>Valid values:</p>
    /// <ul>
    /// <li> <p> <code>Policy-Min-TLS-1-0-2019-07</code>, which supports TLSv1.0 and higher</p> </li>
    /// <li> <p> <code>Policy-Min-TLS-1-2-2019-07</code>, which only supports TLSv1.2</p> </li>
    /// </ul>
    pub fn tls_security_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.tls_security_policy = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The TLS security policy to apply to the HTTPS endpoint of the OpenSearch domain.</p>
    /// <p>Valid values:</p>
    /// <ul>
    /// <li> <p> <code>Policy-Min-TLS-1-0-2019-07</code>, which supports TLSv1.0 and higher</p> </li>
    /// <li> <p> <code>Policy-Min-TLS-1-2-2019-07</code>, which only supports TLSv1.2</p> </li>
    /// </ul>
    pub fn set_tls_security_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.tls_security_policy = input;
        self
    }
    /// <p>The TLS security policy to apply to the HTTPS endpoint of the OpenSearch domain.</p>
    /// <p>Valid values:</p>
    /// <ul>
    /// <li> <p> <code>Policy-Min-TLS-1-0-2019-07</code>, which supports TLSv1.0 and higher</p> </li>
    /// <li> <p> <code>Policy-Min-TLS-1-2-2019-07</code>, which only supports TLSv1.2</p> </li>
    /// </ul>
    pub fn get_tls_security_policy(&self) -> &::std::option::Option<::std::string::String> {
        &self.tls_security_policy
    }
    /// Consumes the builder and constructs a [`AwsElasticsearchDomainDomainEndpointOptions`](crate::types::AwsElasticsearchDomainDomainEndpointOptions).
    pub fn build(self) -> crate::types::AwsElasticsearchDomainDomainEndpointOptions {
        crate::types::AwsElasticsearchDomainDomainEndpointOptions {
            enforce_https: self.enforce_https.unwrap_or_default(),
            tls_security_policy: self.tls_security_policy,
        }
    }
}