aws_sdk_networkfirewall/operation/start_flow_flush/
_start_flow_flush_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct StartFlowFlushInput {
6 pub firewall_arn: ::std::option::Option<::std::string::String>,
8 pub availability_zone: ::std::option::Option<::std::string::String>,
11 pub vpc_endpoint_association_arn: ::std::option::Option<::std::string::String>,
13 pub vpc_endpoint_id: ::std::option::Option<::std::string::String>,
15 pub minimum_flow_age_in_seconds: ::std::option::Option<i32>,
17 pub flow_filters: ::std::option::Option<::std::vec::Vec<crate::types::FlowFilter>>,
19}
20impl StartFlowFlushInput {
21 pub fn firewall_arn(&self) -> ::std::option::Option<&str> {
23 self.firewall_arn.as_deref()
24 }
25 pub fn availability_zone(&self) -> ::std::option::Option<&str> {
28 self.availability_zone.as_deref()
29 }
30 pub fn vpc_endpoint_association_arn(&self) -> ::std::option::Option<&str> {
32 self.vpc_endpoint_association_arn.as_deref()
33 }
34 pub fn vpc_endpoint_id(&self) -> ::std::option::Option<&str> {
36 self.vpc_endpoint_id.as_deref()
37 }
38 pub fn minimum_flow_age_in_seconds(&self) -> ::std::option::Option<i32> {
40 self.minimum_flow_age_in_seconds
41 }
42 pub fn flow_filters(&self) -> &[crate::types::FlowFilter] {
46 self.flow_filters.as_deref().unwrap_or_default()
47 }
48}
49impl StartFlowFlushInput {
50 pub fn builder() -> crate::operation::start_flow_flush::builders::StartFlowFlushInputBuilder {
52 crate::operation::start_flow_flush::builders::StartFlowFlushInputBuilder::default()
53 }
54}
55
56#[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 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 pub fn set_firewall_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
76 self.firewall_arn = input;
77 self
78 }
79 pub fn get_firewall_arn(&self) -> &::std::option::Option<::std::string::String> {
81 &self.firewall_arn
82 }
83 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 pub fn set_availability_zone(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
92 self.availability_zone = input;
93 self
94 }
95 pub fn get_availability_zone(&self) -> &::std::option::Option<::std::string::String> {
98 &self.availability_zone
99 }
100 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 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 pub fn get_vpc_endpoint_association_arn(&self) -> &::std::option::Option<::std::string::String> {
112 &self.vpc_endpoint_association_arn
113 }
114 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 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 pub fn get_vpc_endpoint_id(&self) -> &::std::option::Option<::std::string::String> {
126 &self.vpc_endpoint_id
127 }
128 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 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 pub fn get_minimum_flow_age_in_seconds(&self) -> &::std::option::Option<i32> {
140 &self.minimum_flow_age_in_seconds
141 }
142 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 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 pub fn get_flow_filters(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::FlowFilter>> {
160 &self.flow_filters
161 }
162 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}