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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct SendApiAssetInput {
/// <p>The request body.</p>
pub body: ::std::option::Option<::std::string::String>,
/// <p>Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).</p>
pub query_string_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>Asset ID value for the API request.</p>
pub asset_id: ::std::option::Option<::std::string::String>,
/// <p>Data set ID value for the API request.</p>
pub data_set_id: ::std::option::Option<::std::string::String>,
/// <p>Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.</p>
pub request_headers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.</p>
pub method: ::std::option::Option<::std::string::String>,
/// <p>URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.</p>
pub path: ::std::option::Option<::std::string::String>,
/// <p>Revision ID value for the API request.</p>
pub revision_id: ::std::option::Option<::std::string::String>,
}
impl SendApiAssetInput {
/// <p>The request body.</p>
pub fn body(&self) -> ::std::option::Option<&str> {
self.body.as_deref()
}
/// <p>Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).</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()
}
/// <p>Asset ID value for the API request.</p>
pub fn asset_id(&self) -> ::std::option::Option<&str> {
self.asset_id.as_deref()
}
/// <p>Data set ID value for the API request.</p>
pub fn data_set_id(&self) -> ::std::option::Option<&str> {
self.data_set_id.as_deref()
}
/// <p>Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.</p>
pub fn request_headers(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.request_headers.as_ref()
}
/// <p>HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.</p>
pub fn method(&self) -> ::std::option::Option<&str> {
self.method.as_deref()
}
/// <p>URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.</p>
pub fn path(&self) -> ::std::option::Option<&str> {
self.path.as_deref()
}
/// <p>Revision ID value for the API request.</p>
pub fn revision_id(&self) -> ::std::option::Option<&str> {
self.revision_id.as_deref()
}
}
impl SendApiAssetInput {
/// Creates a new builder-style object to manufacture [`SendApiAssetInput`](crate::operation::send_api_asset::SendApiAssetInput).
pub fn builder() -> crate::operation::send_api_asset::builders::SendApiAssetInputBuilder {
crate::operation::send_api_asset::builders::SendApiAssetInputBuilder::default()
}
}
/// A builder for [`SendApiAssetInput`](crate::operation::send_api_asset::SendApiAssetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct SendApiAssetInputBuilder {
pub(crate) body: ::std::option::Option<::std::string::String>,
pub(crate) query_string_parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) asset_id: ::std::option::Option<::std::string::String>,
pub(crate) data_set_id: ::std::option::Option<::std::string::String>,
pub(crate) request_headers: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) method: ::std::option::Option<::std::string::String>,
pub(crate) path: ::std::option::Option<::std::string::String>,
pub(crate) revision_id: ::std::option::Option<::std::string::String>,
}
impl SendApiAssetInputBuilder {
/// <p>The request body.</p>
pub fn body(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.body = ::std::option::Option::Some(input.into());
self
}
/// <p>The request body.</p>
pub fn set_body(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.body = input;
self
}
/// <p>The request body.</p>
pub fn get_body(&self) -> &::std::option::Option<::std::string::String> {
&self.body
}
/// 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>Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).</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>Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).</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>Attach query string parameters to the end of the URI (for example, /v1/examplePath?exampleParam=exampleValue).</p>
pub fn get_query_string_parameters(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.query_string_parameters
}
/// <p>Asset ID value for the API request.</p>
/// This field is required.
pub fn asset_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.asset_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Asset ID value for the API request.</p>
pub fn set_asset_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.asset_id = input;
self
}
/// <p>Asset ID value for the API request.</p>
pub fn get_asset_id(&self) -> &::std::option::Option<::std::string::String> {
&self.asset_id
}
/// <p>Data set ID value for the API request.</p>
/// This field is required.
pub fn data_set_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.data_set_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Data set ID value for the API request.</p>
pub fn set_data_set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.data_set_id = input;
self
}
/// <p>Data set ID value for the API request.</p>
pub fn get_data_set_id(&self) -> &::std::option::Option<::std::string::String> {
&self.data_set_id
}
/// Adds a key-value pair to `request_headers`.
///
/// To override the contents of this collection use [`set_request_headers`](Self::set_request_headers).
///
/// <p>Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.</p>
pub fn request_headers(
mut self,
k: impl ::std::convert::Into<::std::string::String>,
v: impl ::std::convert::Into<::std::string::String>,
) -> Self {
let mut hash_map = self.request_headers.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.request_headers = ::std::option::Option::Some(hash_map);
self
}
/// <p>Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.</p>
pub fn set_request_headers(
mut self,
input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
) -> Self {
self.request_headers = input;
self
}
/// <p>Any header value prefixed with x-amzn-dataexchange-header- will have that stripped before sending the Asset API request. Use this when you want to override a header that AWS Data Exchange uses. Alternatively, you can use the header without a prefix to the HTTP request.</p>
pub fn get_request_headers(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.request_headers
}
/// <p>HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.</p>
pub fn method(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.method = ::std::option::Option::Some(input.into());
self
}
/// <p>HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.</p>
pub fn set_method(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.method = input;
self
}
/// <p>HTTP method value for the API request. Alternatively, you can use the appropriate verb in your request.</p>
pub fn get_method(&self) -> &::std::option::Option<::std::string::String> {
&self.method
}
/// <p>URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.</p>
pub fn path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.path = ::std::option::Option::Some(input.into());
self
}
/// <p>URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.</p>
pub fn set_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.path = input;
self
}
/// <p>URI path value for the API request. Alternatively, you can set the URI path directly by invoking /v1/{pathValue}.</p>
pub fn get_path(&self) -> &::std::option::Option<::std::string::String> {
&self.path
}
/// <p>Revision ID value for the API request.</p>
/// This field is required.
pub fn revision_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.revision_id = ::std::option::Option::Some(input.into());
self
}
/// <p>Revision ID value for the API request.</p>
pub fn set_revision_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.revision_id = input;
self
}
/// <p>Revision ID value for the API request.</p>
pub fn get_revision_id(&self) -> &::std::option::Option<::std::string::String> {
&self.revision_id
}
/// Consumes the builder and constructs a [`SendApiAssetInput`](crate::operation::send_api_asset::SendApiAssetInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::send_api_asset::SendApiAssetInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::send_api_asset::SendApiAssetInput {
body: self.body,
query_string_parameters: self.query_string_parameters,
asset_id: self.asset_id,
data_set_id: self.data_set_id,
request_headers: self.request_headers,
method: self.method,
path: self.path,
revision_id: self.revision_id,
})
}
}