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

/// <p>The input source of the Amazon Elastic Kubernetes Service cluster.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct EksSource {
    /// <p>The Amazon Resource Name (ARN) of the Amazon Elastic Kubernetes Service cluster. The format for this ARN is: arn:<code>aws</code>:eks:<code>region</code>:<code>account-id</code>:cluster/<code>cluster-name</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>AWS General Reference</i> guide.</p>
    pub eks_cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>The list of namespaces located on your Amazon Elastic Kubernetes Service cluster.</p>
    pub namespaces: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl EksSource {
    /// <p>The Amazon Resource Name (ARN) of the Amazon Elastic Kubernetes Service cluster. The format for this ARN is: arn:<code>aws</code>:eks:<code>region</code>:<code>account-id</code>:cluster/<code>cluster-name</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>AWS General Reference</i> guide.</p>
    pub fn eks_cluster_arn(&self) -> ::std::option::Option<&str> {
        self.eks_cluster_arn.as_deref()
    }
    /// <p>The list of namespaces located on your Amazon Elastic Kubernetes Service cluster.</p>
    pub fn namespaces(&self) -> ::std::option::Option<&[::std::string::String]> {
        self.namespaces.as_deref()
    }
}
impl EksSource {
    /// Creates a new builder-style object to manufacture [`EksSource`](crate::types::EksSource).
    pub fn builder() -> crate::types::builders::EksSourceBuilder {
        crate::types::builders::EksSourceBuilder::default()
    }
}

/// A builder for [`EksSource`](crate::types::EksSource).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct EksSourceBuilder {
    pub(crate) eks_cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) namespaces: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
}
impl EksSourceBuilder {
    /// <p>The Amazon Resource Name (ARN) of the Amazon Elastic Kubernetes Service cluster. The format for this ARN is: arn:<code>aws</code>:eks:<code>region</code>:<code>account-id</code>:cluster/<code>cluster-name</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>AWS General Reference</i> guide.</p>
    pub fn eks_cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.eks_cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Elastic Kubernetes Service cluster. The format for this ARN is: arn:<code>aws</code>:eks:<code>region</code>:<code>account-id</code>:cluster/<code>cluster-name</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>AWS General Reference</i> guide.</p>
    pub fn set_eks_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.eks_cluster_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Amazon Elastic Kubernetes Service cluster. The format for this ARN is: arn:<code>aws</code>:eks:<code>region</code>:<code>account-id</code>:cluster/<code>cluster-name</code>. For more information about ARNs, see <a href="https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html"> Amazon Resource Names (ARNs)</a> in the <i>AWS General Reference</i> guide.</p>
    pub fn get_eks_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.eks_cluster_arn
    }
    /// Appends an item to `namespaces`.
    ///
    /// To override the contents of this collection use [`set_namespaces`](Self::set_namespaces).
    ///
    /// <p>The list of namespaces located on your Amazon Elastic Kubernetes Service cluster.</p>
    pub fn namespaces(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.namespaces.unwrap_or_default();
        v.push(input.into());
        self.namespaces = ::std::option::Option::Some(v);
        self
    }
    /// <p>The list of namespaces located on your Amazon Elastic Kubernetes Service cluster.</p>
    pub fn set_namespaces(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.namespaces = input;
        self
    }
    /// <p>The list of namespaces located on your Amazon Elastic Kubernetes Service cluster.</p>
    pub fn get_namespaces(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.namespaces
    }
    /// Consumes the builder and constructs a [`EksSource`](crate::types::EksSource).
    pub fn build(self) -> crate::types::EksSource {
        crate::types::EksSource {
            eks_cluster_arn: self.eks_cluster_arn,
            namespaces: self.namespaces,
        }
    }
}