aws_sdk_eks/operation/describe_addon_configuration/
_describe_addon_configuration_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeAddonConfigurationOutput {
6    /// <p>The name of the add-on.</p>
7    pub addon_name: ::std::option::Option<::std::string::String>,
8    /// <p>The version of the add-on. The version must match one of the versions returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html"> <code>DescribeAddonVersions</code> </a>.</p>
9    pub addon_version: ::std::option::Option<::std::string::String>,
10    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
11    pub configuration_schema: ::std::option::Option<::std::string::String>,
12    /// <p>The Kubernetes service account name used by the add-on, and any suggested IAM policies. Use this information to create an IAM Role for the add-on.</p>
13    pub pod_identity_configuration: ::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>>,
14    _request_id: Option<String>,
15}
16impl DescribeAddonConfigurationOutput {
17    /// <p>The name of the add-on.</p>
18    pub fn addon_name(&self) -> ::std::option::Option<&str> {
19        self.addon_name.as_deref()
20    }
21    /// <p>The version of the add-on. The version must match one of the versions returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html"> <code>DescribeAddonVersions</code> </a>.</p>
22    pub fn addon_version(&self) -> ::std::option::Option<&str> {
23        self.addon_version.as_deref()
24    }
25    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
26    pub fn configuration_schema(&self) -> ::std::option::Option<&str> {
27        self.configuration_schema.as_deref()
28    }
29    /// <p>The Kubernetes service account name used by the add-on, and any suggested IAM policies. Use this information to create an IAM Role for the add-on.</p>
30    ///
31    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.pod_identity_configuration.is_none()`.
32    pub fn pod_identity_configuration(&self) -> &[crate::types::AddonPodIdentityConfiguration] {
33        self.pod_identity_configuration.as_deref().unwrap_or_default()
34    }
35}
36impl ::aws_types::request_id::RequestId for DescribeAddonConfigurationOutput {
37    fn request_id(&self) -> Option<&str> {
38        self._request_id.as_deref()
39    }
40}
41impl DescribeAddonConfigurationOutput {
42    /// Creates a new builder-style object to manufacture [`DescribeAddonConfigurationOutput`](crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput).
43    pub fn builder() -> crate::operation::describe_addon_configuration::builders::DescribeAddonConfigurationOutputBuilder {
44        crate::operation::describe_addon_configuration::builders::DescribeAddonConfigurationOutputBuilder::default()
45    }
46}
47
48/// A builder for [`DescribeAddonConfigurationOutput`](crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput).
49#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
50#[non_exhaustive]
51pub struct DescribeAddonConfigurationOutputBuilder {
52    pub(crate) addon_name: ::std::option::Option<::std::string::String>,
53    pub(crate) addon_version: ::std::option::Option<::std::string::String>,
54    pub(crate) configuration_schema: ::std::option::Option<::std::string::String>,
55    pub(crate) pod_identity_configuration: ::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>>,
56    _request_id: Option<String>,
57}
58impl DescribeAddonConfigurationOutputBuilder {
59    /// <p>The name of the add-on.</p>
60    pub fn addon_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.addon_name = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The name of the add-on.</p>
65    pub fn set_addon_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.addon_name = input;
67        self
68    }
69    /// <p>The name of the add-on.</p>
70    pub fn get_addon_name(&self) -> &::std::option::Option<::std::string::String> {
71        &self.addon_name
72    }
73    /// <p>The version of the add-on. The version must match one of the versions returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html"> <code>DescribeAddonVersions</code> </a>.</p>
74    pub fn addon_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
75        self.addon_version = ::std::option::Option::Some(input.into());
76        self
77    }
78    /// <p>The version of the add-on. The version must match one of the versions returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html"> <code>DescribeAddonVersions</code> </a>.</p>
79    pub fn set_addon_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
80        self.addon_version = input;
81        self
82    }
83    /// <p>The version of the add-on. The version must match one of the versions returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_DescribeAddonVersions.html"> <code>DescribeAddonVersions</code> </a>.</p>
84    pub fn get_addon_version(&self) -> &::std::option::Option<::std::string::String> {
85        &self.addon_version
86    }
87    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
88    pub fn configuration_schema(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
89        self.configuration_schema = ::std::option::Option::Some(input.into());
90        self
91    }
92    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
93    pub fn set_configuration_schema(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
94        self.configuration_schema = input;
95        self
96    }
97    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
98    pub fn get_configuration_schema(&self) -> &::std::option::Option<::std::string::String> {
99        &self.configuration_schema
100    }
101    /// Appends an item to `pod_identity_configuration`.
102    ///
103    /// To override the contents of this collection use [`set_pod_identity_configuration`](Self::set_pod_identity_configuration).
104    ///
105    /// <p>The Kubernetes service account name used by the add-on, and any suggested IAM policies. Use this information to create an IAM Role for the add-on.</p>
106    pub fn pod_identity_configuration(mut self, input: crate::types::AddonPodIdentityConfiguration) -> Self {
107        let mut v = self.pod_identity_configuration.unwrap_or_default();
108        v.push(input);
109        self.pod_identity_configuration = ::std::option::Option::Some(v);
110        self
111    }
112    /// <p>The Kubernetes service account name used by the add-on, and any suggested IAM policies. Use this information to create an IAM Role for the add-on.</p>
113    pub fn set_pod_identity_configuration(
114        mut self,
115        input: ::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>>,
116    ) -> Self {
117        self.pod_identity_configuration = input;
118        self
119    }
120    /// <p>The Kubernetes service account name used by the add-on, and any suggested IAM policies. Use this information to create an IAM Role for the add-on.</p>
121    pub fn get_pod_identity_configuration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>> {
122        &self.pod_identity_configuration
123    }
124    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
125        self._request_id = Some(request_id.into());
126        self
127    }
128
129    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
130        self._request_id = request_id;
131        self
132    }
133    /// Consumes the builder and constructs a [`DescribeAddonConfigurationOutput`](crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput).
134    pub fn build(self) -> crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput {
135        crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput {
136            addon_name: self.addon_name,
137            addon_version: self.addon_version,
138            configuration_schema: self.configuration_schema,
139            pod_identity_configuration: self.pod_identity_configuration,
140            _request_id: self._request_id,
141        }
142    }
143}