Skip to main content

aws_sdk_networkfirewall/operation/start_flow_flush/
_start_flow_flush_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 StartFlowFlushInput {
6    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
7    pub firewall_arn: ::std::option::Option<::std::string::String>,
8    /// <p>The ID of the Availability Zone where the firewall is located. For example, <code>us-east-2a</code>.</p>
9    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
10    pub availability_zone: ::std::option::Option<::std::string::String>,
11    /// <p>The Amazon Resource Name (ARN) of a VPC endpoint association.</p>
12    pub vpc_endpoint_association_arn: ::std::option::Option<::std::string::String>,
13    /// <p>A unique identifier for the primary endpoint associated with a firewall.</p>
14    pub vpc_endpoint_id: ::std::option::Option<::std::string::String>,
15    /// <p>The reqested <code>FlowOperation</code> ignores flows with an age (in seconds) lower than <code>MinimumFlowAgeInSeconds</code>. You provide this for start commands.</p>
16    pub minimum_flow_age_in_seconds: ::std::option::Option<i32>,
17    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
18    pub flow_filters: ::std::option::Option<::std::vec::Vec<crate::types::FlowFilter>>,
19}
20impl StartFlowFlushInput {
21    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
22    pub fn firewall_arn(&self) -> ::std::option::Option<&str> {
23        self.firewall_arn.as_deref()
24    }
25    /// <p>The ID of the Availability Zone where the firewall is located. For example, <code>us-east-2a</code>.</p>
26    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
27    pub fn availability_zone(&self) -> ::std::option::Option<&str> {
28        self.availability_zone.as_deref()
29    }
30    /// <p>The Amazon Resource Name (ARN) of a VPC endpoint association.</p>
31    pub fn vpc_endpoint_association_arn(&self) -> ::std::option::Option<&str> {
32        self.vpc_endpoint_association_arn.as_deref()
33    }
34    /// <p>A unique identifier for the primary endpoint associated with a firewall.</p>
35    pub fn vpc_endpoint_id(&self) -> ::std::option::Option<&str> {
36        self.vpc_endpoint_id.as_deref()
37    }
38    /// <p>The reqested <code>FlowOperation</code> ignores flows with an age (in seconds) lower than <code>MinimumFlowAgeInSeconds</code>. You provide this for start commands.</p>
39    pub fn minimum_flow_age_in_seconds(&self) -> ::std::option::Option<i32> {
40        self.minimum_flow_age_in_seconds
41    }
42    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
43    ///
44    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.flow_filters.is_none()`.
45    pub fn flow_filters(&self) -> &[crate::types::FlowFilter] {
46        self.flow_filters.as_deref().unwrap_or_default()
47    }
48}
49impl StartFlowFlushInput {
50    /// Creates a new builder-style object to manufacture [`StartFlowFlushInput`](crate::operation::start_flow_flush::StartFlowFlushInput).
51    pub fn builder() -> crate::operation::start_flow_flush::builders::StartFlowFlushInputBuilder {
52        crate::operation::start_flow_flush::builders::StartFlowFlushInputBuilder::default()
53    }
54}
55
56/// A builder for [`StartFlowFlushInput`](crate::operation::start_flow_flush::StartFlowFlushInput).
57#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
58#[non_exhaustive]
59pub struct StartFlowFlushInputBuilder {
60    pub(crate) firewall_arn: ::std::option::Option<::std::string::String>,
61    pub(crate) availability_zone: ::std::option::Option<::std::string::String>,
62    pub(crate) vpc_endpoint_association_arn: ::std::option::Option<::std::string::String>,
63    pub(crate) vpc_endpoint_id: ::std::option::Option<::std::string::String>,
64    pub(crate) minimum_flow_age_in_seconds: ::std::option::Option<i32>,
65    pub(crate) flow_filters: ::std::option::Option<::std::vec::Vec<crate::types::FlowFilter>>,
66}
67impl StartFlowFlushInputBuilder {
68    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
69    /// This field is required.
70    pub fn firewall_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
71        self.firewall_arn = ::std::option::Option::Some(input.into());
72        self
73    }
74    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
75    pub fn set_firewall_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76        self.firewall_arn = input;
77        self
78    }
79    /// <p>The Amazon Resource Name (ARN) of the firewall.</p>
80    pub fn get_firewall_arn(&self) -> &::std::option::Option<::std::string::String> {
81        &self.firewall_arn
82    }
83    /// <p>The ID of the Availability Zone where the firewall is located. For example, <code>us-east-2a</code>.</p>
84    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
85    pub fn availability_zone(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
86        self.availability_zone = ::std::option::Option::Some(input.into());
87        self
88    }
89    /// <p>The ID of the Availability Zone where the firewall is located. For example, <code>us-east-2a</code>.</p>
90    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
91    pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92        self.availability_zone = input;
93        self
94    }
95    /// <p>The ID of the Availability Zone where the firewall is located. For example, <code>us-east-2a</code>.</p>
96    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
97    pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
98        &self.availability_zone
99    }
100    /// <p>The Amazon Resource Name (ARN) of a VPC endpoint association.</p>
101    pub fn vpc_endpoint_association_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
102        self.vpc_endpoint_association_arn = ::std::option::Option::Some(input.into());
103        self
104    }
105    /// <p>The Amazon Resource Name (ARN) of a VPC endpoint association.</p>
106    pub fn set_vpc_endpoint_association_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
107        self.vpc_endpoint_association_arn = input;
108        self
109    }
110    /// <p>The Amazon Resource Name (ARN) of a VPC endpoint association.</p>
111    pub fn get_vpc_endpoint_association_arn(&self) -> &::std::option::Option<::std::string::String> {
112        &self.vpc_endpoint_association_arn
113    }
114    /// <p>A unique identifier for the primary endpoint associated with a firewall.</p>
115    pub fn vpc_endpoint_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
116        self.vpc_endpoint_id = ::std::option::Option::Some(input.into());
117        self
118    }
119    /// <p>A unique identifier for the primary endpoint associated with a firewall.</p>
120    pub fn set_vpc_endpoint_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
121        self.vpc_endpoint_id = input;
122        self
123    }
124    /// <p>A unique identifier for the primary endpoint associated with a firewall.</p>
125    pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
126        &self.vpc_endpoint_id
127    }
128    /// <p>The reqested <code>FlowOperation</code> ignores flows with an age (in seconds) lower than <code>MinimumFlowAgeInSeconds</code>. You provide this for start commands.</p>
129    pub fn minimum_flow_age_in_seconds(mut self, input: i32) -> Self {
130        self.minimum_flow_age_in_seconds = ::std::option::Option::Some(input);
131        self
132    }
133    /// <p>The reqested <code>FlowOperation</code> ignores flows with an age (in seconds) lower than <code>MinimumFlowAgeInSeconds</code>. You provide this for start commands.</p>
134    pub fn set_minimum_flow_age_in_seconds(mut self, input: ::std::option::Option<i32>) -> Self {
135        self.minimum_flow_age_in_seconds = input;
136        self
137    }
138    /// <p>The reqested <code>FlowOperation</code> ignores flows with an age (in seconds) lower than <code>MinimumFlowAgeInSeconds</code>. You provide this for start commands.</p>
139    pub fn get_minimum_flow_age_in_seconds(&self) -> &::std::option::Option<i32> {
140        &self.minimum_flow_age_in_seconds
141    }
142    /// Appends an item to `flow_filters`.
143    ///
144    /// To override the contents of this collection use [`set_flow_filters`](Self::set_flow_filters).
145    ///
146    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
147    pub fn flow_filters(mut self, input: crate::types::FlowFilter) -> Self {
148        let mut v = self.flow_filters.unwrap_or_default();
149        v.push(input);
150        self.flow_filters = ::std::option::Option::Some(v);
151        self
152    }
153    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
154    pub fn set_flow_filters(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::FlowFilter>>) -> Self {
155        self.flow_filters = input;
156        self
157    }
158    /// <p>Defines the scope a flow operation. You can use up to 20 filters to configure a single flow operation.</p>
159    pub fn get_flow_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowFilter>> {
160        &self.flow_filters
161    }
162    /// Consumes the builder and constructs a [`StartFlowFlushInput`](crate::operation::start_flow_flush::StartFlowFlushInput).
163    pub fn build(
164        self,
165    ) -> ::std::result::Result<crate::operation::start_flow_flush::StartFlowFlushInput, ::aws_smithy_types::error::operation::BuildError> {
166        ::std::result::Result::Ok(crate::operation::start_flow_flush::StartFlowFlushInput {
167            firewall_arn: self.firewall_arn,
168            availability_zone: self.availability_zone,
169            vpc_endpoint_association_arn: self.vpc_endpoint_association_arn,
170            vpc_endpoint_id: self.vpc_endpoint_id,
171            minimum_flow_age_in_seconds: self.minimum_flow_age_in_seconds,
172            flow_filters: self.flow_filters,
173        })
174    }
175}