aws_sdk_kafka/operation/reboot_broker/
_reboot_broker_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct RebootBrokerInput {
7 pub broker_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
9 pub cluster_arn: ::std::option::Option<::std::string::String>,
11}
12impl RebootBrokerInput {
13 pub fn broker_ids(&self) -> &[::std::string::String] {
17 self.broker_ids.as_deref().unwrap_or_default()
18 }
19 pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
21 self.cluster_arn.as_deref()
22 }
23}
24impl RebootBrokerInput {
25 pub fn builder() -> crate::operation::reboot_broker::builders::RebootBrokerInputBuilder {
27 crate::operation::reboot_broker::builders::RebootBrokerInputBuilder::default()
28 }
29}
30
31#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
33#[non_exhaustive]
34pub struct RebootBrokerInputBuilder {
35 pub(crate) broker_ids: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
36 pub(crate) cluster_arn: ::std::option::Option<::std::string::String>,
37}
38impl RebootBrokerInputBuilder {
39 pub fn broker_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
45 let mut v = self.broker_ids.unwrap_or_default();
46 v.push(input.into());
47 self.broker_ids = ::std::option::Option::Some(v);
48 self
49 }
50 pub fn set_broker_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
52 self.broker_ids = input;
53 self
54 }
55 pub fn get_broker_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
57 &self.broker_ids
58 }
59 pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.cluster_arn = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.cluster_arn = input;
68 self
69 }
70 pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
72 &self.cluster_arn
73 }
74 pub fn build(
76 self,
77 ) -> ::std::result::Result<crate::operation::reboot_broker::RebootBrokerInput, ::aws_smithy_types::error::operation::BuildError> {
78 ::std::result::Result::Ok(crate::operation::reboot_broker::RebootBrokerInput {
79 broker_ids: self.broker_ids,
80 cluster_arn: self.cluster_arn,
81 })
82 }
83}