aws_sdk_kafka/operation/update_rebalancing/
_update_rebalancing_input.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 UpdateRebalancingInput {
6    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
7    pub cluster_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The current version of the cluster.</p>
9    pub current_version: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies if intelligent rebalancing should be turned on for your cluster. The default intelligent rebalancing status is ACTIVE for all new MSK Provisioned clusters that you create with Express brokers.</p>
11    pub rebalancing: ::std::option::Option<crate::types::Rebalancing>,
12}
13impl UpdateRebalancingInput {
14    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
15    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
16        self.cluster_arn.as_deref()
17    }
18    /// <p>The current version of the cluster.</p>
19    pub fn current_version(&self) -> ::std::option::Option<&str> {
20        self.current_version.as_deref()
21    }
22    /// <p>Specifies if intelligent rebalancing should be turned on for your cluster. The default intelligent rebalancing status is ACTIVE for all new MSK Provisioned clusters that you create with Express brokers.</p>
23    pub fn rebalancing(&self) -> ::std::option::Option<&crate::types::Rebalancing> {
24        self.rebalancing.as_ref()
25    }
26}
27impl UpdateRebalancingInput {
28    /// Creates a new builder-style object to manufacture [`UpdateRebalancingInput`](crate::operation::update_rebalancing::UpdateRebalancingInput).
29    pub fn builder() -> crate::operation::update_rebalancing::builders::UpdateRebalancingInputBuilder {
30        crate::operation::update_rebalancing::builders::UpdateRebalancingInputBuilder::default()
31    }
32}
33
34/// A builder for [`UpdateRebalancingInput`](crate::operation::update_rebalancing::UpdateRebalancingInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct UpdateRebalancingInputBuilder {
38    pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
39    pub(crate) current_version: ::std::option::Option<::std::string::String>,
40    pub(crate) rebalancing: ::std::option::Option<crate::types::Rebalancing>,
41}
42impl UpdateRebalancingInputBuilder {
43    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
44    /// This field is required.
45    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46        self.cluster_arn = ::std::option::Option::Some(input.into());
47        self
48    }
49    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
50    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51        self.cluster_arn = input;
52        self
53    }
54    /// <p>The Amazon Resource Name (ARN) of the cluster.</p>
55    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
56        &self.cluster_arn
57    }
58    /// <p>The current version of the cluster.</p>
59    /// This field is required.
60    pub fn current_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
61        self.current_version = ::std::option::Option::Some(input.into());
62        self
63    }
64    /// <p>The current version of the cluster.</p>
65    pub fn set_current_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
66        self.current_version = input;
67        self
68    }
69    /// <p>The current version of the cluster.</p>
70    pub fn get_current_version(&self) -> &::std::option::Option<::std::string::String> {
71        &self.current_version
72    }
73    /// <p>Specifies if intelligent rebalancing should be turned on for your cluster. The default intelligent rebalancing status is ACTIVE for all new MSK Provisioned clusters that you create with Express brokers.</p>
74    /// This field is required.
75    pub fn rebalancing(mut self, input: crate::types::Rebalancing) -> Self {
76        self.rebalancing = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>Specifies if intelligent rebalancing should be turned on for your cluster. The default intelligent rebalancing status is ACTIVE for all new MSK Provisioned clusters that you create with Express brokers.</p>
80    pub fn set_rebalancing(mut self, input: ::std::option::Option<crate::types::Rebalancing>) -> Self {
81        self.rebalancing = input;
82        self
83    }
84    /// <p>Specifies if intelligent rebalancing should be turned on for your cluster. The default intelligent rebalancing status is ACTIVE for all new MSK Provisioned clusters that you create with Express brokers.</p>
85    pub fn get_rebalancing(&self) -> &::std::option::Option<crate::types::Rebalancing> {
86        &self.rebalancing
87    }
88    /// Consumes the builder and constructs a [`UpdateRebalancingInput`](crate::operation::update_rebalancing::UpdateRebalancingInput).
89    pub fn build(
90        self,
91    ) -> ::std::result::Result<crate::operation::update_rebalancing::UpdateRebalancingInput, ::aws_smithy_types::error::operation::BuildError> {
92        ::std::result::Result::Ok(crate::operation::update_rebalancing::UpdateRebalancingInput {
93            cluster_arn: self.cluster_arn,
94            current_version: self.current_version,
95            rebalancing: self.rebalancing,
96        })
97    }
98}