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

/// <p>An object that represents a Transport Layer Security (TLS) validation context trust for an Certificate Manager certificate.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct TlsValidationContextAcmTrust {
    /// <p>One or more ACM Amazon Resource Name (ARN)s.</p>
    pub certificate_authority_arns: ::std::vec::Vec<::std::string::String>,
}
impl TlsValidationContextAcmTrust {
    /// <p>One or more ACM Amazon Resource Name (ARN)s.</p>
    pub fn certificate_authority_arns(&self) -> &[::std::string::String] {
        use std::ops::Deref;
        self.certificate_authority_arns.deref()
    }
}
impl TlsValidationContextAcmTrust {
    /// Creates a new builder-style object to manufacture [`TlsValidationContextAcmTrust`](crate::types::TlsValidationContextAcmTrust).
    pub fn builder() -> crate::types::builders::TlsValidationContextAcmTrustBuilder {
        crate::types::builders::TlsValidationContextAcmTrustBuilder::default()
    }
}

/// A builder for [`TlsValidationContextAcmTrust`](crate::types::TlsValidationContextAcmTrust).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct TlsValidationContextAcmTrustBuilder {
    pub(crate) certificate_authority_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl TlsValidationContextAcmTrustBuilder {
    /// Appends an item to `certificate_authority_arns`.
    ///
    /// To override the contents of this collection use [`set_certificate_authority_arns`](Self::set_certificate_authority_arns).
    ///
    /// <p>One or more ACM Amazon Resource Name (ARN)s.</p>
    pub fn certificate_authority_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.certificate_authority_arns.unwrap_or_default();
        v.push(input.into());
        self.certificate_authority_arns = ::std::option::Option::Some(v);
        self
    }
    /// <p>One or more ACM Amazon Resource Name (ARN)s.</p>
    pub fn set_certificate_authority_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.certificate_authority_arns = input;
        self
    }
    /// <p>One or more ACM Amazon Resource Name (ARN)s.</p>
    pub fn get_certificate_authority_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.certificate_authority_arns
    }
    /// Consumes the builder and constructs a [`TlsValidationContextAcmTrust`](crate::types::TlsValidationContextAcmTrust).
    /// This method will fail if any of the following fields are not set:
    /// - [`certificate_authority_arns`](crate::types::builders::TlsValidationContextAcmTrustBuilder::certificate_authority_arns)
    pub fn build(self) -> ::std::result::Result<crate::types::TlsValidationContextAcmTrust, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::types::TlsValidationContextAcmTrust {
            certificate_authority_arns: self.certificate_authority_arns.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "certificate_authority_arns",
                    "certificate_authority_arns was not specified but it is required when building TlsValidationContextAcmTrust",
                )
            })?,
        })
    }
}