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

/// <p>An object that represents an HTTP or HTTP/2 route type.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct HttpRoute {
    /// <p>An object that represents the criteria for determining a request match.</p>
    pub r#match: ::std::option::Option<crate::types::HttpRouteMatch>,
    /// <p>An object that represents the action to take if a match is determined.</p>
    pub action: ::std::option::Option<crate::types::HttpRouteAction>,
    /// <p>An object that represents a retry policy.</p>
    pub retry_policy: ::std::option::Option<crate::types::HttpRetryPolicy>,
    /// <p>An object that represents types of timeouts.</p>
    pub timeout: ::std::option::Option<crate::types::HttpTimeout>,
}
impl HttpRoute {
    /// <p>An object that represents the criteria for determining a request match.</p>
    pub fn r#match(&self) -> ::std::option::Option<&crate::types::HttpRouteMatch> {
        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::HttpRouteAction> {
        self.action.as_ref()
    }
    /// <p>An object that represents a retry policy.</p>
    pub fn retry_policy(&self) -> ::std::option::Option<&crate::types::HttpRetryPolicy> {
        self.retry_policy.as_ref()
    }
    /// <p>An object that represents types of timeouts.</p>
    pub fn timeout(&self) -> ::std::option::Option<&crate::types::HttpTimeout> {
        self.timeout.as_ref()
    }
}
impl HttpRoute {
    /// Creates a new builder-style object to manufacture [`HttpRoute`](crate::types::HttpRoute).
    pub fn builder() -> crate::types::builders::HttpRouteBuilder {
        crate::types::builders::HttpRouteBuilder::default()
    }
}

/// A builder for [`HttpRoute`](crate::types::HttpRoute).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct HttpRouteBuilder {
    pub(crate) r#match: ::std::option::Option<crate::types::HttpRouteMatch>,
    pub(crate) action: ::std::option::Option<crate::types::HttpRouteAction>,
    pub(crate) retry_policy: ::std::option::Option<crate::types::HttpRetryPolicy>,
    pub(crate) timeout: ::std::option::Option<crate::types::HttpTimeout>,
}
impl HttpRouteBuilder {
    /// <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::HttpRouteMatch) -> 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::HttpRouteMatch>) -> 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::HttpRouteMatch> {
        &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::HttpRouteAction) -> 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::HttpRouteAction>) -> 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::HttpRouteAction> {
        &self.action
    }
    /// <p>An object that represents a retry policy.</p>
    pub fn retry_policy(mut self, input: crate::types::HttpRetryPolicy) -> Self {
        self.retry_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that represents a retry policy.</p>
    pub fn set_retry_policy(mut self, input: ::std::option::Option<crate::types::HttpRetryPolicy>) -> Self {
        self.retry_policy = input;
        self
    }
    /// <p>An object that represents a retry policy.</p>
    pub fn get_retry_policy(&self) -> &::std::option::Option<crate::types::HttpRetryPolicy> {
        &self.retry_policy
    }
    /// <p>An object that represents types of timeouts.</p>
    pub fn timeout(mut self, input: crate::types::HttpTimeout) -> Self {
        self.timeout = ::std::option::Option::Some(input);
        self
    }
    /// <p>An object that represents types of timeouts.</p>
    pub fn set_timeout(mut self, input: ::std::option::Option<crate::types::HttpTimeout>) -> Self {
        self.timeout = input;
        self
    }
    /// <p>An object that represents types of timeouts.</p>
    pub fn get_timeout(&self) -> &::std::option::Option<crate::types::HttpTimeout> {
        &self.timeout
    }
    /// Consumes the builder and constructs a [`HttpRoute`](crate::types::HttpRoute).
    pub fn build(self) -> crate::types::HttpRoute {
        crate::types::HttpRoute {
            r#match: self.r#match,
            action: self.action,
            retry_policy: self.retry_policy,
            timeout: self.timeout,
        }
    }
}