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
119
120
121
122
123
124
125
126
127
128
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>These are custom parameter to be used when the target is an API Gateway REST APIs or EventBridge ApiDestinations.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct PipeTargetHttpParameters {
    /// <p>The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path wildcards ("*").</p>
    pub path_parameter_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub header_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    /// <p>The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub query_string_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl PipeTargetHttpParameters {
    /// <p>The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path wildcards ("*").</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.path_parameter_values.is_none()`.
    pub fn path_parameter_values(&self) -> &[::std::string::String] {
        self.path_parameter_values.as_deref().unwrap_or_default()
    }
    /// <p>The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn header_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.header_parameters.as_ref()
    }
    /// <p>The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn query_string_parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.query_string_parameters.as_ref()
    }
}
impl PipeTargetHttpParameters {
    /// Creates a new builder-style object to manufacture [`PipeTargetHttpParameters`](crate::types::PipeTargetHttpParameters).
    pub fn builder() -> crate::types::builders::PipeTargetHttpParametersBuilder {
        crate::types::builders::PipeTargetHttpParametersBuilder::default()
    }
}

/// A builder for [`PipeTargetHttpParameters`](crate::types::PipeTargetHttpParameters).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct PipeTargetHttpParametersBuilder {
    pub(crate) path_parameter_values: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) header_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    pub(crate) query_string_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl PipeTargetHttpParametersBuilder {
    /// Appends an item to `path_parameter_values`.
    ///
    /// To override the contents of this collection use [`set_path_parameter_values`](Self::set_path_parameter_values).
    ///
    /// <p>The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path wildcards ("*").</p>
    pub fn path_parameter_values(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.path_parameter_values.unwrap_or_default();
        v.push(input.into());
        self.path_parameter_values = ::std::option::Option::Some(v);
        self
    }
    /// <p>The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path wildcards ("*").</p>
    pub fn set_path_parameter_values(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.path_parameter_values = input;
        self
    }
    /// <p>The path parameter values to be used to populate API Gateway REST API or EventBridge ApiDestination path wildcards ("*").</p>
    pub fn get_path_parameter_values(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.path_parameter_values
    }
    /// Adds a key-value pair to `header_parameters`.
    ///
    /// To override the contents of this collection use [`set_header_parameters`](Self::set_header_parameters).
    ///
    /// <p>The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn header_parameters(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.header_parameters.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.header_parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn set_header_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.header_parameters = input;
        self
    }
    /// <p>The headers that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn get_header_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.header_parameters
    }
    /// Adds a key-value pair to `query_string_parameters`.
    ///
    /// To override the contents of this collection use [`set_query_string_parameters`](Self::set_query_string_parameters).
    ///
    /// <p>The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn query_string_parameters(
        mut self,
        k: impl ::std::convert::Into<::std::string::String>,
        v: impl ::std::convert::Into<::std::string::String>,
    ) -> Self {
        let mut hash_map = self.query_string_parameters.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.query_string_parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn set_query_string_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    ) -> Self {
        self.query_string_parameters = input;
        self
    }
    /// <p>The query string keys/values that need to be sent as part of request invoking the API Gateway REST API or EventBridge ApiDestination.</p>
    pub fn get_query_string_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.query_string_parameters
    }
    /// Consumes the builder and constructs a [`PipeTargetHttpParameters`](crate::types::PipeTargetHttpParameters).
    pub fn build(self) -> crate::types::PipeTargetHttpParameters {
        crate::types::PipeTargetHttpParameters {
            path_parameter_values: self.path_parameter_values,
            header_parameters: self.header_parameters,
            query_string_parameters: self.query_string_parameters,
        }
    }
}