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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object that represents a virtual gateway's listener's Transport Layer Security (TLS) validation context.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct VirtualGatewayListenerTlsValidationContext {
    /// <p>A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.</p>
    pub trust: ::std::option::Option<crate::types::VirtualGatewayListenerTlsValidationContextTrust>,
    /// <p>A reference to an object that represents the SANs for a virtual gateway listener's Transport Layer Security (TLS) validation context.</p>
    pub subject_alternative_names: ::std::option::Option<crate::types::SubjectAlternativeNames>,
}
impl VirtualGatewayListenerTlsValidationContext {
    /// <p>A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.</p>
    pub fn trust(&self) -> ::std::option::Option<&crate::types::VirtualGatewayListenerTlsValidationContextTrust> {
        self.trust.as_ref()
    }
    /// <p>A reference to an object that represents the SANs for a virtual gateway listener's Transport Layer Security (TLS) validation context.</p>
    pub fn subject_alternative_names(&self) -> ::std::option::Option<&crate::types::SubjectAlternativeNames> {
        self.subject_alternative_names.as_ref()
    }
}
impl VirtualGatewayListenerTlsValidationContext {
    /// Creates a new builder-style object to manufacture [`VirtualGatewayListenerTlsValidationContext`](crate::types::VirtualGatewayListenerTlsValidationContext).
    pub fn builder() -> crate::types::builders::VirtualGatewayListenerTlsValidationContextBuilder {
        crate::types::builders::VirtualGatewayListenerTlsValidationContextBuilder::default()
    }
}

/// A builder for [`VirtualGatewayListenerTlsValidationContext`](crate::types::VirtualGatewayListenerTlsValidationContext).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct VirtualGatewayListenerTlsValidationContextBuilder {
    pub(crate) trust: ::std::option::Option<crate::types::VirtualGatewayListenerTlsValidationContextTrust>,
    pub(crate) subject_alternative_names: ::std::option::Option<crate::types::SubjectAlternativeNames>,
}
impl VirtualGatewayListenerTlsValidationContextBuilder {
    /// <p>A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.</p>
    /// This field is required.
    pub fn trust(mut self, input: crate::types::VirtualGatewayListenerTlsValidationContextTrust) -> Self {
        self.trust = ::std::option::Option::Some(input);
        self
    }
    /// <p>A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.</p>
    pub fn set_trust(mut self, input: ::std::option::Option<crate::types::VirtualGatewayListenerTlsValidationContextTrust>) -> Self {
        self.trust = input;
        self
    }
    /// <p>A reference to where to retrieve the trust chain when validating a peer’s Transport Layer Security (TLS) certificate.</p>
    pub fn get_trust(&self) -> &::std::option::Option<crate::types::VirtualGatewayListenerTlsValidationContextTrust> {
        &self.trust
    }
    /// <p>A reference to an object that represents the SANs for a virtual gateway listener's Transport Layer Security (TLS) validation context.</p>
    pub fn subject_alternative_names(mut self, input: crate::types::SubjectAlternativeNames) -> Self {
        self.subject_alternative_names = ::std::option::Option::Some(input);
        self
    }
    /// <p>A reference to an object that represents the SANs for a virtual gateway listener's Transport Layer Security (TLS) validation context.</p>
    pub fn set_subject_alternative_names(mut self, input: ::std::option::Option<crate::types::SubjectAlternativeNames>) -> Self {
        self.subject_alternative_names = input;
        self
    }
    /// <p>A reference to an object that represents the SANs for a virtual gateway listener's Transport Layer Security (TLS) validation context.</p>
    pub fn get_subject_alternative_names(&self) -> &::std::option::Option<crate::types::SubjectAlternativeNames> {
        &self.subject_alternative_names
    }
    /// Consumes the builder and constructs a [`VirtualGatewayListenerTlsValidationContext`](crate::types::VirtualGatewayListenerTlsValidationContext).
    pub fn build(self) -> crate::types::VirtualGatewayListenerTlsValidationContext {
        crate::types::VirtualGatewayListenerTlsValidationContext {
            trust: self.trust,
            subject_alternative_names: self.subject_alternative_names,
        }
    }
}