#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DisableRuleInput {
#[doc(hidden)]
pub name: std::option::Option<std::string::String>,
#[doc(hidden)]
pub event_bus_name: std::option::Option<std::string::String>,
}
impl DisableRuleInput {
pub fn name(&self) -> std::option::Option<&str> {
self.name.as_deref()
}
pub fn event_bus_name(&self) -> std::option::Option<&str> {
self.event_bus_name.as_deref()
}
}
impl DisableRuleInput {
pub fn builder() -> crate::operation::disable_rule::builders::DisableRuleInputBuilder {
crate::operation::disable_rule::builders::DisableRuleInputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DisableRuleInputBuilder {
pub(crate) name: std::option::Option<std::string::String>,
pub(crate) event_bus_name: std::option::Option<std::string::String>,
}
impl DisableRuleInputBuilder {
pub fn name(mut self, input: impl Into<std::string::String>) -> Self {
self.name = Some(input.into());
self
}
pub fn set_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.name = input;
self
}
pub fn event_bus_name(mut self, input: impl Into<std::string::String>) -> Self {
self.event_bus_name = Some(input.into());
self
}
pub fn set_event_bus_name(mut self, input: std::option::Option<std::string::String>) -> Self {
self.event_bus_name = input;
self
}
pub fn build(
self,
) -> Result<
crate::operation::disable_rule::DisableRuleInput,
aws_smithy_http::operation::error::BuildError,
> {
Ok(crate::operation::disable_rule::DisableRuleInput {
name: self.name,
event_bus_name: self.event_bus_name,
})
}
}