Skip to main content

aws_sdk_elasticloadbalancingv2/types/
_mutual_authentication_attributes.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Information about the mutual authentication attributes of a listener.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct MutualAuthenticationAttributes {
7    /// <p>The client certificate handling method. Options are <code>off</code>, <code>passthrough</code> or <code>verify</code>. The default value is <code>off</code>.</p>
8    pub mode: ::std::option::Option<::std::string::String>,
9    /// <p>The Amazon Resource Name (ARN) of the trust store.</p>
10    pub trust_store_arn: ::std::option::Option<::std::string::String>,
11    /// <p>Indicates whether expired client certificates are ignored.</p>
12    pub ignore_client_certificate_expiry: ::std::option::Option<bool>,
13    /// <p>Indicates a shared trust stores association status.</p>
14    pub trust_store_association_status: ::std::option::Option<crate::types::TrustStoreAssociationStatusEnum>,
15    /// <p>Indicates whether trust store CA certificate names are advertised.</p>
16    pub advertise_trust_store_ca_names: ::std::option::Option<crate::types::AdvertiseTrustStoreCaNamesEnum>,
17}
18impl MutualAuthenticationAttributes {
19    /// <p>The client certificate handling method. Options are <code>off</code>, <code>passthrough</code> or <code>verify</code>. The default value is <code>off</code>.</p>
20    pub fn mode(&self) -> ::std::option::Option<&str> {
21        self.mode.as_deref()
22    }
23    /// <p>The Amazon Resource Name (ARN) of the trust store.</p>
24    pub fn trust_store_arn(&self) -> ::std::option::Option<&str> {
25        self.trust_store_arn.as_deref()
26    }
27    /// <p>Indicates whether expired client certificates are ignored.</p>
28    pub fn ignore_client_certificate_expiry(&self) -> ::std::option::Option<bool> {
29        self.ignore_client_certificate_expiry
30    }
31    /// <p>Indicates a shared trust stores association status.</p>
32    pub fn trust_store_association_status(&self) -> ::std::option::Option<&crate::types::TrustStoreAssociationStatusEnum> {
33        self.trust_store_association_status.as_ref()
34    }
35    /// <p>Indicates whether trust store CA certificate names are advertised.</p>
36    pub fn advertise_trust_store_ca_names(&self) -> ::std::option::Option<&crate::types::AdvertiseTrustStoreCaNamesEnum> {
37        self.advertise_trust_store_ca_names.as_ref()
38    }
39}
40impl MutualAuthenticationAttributes {
41    /// Creates a new builder-style object to manufacture [`MutualAuthenticationAttributes`](crate::types::MutualAuthenticationAttributes).
42    pub fn builder() -> crate::types::builders::MutualAuthenticationAttributesBuilder {
43        crate::types::builders::MutualAuthenticationAttributesBuilder::default()
44    }
45}
46
47/// A builder for [`MutualAuthenticationAttributes`](crate::types::MutualAuthenticationAttributes).
48#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
49#[non_exhaustive]
50pub struct MutualAuthenticationAttributesBuilder {
51    pub(crate) mode: ::std::option::Option<::std::string::String>,
52    pub(crate) trust_store_arn: ::std::option::Option<::std::string::String>,
53    pub(crate) ignore_client_certificate_expiry: ::std::option::Option<bool>,
54    pub(crate) trust_store_association_status: ::std::option::Option<crate::types::TrustStoreAssociationStatusEnum>,
55    pub(crate) advertise_trust_store_ca_names: ::std::option::Option<crate::types::AdvertiseTrustStoreCaNamesEnum>,
56}
57impl MutualAuthenticationAttributesBuilder {
58    /// <p>The client certificate handling method. Options are <code>off</code>, <code>passthrough</code> or <code>verify</code>. The default value is <code>off</code>.</p>
59    pub fn mode(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60        self.mode = ::std::option::Option::Some(input.into());
61        self
62    }
63    /// <p>The client certificate handling method. Options are <code>off</code>, <code>passthrough</code> or <code>verify</code>. The default value is <code>off</code>.</p>
64    pub fn set_mode(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65        self.mode = input;
66        self
67    }
68    /// <p>The client certificate handling method. Options are <code>off</code>, <code>passthrough</code> or <code>verify</code>. The default value is <code>off</code>.</p>
69    pub fn get_mode(&self) -> &::std::option::Option<::std::string::String> {
70        &self.mode
71    }
72    /// <p>The Amazon Resource Name (ARN) of the trust store.</p>
73    pub fn trust_store_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74        self.trust_store_arn = ::std::option::Option::Some(input.into());
75        self
76    }
77    /// <p>The Amazon Resource Name (ARN) of the trust store.</p>
78    pub fn set_trust_store_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79        self.trust_store_arn = input;
80        self
81    }
82    /// <p>The Amazon Resource Name (ARN) of the trust store.</p>
83    pub fn get_trust_store_arn(&self) -> &::std::option::Option<::std::string::String> {
84        &self.trust_store_arn
85    }
86    /// <p>Indicates whether expired client certificates are ignored.</p>
87    pub fn ignore_client_certificate_expiry(mut self, input: bool) -> Self {
88        self.ignore_client_certificate_expiry = ::std::option::Option::Some(input);
89        self
90    }
91    /// <p>Indicates whether expired client certificates are ignored.</p>
92    pub fn set_ignore_client_certificate_expiry(mut self, input: ::std::option::Option<bool>) -> Self {
93        self.ignore_client_certificate_expiry = input;
94        self
95    }
96    /// <p>Indicates whether expired client certificates are ignored.</p>
97    pub fn get_ignore_client_certificate_expiry(&self) -> &::std::option::Option<bool> {
98        &self.ignore_client_certificate_expiry
99    }
100    /// <p>Indicates a shared trust stores association status.</p>
101    pub fn trust_store_association_status(mut self, input: crate::types::TrustStoreAssociationStatusEnum) -> Self {
102        self.trust_store_association_status = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>Indicates a shared trust stores association status.</p>
106    pub fn set_trust_store_association_status(mut self, input: ::std::option::Option<crate::types::TrustStoreAssociationStatusEnum>) -> Self {
107        self.trust_store_association_status = input;
108        self
109    }
110    /// <p>Indicates a shared trust stores association status.</p>
111    pub fn get_trust_store_association_status(&self) -> &::std::option::Option<crate::types::TrustStoreAssociationStatusEnum> {
112        &self.trust_store_association_status
113    }
114    /// <p>Indicates whether trust store CA certificate names are advertised.</p>
115    pub fn advertise_trust_store_ca_names(mut self, input: crate::types::AdvertiseTrustStoreCaNamesEnum) -> Self {
116        self.advertise_trust_store_ca_names = ::std::option::Option::Some(input);
117        self
118    }
119    /// <p>Indicates whether trust store CA certificate names are advertised.</p>
120    pub fn set_advertise_trust_store_ca_names(mut self, input: ::std::option::Option<crate::types::AdvertiseTrustStoreCaNamesEnum>) -> Self {
121        self.advertise_trust_store_ca_names = input;
122        self
123    }
124    /// <p>Indicates whether trust store CA certificate names are advertised.</p>
125    pub fn get_advertise_trust_store_ca_names(&self) -> &::std::option::Option<crate::types::AdvertiseTrustStoreCaNamesEnum> {
126        &self.advertise_trust_store_ca_names
127    }
128    /// Consumes the builder and constructs a [`MutualAuthenticationAttributes`](crate::types::MutualAuthenticationAttributes).
129    pub fn build(self) -> crate::types::MutualAuthenticationAttributes {
130        crate::types::MutualAuthenticationAttributes {
131            mode: self.mode,
132            trust_store_arn: self.trust_store_arn,
133            ignore_client_certificate_expiry: self.ignore_client_certificate_expiry,
134            trust_store_association_status: self.trust_store_association_status,
135            advertise_trust_store_ca_names: self.advertise_trust_store_ca_names,
136        }
137    }
138}