12 13 | /// This client allows ergonomic access to Sample Query Protocol Service.
|
13 14 | /// Each method corresponds to an API defined in the service's Smithy model,
|
14 15 | /// and the request and response shapes are auto-generated from that same model.
|
15 16 | ///
|
16 17 | /// Client for calling Sample Query Protocol Service.
|
17 18 | ///
|
18 19 | /// ## Constructing a `Client`
|
19 20 | ///
|
20 21 | /// A `Client` requires a config in order to be constructed. With the default set of Cargo features,
|
21 22 | /// this config will only require an endpoint to produce a functioning client. However, some Smithy
|
22 23 | /// features will require additional configuration. For example, `@auth` requires some kind of identity
|
23 24 | /// or identity resolver to be configured. The config is used to customize various aspects of the client,
|
24 25 | /// such as:
|
25 26 | ///
|
26 27 | /// - [The underlying HTTP client](crate::config::Builder::http_client)
|
27 28 | /// - [Retries](crate::config::Builder::retry_config)
|
28 29 | /// - [Timeouts](crate::config::Builder::timeout_config)
|
29 30 | /// - [... and more](crate::config::Builder)
|
30 31 | ///
|
31 32 | /// Below is a minimal example of how to create a client:
|
77 78 | /// The panic message for each of these will have instructions on how to resolve them.
|
78 79 | #[track_caller]
|
79 80 | pub fn from_conf(conf: crate::Config) -> Self {
|
80 81 | let handle = Handle {
|
81 82 | conf: conf.clone(),
|
82 83 | runtime_plugins: crate::config::base_client_runtime_plugins(conf),
|
83 84 | };
|
84 85 | if let Err(err) = Self::validate_config(&handle) {
|
85 86 | panic!("Invalid client configuration: {err}");
|
86 87 | }
|
87 88 | Self {
|
88 89 | handle: ::std::sync::Arc::new(handle),
|
89 90 | }
|
90 91 | }
|
91 92 |
|
92 93 | /// Returns the client's configuration.
|
93 94 | pub fn config(&self) -> &crate::Config {
|
94 95 | &self.handle.conf
|
95 96 | }
|
96 97 |
|
97 98 | fn validate_config(handle: &Handle) -> ::std::result::Result<(), ::aws_smithy_runtime_api::box_error::BoxError> {
|
98 99 | let mut cfg = ::aws_smithy_types::config_bag::ConfigBag::base();
|
99 100 | handle
|
100 101 | .runtime_plugins
|
101 102 | .apply_client_configuration(&mut cfg)?
|
102 103 | .validate_base_client_config(&cfg)?;
|
103 104 | Ok(())
|
104 105 | }
|
105 106 | }
|
106 107 |
|
107 - | /// Operation customization and supporting types.
|
108 + | /// /* ClientRustModule.kt:161 */Operation customization and supporting types.
|
108 109 | ///
|
109 - | /// The underlying HTTP requests made during an operation can be customized
|
110 + | /// /* ClientRustModule.kt:170 */The underlying HTTP requests made during an operation can be customized
|
110 111 | /// by calling the `customize()` method on the builder returned from a client
|
111 112 | /// operation call. For example, this can be used to add an additional HTTP header:
|
112 113 | ///
|
113 114 | /// ```ignore
|
114 115 | /// # async fn wrapper() -> ::std::result::Result<(), aws_query::Error> {
|
115 116 | /// # let client: aws_query::Client = unimplemented!();
|
116 117 | /// use ::http::header::{HeaderName, HeaderValue};
|
117 118 | ///
|
118 119 | /// let result = client.datetime_offsets()
|
119 120 | /// .customize()
|
120 121 | /// .mutate_request(|req| {
|
121 122 | /// // Add `x-example-header` with value
|
122 123 | /// req.headers_mut()
|
123 124 | /// .insert(
|
124 125 | /// HeaderName::from_static("x-example-header"),
|
125 126 | /// HeaderValue::from_static("1"),
|
126 127 | /// );
|
127 128 | /// })
|
128 129 | /// .send()
|
129 130 | /// .await;
|
130 131 | /// # }
|
131 132 | /// ```
|
132 133 | pub mod customize;
|
133 134 |
|
135 + | /* RustModule.kt:172 */
|
134 136 | mod datetime_offsets;
|
135 137 |
|
138 + | /* RustModule.kt:172 */
|
136 139 | mod empty_input_and_empty_output;
|
137 140 |
|
141 + | /* RustModule.kt:172 */
|
138 142 | mod endpoint_operation;
|
139 143 |
|
144 + | /* RustModule.kt:172 */
|
140 145 | mod endpoint_with_host_label_operation;
|
141 146 |
|
147 + | /* RustModule.kt:172 */
|
142 148 | mod flattened_xml_map;
|
143 149 |
|
150 + | /* RustModule.kt:172 */
|
144 151 | mod flattened_xml_map_with_xml_name;
|
145 152 |
|
153 + | /* RustModule.kt:172 */
|
146 154 | mod flattened_xml_map_with_xml_namespace;
|
147 155 |
|
156 + | /* RustModule.kt:172 */
|
148 157 | mod fractional_seconds;
|
149 158 |
|
159 + | /* RustModule.kt:172 */
|
150 160 | mod greeting_with_errors;
|
151 161 |
|
162 + | /* RustModule.kt:172 */
|
152 163 | mod host_with_path_operation;
|
153 164 |
|
165 + | /* RustModule.kt:172 */
|
154 166 | mod ignores_wrapping_xml_name;
|
155 167 |
|
168 + | /* RustModule.kt:172 */
|
156 169 | mod nested_structures;
|
157 170 |
|
171 + | /* RustModule.kt:172 */
|
158 172 | mod no_input_and_no_output;
|
159 173 |
|
174 + | /* RustModule.kt:172 */
|
160 175 | mod no_input_and_output;
|
161 176 |
|
177 + | /* RustModule.kt:172 */
|
162 178 | mod put_with_content_encoding;
|
163 179 |
|
180 + | /* RustModule.kt:172 */
|
164 181 | mod query_idempotency_token_auto_fill;
|
165 182 |
|
183 + | /* RustModule.kt:172 */
|
166 184 | mod query_lists;
|
167 185 |
|
186 + | /* RustModule.kt:172 */
|
168 187 | mod query_maps;
|
169 188 |
|
189 + | /* RustModule.kt:172 */
|
170 190 | mod query_timestamps;
|
171 191 |
|
192 + | /* RustModule.kt:172 */
|
172 193 | mod recursive_xml_shapes;
|
173 194 |
|
195 + | /* RustModule.kt:172 */
|
174 196 | mod simple_input_params;
|
175 197 |
|
198 + | /* RustModule.kt:172 */
|
176 199 | mod simple_scalar_xml_properties;
|
177 200 |
|
201 + | /* RustModule.kt:172 */
|
178 202 | mod xml_blobs;
|
179 203 |
|
204 + | /* RustModule.kt:172 */
|
180 205 | mod xml_empty_blobs;
|
181 206 |
|
207 + | /* RustModule.kt:172 */
|
182 208 | mod xml_empty_lists;
|
183 209 |
|
210 + | /* RustModule.kt:172 */
|
184 211 | mod xml_empty_maps;
|
185 212 |
|
213 + | /* RustModule.kt:172 */
|
186 214 | mod xml_enums;
|
187 215 |
|
216 + | /* RustModule.kt:172 */
|
188 217 | mod xml_int_enums;
|
189 218 |
|
219 + | /* RustModule.kt:172 */
|
190 220 | mod xml_lists;
|
191 221 |
|
222 + | /* RustModule.kt:172 */
|
192 223 | mod xml_maps;
|
193 224 |
|
225 + | /* RustModule.kt:172 */
|
194 226 | mod xml_maps_xml_name;
|
195 227 |
|
228 + | /* RustModule.kt:172 */
|
196 229 | mod xml_namespaces;
|
197 230 |
|
231 + | /* RustModule.kt:172 */
|
198 232 | mod xml_timestamps;
|