aws-sdk-kafka 1.126.0

AWS SDK for Managed Streaming for Kafka
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 UpdateBrokerCountInput {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>The version of cluster to update from. A successful operation will then generate a new version.</p>
    pub current_version: ::std::option::Option<::std::string::String>,
    /// <p>The number of broker nodes that you want the cluster to have after this operation completes successfully.</p>
    pub target_number_of_broker_nodes: ::std::option::Option<i32>,
}
impl UpdateBrokerCountInput {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
        self.cluster_arn.as_deref()
    }
    /// <p>The version of cluster to update from. A successful operation will then generate a new version.</p>
    pub fn current_version(&self) -> ::std::option::Option<&str> {
        self.current_version.as_deref()
    }
    /// <p>The number of broker nodes that you want the cluster to have after this operation completes successfully.</p>
    pub fn target_number_of_broker_nodes(&self) -> ::std::option::Option<i32> {
        self.target_number_of_broker_nodes
    }
}
impl UpdateBrokerCountInput {
    /// Creates a new builder-style object to manufacture [`UpdateBrokerCountInput`](crate::operation::update_broker_count::UpdateBrokerCountInput).
    pub fn builder() -> crate::operation::update_broker_count::builders::UpdateBrokerCountInputBuilder {
        crate::operation::update_broker_count::builders::UpdateBrokerCountInputBuilder::default()
    }
}

/// A builder for [`UpdateBrokerCountInput`](crate::operation::update_broker_count::UpdateBrokerCountInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateBrokerCountInputBuilder {
    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) current_version: ::std::option::Option<::std::string::String>,
    pub(crate) target_number_of_broker_nodes: ::std::option::Option<i32>,
}
impl UpdateBrokerCountInputBuilder {
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    /// This field is required.
    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) that uniquely identifies the cluster.</p>
    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_arn
    }
    /// <p>The version of cluster to update from. A successful operation will then generate a new version.</p>
    /// This field is required.
    pub fn current_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.current_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The version of cluster to update from. A successful operation will then generate a new version.</p>
    pub fn set_current_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.current_version = input;
        self
    }
    /// <p>The version of cluster to update from. A successful operation will then generate a new version.</p>
    pub fn get_current_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.current_version
    }
    /// <p>The number of broker nodes that you want the cluster to have after this operation completes successfully.</p>
    /// This field is required.
    pub fn target_number_of_broker_nodes(mut self, input: i32) -> Self {
        self.target_number_of_broker_nodes = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of broker nodes that you want the cluster to have after this operation completes successfully.</p>
    pub fn set_target_number_of_broker_nodes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.target_number_of_broker_nodes = input;
        self
    }
    /// <p>The number of broker nodes that you want the cluster to have after this operation completes successfully.</p>
    pub fn get_target_number_of_broker_nodes(&self) -> &::std::option::Option<i32> {
        &self.target_number_of_broker_nodes
    }
    /// Consumes the builder and constructs a [`UpdateBrokerCountInput`](crate::operation::update_broker_count::UpdateBrokerCountInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_broker_count::UpdateBrokerCountInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_broker_count::UpdateBrokerCountInput {
            cluster_arn: self.cluster_arn,
            current_version: self.current_version,
            target_number_of_broker_nodes: self.target_number_of_broker_nodes,
        })
    }
}