aws_sdk_iot/types/_tls_config.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>An object that specifies the TLS configuration for a domain.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct TlsConfig {
7 /// <p>The security policy for a domain configuration. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html#tls-policy-table">Security policies </a> in the <i>Amazon Web Services IoT Core developer guide</i>.</p>
8 pub security_policy: ::std::option::Option<::std::string::String>,
9}
10impl TlsConfig {
11 /// <p>The security policy for a domain configuration. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html#tls-policy-table">Security policies </a> in the <i>Amazon Web Services IoT Core developer guide</i>.</p>
12 pub fn security_policy(&self) -> ::std::option::Option<&str> {
13 self.security_policy.as_deref()
14 }
15}
16impl TlsConfig {
17 /// Creates a new builder-style object to manufacture [`TlsConfig`](crate::types::TlsConfig).
18 pub fn builder() -> crate::types::builders::TlsConfigBuilder {
19 crate::types::builders::TlsConfigBuilder::default()
20 }
21}
22
23/// A builder for [`TlsConfig`](crate::types::TlsConfig).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct TlsConfigBuilder {
27 pub(crate) security_policy: ::std::option::Option<::std::string::String>,
28}
29impl TlsConfigBuilder {
30 /// <p>The security policy for a domain configuration. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html#tls-policy-table">Security policies </a> in the <i>Amazon Web Services IoT Core developer guide</i>.</p>
31 pub fn security_policy(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
32 self.security_policy = ::std::option::Option::Some(input.into());
33 self
34 }
35 /// <p>The security policy for a domain configuration. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html#tls-policy-table">Security policies </a> in the <i>Amazon Web Services IoT Core developer guide</i>.</p>
36 pub fn set_security_policy(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
37 self.security_policy = input;
38 self
39 }
40 /// <p>The security policy for a domain configuration. For more information, see <a href="https://docs.aws.amazon.com/iot/latest/developerguide/transport-security.html#tls-policy-table">Security policies </a> in the <i>Amazon Web Services IoT Core developer guide</i>.</p>
41 pub fn get_security_policy(&self) -> &::std::option::Option<::std::string::String> {
42 &self.security_policy
43 }
44 /// Consumes the builder and constructs a [`TlsConfig`](crate::types::TlsConfig).
45 pub fn build(self) -> crate::types::TlsConfig {
46 crate::types::TlsConfig {
47 security_policy: self.security_policy,
48 }
49 }
50}