aws_sdk_elasticloadbalancingv2/operation/describe_rules/
_describe_rules_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct DescribeRulesInput {
6    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
7    pub listener_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The Amazon Resource Names (ARN) of the rules.</p>
9    pub rule_arns: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
10    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
11    pub marker: ::std::option::Option<::std::string::String>,
12    /// <p>The maximum number of results to return with this call.</p>
13    pub page_size: ::std::option::Option<i32>,
14}
15impl DescribeRulesInput {
16    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
17    pub fn listener_arn(&self) -> ::std::option::Option<&str> {
18        self.listener_arn.as_deref()
19    }
20    /// <p>The Amazon Resource Names (ARN) of the rules.</p>
21    ///
22    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.rule_arns.is_none()`.
23    pub fn rule_arns(&self) -> &[::std::string::String] {
24        self.rule_arns.as_deref().unwrap_or_default()
25    }
26    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
27    pub fn marker(&self) -> ::std::option::Option<&str> {
28        self.marker.as_deref()
29    }
30    /// <p>The maximum number of results to return with this call.</p>
31    pub fn page_size(&self) -> ::std::option::Option<i32> {
32        self.page_size
33    }
34}
35impl DescribeRulesInput {
36    /// Creates a new builder-style object to manufacture [`DescribeRulesInput`](crate::operation::describe_rules::DescribeRulesInput).
37    pub fn builder() -> crate::operation::describe_rules::builders::DescribeRulesInputBuilder {
38        crate::operation::describe_rules::builders::DescribeRulesInputBuilder::default()
39    }
40}
41
42/// A builder for [`DescribeRulesInput`](crate::operation::describe_rules::DescribeRulesInput).
43#[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    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
53    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    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
58    pub fn set_listener_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.listener_arn = input;
60        self
61    }
62    /// <p>The Amazon Resource Name (ARN) of the listener.</p>
63    pub fn get_listener_arn(&self) -> &::std::option::Option<::std::string::String> {
64        &self.listener_arn
65    }
66    /// Appends an item to `rule_arns`.
67    ///
68    /// To override the contents of this collection use [`set_rule_arns`](Self::set_rule_arns).
69    ///
70    /// <p>The Amazon Resource Names (ARN) of the rules.</p>
71    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    /// <p>The Amazon Resource Names (ARN) of the rules.</p>
78    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    /// <p>The Amazon Resource Names (ARN) of the rules.</p>
83    pub fn get_rule_arns(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
84        &self.rule_arns
85    }
86    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
87    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    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
92    pub fn set_marker(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
93        self.marker = input;
94        self
95    }
96    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
97    pub fn get_marker(&self) -> &::std::option::Option<::std::string::String> {
98        &self.marker
99    }
100    /// <p>The maximum number of results to return with this call.</p>
101    pub fn page_size(mut self, input: i32) -> Self {
102        self.page_size = ::std::option::Option::Some(input);
103        self
104    }
105    /// <p>The maximum number of results to return with this call.</p>
106    pub fn set_page_size(mut self, input: ::std::option::Option<i32>) -> Self {
107        self.page_size = input;
108        self
109    }
110    /// <p>The maximum number of results to return with this call.</p>
111    pub fn get_page_size(&self) -> &::std::option::Option<i32> {
112        &self.page_size
113    }
114    /// Consumes the builder and constructs a [`DescribeRulesInput`](crate::operation::describe_rules::DescribeRulesInput).
115    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}