aws_sdk_elasticloadbalancingv2/operation/describe_rules/
_describe_rules_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeRulesInput {
6 pub listener_arn: ::std::option::Option<::std::string::String>,
8 pub rule_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10 pub marker: ::std::option::Option<::std::string::String>,
12 pub page_size: ::std::option::Option<i32>,
14}
15impl DescribeRulesInput {
16 pub fn listener_arn(&self) -> ::std::option::Option<&str> {
18 self.listener_arn.as_deref()
19 }
20 pub fn rule_arns(&self) -> &[::std::string::String] {
24 self.rule_arns.as_deref().unwrap_or_default()
25 }
26 pub fn marker(&self) -> ::std::option::Option<&str> {
28 self.marker.as_deref()
29 }
30 pub fn page_size(&self) -> ::std::option::Option<i32> {
32 self.page_size
33 }
34}
35impl DescribeRulesInput {
36 pub fn builder() -> crate::operation::describe_rules::builders::DescribeRulesInputBuilder {
38 crate::operation::describe_rules::builders::DescribeRulesInputBuilder::default()
39 }
40}
41
42#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
44#[non_exhaustive]
45pub struct DescribeRulesInputBuilder {
46 pub(crate) listener_arn: ::std::option::Option<::std::string::String>,
47 pub(crate) rule_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
48 pub(crate) marker: ::std::option::Option<::std::string::String>,
49 pub(crate) page_size: ::std::option::Option<i32>,
50}
51impl DescribeRulesInputBuilder {
52 pub fn listener_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54 self.listener_arn = ::std::option::Option::Some(input.into());
55 self
56 }
57 pub fn set_listener_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59 self.listener_arn = input;
60 self
61 }
62 pub fn get_listener_arn(&self) -> &::std::option::Option<::std::string::String> {
64 &self.listener_arn
65 }
66 pub fn rule_arns(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
72 let mut v = self.rule_arns.unwrap_or_default();
73 v.push(input.into());
74 self.rule_arns = ::std::option::Option::Some(v);
75 self
76 }
77 pub fn set_rule_arns(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
79 self.rule_arns = input;
80 self
81 }
82 pub fn get_rule_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
84 &self.rule_arns
85 }
86 pub fn marker(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
88 self.marker = ::std::option::Option::Some(input.into());
89 self
90 }
91 pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93 self.marker = input;
94 self
95 }
96 pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
98 &self.marker
99 }
100 pub fn page_size(mut self, input: i32) -> Self {
102 self.page_size = ::std::option::Option::Some(input);
103 self
104 }
105 pub fn set_page_size(mut self, input: ::std::option::Option<i32>) -> Self {
107 self.page_size = input;
108 self
109 }
110 pub fn get_page_size(&self) -> &::std::option::Option<i32> {
112 &self.page_size
113 }
114 pub fn build(
116 self,
117 ) -> ::std::result::Result<crate::operation::describe_rules::DescribeRulesInput, ::aws_smithy_types::error::operation::BuildError> {
118 ::std::result::Result::Ok(crate::operation::describe_rules::DescribeRulesInput {
119 listener_arn: self.listener_arn,
120 rule_arns: self.rule_arns,
121 marker: self.marker,
122 page_size: self.page_size,
123 })
124 }
125}