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.

/// <p>Describes an update request.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeUpdateInput {
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The ID of the update to describe.</p>
    pub update_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
    pub nodegroup_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>. This parameter is required if the update is an add-on update.</p>
    pub addon_name: ::std::option::Option<::std::string::String>,
    /// <p>The name of the capability for which you want to describe updates.</p>
    pub capability_name: ::std::option::Option<::std::string::String>,
}
impl DescribeUpdateInput {
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The ID of the update to describe.</p>
    pub fn update_id(&self) -> ::std::option::Option<&str> {
        self.update_id.as_deref()
    }
    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
    pub fn nodegroup_name(&self) -> ::std::option::Option<&str> {
        self.nodegroup_name.as_deref()
    }
    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>. This parameter is required if the update is an add-on update.</p>
    pub fn addon_name(&self) -> ::std::option::Option<&str> {
        self.addon_name.as_deref()
    }
    /// <p>The name of the capability for which you want to describe updates.</p>
    pub fn capability_name(&self) -> ::std::option::Option<&str> {
        self.capability_name.as_deref()
    }
}
impl DescribeUpdateInput {
    /// Creates a new builder-style object to manufacture [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
    pub fn builder() -> crate::operation::describe_update::builders::DescribeUpdateInputBuilder {
        crate::operation::describe_update::builders::DescribeUpdateInputBuilder::default()
    }
}

/// A builder for [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeUpdateInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) update_id: ::std::option::Option<::std::string::String>,
    pub(crate) nodegroup_name: ::std::option::Option<::std::string::String>,
    pub(crate) addon_name: ::std::option::Option<::std::string::String>,
    pub(crate) capability_name: ::std::option::Option<::std::string::String>,
}
impl DescribeUpdateInputBuilder {
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the Amazon EKS cluster associated with the update.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The ID of the update to describe.</p>
    /// This field is required.
    pub fn update_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.update_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ID of the update to describe.</p>
    pub fn set_update_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.update_id = input;
        self
    }
    /// <p>The ID of the update to describe.</p>
    pub fn get_update_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.update_id
    }
    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
    pub fn nodegroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.nodegroup_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
    pub fn set_nodegroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.nodegroup_name = input;
        self
    }
    /// <p>The name of the Amazon EKS node group associated with the update. This parameter is required if the update is a node group update.</p>
    pub fn get_nodegroup_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.nodegroup_name
    }
    /// <p>The name of the add-on. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>. This parameter is required if the update is an add-on update.</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. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>. This parameter is required if the update is an add-on update.</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. The name must match one of the names returned by <a href="https://docs.aws.amazon.com/eks/latest/APIReference/API_ListAddons.html"> <code>ListAddons</code> </a>. This parameter is required if the update is an add-on update.</p>
    pub fn get_addon_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.addon_name
    }
    /// <p>The name of the capability for which you want to describe updates.</p>
    pub fn capability_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.capability_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the capability for which you want to describe updates.</p>
    pub fn set_capability_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.capability_name = input;
        self
    }
    /// <p>The name of the capability for which you want to describe updates.</p>
    pub fn get_capability_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.capability_name
    }
    /// Consumes the builder and constructs a [`DescribeUpdateInput`](crate::operation::describe_update::DescribeUpdateInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::describe_update::DescribeUpdateInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::describe_update::DescribeUpdateInput {
            name: self.name,
            update_id: self.update_id,
            nodegroup_name: self.nodegroup_name,
            addon_name: self.addon_name,
            capability_name: self.capability_name,
        })
    }
}