#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct CreateRuleGroupOutput {
pub rule_group: ::std::option::Option<crate::types::RuleGroup>,
pub change_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateRuleGroupOutput {
pub fn rule_group(&self) -> ::std::option::Option<&crate::types::RuleGroup> {
self.rule_group.as_ref()
}
pub fn change_token(&self) -> ::std::option::Option<&str> {
self.change_token.as_deref()
}
}
impl ::aws_types::request_id::RequestId for CreateRuleGroupOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl CreateRuleGroupOutput {
pub fn builder() -> crate::operation::create_rule_group::builders::CreateRuleGroupOutputBuilder {
crate::operation::create_rule_group::builders::CreateRuleGroupOutputBuilder::default()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct CreateRuleGroupOutputBuilder {
pub(crate) rule_group: ::std::option::Option<crate::types::RuleGroup>,
pub(crate) change_token: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl CreateRuleGroupOutputBuilder {
pub fn rule_group(mut self, input: crate::types::RuleGroup) -> Self {
self.rule_group = ::std::option::Option::Some(input);
self
}
pub fn set_rule_group(mut self, input: ::std::option::Option<crate::types::RuleGroup>) -> Self {
self.rule_group = input;
self
}
pub fn get_rule_group(&self) -> &::std::option::Option<crate::types::RuleGroup> {
&self.rule_group
}
pub fn change_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.change_token = ::std::option::Option::Some(input.into());
self
}
pub fn set_change_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.change_token = input;
self
}
pub fn get_change_token(&self) -> &::std::option::Option<::std::string::String> {
&self.change_token
}
pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
self._request_id = Some(request_id.into());
self
}
pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
self._request_id = request_id;
self
}
pub fn build(self) -> crate::operation::create_rule_group::CreateRuleGroupOutput {
crate::operation::create_rule_group::CreateRuleGroupOutput {
rule_group: self.rule_group,
change_token: self.change_token,
_request_id: self._request_id,
}
}
}