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 DescribeClusterVersionsInput {
    /// <p>The type of cluster to filter versions by.</p>
    pub cluster_type: ::std::option::Option<::std::string::String>,
    /// <p>Maximum number of results to return.</p>
    pub max_results: ::std::option::Option<i32>,
    /// <p>Pagination token for the next set of results.</p>
    pub next_token: ::std::option::Option<::std::string::String>,
    /// <p>Filter to show only default versions.</p>
    pub default_only: ::std::option::Option<bool>,
    /// <p>Include all available versions in the response.</p>
    pub include_all: ::std::option::Option<bool>,
    /// <p>List of specific cluster versions to describe.</p>
    pub cluster_versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <important>
    /// <p>This field is deprecated. Use <code>versionStatus</code> instead, as that field matches for input and output of this action.</p>
    /// </important>
    /// <p>Filter versions by their current status.</p>
    #[deprecated(note = "status has been replaced by versionStatus", since = "2025-02-15")]
    pub status: ::std::option::Option<crate::types::ClusterVersionStatus>,
    /// <p>Filter versions by their current status.</p>
    pub version_status: ::std::option::Option<crate::types::VersionStatus>,
}
impl DescribeClusterVersionsInput {
    /// <p>The type of cluster to filter versions by.</p>
    pub fn cluster_type(&self) -> ::std::option::Option<&str> {
        self.cluster_type.as_deref()
    }
    /// <p>Maximum number of results to return.</p>
    pub fn max_results(&self) -> ::std::option::Option<i32> {
        self.max_results
    }
    /// <p>Pagination token for the next set of results.</p>
    pub fn next_token(&self) -> ::std::option::Option<&str> {
        self.next_token.as_deref()
    }
    /// <p>Filter to show only default versions.</p>
    pub fn default_only(&self) -> ::std::option::Option<bool> {
        self.default_only
    }
    /// <p>Include all available versions in the response.</p>
    pub fn include_all(&self) -> ::std::option::Option<bool> {
        self.include_all
    }
    /// <p>List of specific cluster versions to describe.</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 `.cluster_versions.is_none()`.
    pub fn cluster_versions(&self) -> &[::std::string::String] {
        self.cluster_versions.as_deref().unwrap_or_default()
    }
    /// <important>
    /// <p>This field is deprecated. Use <code>versionStatus</code> instead, as that field matches for input and output of this action.</p>
    /// </important>
    /// <p>Filter versions by their current status.</p>
    #[deprecated(note = "status has been replaced by versionStatus", since = "2025-02-15")]
    pub fn status(&self) -> ::std::option::Option<&crate::types::ClusterVersionStatus> {
        self.status.as_ref()
    }
    /// <p>Filter versions by their current status.</p>
    pub fn version_status(&self) -> ::std::option::Option<&crate::types::VersionStatus> {
        self.version_status.as_ref()
    }
}
impl DescribeClusterVersionsInput {
    /// Creates a new builder-style object to manufacture [`DescribeClusterVersionsInput`](crate::operation::describe_cluster_versions::DescribeClusterVersionsInput).
    pub fn builder() -> crate::operation::describe_cluster_versions::builders::DescribeClusterVersionsInputBuilder {
        crate::operation::describe_cluster_versions::builders::DescribeClusterVersionsInputBuilder::default()
    }
}

/// A builder for [`DescribeClusterVersionsInput`](crate::operation::describe_cluster_versions::DescribeClusterVersionsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct DescribeClusterVersionsInputBuilder {
    pub(crate) cluster_type: ::std::option::Option<::std::string::String>,
    pub(crate) max_results: ::std::option::Option<i32>,
    pub(crate) next_token: ::std::option::Option<::std::string::String>,
    pub(crate) default_only: ::std::option::Option<bool>,
    pub(crate) include_all: ::std::option::Option<bool>,
    pub(crate) cluster_versions: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) status: ::std::option::Option<crate::types::ClusterVersionStatus>,
    pub(crate) version_status: ::std::option::Option<crate::types::VersionStatus>,
}
impl DescribeClusterVersionsInputBuilder {
    /// <p>The type of cluster to filter versions by.</p>
    pub fn cluster_type(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_type = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The type of cluster to filter versions by.</p>
    pub fn set_cluster_type(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_type = input;
        self
    }
    /// <p>The type of cluster to filter versions by.</p>
    pub fn get_cluster_type(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_type
    }
    /// <p>Maximum number of results to return.</p>
    pub fn max_results(mut self, input: i32) -> Self {
        self.max_results = ::std::option::Option::Some(input);
        self
    }
    /// <p>Maximum number of results to return.</p>
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.max_results = input;
        self
    }
    /// <p>Maximum number of results to return.</p>
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        &self.max_results
    }
    /// <p>Pagination token for the next set of results.</p>
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.next_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Pagination token for the next set of results.</p>
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.next_token = input;
        self
    }
    /// <p>Pagination token for the next set of results.</p>
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.next_token
    }
    /// <p>Filter to show only default versions.</p>
    pub fn default_only(mut self, input: bool) -> Self {
        self.default_only = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filter to show only default versions.</p>
    pub fn set_default_only(mut self, input: ::std::option::Option<bool>) -> Self {
        self.default_only = input;
        self
    }
    /// <p>Filter to show only default versions.</p>
    pub fn get_default_only(&self) -> &::std::option::Option<bool> {
        &self.default_only
    }
    /// <p>Include all available versions in the response.</p>
    pub fn include_all(mut self, input: bool) -> Self {
        self.include_all = ::std::option::Option::Some(input);
        self
    }
    /// <p>Include all available versions in the response.</p>
    pub fn set_include_all(mut self, input: ::std::option::Option<bool>) -> Self {
        self.include_all = input;
        self
    }
    /// <p>Include all available versions in the response.</p>
    pub fn get_include_all(&self) -> &::std::option::Option<bool> {
        &self.include_all
    }
    /// Appends an item to `cluster_versions`.
    ///
    /// To override the contents of this collection use [`set_cluster_versions`](Self::set_cluster_versions).
    ///
    /// <p>List of specific cluster versions to describe.</p>
    pub fn cluster_versions(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.cluster_versions.unwrap_or_default();
        v.push(input.into());
        self.cluster_versions = ::std::option::Option::Some(v);
        self
    }
    /// <p>List of specific cluster versions to describe.</p>
    pub fn set_cluster_versions(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.cluster_versions = input;
        self
    }
    /// <p>List of specific cluster versions to describe.</p>
    pub fn get_cluster_versions(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.cluster_versions
    }
    /// <important>
    /// <p>This field is deprecated. Use <code>versionStatus</code> instead, as that field matches for input and output of this action.</p>
    /// </important>
    /// <p>Filter versions by their current status.</p>
    #[deprecated(note = "status has been replaced by versionStatus", since = "2025-02-15")]
    pub fn status(mut self, input: crate::types::ClusterVersionStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <important>
    /// <p>This field is deprecated. Use <code>versionStatus</code> instead, as that field matches for input and output of this action.</p>
    /// </important>
    /// <p>Filter versions by their current status.</p>
    #[deprecated(note = "status has been replaced by versionStatus", since = "2025-02-15")]
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ClusterVersionStatus>) -> Self {
        self.status = input;
        self
    }
    /// <important>
    /// <p>This field is deprecated. Use <code>versionStatus</code> instead, as that field matches for input and output of this action.</p>
    /// </important>
    /// <p>Filter versions by their current status.</p>
    #[deprecated(note = "status has been replaced by versionStatus", since = "2025-02-15")]
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ClusterVersionStatus> {
        &self.status
    }
    /// <p>Filter versions by their current status.</p>
    pub fn version_status(mut self, input: crate::types::VersionStatus) -> Self {
        self.version_status = ::std::option::Option::Some(input);
        self
    }
    /// <p>Filter versions by their current status.</p>
    pub fn set_version_status(mut self, input: ::std::option::Option<crate::types::VersionStatus>) -> Self {
        self.version_status = input;
        self
    }
    /// <p>Filter versions by their current status.</p>
    pub fn get_version_status(&self) -> &::std::option::Option<crate::types::VersionStatus> {
        &self.version_status
    }
    /// Consumes the builder and constructs a [`DescribeClusterVersionsInput`](crate::operation::describe_cluster_versions::DescribeClusterVersionsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_cluster_versions::DescribeClusterVersionsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::describe_cluster_versions::DescribeClusterVersionsInput {
            cluster_type: self.cluster_type,
            max_results: self.max_results,
            next_token: self.next_token,
            default_only: self.default_only,
            include_all: self.include_all,
            cluster_versions: self.cluster_versions,
            status: self.status,
            version_status: self.version_status,
        })
    }
}