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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>An object that represents an HTTP gateway route.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct HttpGatewayRoute {
    /// <p>An object that represents the criteria for determining a request match.</p>
    pub r#match: ::std::option::Option<crate::types::HttpGatewayRouteMatch>,
    /// <p>An object that represents the action to take if a match is determined.</p>
    pub action: ::std::option::Option<crate::types::HttpGatewayRouteAction>,
}
impl HttpGatewayRoute {
    /// <p>An object that represents the criteria for determining a request match.</p>
    pub fn r#match(&self) -> ::std::option::Option<&crate::types::HttpGatewayRouteMatch> {
        self.r#match.as_ref()
    }
    /// <p>An object that represents the action to take if a match is determined.</p>
    pub fn action(&self) -> ::std::option::Option<&crate::types::HttpGatewayRouteAction> {
        self.action.as_ref()
    }
}
impl HttpGatewayRoute {
    /// Creates a new builder-style object to manufacture [`HttpGatewayRoute`](crate::types::HttpGatewayRoute).
    pub fn builder() -> crate::types::builders::HttpGatewayRouteBuilder {
        crate::types::builders::HttpGatewayRouteBuilder::default()
    }
}

/// A builder for [`HttpGatewayRoute`](crate::types::HttpGatewayRoute).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct HttpGatewayRouteBuilder {
    pub(crate) r#match: ::std::option::Option<crate::types::HttpGatewayRouteMatch>,
    pub(crate) action: ::std::option::Option<crate::types::HttpGatewayRouteAction>,
}
impl HttpGatewayRouteBuilder {
    /// <p>An object that represents the criteria for determining a request match.</p>
    /// This field is required.
    pub fn r#match(mut self, input: crate::types::HttpGatewayRouteMatch) -> Self {
        self.r#match = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that represents the criteria for determining a request match.</p>
    pub fn set_match(mut self, input: ::std::option::Option<crate::types::HttpGatewayRouteMatch>) -> Self {
        self.r#match = input;
        self
    }
    /// <p>An object that represents the criteria for determining a request match.</p>
    pub fn get_match(&self) -> &::std::option::Option<crate::types::HttpGatewayRouteMatch> {
        &self.r#match
    }
    /// <p>An object that represents the action to take if a match is determined.</p>
    /// This field is required.
    pub fn action(mut self, input: crate::types::HttpGatewayRouteAction) -> Self {
        self.action = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that represents the action to take if a match is determined.</p>
    pub fn set_action(mut self, input: ::std::option::Option<crate::types::HttpGatewayRouteAction>) -> Self {
        self.action = input;
        self
    }
    /// <p>An object that represents the action to take if a match is determined.</p>
    pub fn get_action(&self) -> &::std::option::Option<crate::types::HttpGatewayRouteAction> {
        &self.action
    }
    /// Consumes the builder and constructs a [`HttpGatewayRoute`](crate::types::HttpGatewayRoute).
    pub fn build(self) -> crate::types::HttpGatewayRoute {
        crate::types::HttpGatewayRoute {
            r#match: self.r#match,
            action: self.action,
        }
    }
}