#[allow(missing_docs)] #[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::fmt::Debug)]
pub struct DescribeRulesOutput {
#[doc(hidden)]
pub rules: std::option::Option<std::vec::Vec<crate::types::Rule>>,
#[doc(hidden)]
pub next_marker: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl DescribeRulesOutput {
pub fn rules(&self) -> std::option::Option<&[crate::types::Rule]> {
self.rules.as_deref()
}
pub fn next_marker(&self) -> std::option::Option<&str> {
self.next_marker.as_deref()
}
}
impl aws_http::request_id::RequestId for DescribeRulesOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl DescribeRulesOutput {
pub fn builder() -> crate::operation::describe_rules::builders::DescribeRulesOutputBuilder {
crate::operation::describe_rules::builders::DescribeRulesOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(std::clone::Clone, std::cmp::PartialEq, std::default::Default, std::fmt::Debug)]
pub struct DescribeRulesOutputBuilder {
pub(crate) rules: std::option::Option<std::vec::Vec<crate::types::Rule>>,
pub(crate) next_marker: std::option::Option<std::string::String>,
_request_id: Option<String>,
}
impl DescribeRulesOutputBuilder {
pub fn rules(mut self, input: crate::types::Rule) -> Self {
let mut v = self.rules.unwrap_or_default();
v.push(input);
self.rules = Some(v);
self
}
pub fn set_rules(
mut self,
input: std::option::Option<std::vec::Vec<crate::types::Rule>>,
) -> Self {
self.rules = input;
self
}
pub fn next_marker(mut self, input: impl Into<std::string::String>) -> Self {
self.next_marker = Some(input.into());
self
}
pub fn set_next_marker(mut self, input: std::option::Option<std::string::String>) -> Self {
self.next_marker = input;
self
}
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::describe_rules::DescribeRulesOutput {
crate::operation::describe_rules::DescribeRulesOutput {
rules: self.rules,
next_marker: self.next_marker,
_request_id: self._request_id,
}
}
}