#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PromoteInput {
pub broker_id: ::std::option::Option<::std::string::String>,
pub mode: ::std::option::Option<crate::types::PromoteMode>,
}
impl PromoteInput {
pub fn broker_id(&self) -> ::std::option::Option<&str> {
self.broker_id.as_deref()
}
pub fn mode(&self) -> ::std::option::Option<&crate::types::PromoteMode> {
self.mode.as_ref()
}
}
impl PromoteInput {
pub fn builder() -> crate::operation::promote::builders::PromoteInputBuilder {
crate::operation::promote::builders::PromoteInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PromoteInputBuilder {
pub(crate) broker_id: ::std::option::Option<::std::string::String>,
pub(crate) mode: ::std::option::Option<crate::types::PromoteMode>,
}
impl PromoteInputBuilder {
pub fn broker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.broker_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_broker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.broker_id = input;
self
}
pub fn get_broker_id(&self) -> &::std::option::Option<::std::string::String> {
&self.broker_id
}
pub fn mode(mut self, input: crate::types::PromoteMode) -> Self {
self.mode = ::std::option::Option::Some(input);
self
}
pub fn set_mode(mut self, input: ::std::option::Option<crate::types::PromoteMode>) -> Self {
self.mode = input;
self
}
pub fn get_mode(&self) -> &::std::option::Option<crate::types::PromoteMode> {
&self.mode
}
pub fn build(self) -> ::std::result::Result<crate::operation::promote::PromoteInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::promote::PromoteInput {
broker_id: self.broker_id,
mode: self.mode,
})
}
}