aws_sdk_elasticloadbalancingv2/operation/describe_rules/
_describe_rules_output.rs#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct DescribeRulesOutput {
pub rules: ::std::option::Option<::std::vec::Vec<crate::types::Rule>>,
pub next_marker: ::std::option::Option<::std::string::String>,
_request_id: Option<String>,
}
impl DescribeRulesOutput {
pub fn rules(&self) -> &[crate::types::Rule] {
self.rules.as_deref().unwrap_or_default()
}
pub fn next_marker(&self) -> ::std::option::Option<&str> {
self.next_marker.as_deref()
}
}
impl ::aws_types::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()
}
}
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
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 = ::std::option::Option::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 get_rules(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Rule>> {
&self.rules
}
pub fn next_marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.next_marker = ::std::option::Option::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 fn get_next_marker(&self) -> &::std::option::Option<::std::string::String> {
&self.next_marker
}
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,
}
}
}