aws-sdk-eks 1.128.0

AWS SDK for Amazon Elastic Kubernetes Service
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeAddonConfigurationOutput {
    /// <p>The name of the add-on.</p>
    pub addon_name: ::std::option::Option<::std::string::String>,
    /// <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>
    pub addon_version: ::std::option::Option<::std::string::String>,
    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
    pub configuration_schema: ::std::option::Option<::std::string::String>,
    /// <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>
    pub pod_identity_configuration: ::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>>,
    _request_id: Option<String>,
}
impl DescribeAddonConfigurationOutput {
    /// <p>The name of the add-on.</p>
    pub fn addon_name(&self) -> ::std::option::Option<&str> {
        self.addon_name.as_deref()
    }
    /// <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>
    pub fn addon_version(&self) -> ::std::option::Option<&str> {
        self.addon_version.as_deref()
    }
    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
    pub fn configuration_schema(&self) -> ::std::option::Option<&str> {
        self.configuration_schema.as_deref()
    }
    /// <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>
    ///
    /// 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()`.
    pub fn pod_identity_configuration(&self) -> &[crate::types::AddonPodIdentityConfiguration] {
        self.pod_identity_configuration.as_deref().unwrap_or_default()
    }
}
impl ::aws_types::request_id::RequestId for DescribeAddonConfigurationOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl DescribeAddonConfigurationOutput {
    /// Creates a new builder-style object to manufacture [`DescribeAddonConfigurationOutput`](crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput).
    pub fn builder() -> crate::operation::describe_addon_configuration::builders::DescribeAddonConfigurationOutputBuilder {
        crate::operation::describe_addon_configuration::builders::DescribeAddonConfigurationOutputBuilder::default()
    }
}

/// A builder for [`DescribeAddonConfigurationOutput`](crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeAddonConfigurationOutputBuilder {
    pub(crate) addon_name: ::std::option::Option<::std::string::String>,
    pub(crate) addon_version: ::std::option::Option<::std::string::String>,
    pub(crate) configuration_schema: ::std::option::Option<::std::string::String>,
    pub(crate) pod_identity_configuration: ::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>>,
    _request_id: Option<String>,
}
impl DescribeAddonConfigurationOutputBuilder {
    /// <p>The name of the add-on.</p>
    pub fn addon_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.addon_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the add-on.</p>
    pub fn set_addon_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.addon_name = input;
        self
    }
    /// <p>The name of the add-on.</p>
    pub fn get_addon_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.addon_name
    }
    /// <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>
    pub fn addon_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.addon_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_addon_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.addon_version = input;
        self
    }
    /// <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>
    pub fn get_addon_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.addon_version
    }
    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
    pub fn configuration_schema(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.configuration_schema = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
    pub fn set_configuration_schema(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.configuration_schema = input;
        self
    }
    /// <p>A JSON schema that's used to validate the configuration values you provide when an add-on is created or updated.</p>
    pub fn get_configuration_schema(&self) -> &::std::option::Option<::std::string::String> {
        &self.configuration_schema
    }
    /// Appends an item to `pod_identity_configuration`.
    ///
    /// To override the contents of this collection use [`set_pod_identity_configuration`](Self::set_pod_identity_configuration).
    ///
    /// <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>
    pub fn pod_identity_configuration(mut self, input: crate::types::AddonPodIdentityConfiguration) -> Self {
        let mut v = self.pod_identity_configuration.unwrap_or_default();
        v.push(input);
        self.pod_identity_configuration = ::std::option::Option::Some(v);
        self
    }
    /// <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>
    pub fn set_pod_identity_configuration(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>>,
    ) -> Self {
        self.pod_identity_configuration = input;
        self
    }
    /// <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>
    pub fn get_pod_identity_configuration(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AddonPodIdentityConfiguration>> {
        &self.pod_identity_configuration
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`DescribeAddonConfigurationOutput`](crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput).
    pub fn build(self) -> crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput {
        crate::operation::describe_addon_configuration::DescribeAddonConfigurationOutput {
            addon_name: self.addon_name,
            addon_version: self.addon_version,
            configuration_schema: self.configuration_schema,
            pod_identity_configuration: self.pod_identity_configuration,
            _request_id: self._request_id,
        }
    }
}