1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Describes a set of filters for a path analysis. Use path filters to scope the analysis when there can be multiple resulting paths.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PathRequestFilter {
    /// <p>The source IPv4 address.</p>
    pub source_address: ::std::option::Option<::std::string::String>,
    /// <p>The source port range.</p>
    pub source_port_range: ::std::option::Option<crate::types::RequestFilterPortRange>,
    /// <p>The destination IPv4 address.</p>
    pub destination_address: ::std::option::Option<::std::string::String>,
    /// <p>The destination port range.</p>
    pub destination_port_range: ::std::option::Option<crate::types::RequestFilterPortRange>,
}
impl PathRequestFilter {
    /// <p>The source IPv4 address.</p>
    pub fn source_address(&self) -> ::std::option::Option<&str> {
        self.source_address.as_deref()
    }
    /// <p>The source port range.</p>
    pub fn source_port_range(&self) -> ::std::option::Option<&crate::types::RequestFilterPortRange> {
        self.source_port_range.as_ref()
    }
    /// <p>The destination IPv4 address.</p>
    pub fn destination_address(&self) -> ::std::option::Option<&str> {
        self.destination_address.as_deref()
    }
    /// <p>The destination port range.</p>
    pub fn destination_port_range(&self) -> ::std::option::Option<&crate::types::RequestFilterPortRange> {
        self.destination_port_range.as_ref()
    }
}
impl PathRequestFilter {
    /// Creates a new builder-style object to manufacture [`PathRequestFilter`](crate::types::PathRequestFilter).
    pub fn builder() -> crate::types::builders::PathRequestFilterBuilder {
        crate::types::builders::PathRequestFilterBuilder::default()
    }
}

/// A builder for [`PathRequestFilter`](crate::types::PathRequestFilter).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PathRequestFilterBuilder {
    pub(crate) source_address: ::std::option::Option<::std::string::String>,
    pub(crate) source_port_range: ::std::option::Option<crate::types::RequestFilterPortRange>,
    pub(crate) destination_address: ::std::option::Option<::std::string::String>,
    pub(crate) destination_port_range: ::std::option::Option<crate::types::RequestFilterPortRange>,
}
impl PathRequestFilterBuilder {
    /// <p>The source IPv4 address.</p>
    pub fn source_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.source_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The source IPv4 address.</p>
    pub fn set_source_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.source_address = input;
        self
    }
    /// <p>The source IPv4 address.</p>
    pub fn get_source_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.source_address
    }
    /// <p>The source port range.</p>
    pub fn source_port_range(mut self, input: crate::types::RequestFilterPortRange) -> Self {
        self.source_port_range = ::std::option::Option::Some(input);
        self
    }
    /// <p>The source port range.</p>
    pub fn set_source_port_range(mut self, input: ::std::option::Option<crate::types::RequestFilterPortRange>) -> Self {
        self.source_port_range = input;
        self
    }
    /// <p>The source port range.</p>
    pub fn get_source_port_range(&self) -> &::std::option::Option<crate::types::RequestFilterPortRange> {
        &self.source_port_range
    }
    /// <p>The destination IPv4 address.</p>
    pub fn destination_address(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination_address = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The destination IPv4 address.</p>
    pub fn set_destination_address(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination_address = input;
        self
    }
    /// <p>The destination IPv4 address.</p>
    pub fn get_destination_address(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination_address
    }
    /// <p>The destination port range.</p>
    pub fn destination_port_range(mut self, input: crate::types::RequestFilterPortRange) -> Self {
        self.destination_port_range = ::std::option::Option::Some(input);
        self
    }
    /// <p>The destination port range.</p>
    pub fn set_destination_port_range(mut self, input: ::std::option::Option<crate::types::RequestFilterPortRange>) -> Self {
        self.destination_port_range = input;
        self
    }
    /// <p>The destination port range.</p>
    pub fn get_destination_port_range(&self) -> &::std::option::Option<crate::types::RequestFilterPortRange> {
        &self.destination_port_range
    }
    /// Consumes the builder and constructs a [`PathRequestFilter`](crate::types::PathRequestFilter).
    pub fn build(self) -> crate::types::PathRequestFilter {
        crate::types::PathRequestFilter {
            source_address: self.source_address,
            source_port_range: self.source_port_range,
            destination_address: self.destination_address,
            destination_port_range: self.destination_port_range,
        }
    }
}