aws_sdk_s3/config/endpoint/
internals.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(
3    clippy::collapsible_if,
4    clippy::bool_comparison,
5    clippy::nonminimal_bool,
6    clippy::comparison_to_empty,
7    clippy::redundant_pattern_matching,
8    clippy::useless_asref
9)]
10pub(super) fn resolve_endpoint(
11    _params: &crate::config::endpoint::Params,
12    _diagnostic_collector: &mut crate::endpoint_lib::diagnostic::DiagnosticCollector,
13    partition_resolver: &crate::endpoint_lib::partition::PartitionResolver,
14) -> ::aws_smithy_http::endpoint::Result {
15    #[allow(unused_variables)]
16    let bucket = &_params.bucket;
17    #[allow(unused_variables)]
18    let region = &_params.region;
19    #[allow(unused_variables)]
20    let use_fips = &_params.use_fips;
21    #[allow(unused_variables)]
22    let use_dual_stack = &_params.use_dual_stack;
23    #[allow(unused_variables)]
24    let endpoint = &_params.endpoint;
25    #[allow(unused_variables)]
26    let force_path_style = &_params.force_path_style;
27    #[allow(unused_variables)]
28    let accelerate = &_params.accelerate;
29    #[allow(unused_variables)]
30    let use_global_endpoint = &_params.use_global_endpoint;
31    #[allow(unused_variables)]
32    let use_object_lambda_endpoint = &_params.use_object_lambda_endpoint;
33    #[allow(unused_variables)]
34    let key = &_params.key;
35    #[allow(unused_variables)]
36    let prefix = &_params.prefix;
37    #[allow(unused_variables)]
38    let copy_source = &_params.copy_source;
39    #[allow(unused_variables)]
40    let disable_access_points = &_params.disable_access_points;
41    #[allow(unused_variables)]
42    let disable_multi_region_access_points = &_params.disable_multi_region_access_points;
43    #[allow(unused_variables)]
44    let use_arn_region = &_params.use_arn_region;
45    #[allow(unused_variables)]
46    let use_s3_express_control_endpoint = &_params.use_s3_express_control_endpoint;
47    #[allow(unused_variables)]
48    let disable_s3_express_session_auth = &_params.disable_s3_express_session_auth;
49    #[allow(unused_variables)]
50    if let Some(region) = region {
51        if (*accelerate) == (true) {
52            if (*use_fips) == (true) {
53                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
54                    "Accelerate cannot be used with FIPS".to_string(),
55                ));
56            }
57        }
58        if (*use_dual_stack) == (true) {
59            #[allow(unused_variables)]
60            if let Some(endpoint) = endpoint {
61                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
62                    "Cannot set dual-stack in combination with a custom endpoint.".to_string(),
63                ));
64            }
65        }
66        #[allow(unused_variables)]
67        if let Some(endpoint) = endpoint {
68            if (*use_fips) == (true) {
69                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
70                    "A custom endpoint cannot be combined with FIPS".to_string(),
71                ));
72            }
73        }
74        #[allow(unused_variables)]
75        if let Some(endpoint) = endpoint {
76            if (*accelerate) == (true) {
77                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
78                    "A custom endpoint cannot be combined with S3 Accelerate".to_string(),
79                ));
80            }
81        }
82        if (*use_fips) == (true) {
83            #[allow(unused_variables)]
84            if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
85                if (partition_result.name()) == ("aws-cn") {
86                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
87                        "Partition does not support FIPS".to_string(),
88                    ));
89                }
90            }
91        }
92        #[allow(unused_variables)]
93        if let Some(bucket) = bucket {
94            #[allow(unused_variables)]
95            if let Some(bucket_suffix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 6, true, _diagnostic_collector) {
96                if (bucket_suffix.as_ref() as &str) == ("--x-s3") {
97                    if (*use_dual_stack) == (true) {
98                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
99                            "S3Express does not support Dual-stack.".to_string(),
100                        ));
101                    }
102                    if (*accelerate) == (true) {
103                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
104                            "S3Express does not support S3 Accelerate.".to_string(),
105                        ));
106                    }
107                    #[allow(unused_variables)]
108                    if let Some(endpoint) = endpoint {
109                        #[allow(unused_variables)]
110                        if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
111                            #[allow(unused_variables)]
112                            if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
113                                if (*disable_s3_express_session_auth) == (true) {
114                                    if (url.is_ip()) == (true) {
115                                        let uri_encoded_bucket =
116                                            crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
117                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
118                                            .url({
119                                                let mut out = String::new();
120                                                #[allow(clippy::needless_borrow)]
121                                                out.push_str(&url.scheme());
122                                                out.push_str("://");
123                                                #[allow(clippy::needless_borrow)]
124                                                out.push_str(&url.authority());
125                                                out.push('/');
126                                                #[allow(clippy::needless_borrow)]
127                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
128                                                #[allow(clippy::needless_borrow)]
129                                                out.push_str(&url.path());
130                                                out
131                                            })
132                                            .property("backend", "S3Express".to_string())
133                                            .property(
134                                                "authSchemes",
135                                                vec![::aws_smithy_types::Document::from({
136                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
137                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
138                                                    out.insert("name".to_string(), "sigv4".to_string().into());
139                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
140                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
141                                                    out
142                                                })],
143                                            )
144                                            .build());
145                                    }
146                                    if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
147                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
148                                            .url({
149                                                let mut out = String::new();
150                                                #[allow(clippy::needless_borrow)]
151                                                out.push_str(&url.scheme());
152                                                out.push_str("://");
153                                                #[allow(clippy::needless_borrow)]
154                                                out.push_str(&bucket.as_ref() as &str);
155                                                out.push('.');
156                                                #[allow(clippy::needless_borrow)]
157                                                out.push_str(&url.authority());
158                                                #[allow(clippy::needless_borrow)]
159                                                out.push_str(&url.path());
160                                                out
161                                            })
162                                            .property("backend", "S3Express".to_string())
163                                            .property(
164                                                "authSchemes",
165                                                vec![::aws_smithy_types::Document::from({
166                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
167                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
168                                                    out.insert("name".to_string(), "sigv4".to_string().into());
169                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
170                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
171                                                    out
172                                                })],
173                                            )
174                                            .build());
175                                    }
176                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
177                                        "S3Express bucket name is not a valid virtual hostable name.".to_string(),
178                                    ));
179                                }
180                            }
181                            if (url.is_ip()) == (true) {
182                                let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
183                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
184                                    .url({
185                                        let mut out = String::new();
186                                        #[allow(clippy::needless_borrow)]
187                                        out.push_str(&url.scheme());
188                                        out.push_str("://");
189                                        #[allow(clippy::needless_borrow)]
190                                        out.push_str(&url.authority());
191                                        out.push('/');
192                                        #[allow(clippy::needless_borrow)]
193                                        out.push_str(&uri_encoded_bucket.as_ref() as &str);
194                                        #[allow(clippy::needless_borrow)]
195                                        out.push_str(&url.path());
196                                        out
197                                    })
198                                    .property("backend", "S3Express".to_string())
199                                    .property(
200                                        "authSchemes",
201                                        vec![::aws_smithy_types::Document::from({
202                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
203                                            out.insert("disableDoubleEncoding".to_string(), true.into());
204                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
205                                            out.insert("signingName".to_string(), "s3express".to_string().into());
206                                            out.insert("signingRegion".to_string(), region.to_owned().into());
207                                            out
208                                        })],
209                                    )
210                                    .build());
211                            }
212                            if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
213                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
214                                    .url({
215                                        let mut out = String::new();
216                                        #[allow(clippy::needless_borrow)]
217                                        out.push_str(&url.scheme());
218                                        out.push_str("://");
219                                        #[allow(clippy::needless_borrow)]
220                                        out.push_str(&bucket.as_ref() as &str);
221                                        out.push('.');
222                                        #[allow(clippy::needless_borrow)]
223                                        out.push_str(&url.authority());
224                                        #[allow(clippy::needless_borrow)]
225                                        out.push_str(&url.path());
226                                        out
227                                    })
228                                    .property("backend", "S3Express".to_string())
229                                    .property(
230                                        "authSchemes",
231                                        vec![::aws_smithy_types::Document::from({
232                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
233                                            out.insert("disableDoubleEncoding".to_string(), true.into());
234                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
235                                            out.insert("signingName".to_string(), "s3express".to_string().into());
236                                            out.insert("signingRegion".to_string(), region.to_owned().into());
237                                            out
238                                        })],
239                                    )
240                                    .build());
241                            }
242                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
243                                "S3Express bucket name is not a valid virtual hostable name.".to_string(),
244                            ));
245                        }
246                    }
247                    #[allow(unused_variables)]
248                    if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
249                        if (*use_s3_express_control_endpoint) == (true) {
250                            let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
251                            if !(endpoint.is_some()) {
252                                if (*use_fips) == (true) {
253                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
254                                        .url({
255                                            let mut out = String::new();
256                                            out.push_str("https://s3express-control-fips.");
257                                            #[allow(clippy::needless_borrow)]
258                                            out.push_str(&region.as_ref() as &str);
259                                            out.push_str(".amazonaws.com/");
260                                            #[allow(clippy::needless_borrow)]
261                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
262                                            out
263                                        })
264                                        .property("backend", "S3Express".to_string())
265                                        .property(
266                                            "authSchemes",
267                                            vec![::aws_smithy_types::Document::from({
268                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
269                                                out.insert("disableDoubleEncoding".to_string(), true.into());
270                                                out.insert("name".to_string(), "sigv4".to_string().into());
271                                                out.insert("signingName".to_string(), "s3express".to_string().into());
272                                                out.insert("signingRegion".to_string(), region.to_owned().into());
273                                                out
274                                            })],
275                                        )
276                                        .build());
277                                }
278                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
279                                    .url({
280                                        let mut out = String::new();
281                                        out.push_str("https://s3express-control.");
282                                        #[allow(clippy::needless_borrow)]
283                                        out.push_str(&region.as_ref() as &str);
284                                        out.push_str(".amazonaws.com/");
285                                        #[allow(clippy::needless_borrow)]
286                                        out.push_str(&uri_encoded_bucket.as_ref() as &str);
287                                        out
288                                    })
289                                    .property("backend", "S3Express".to_string())
290                                    .property(
291                                        "authSchemes",
292                                        vec![::aws_smithy_types::Document::from({
293                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
294                                            out.insert("disableDoubleEncoding".to_string(), true.into());
295                                            out.insert("name".to_string(), "sigv4".to_string().into());
296                                            out.insert("signingName".to_string(), "s3express".to_string().into());
297                                            out.insert("signingRegion".to_string(), region.to_owned().into());
298                                            out
299                                        })],
300                                    )
301                                    .build());
302                            }
303                            #[allow(unreachable_code)]
304                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
305                                "No rules matched these parameters. This is a bug. {:?}",
306                                _params
307                            )));
308                        }
309                    }
310                    if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
311                        #[allow(unused_variables)]
312                        if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
313                            if (*disable_s3_express_session_auth) == (true) {
314                                #[allow(unused_variables)]
315                                if let Some(s3express_availability_zone_id) =
316                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 14, true, _diagnostic_collector)
317                                {
318                                    #[allow(unused_variables)]
319                                    if let Some(s3express_availability_zone_delim) =
320                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 14, 16, true, _diagnostic_collector)
321                                    {
322                                        if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
323                                            if (*use_fips) == (true) {
324                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
325                                                    .url({
326                                                        let mut out = String::new();
327                                                        out.push_str("https://");
328                                                        #[allow(clippy::needless_borrow)]
329                                                        out.push_str(&bucket.as_ref() as &str);
330                                                        out.push_str(".s3express-fips-");
331                                                        #[allow(clippy::needless_borrow)]
332                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
333                                                        out.push('.');
334                                                        #[allow(clippy::needless_borrow)]
335                                                        out.push_str(&region.as_ref() as &str);
336                                                        out.push_str(".amazonaws.com");
337                                                        out
338                                                    })
339                                                    .property("backend", "S3Express".to_string())
340                                                    .property(
341                                                        "authSchemes",
342                                                        vec![::aws_smithy_types::Document::from({
343                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
344                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
345                                                            out.insert("name".to_string(), "sigv4".to_string().into());
346                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
347                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
348                                                            out
349                                                        })],
350                                                    )
351                                                    .build());
352                                            }
353                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
354                                                .url({
355                                                    let mut out = String::new();
356                                                    out.push_str("https://");
357                                                    #[allow(clippy::needless_borrow)]
358                                                    out.push_str(&bucket.as_ref() as &str);
359                                                    out.push_str(".s3express-");
360                                                    #[allow(clippy::needless_borrow)]
361                                                    out.push_str(&s3express_availability_zone_id.as_ref() as &str);
362                                                    out.push('.');
363                                                    #[allow(clippy::needless_borrow)]
364                                                    out.push_str(&region.as_ref() as &str);
365                                                    out.push_str(".amazonaws.com");
366                                                    out
367                                                })
368                                                .property("backend", "S3Express".to_string())
369                                                .property(
370                                                    "authSchemes",
371                                                    vec![::aws_smithy_types::Document::from({
372                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
373                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
374                                                        out.insert("name".to_string(), "sigv4".to_string().into());
375                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
376                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
377                                                        out
378                                                    })],
379                                                )
380                                                .build());
381                                        }
382                                    }
383                                }
384                                #[allow(unused_variables)]
385                                if let Some(s3express_availability_zone_id) =
386                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 15, true, _diagnostic_collector)
387                                {
388                                    #[allow(unused_variables)]
389                                    if let Some(s3express_availability_zone_delim) =
390                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
391                                    {
392                                        if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
393                                            if (*use_fips) == (true) {
394                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
395                                                    .url({
396                                                        let mut out = String::new();
397                                                        out.push_str("https://");
398                                                        #[allow(clippy::needless_borrow)]
399                                                        out.push_str(&bucket.as_ref() as &str);
400                                                        out.push_str(".s3express-fips-");
401                                                        #[allow(clippy::needless_borrow)]
402                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
403                                                        out.push('.');
404                                                        #[allow(clippy::needless_borrow)]
405                                                        out.push_str(&region.as_ref() as &str);
406                                                        out.push_str(".amazonaws.com");
407                                                        out
408                                                    })
409                                                    .property("backend", "S3Express".to_string())
410                                                    .property(
411                                                        "authSchemes",
412                                                        vec![::aws_smithy_types::Document::from({
413                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
414                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
415                                                            out.insert("name".to_string(), "sigv4".to_string().into());
416                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
417                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
418                                                            out
419                                                        })],
420                                                    )
421                                                    .build());
422                                            }
423                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
424                                                .url({
425                                                    let mut out = String::new();
426                                                    out.push_str("https://");
427                                                    #[allow(clippy::needless_borrow)]
428                                                    out.push_str(&bucket.as_ref() as &str);
429                                                    out.push_str(".s3express-");
430                                                    #[allow(clippy::needless_borrow)]
431                                                    out.push_str(&s3express_availability_zone_id.as_ref() as &str);
432                                                    out.push('.');
433                                                    #[allow(clippy::needless_borrow)]
434                                                    out.push_str(&region.as_ref() as &str);
435                                                    out.push_str(".amazonaws.com");
436                                                    out
437                                                })
438                                                .property("backend", "S3Express".to_string())
439                                                .property(
440                                                    "authSchemes",
441                                                    vec![::aws_smithy_types::Document::from({
442                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
443                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
444                                                        out.insert("name".to_string(), "sigv4".to_string().into());
445                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
446                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
447                                                        out
448                                                    })],
449                                                )
450                                                .build());
451                                        }
452                                    }
453                                }
454                                #[allow(unused_variables)]
455                                if let Some(s3express_availability_zone_id) =
456                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 19, true, _diagnostic_collector)
457                                {
458                                    #[allow(unused_variables)]
459                                    if let Some(s3express_availability_zone_delim) =
460                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 19, 21, true, _diagnostic_collector)
461                                    {
462                                        if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
463                                            if (*use_fips) == (true) {
464                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
465                                                    .url({
466                                                        let mut out = String::new();
467                                                        out.push_str("https://");
468                                                        #[allow(clippy::needless_borrow)]
469                                                        out.push_str(&bucket.as_ref() as &str);
470                                                        out.push_str(".s3express-fips-");
471                                                        #[allow(clippy::needless_borrow)]
472                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
473                                                        out.push('.');
474                                                        #[allow(clippy::needless_borrow)]
475                                                        out.push_str(&region.as_ref() as &str);
476                                                        out.push_str(".amazonaws.com");
477                                                        out
478                                                    })
479                                                    .property("backend", "S3Express".to_string())
480                                                    .property(
481                                                        "authSchemes",
482                                                        vec![::aws_smithy_types::Document::from({
483                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
484                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
485                                                            out.insert("name".to_string(), "sigv4".to_string().into());
486                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
487                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
488                                                            out
489                                                        })],
490                                                    )
491                                                    .build());
492                                            }
493                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
494                                                .url({
495                                                    let mut out = String::new();
496                                                    out.push_str("https://");
497                                                    #[allow(clippy::needless_borrow)]
498                                                    out.push_str(&bucket.as_ref() as &str);
499                                                    out.push_str(".s3express-");
500                                                    #[allow(clippy::needless_borrow)]
501                                                    out.push_str(&s3express_availability_zone_id.as_ref() as &str);
502                                                    out.push('.');
503                                                    #[allow(clippy::needless_borrow)]
504                                                    out.push_str(&region.as_ref() as &str);
505                                                    out.push_str(".amazonaws.com");
506                                                    out
507                                                })
508                                                .property("backend", "S3Express".to_string())
509                                                .property(
510                                                    "authSchemes",
511                                                    vec![::aws_smithy_types::Document::from({
512                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
513                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
514                                                        out.insert("name".to_string(), "sigv4".to_string().into());
515                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
516                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
517                                                        out
518                                                    })],
519                                                )
520                                                .build());
521                                        }
522                                    }
523                                }
524                                #[allow(unused_variables)]
525                                if let Some(s3express_availability_zone_id) =
526                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 20, true, _diagnostic_collector)
527                                {
528                                    #[allow(unused_variables)]
529                                    if let Some(s3express_availability_zone_delim) =
530                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
531                                    {
532                                        if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
533                                            if (*use_fips) == (true) {
534                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
535                                                    .url({
536                                                        let mut out = String::new();
537                                                        out.push_str("https://");
538                                                        #[allow(clippy::needless_borrow)]
539                                                        out.push_str(&bucket.as_ref() as &str);
540                                                        out.push_str(".s3express-fips-");
541                                                        #[allow(clippy::needless_borrow)]
542                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
543                                                        out.push('.');
544                                                        #[allow(clippy::needless_borrow)]
545                                                        out.push_str(&region.as_ref() as &str);
546                                                        out.push_str(".amazonaws.com");
547                                                        out
548                                                    })
549                                                    .property("backend", "S3Express".to_string())
550                                                    .property(
551                                                        "authSchemes",
552                                                        vec![::aws_smithy_types::Document::from({
553                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
554                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
555                                                            out.insert("name".to_string(), "sigv4".to_string().into());
556                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
557                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
558                                                            out
559                                                        })],
560                                                    )
561                                                    .build());
562                                            }
563                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
564                                                .url({
565                                                    let mut out = String::new();
566                                                    out.push_str("https://");
567                                                    #[allow(clippy::needless_borrow)]
568                                                    out.push_str(&bucket.as_ref() as &str);
569                                                    out.push_str(".s3express-");
570                                                    #[allow(clippy::needless_borrow)]
571                                                    out.push_str(&s3express_availability_zone_id.as_ref() as &str);
572                                                    out.push('.');
573                                                    #[allow(clippy::needless_borrow)]
574                                                    out.push_str(&region.as_ref() as &str);
575                                                    out.push_str(".amazonaws.com");
576                                                    out
577                                                })
578                                                .property("backend", "S3Express".to_string())
579                                                .property(
580                                                    "authSchemes",
581                                                    vec![::aws_smithy_types::Document::from({
582                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
583                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
584                                                        out.insert("name".to_string(), "sigv4".to_string().into());
585                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
586                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
587                                                        out
588                                                    })],
589                                                )
590                                                .build());
591                                        }
592                                    }
593                                }
594                                #[allow(unused_variables)]
595                                if let Some(s3express_availability_zone_id) =
596                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 26, true, _diagnostic_collector)
597                                {
598                                    #[allow(unused_variables)]
599                                    if let Some(s3express_availability_zone_delim) =
600                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 26, 28, true, _diagnostic_collector)
601                                    {
602                                        if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
603                                            if (*use_fips) == (true) {
604                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
605                                                    .url({
606                                                        let mut out = String::new();
607                                                        out.push_str("https://");
608                                                        #[allow(clippy::needless_borrow)]
609                                                        out.push_str(&bucket.as_ref() as &str);
610                                                        out.push_str(".s3express-fips-");
611                                                        #[allow(clippy::needless_borrow)]
612                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
613                                                        out.push('.');
614                                                        #[allow(clippy::needless_borrow)]
615                                                        out.push_str(&region.as_ref() as &str);
616                                                        out.push_str(".amazonaws.com");
617                                                        out
618                                                    })
619                                                    .property("backend", "S3Express".to_string())
620                                                    .property(
621                                                        "authSchemes",
622                                                        vec![::aws_smithy_types::Document::from({
623                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
624                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
625                                                            out.insert("name".to_string(), "sigv4".to_string().into());
626                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
627                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
628                                                            out
629                                                        })],
630                                                    )
631                                                    .build());
632                                            }
633                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
634                                                .url({
635                                                    let mut out = String::new();
636                                                    out.push_str("https://");
637                                                    #[allow(clippy::needless_borrow)]
638                                                    out.push_str(&bucket.as_ref() as &str);
639                                                    out.push_str(".s3express-");
640                                                    #[allow(clippy::needless_borrow)]
641                                                    out.push_str(&s3express_availability_zone_id.as_ref() as &str);
642                                                    out.push('.');
643                                                    #[allow(clippy::needless_borrow)]
644                                                    out.push_str(&region.as_ref() as &str);
645                                                    out.push_str(".amazonaws.com");
646                                                    out
647                                                })
648                                                .property("backend", "S3Express".to_string())
649                                                .property(
650                                                    "authSchemes",
651                                                    vec![::aws_smithy_types::Document::from({
652                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
653                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
654                                                        out.insert("name".to_string(), "sigv4".to_string().into());
655                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
656                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
657                                                        out
658                                                    })],
659                                                )
660                                                .build());
661                                        }
662                                    }
663                                }
664                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
665                                    "Unrecognized S3Express bucket name format.".to_string(),
666                                ));
667                            }
668                        }
669                        #[allow(unused_variables)]
670                        if let Some(s3express_availability_zone_id) =
671                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 14, true, _diagnostic_collector)
672                        {
673                            #[allow(unused_variables)]
674                            if let Some(s3express_availability_zone_delim) =
675                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 14, 16, true, _diagnostic_collector)
676                            {
677                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
678                                    if (*use_fips) == (true) {
679                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
680                                            .url({
681                                                let mut out = String::new();
682                                                out.push_str("https://");
683                                                #[allow(clippy::needless_borrow)]
684                                                out.push_str(&bucket.as_ref() as &str);
685                                                out.push_str(".s3express-fips-");
686                                                #[allow(clippy::needless_borrow)]
687                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
688                                                out.push('.');
689                                                #[allow(clippy::needless_borrow)]
690                                                out.push_str(&region.as_ref() as &str);
691                                                out.push_str(".amazonaws.com");
692                                                out
693                                            })
694                                            .property("backend", "S3Express".to_string())
695                                            .property(
696                                                "authSchemes",
697                                                vec![::aws_smithy_types::Document::from({
698                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
699                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
700                                                    out.insert("name".to_string(), "sigv4-s3express".to_string().into());
701                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
702                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
703                                                    out
704                                                })],
705                                            )
706                                            .build());
707                                    }
708                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
709                                        .url({
710                                            let mut out = String::new();
711                                            out.push_str("https://");
712                                            #[allow(clippy::needless_borrow)]
713                                            out.push_str(&bucket.as_ref() as &str);
714                                            out.push_str(".s3express-");
715                                            #[allow(clippy::needless_borrow)]
716                                            out.push_str(&s3express_availability_zone_id.as_ref() as &str);
717                                            out.push('.');
718                                            #[allow(clippy::needless_borrow)]
719                                            out.push_str(&region.as_ref() as &str);
720                                            out.push_str(".amazonaws.com");
721                                            out
722                                        })
723                                        .property("backend", "S3Express".to_string())
724                                        .property(
725                                            "authSchemes",
726                                            vec![::aws_smithy_types::Document::from({
727                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
728                                                out.insert("disableDoubleEncoding".to_string(), true.into());
729                                                out.insert("name".to_string(), "sigv4-s3express".to_string().into());
730                                                out.insert("signingName".to_string(), "s3express".to_string().into());
731                                                out.insert("signingRegion".to_string(), region.to_owned().into());
732                                                out
733                                            })],
734                                        )
735                                        .build());
736                                }
737                            }
738                        }
739                        #[allow(unused_variables)]
740                        if let Some(s3express_availability_zone_id) =
741                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 15, true, _diagnostic_collector)
742                        {
743                            #[allow(unused_variables)]
744                            if let Some(s3express_availability_zone_delim) =
745                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
746                            {
747                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
748                                    if (*use_fips) == (true) {
749                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
750                                            .url({
751                                                let mut out = String::new();
752                                                out.push_str("https://");
753                                                #[allow(clippy::needless_borrow)]
754                                                out.push_str(&bucket.as_ref() as &str);
755                                                out.push_str(".s3express-fips-");
756                                                #[allow(clippy::needless_borrow)]
757                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
758                                                out.push('.');
759                                                #[allow(clippy::needless_borrow)]
760                                                out.push_str(&region.as_ref() as &str);
761                                                out.push_str(".amazonaws.com");
762                                                out
763                                            })
764                                            .property("backend", "S3Express".to_string())
765                                            .property(
766                                                "authSchemes",
767                                                vec![::aws_smithy_types::Document::from({
768                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
769                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
770                                                    out.insert("name".to_string(), "sigv4-s3express".to_string().into());
771                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
772                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
773                                                    out
774                                                })],
775                                            )
776                                            .build());
777                                    }
778                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
779                                        .url({
780                                            let mut out = String::new();
781                                            out.push_str("https://");
782                                            #[allow(clippy::needless_borrow)]
783                                            out.push_str(&bucket.as_ref() as &str);
784                                            out.push_str(".s3express-");
785                                            #[allow(clippy::needless_borrow)]
786                                            out.push_str(&s3express_availability_zone_id.as_ref() as &str);
787                                            out.push('.');
788                                            #[allow(clippy::needless_borrow)]
789                                            out.push_str(&region.as_ref() as &str);
790                                            out.push_str(".amazonaws.com");
791                                            out
792                                        })
793                                        .property("backend", "S3Express".to_string())
794                                        .property(
795                                            "authSchemes",
796                                            vec![::aws_smithy_types::Document::from({
797                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
798                                                out.insert("disableDoubleEncoding".to_string(), true.into());
799                                                out.insert("name".to_string(), "sigv4-s3express".to_string().into());
800                                                out.insert("signingName".to_string(), "s3express".to_string().into());
801                                                out.insert("signingRegion".to_string(), region.to_owned().into());
802                                                out
803                                            })],
804                                        )
805                                        .build());
806                                }
807                            }
808                        }
809                        #[allow(unused_variables)]
810                        if let Some(s3express_availability_zone_id) =
811                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 19, true, _diagnostic_collector)
812                        {
813                            #[allow(unused_variables)]
814                            if let Some(s3express_availability_zone_delim) =
815                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 19, 21, true, _diagnostic_collector)
816                            {
817                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
818                                    if (*use_fips) == (true) {
819                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
820                                            .url({
821                                                let mut out = String::new();
822                                                out.push_str("https://");
823                                                #[allow(clippy::needless_borrow)]
824                                                out.push_str(&bucket.as_ref() as &str);
825                                                out.push_str(".s3express-fips-");
826                                                #[allow(clippy::needless_borrow)]
827                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
828                                                out.push('.');
829                                                #[allow(clippy::needless_borrow)]
830                                                out.push_str(&region.as_ref() as &str);
831                                                out.push_str(".amazonaws.com");
832                                                out
833                                            })
834                                            .property("backend", "S3Express".to_string())
835                                            .property(
836                                                "authSchemes",
837                                                vec![::aws_smithy_types::Document::from({
838                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
839                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
840                                                    out.insert("name".to_string(), "sigv4-s3express".to_string().into());
841                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
842                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
843                                                    out
844                                                })],
845                                            )
846                                            .build());
847                                    }
848                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
849                                        .url({
850                                            let mut out = String::new();
851                                            out.push_str("https://");
852                                            #[allow(clippy::needless_borrow)]
853                                            out.push_str(&bucket.as_ref() as &str);
854                                            out.push_str(".s3express-");
855                                            #[allow(clippy::needless_borrow)]
856                                            out.push_str(&s3express_availability_zone_id.as_ref() as &str);
857                                            out.push('.');
858                                            #[allow(clippy::needless_borrow)]
859                                            out.push_str(&region.as_ref() as &str);
860                                            out.push_str(".amazonaws.com");
861                                            out
862                                        })
863                                        .property("backend", "S3Express".to_string())
864                                        .property(
865                                            "authSchemes",
866                                            vec![::aws_smithy_types::Document::from({
867                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
868                                                out.insert("disableDoubleEncoding".to_string(), true.into());
869                                                out.insert("name".to_string(), "sigv4-s3express".to_string().into());
870                                                out.insert("signingName".to_string(), "s3express".to_string().into());
871                                                out.insert("signingRegion".to_string(), region.to_owned().into());
872                                                out
873                                            })],
874                                        )
875                                        .build());
876                                }
877                            }
878                        }
879                        #[allow(unused_variables)]
880                        if let Some(s3express_availability_zone_id) =
881                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 20, true, _diagnostic_collector)
882                        {
883                            #[allow(unused_variables)]
884                            if let Some(s3express_availability_zone_delim) =
885                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
886                            {
887                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
888                                    if (*use_fips) == (true) {
889                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
890                                            .url({
891                                                let mut out = String::new();
892                                                out.push_str("https://");
893                                                #[allow(clippy::needless_borrow)]
894                                                out.push_str(&bucket.as_ref() as &str);
895                                                out.push_str(".s3express-fips-");
896                                                #[allow(clippy::needless_borrow)]
897                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
898                                                out.push('.');
899                                                #[allow(clippy::needless_borrow)]
900                                                out.push_str(&region.as_ref() as &str);
901                                                out.push_str(".amazonaws.com");
902                                                out
903                                            })
904                                            .property("backend", "S3Express".to_string())
905                                            .property(
906                                                "authSchemes",
907                                                vec![::aws_smithy_types::Document::from({
908                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
909                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
910                                                    out.insert("name".to_string(), "sigv4-s3express".to_string().into());
911                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
912                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
913                                                    out
914                                                })],
915                                            )
916                                            .build());
917                                    }
918                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
919                                        .url({
920                                            let mut out = String::new();
921                                            out.push_str("https://");
922                                            #[allow(clippy::needless_borrow)]
923                                            out.push_str(&bucket.as_ref() as &str);
924                                            out.push_str(".s3express-");
925                                            #[allow(clippy::needless_borrow)]
926                                            out.push_str(&s3express_availability_zone_id.as_ref() as &str);
927                                            out.push('.');
928                                            #[allow(clippy::needless_borrow)]
929                                            out.push_str(&region.as_ref() as &str);
930                                            out.push_str(".amazonaws.com");
931                                            out
932                                        })
933                                        .property("backend", "S3Express".to_string())
934                                        .property(
935                                            "authSchemes",
936                                            vec![::aws_smithy_types::Document::from({
937                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
938                                                out.insert("disableDoubleEncoding".to_string(), true.into());
939                                                out.insert("name".to_string(), "sigv4-s3express".to_string().into());
940                                                out.insert("signingName".to_string(), "s3express".to_string().into());
941                                                out.insert("signingRegion".to_string(), region.to_owned().into());
942                                                out
943                                            })],
944                                        )
945                                        .build());
946                                }
947                            }
948                        }
949                        #[allow(unused_variables)]
950                        if let Some(s3express_availability_zone_id) =
951                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 26, true, _diagnostic_collector)
952                        {
953                            #[allow(unused_variables)]
954                            if let Some(s3express_availability_zone_delim) =
955                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 26, 28, true, _diagnostic_collector)
956                            {
957                                if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
958                                    if (*use_fips) == (true) {
959                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
960                                            .url({
961                                                let mut out = String::new();
962                                                out.push_str("https://");
963                                                #[allow(clippy::needless_borrow)]
964                                                out.push_str(&bucket.as_ref() as &str);
965                                                out.push_str(".s3express-fips-");
966                                                #[allow(clippy::needless_borrow)]
967                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
968                                                out.push('.');
969                                                #[allow(clippy::needless_borrow)]
970                                                out.push_str(&region.as_ref() as &str);
971                                                out.push_str(".amazonaws.com");
972                                                out
973                                            })
974                                            .property("backend", "S3Express".to_string())
975                                            .property(
976                                                "authSchemes",
977                                                vec![::aws_smithy_types::Document::from({
978                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
979                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
980                                                    out.insert("name".to_string(), "sigv4-s3express".to_string().into());
981                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
982                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
983                                                    out
984                                                })],
985                                            )
986                                            .build());
987                                    }
988                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
989                                        .url({
990                                            let mut out = String::new();
991                                            out.push_str("https://");
992                                            #[allow(clippy::needless_borrow)]
993                                            out.push_str(&bucket.as_ref() as &str);
994                                            out.push_str(".s3express-");
995                                            #[allow(clippy::needless_borrow)]
996                                            out.push_str(&s3express_availability_zone_id.as_ref() as &str);
997                                            out.push('.');
998                                            #[allow(clippy::needless_borrow)]
999                                            out.push_str(&region.as_ref() as &str);
1000                                            out.push_str(".amazonaws.com");
1001                                            out
1002                                        })
1003                                        .property("backend", "S3Express".to_string())
1004                                        .property(
1005                                            "authSchemes",
1006                                            vec![::aws_smithy_types::Document::from({
1007                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1008                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1009                                                out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1010                                                out.insert("signingName".to_string(), "s3express".to_string().into());
1011                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1012                                                out
1013                                            })],
1014                                        )
1015                                        .build());
1016                                }
1017                            }
1018                        }
1019                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1020                            "Unrecognized S3Express bucket name format.".to_string(),
1021                        ));
1022                    }
1023                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1024                        "S3Express bucket name is not a valid virtual hostable name.".to_string(),
1025                    ));
1026                }
1027            }
1028        }
1029        if !(bucket.is_some()) {
1030            #[allow(unused_variables)]
1031            if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
1032                if (*use_s3_express_control_endpoint) == (true) {
1033                    #[allow(unused_variables)]
1034                    if let Some(endpoint) = endpoint {
1035                        #[allow(unused_variables)]
1036                        if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
1037                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1038                                .url({
1039                                    let mut out = String::new();
1040                                    #[allow(clippy::needless_borrow)]
1041                                    out.push_str(&url.scheme());
1042                                    out.push_str("://");
1043                                    #[allow(clippy::needless_borrow)]
1044                                    out.push_str(&url.authority());
1045                                    #[allow(clippy::needless_borrow)]
1046                                    out.push_str(&url.path());
1047                                    out
1048                                })
1049                                .property("backend", "S3Express".to_string())
1050                                .property(
1051                                    "authSchemes",
1052                                    vec![::aws_smithy_types::Document::from({
1053                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1054                                        out.insert("disableDoubleEncoding".to_string(), true.into());
1055                                        out.insert("name".to_string(), "sigv4".to_string().into());
1056                                        out.insert("signingName".to_string(), "s3express".to_string().into());
1057                                        out.insert("signingRegion".to_string(), region.to_owned().into());
1058                                        out
1059                                    })],
1060                                )
1061                                .build());
1062                        }
1063                    }
1064                    if (*use_fips) == (true) {
1065                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1066                            .url({
1067                                let mut out = String::new();
1068                                out.push_str("https://s3express-control-fips.");
1069                                #[allow(clippy::needless_borrow)]
1070                                out.push_str(&region.as_ref() as &str);
1071                                out.push_str(".amazonaws.com");
1072                                out
1073                            })
1074                            .property("backend", "S3Express".to_string())
1075                            .property(
1076                                "authSchemes",
1077                                vec![::aws_smithy_types::Document::from({
1078                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1079                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1080                                    out.insert("name".to_string(), "sigv4".to_string().into());
1081                                    out.insert("signingName".to_string(), "s3express".to_string().into());
1082                                    out.insert("signingRegion".to_string(), region.to_owned().into());
1083                                    out
1084                                })],
1085                            )
1086                            .build());
1087                    }
1088                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1089                        .url({
1090                            let mut out = String::new();
1091                            out.push_str("https://s3express-control.");
1092                            #[allow(clippy::needless_borrow)]
1093                            out.push_str(&region.as_ref() as &str);
1094                            out.push_str(".amazonaws.com");
1095                            out
1096                        })
1097                        .property("backend", "S3Express".to_string())
1098                        .property(
1099                            "authSchemes",
1100                            vec![::aws_smithy_types::Document::from({
1101                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1102                                out.insert("disableDoubleEncoding".to_string(), true.into());
1103                                out.insert("name".to_string(), "sigv4".to_string().into());
1104                                out.insert("signingName".to_string(), "s3express".to_string().into());
1105                                out.insert("signingRegion".to_string(), region.to_owned().into());
1106                                out
1107                            })],
1108                        )
1109                        .build());
1110                }
1111            }
1112        }
1113        #[allow(unused_variables)]
1114        if let Some(bucket) = bucket {
1115            #[allow(unused_variables)]
1116            if let Some(hardware_type) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 49, 50, true, _diagnostic_collector) {
1117                #[allow(unused_variables)]
1118                if let Some(region_prefix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 8, 12, true, _diagnostic_collector) {
1119                    #[allow(unused_variables)]
1120                    if let Some(bucket_alias_suffix) =
1121                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 7, true, _diagnostic_collector)
1122                    {
1123                        #[allow(unused_variables)]
1124                        if let Some(outpost_id) =
1125                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 32, 49, true, _diagnostic_collector)
1126                        {
1127                            #[allow(unused_variables)]
1128                            if let Some(region_partition) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
1129                                if (bucket_alias_suffix.as_ref() as &str) == ("--op-s3") {
1130                                    if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
1131                                        if (hardware_type.as_ref() as &str) == ("e") {
1132                                            if (region_prefix.as_ref() as &str) == ("beta") {
1133                                                if !(endpoint.is_some()) {
1134                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1135                                                        "Expected a endpoint to be specified but no endpoint was found".to_string(),
1136                                                    ));
1137                                                }
1138                                                #[allow(unused_variables)]
1139                                                if let Some(endpoint) = endpoint {
1140                                                    #[allow(unused_variables)]
1141                                                    if let Some(url) =
1142                                                        crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
1143                                                    {
1144                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1145                                                            .url({
1146                                                                let mut out = String::new();
1147                                                                out.push_str("https://");
1148                                                                #[allow(clippy::needless_borrow)]
1149                                                                out.push_str(&bucket.as_ref() as &str);
1150                                                                out.push_str(".ec2.");
1151                                                                #[allow(clippy::needless_borrow)]
1152                                                                out.push_str(&url.authority());
1153                                                                out
1154                                                            })
1155                                                            .property(
1156                                                                "authSchemes",
1157                                                                vec![
1158                                                                    ::aws_smithy_types::Document::from({
1159                                                                        let mut out =
1160                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
1161                                                                            );
1162                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
1163                                                                        out.insert("name".to_string(), "sigv4a".to_string().into());
1164                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1165                                                                        out.insert(
1166                                                                            "signingRegionSet".to_string(),
1167                                                                            vec![::aws_smithy_types::Document::from("*".to_string())].into(),
1168                                                                        );
1169                                                                        out
1170                                                                    }),
1171                                                                    ::aws_smithy_types::Document::from({
1172                                                                        let mut out =
1173                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
1174                                                                            );
1175                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
1176                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
1177                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1178                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
1179                                                                        out
1180                                                                    }),
1181                                                                ],
1182                                                            )
1183                                                            .build());
1184                                                    }
1185                                                }
1186                                                #[allow(unreachable_code)]
1187                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1188                                                    "No rules matched these parameters. This is a bug. {:?}",
1189                                                    _params
1190                                                )));
1191                                            }
1192                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1193                                                .url({
1194                                                    let mut out = String::new();
1195                                                    out.push_str("https://");
1196                                                    #[allow(clippy::needless_borrow)]
1197                                                    out.push_str(&bucket.as_ref() as &str);
1198                                                    out.push_str(".ec2.s3-outposts.");
1199                                                    #[allow(clippy::needless_borrow)]
1200                                                    out.push_str(&region.as_ref() as &str);
1201                                                    out.push('.');
1202                                                    #[allow(clippy::needless_borrow)]
1203                                                    out.push_str(&region_partition.dns_suffix());
1204                                                    out
1205                                                })
1206                                                .property(
1207                                                    "authSchemes",
1208                                                    vec![
1209                                                        ::aws_smithy_types::Document::from({
1210                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1211                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1212                                                            out.insert("name".to_string(), "sigv4a".to_string().into());
1213                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1214                                                            out.insert(
1215                                                                "signingRegionSet".to_string(),
1216                                                                vec![::aws_smithy_types::Document::from("*".to_string())].into(),
1217                                                            );
1218                                                            out
1219                                                        }),
1220                                                        ::aws_smithy_types::Document::from({
1221                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1222                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1223                                                            out.insert("name".to_string(), "sigv4".to_string().into());
1224                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1225                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1226                                                            out
1227                                                        }),
1228                                                    ],
1229                                                )
1230                                                .build());
1231                                        }
1232                                        if (hardware_type.as_ref() as &str) == ("o") {
1233                                            if (region_prefix.as_ref() as &str) == ("beta") {
1234                                                if !(endpoint.is_some()) {
1235                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1236                                                        "Expected a endpoint to be specified but no endpoint was found".to_string(),
1237                                                    ));
1238                                                }
1239                                                #[allow(unused_variables)]
1240                                                if let Some(endpoint) = endpoint {
1241                                                    #[allow(unused_variables)]
1242                                                    if let Some(url) =
1243                                                        crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
1244                                                    {
1245                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1246                                                            .url({
1247                                                                let mut out = String::new();
1248                                                                out.push_str("https://");
1249                                                                #[allow(clippy::needless_borrow)]
1250                                                                out.push_str(&bucket.as_ref() as &str);
1251                                                                out.push_str(".op-");
1252                                                                #[allow(clippy::needless_borrow)]
1253                                                                out.push_str(&outpost_id.as_ref() as &str);
1254                                                                out.push('.');
1255                                                                #[allow(clippy::needless_borrow)]
1256                                                                out.push_str(&url.authority());
1257                                                                out
1258                                                            })
1259                                                            .property(
1260                                                                "authSchemes",
1261                                                                vec![
1262                                                                    ::aws_smithy_types::Document::from({
1263                                                                        let mut out =
1264                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
1265                                                                            );
1266                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
1267                                                                        out.insert("name".to_string(), "sigv4a".to_string().into());
1268                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1269                                                                        out.insert(
1270                                                                            "signingRegionSet".to_string(),
1271                                                                            vec![::aws_smithy_types::Document::from("*".to_string())].into(),
1272                                                                        );
1273                                                                        out
1274                                                                    }),
1275                                                                    ::aws_smithy_types::Document::from({
1276                                                                        let mut out =
1277                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
1278                                                                            );
1279                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
1280                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
1281                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1282                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
1283                                                                        out
1284                                                                    }),
1285                                                                ],
1286                                                            )
1287                                                            .build());
1288                                                    }
1289                                                }
1290                                                #[allow(unreachable_code)]
1291                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1292                                                    "No rules matched these parameters. This is a bug. {:?}",
1293                                                    _params
1294                                                )));
1295                                            }
1296                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1297                                                .url({
1298                                                    let mut out = String::new();
1299                                                    out.push_str("https://");
1300                                                    #[allow(clippy::needless_borrow)]
1301                                                    out.push_str(&bucket.as_ref() as &str);
1302                                                    out.push_str(".op-");
1303                                                    #[allow(clippy::needless_borrow)]
1304                                                    out.push_str(&outpost_id.as_ref() as &str);
1305                                                    out.push_str(".s3-outposts.");
1306                                                    #[allow(clippy::needless_borrow)]
1307                                                    out.push_str(&region.as_ref() as &str);
1308                                                    out.push('.');
1309                                                    #[allow(clippy::needless_borrow)]
1310                                                    out.push_str(&region_partition.dns_suffix());
1311                                                    out
1312                                                })
1313                                                .property(
1314                                                    "authSchemes",
1315                                                    vec![
1316                                                        ::aws_smithy_types::Document::from({
1317                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1318                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1319                                                            out.insert("name".to_string(), "sigv4a".to_string().into());
1320                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1321                                                            out.insert(
1322                                                                "signingRegionSet".to_string(),
1323                                                                vec![::aws_smithy_types::Document::from("*".to_string())].into(),
1324                                                            );
1325                                                            out
1326                                                        }),
1327                                                        ::aws_smithy_types::Document::from({
1328                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1329                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1330                                                            out.insert("name".to_string(), "sigv4".to_string().into());
1331                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
1332                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1333                                                            out
1334                                                        }),
1335                                                    ],
1336                                                )
1337                                                .build());
1338                                        }
1339                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
1340                                            let mut out = String::new();
1341                                            out.push_str("Unrecognized hardware type: \"Expected hardware type o or e but got ");
1342                                            #[allow(clippy::needless_borrow)]
1343                                            out.push_str(&hardware_type.as_ref() as &str);
1344                                            out.push('"');
1345                                            out
1346                                        }));
1347                                    }
1348                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1349                                        "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
1350                                    ));
1351                                }
1352                            }
1353                        }
1354                    }
1355                }
1356            }
1357        }
1358        #[allow(unused_variables)]
1359        if let Some(bucket) = bucket {
1360            #[allow(unused_variables)]
1361            if let Some(endpoint) = endpoint {
1362                if !(crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector).is_some()) {
1363                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
1364                        let mut out = String::new();
1365                        out.push_str("Custom endpoint `");
1366                        #[allow(clippy::needless_borrow)]
1367                        out.push_str(&endpoint.as_ref() as &str);
1368                        out.push_str("` was not a valid URI");
1369                        out
1370                    }));
1371                }
1372            }
1373            if (*force_path_style) == (false) {
1374                if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
1375                    #[allow(unused_variables)]
1376                    if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
1377                        if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, false, _diagnostic_collector) {
1378                            if (*accelerate) == (true) {
1379                                if (partition_result.name()) == ("aws-cn") {
1380                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1381                                        "S3 Accelerate cannot be used in this region".to_string(),
1382                                    ));
1383                                }
1384                            }
1385                            if (*use_dual_stack) == (true) {
1386                                if (*use_fips) == (true) {
1387                                    if (*accelerate) == (false) {
1388                                        if !(endpoint.is_some()) {
1389                                            if (region.as_ref() as &str) == ("aws-global") {
1390                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1391                                                    .url({
1392                                                        let mut out = String::new();
1393                                                        out.push_str("https://");
1394                                                        #[allow(clippy::needless_borrow)]
1395                                                        out.push_str(&bucket.as_ref() as &str);
1396                                                        out.push_str(".s3-fips.dualstack.us-east-1.");
1397                                                        #[allow(clippy::needless_borrow)]
1398                                                        out.push_str(&partition_result.dns_suffix());
1399                                                        out
1400                                                    })
1401                                                    .property(
1402                                                        "authSchemes",
1403                                                        vec![::aws_smithy_types::Document::from({
1404                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1405                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1406                                                            out.insert("name".to_string(), "sigv4".to_string().into());
1407                                                            out.insert("signingName".to_string(), "s3".to_string().into());
1408                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
1409                                                            out
1410                                                        })],
1411                                                    )
1412                                                    .build());
1413                                            }
1414                                        }
1415                                    }
1416                                }
1417                            }
1418                            if (*use_dual_stack) == (true) {
1419                                if (*use_fips) == (true) {
1420                                    if (*accelerate) == (false) {
1421                                        if !(endpoint.is_some()) {
1422                                            if !((region.as_ref() as &str) == ("aws-global")) {
1423                                                if (*use_global_endpoint) == (true) {
1424                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1425                                                        .url({
1426                                                            let mut out = String::new();
1427                                                            out.push_str("https://");
1428                                                            #[allow(clippy::needless_borrow)]
1429                                                            out.push_str(&bucket.as_ref() as &str);
1430                                                            out.push_str(".s3-fips.dualstack.");
1431                                                            #[allow(clippy::needless_borrow)]
1432                                                            out.push_str(&region.as_ref() as &str);
1433                                                            out.push('.');
1434                                                            #[allow(clippy::needless_borrow)]
1435                                                            out.push_str(&partition_result.dns_suffix());
1436                                                            out
1437                                                        })
1438                                                        .property(
1439                                                            "authSchemes",
1440                                                            vec![::aws_smithy_types::Document::from({
1441                                                                let mut out =
1442                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1443                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1444                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1445                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1446                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1447                                                                out
1448                                                            })],
1449                                                        )
1450                                                        .build());
1451                                                }
1452                                            }
1453                                        }
1454                                    }
1455                                }
1456                            }
1457                            if (*use_dual_stack) == (true) {
1458                                if (*use_fips) == (true) {
1459                                    if (*accelerate) == (false) {
1460                                        if !(endpoint.is_some()) {
1461                                            if !((region.as_ref() as &str) == ("aws-global")) {
1462                                                if (*use_global_endpoint) == (false) {
1463                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1464                                                        .url({
1465                                                            let mut out = String::new();
1466                                                            out.push_str("https://");
1467                                                            #[allow(clippy::needless_borrow)]
1468                                                            out.push_str(&bucket.as_ref() as &str);
1469                                                            out.push_str(".s3-fips.dualstack.");
1470                                                            #[allow(clippy::needless_borrow)]
1471                                                            out.push_str(&region.as_ref() as &str);
1472                                                            out.push('.');
1473                                                            #[allow(clippy::needless_borrow)]
1474                                                            out.push_str(&partition_result.dns_suffix());
1475                                                            out
1476                                                        })
1477                                                        .property(
1478                                                            "authSchemes",
1479                                                            vec![::aws_smithy_types::Document::from({
1480                                                                let mut out =
1481                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1482                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1483                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1484                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1485                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1486                                                                out
1487                                                            })],
1488                                                        )
1489                                                        .build());
1490                                                }
1491                                            }
1492                                        }
1493                                    }
1494                                }
1495                            }
1496                            if (*use_dual_stack) == (false) {
1497                                if (*use_fips) == (true) {
1498                                    if (*accelerate) == (false) {
1499                                        if !(endpoint.is_some()) {
1500                                            if (region.as_ref() as &str) == ("aws-global") {
1501                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1502                                                    .url({
1503                                                        let mut out = String::new();
1504                                                        out.push_str("https://");
1505                                                        #[allow(clippy::needless_borrow)]
1506                                                        out.push_str(&bucket.as_ref() as &str);
1507                                                        out.push_str(".s3-fips.us-east-1.");
1508                                                        #[allow(clippy::needless_borrow)]
1509                                                        out.push_str(&partition_result.dns_suffix());
1510                                                        out
1511                                                    })
1512                                                    .property(
1513                                                        "authSchemes",
1514                                                        vec![::aws_smithy_types::Document::from({
1515                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1516                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1517                                                            out.insert("name".to_string(), "sigv4".to_string().into());
1518                                                            out.insert("signingName".to_string(), "s3".to_string().into());
1519                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
1520                                                            out
1521                                                        })],
1522                                                    )
1523                                                    .build());
1524                                            }
1525                                        }
1526                                    }
1527                                }
1528                            }
1529                            if (*use_dual_stack) == (false) {
1530                                if (*use_fips) == (true) {
1531                                    if (*accelerate) == (false) {
1532                                        if !(endpoint.is_some()) {
1533                                            if !((region.as_ref() as &str) == ("aws-global")) {
1534                                                if (*use_global_endpoint) == (true) {
1535                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1536                                                        .url({
1537                                                            let mut out = String::new();
1538                                                            out.push_str("https://");
1539                                                            #[allow(clippy::needless_borrow)]
1540                                                            out.push_str(&bucket.as_ref() as &str);
1541                                                            out.push_str(".s3-fips.");
1542                                                            #[allow(clippy::needless_borrow)]
1543                                                            out.push_str(&region.as_ref() as &str);
1544                                                            out.push('.');
1545                                                            #[allow(clippy::needless_borrow)]
1546                                                            out.push_str(&partition_result.dns_suffix());
1547                                                            out
1548                                                        })
1549                                                        .property(
1550                                                            "authSchemes",
1551                                                            vec![::aws_smithy_types::Document::from({
1552                                                                let mut out =
1553                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1554                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1555                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1556                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1557                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1558                                                                out
1559                                                            })],
1560                                                        )
1561                                                        .build());
1562                                                }
1563                                            }
1564                                        }
1565                                    }
1566                                }
1567                            }
1568                            if (*use_dual_stack) == (false) {
1569                                if (*use_fips) == (true) {
1570                                    if (*accelerate) == (false) {
1571                                        if !(endpoint.is_some()) {
1572                                            if !((region.as_ref() as &str) == ("aws-global")) {
1573                                                if (*use_global_endpoint) == (false) {
1574                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1575                                                        .url({
1576                                                            let mut out = String::new();
1577                                                            out.push_str("https://");
1578                                                            #[allow(clippy::needless_borrow)]
1579                                                            out.push_str(&bucket.as_ref() as &str);
1580                                                            out.push_str(".s3-fips.");
1581                                                            #[allow(clippy::needless_borrow)]
1582                                                            out.push_str(&region.as_ref() as &str);
1583                                                            out.push('.');
1584                                                            #[allow(clippy::needless_borrow)]
1585                                                            out.push_str(&partition_result.dns_suffix());
1586                                                            out
1587                                                        })
1588                                                        .property(
1589                                                            "authSchemes",
1590                                                            vec![::aws_smithy_types::Document::from({
1591                                                                let mut out =
1592                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1593                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1594                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1595                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1596                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1597                                                                out
1598                                                            })],
1599                                                        )
1600                                                        .build());
1601                                                }
1602                                            }
1603                                        }
1604                                    }
1605                                }
1606                            }
1607                            if (*use_dual_stack) == (true) {
1608                                if (*use_fips) == (false) {
1609                                    if (*accelerate) == (true) {
1610                                        if !(endpoint.is_some()) {
1611                                            if (region.as_ref() as &str) == ("aws-global") {
1612                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1613                                                    .url({
1614                                                        let mut out = String::new();
1615                                                        out.push_str("https://");
1616                                                        #[allow(clippy::needless_borrow)]
1617                                                        out.push_str(&bucket.as_ref() as &str);
1618                                                        out.push_str(".s3-accelerate.dualstack.us-east-1.");
1619                                                        #[allow(clippy::needless_borrow)]
1620                                                        out.push_str(&partition_result.dns_suffix());
1621                                                        out
1622                                                    })
1623                                                    .property(
1624                                                        "authSchemes",
1625                                                        vec![::aws_smithy_types::Document::from({
1626                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1627                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1628                                                            out.insert("name".to_string(), "sigv4".to_string().into());
1629                                                            out.insert("signingName".to_string(), "s3".to_string().into());
1630                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
1631                                                            out
1632                                                        })],
1633                                                    )
1634                                                    .build());
1635                                            }
1636                                        }
1637                                    }
1638                                }
1639                            }
1640                            if (*use_dual_stack) == (true) {
1641                                if (*use_fips) == (false) {
1642                                    if (*accelerate) == (true) {
1643                                        if !(endpoint.is_some()) {
1644                                            if !((region.as_ref() as &str) == ("aws-global")) {
1645                                                if (*use_global_endpoint) == (true) {
1646                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1647                                                        .url({
1648                                                            let mut out = String::new();
1649                                                            out.push_str("https://");
1650                                                            #[allow(clippy::needless_borrow)]
1651                                                            out.push_str(&bucket.as_ref() as &str);
1652                                                            out.push_str(".s3-accelerate.dualstack.");
1653                                                            #[allow(clippy::needless_borrow)]
1654                                                            out.push_str(&partition_result.dns_suffix());
1655                                                            out
1656                                                        })
1657                                                        .property(
1658                                                            "authSchemes",
1659                                                            vec![::aws_smithy_types::Document::from({
1660                                                                let mut out =
1661                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1662                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1663                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1664                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1665                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1666                                                                out
1667                                                            })],
1668                                                        )
1669                                                        .build());
1670                                                }
1671                                            }
1672                                        }
1673                                    }
1674                                }
1675                            }
1676                            if (*use_dual_stack) == (true) {
1677                                if (*use_fips) == (false) {
1678                                    if (*accelerate) == (true) {
1679                                        if !(endpoint.is_some()) {
1680                                            if !((region.as_ref() as &str) == ("aws-global")) {
1681                                                if (*use_global_endpoint) == (false) {
1682                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1683                                                        .url({
1684                                                            let mut out = String::new();
1685                                                            out.push_str("https://");
1686                                                            #[allow(clippy::needless_borrow)]
1687                                                            out.push_str(&bucket.as_ref() as &str);
1688                                                            out.push_str(".s3-accelerate.dualstack.");
1689                                                            #[allow(clippy::needless_borrow)]
1690                                                            out.push_str(&partition_result.dns_suffix());
1691                                                            out
1692                                                        })
1693                                                        .property(
1694                                                            "authSchemes",
1695                                                            vec![::aws_smithy_types::Document::from({
1696                                                                let mut out =
1697                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1698                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1699                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1700                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1701                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1702                                                                out
1703                                                            })],
1704                                                        )
1705                                                        .build());
1706                                                }
1707                                            }
1708                                        }
1709                                    }
1710                                }
1711                            }
1712                            if (*use_dual_stack) == (true) {
1713                                if (*use_fips) == (false) {
1714                                    if (*accelerate) == (false) {
1715                                        if !(endpoint.is_some()) {
1716                                            if (region.as_ref() as &str) == ("aws-global") {
1717                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1718                                                    .url({
1719                                                        let mut out = String::new();
1720                                                        out.push_str("https://");
1721                                                        #[allow(clippy::needless_borrow)]
1722                                                        out.push_str(&bucket.as_ref() as &str);
1723                                                        out.push_str(".s3.dualstack.us-east-1.");
1724                                                        #[allow(clippy::needless_borrow)]
1725                                                        out.push_str(&partition_result.dns_suffix());
1726                                                        out
1727                                                    })
1728                                                    .property(
1729                                                        "authSchemes",
1730                                                        vec![::aws_smithy_types::Document::from({
1731                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1732                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1733                                                            out.insert("name".to_string(), "sigv4".to_string().into());
1734                                                            out.insert("signingName".to_string(), "s3".to_string().into());
1735                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
1736                                                            out
1737                                                        })],
1738                                                    )
1739                                                    .build());
1740                                            }
1741                                        }
1742                                    }
1743                                }
1744                            }
1745                            if (*use_dual_stack) == (true) {
1746                                if (*use_fips) == (false) {
1747                                    if (*accelerate) == (false) {
1748                                        if !(endpoint.is_some()) {
1749                                            if !((region.as_ref() as &str) == ("aws-global")) {
1750                                                if (*use_global_endpoint) == (true) {
1751                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1752                                                        .url({
1753                                                            let mut out = String::new();
1754                                                            out.push_str("https://");
1755                                                            #[allow(clippy::needless_borrow)]
1756                                                            out.push_str(&bucket.as_ref() as &str);
1757                                                            out.push_str(".s3.dualstack.");
1758                                                            #[allow(clippy::needless_borrow)]
1759                                                            out.push_str(&region.as_ref() as &str);
1760                                                            out.push('.');
1761                                                            #[allow(clippy::needless_borrow)]
1762                                                            out.push_str(&partition_result.dns_suffix());
1763                                                            out
1764                                                        })
1765                                                        .property(
1766                                                            "authSchemes",
1767                                                            vec![::aws_smithy_types::Document::from({
1768                                                                let mut out =
1769                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1770                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1771                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1772                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1773                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1774                                                                out
1775                                                            })],
1776                                                        )
1777                                                        .build());
1778                                                }
1779                                            }
1780                                        }
1781                                    }
1782                                }
1783                            }
1784                            if (*use_dual_stack) == (true) {
1785                                if (*use_fips) == (false) {
1786                                    if (*accelerate) == (false) {
1787                                        if !(endpoint.is_some()) {
1788                                            if !((region.as_ref() as &str) == ("aws-global")) {
1789                                                if (*use_global_endpoint) == (false) {
1790                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1791                                                        .url({
1792                                                            let mut out = String::new();
1793                                                            out.push_str("https://");
1794                                                            #[allow(clippy::needless_borrow)]
1795                                                            out.push_str(&bucket.as_ref() as &str);
1796                                                            out.push_str(".s3.dualstack.");
1797                                                            #[allow(clippy::needless_borrow)]
1798                                                            out.push_str(&region.as_ref() as &str);
1799                                                            out.push('.');
1800                                                            #[allow(clippy::needless_borrow)]
1801                                                            out.push_str(&partition_result.dns_suffix());
1802                                                            out
1803                                                        })
1804                                                        .property(
1805                                                            "authSchemes",
1806                                                            vec![::aws_smithy_types::Document::from({
1807                                                                let mut out =
1808                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1809                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
1810                                                                out.insert("name".to_string(), "sigv4".to_string().into());
1811                                                                out.insert("signingName".to_string(), "s3".to_string().into());
1812                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
1813                                                                out
1814                                                            })],
1815                                                        )
1816                                                        .build());
1817                                                }
1818                                            }
1819                                        }
1820                                    }
1821                                }
1822                            }
1823                            if (*use_dual_stack) == (false) {
1824                                if (*use_fips) == (false) {
1825                                    if (*accelerate) == (false) {
1826                                        #[allow(unused_variables)]
1827                                        if let Some(endpoint) = endpoint {
1828                                            #[allow(unused_variables)]
1829                                            if let Some(url) =
1830                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
1831                                            {
1832                                                if (url.is_ip()) == (true) {
1833                                                    if (region.as_ref() as &str) == ("aws-global") {
1834                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1835                                                            .url({
1836                                                                let mut out = String::new();
1837                                                                #[allow(clippy::needless_borrow)]
1838                                                                out.push_str(&url.scheme());
1839                                                                out.push_str("://");
1840                                                                #[allow(clippy::needless_borrow)]
1841                                                                out.push_str(&url.authority());
1842                                                                #[allow(clippy::needless_borrow)]
1843                                                                out.push_str(&url.normalized_path());
1844                                                                #[allow(clippy::needless_borrow)]
1845                                                                out.push_str(&bucket.as_ref() as &str);
1846                                                                out
1847                                                            })
1848                                                            .property(
1849                                                                "authSchemes",
1850                                                                vec![::aws_smithy_types::Document::from({
1851                                                                    let mut out =
1852                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1853                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1854                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1855                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
1856                                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
1857                                                                    out
1858                                                                })],
1859                                                            )
1860                                                            .build());
1861                                                    }
1862                                                }
1863                                            }
1864                                        }
1865                                    }
1866                                }
1867                            }
1868                            if (*use_dual_stack) == (false) {
1869                                if (*use_fips) == (false) {
1870                                    if (*accelerate) == (false) {
1871                                        #[allow(unused_variables)]
1872                                        if let Some(endpoint) = endpoint {
1873                                            #[allow(unused_variables)]
1874                                            if let Some(url) =
1875                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
1876                                            {
1877                                                if (url.is_ip()) == (false) {
1878                                                    if (region.as_ref() as &str) == ("aws-global") {
1879                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1880                                                            .url({
1881                                                                let mut out = String::new();
1882                                                                #[allow(clippy::needless_borrow)]
1883                                                                out.push_str(&url.scheme());
1884                                                                out.push_str("://");
1885                                                                #[allow(clippy::needless_borrow)]
1886                                                                out.push_str(&bucket.as_ref() as &str);
1887                                                                out.push('.');
1888                                                                #[allow(clippy::needless_borrow)]
1889                                                                out.push_str(&url.authority());
1890                                                                #[allow(clippy::needless_borrow)]
1891                                                                out.push_str(&url.path());
1892                                                                out
1893                                                            })
1894                                                            .property(
1895                                                                "authSchemes",
1896                                                                vec![::aws_smithy_types::Document::from({
1897                                                                    let mut out =
1898                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1899                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1900                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1901                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
1902                                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
1903                                                                    out
1904                                                                })],
1905                                                            )
1906                                                            .build());
1907                                                    }
1908                                                }
1909                                            }
1910                                        }
1911                                    }
1912                                }
1913                            }
1914                            if (*use_dual_stack) == (false) {
1915                                if (*use_fips) == (false) {
1916                                    if (*accelerate) == (false) {
1917                                        #[allow(unused_variables)]
1918                                        if let Some(endpoint) = endpoint {
1919                                            #[allow(unused_variables)]
1920                                            if let Some(url) =
1921                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
1922                                            {
1923                                                if (url.is_ip()) == (true) {
1924                                                    if !((region.as_ref() as &str) == ("aws-global")) {
1925                                                        if (*use_global_endpoint) == (true) {
1926                                                            if (region.as_ref() as &str) == ("us-east-1") {
1927                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1928                                                                    .url({
1929                                                                        let mut out = String::new();
1930                                                                        #[allow(clippy::needless_borrow)]
1931                                                                        out.push_str(&url.scheme());
1932                                                                        out.push_str("://");
1933                                                                        #[allow(clippy::needless_borrow)]
1934                                                                        out.push_str(&url.authority());
1935                                                                        #[allow(clippy::needless_borrow)]
1936                                                                        out.push_str(&url.normalized_path());
1937                                                                        #[allow(clippy::needless_borrow)]
1938                                                                        out.push_str(&bucket.as_ref() as &str);
1939                                                                        out
1940                                                                    })
1941                                                                    .property(
1942                                                                        "authSchemes",
1943                                                                        vec![::aws_smithy_types::Document::from({
1944                                                                            let mut out = ::std::collections::HashMap::<
1945                                                                                String,
1946                                                                                ::aws_smithy_types::Document,
1947                                                                            >::new(
1948                                                                            );
1949                                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1950                                                                            out.insert("name".to_string(), "sigv4".to_string().into());
1951                                                                            out.insert("signingName".to_string(), "s3".to_string().into());
1952                                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1953                                                                            out
1954                                                                        })],
1955                                                                    )
1956                                                                    .build());
1957                                                            }
1958                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1959                                                                .url({
1960                                                                    let mut out = String::new();
1961                                                                    #[allow(clippy::needless_borrow)]
1962                                                                    out.push_str(&url.scheme());
1963                                                                    out.push_str("://");
1964                                                                    #[allow(clippy::needless_borrow)]
1965                                                                    out.push_str(&url.authority());
1966                                                                    #[allow(clippy::needless_borrow)]
1967                                                                    out.push_str(&url.normalized_path());
1968                                                                    #[allow(clippy::needless_borrow)]
1969                                                                    out.push_str(&bucket.as_ref() as &str);
1970                                                                    out
1971                                                                })
1972                                                                .property(
1973                                                                    "authSchemes",
1974                                                                    vec![::aws_smithy_types::Document::from({
1975                                                                        let mut out =
1976                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
1977                                                                            );
1978                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
1979                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
1980                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
1981                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
1982                                                                        out
1983                                                                    })],
1984                                                                )
1985                                                                .build());
1986                                                        }
1987                                                    }
1988                                                }
1989                                            }
1990                                        }
1991                                    }
1992                                }
1993                            }
1994                            if (*use_dual_stack) == (false) {
1995                                if (*use_fips) == (false) {
1996                                    if (*accelerate) == (false) {
1997                                        #[allow(unused_variables)]
1998                                        if let Some(endpoint) = endpoint {
1999                                            #[allow(unused_variables)]
2000                                            if let Some(url) =
2001                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
2002                                            {
2003                                                if (url.is_ip()) == (false) {
2004                                                    if !((region.as_ref() as &str) == ("aws-global")) {
2005                                                        if (*use_global_endpoint) == (true) {
2006                                                            if (region.as_ref() as &str) == ("us-east-1") {
2007                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2008                                                                    .url({
2009                                                                        let mut out = String::new();
2010                                                                        #[allow(clippy::needless_borrow)]
2011                                                                        out.push_str(&url.scheme());
2012                                                                        out.push_str("://");
2013                                                                        #[allow(clippy::needless_borrow)]
2014                                                                        out.push_str(&bucket.as_ref() as &str);
2015                                                                        out.push('.');
2016                                                                        #[allow(clippy::needless_borrow)]
2017                                                                        out.push_str(&url.authority());
2018                                                                        #[allow(clippy::needless_borrow)]
2019                                                                        out.push_str(&url.path());
2020                                                                        out
2021                                                                    })
2022                                                                    .property(
2023                                                                        "authSchemes",
2024                                                                        vec![::aws_smithy_types::Document::from({
2025                                                                            let mut out = ::std::collections::HashMap::<
2026                                                                                String,
2027                                                                                ::aws_smithy_types::Document,
2028                                                                            >::new(
2029                                                                            );
2030                                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2031                                                                            out.insert("name".to_string(), "sigv4".to_string().into());
2032                                                                            out.insert("signingName".to_string(), "s3".to_string().into());
2033                                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
2034                                                                            out
2035                                                                        })],
2036                                                                    )
2037                                                                    .build());
2038                                                            }
2039                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2040                                                                .url({
2041                                                                    let mut out = String::new();
2042                                                                    #[allow(clippy::needless_borrow)]
2043                                                                    out.push_str(&url.scheme());
2044                                                                    out.push_str("://");
2045                                                                    #[allow(clippy::needless_borrow)]
2046                                                                    out.push_str(&bucket.as_ref() as &str);
2047                                                                    out.push('.');
2048                                                                    #[allow(clippy::needless_borrow)]
2049                                                                    out.push_str(&url.authority());
2050                                                                    #[allow(clippy::needless_borrow)]
2051                                                                    out.push_str(&url.path());
2052                                                                    out
2053                                                                })
2054                                                                .property(
2055                                                                    "authSchemes",
2056                                                                    vec![::aws_smithy_types::Document::from({
2057                                                                        let mut out =
2058                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
2059                                                                            );
2060                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
2061                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
2062                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
2063                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
2064                                                                        out
2065                                                                    })],
2066                                                                )
2067                                                                .build());
2068                                                        }
2069                                                    }
2070                                                }
2071                                            }
2072                                        }
2073                                    }
2074                                }
2075                            }
2076                            if (*use_dual_stack) == (false) {
2077                                if (*use_fips) == (false) {
2078                                    if (*accelerate) == (false) {
2079                                        #[allow(unused_variables)]
2080                                        if let Some(endpoint) = endpoint {
2081                                            #[allow(unused_variables)]
2082                                            if let Some(url) =
2083                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
2084                                            {
2085                                                if (url.is_ip()) == (true) {
2086                                                    if !((region.as_ref() as &str) == ("aws-global")) {
2087                                                        if (*use_global_endpoint) == (false) {
2088                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2089                                                                .url({
2090                                                                    let mut out = String::new();
2091                                                                    #[allow(clippy::needless_borrow)]
2092                                                                    out.push_str(&url.scheme());
2093                                                                    out.push_str("://");
2094                                                                    #[allow(clippy::needless_borrow)]
2095                                                                    out.push_str(&url.authority());
2096                                                                    #[allow(clippy::needless_borrow)]
2097                                                                    out.push_str(&url.normalized_path());
2098                                                                    #[allow(clippy::needless_borrow)]
2099                                                                    out.push_str(&bucket.as_ref() as &str);
2100                                                                    out
2101                                                                })
2102                                                                .property(
2103                                                                    "authSchemes",
2104                                                                    vec![::aws_smithy_types::Document::from({
2105                                                                        let mut out =
2106                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
2107                                                                            );
2108                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
2109                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
2110                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
2111                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
2112                                                                        out
2113                                                                    })],
2114                                                                )
2115                                                                .build());
2116                                                        }
2117                                                    }
2118                                                }
2119                                            }
2120                                        }
2121                                    }
2122                                }
2123                            }
2124                            if (*use_dual_stack) == (false) {
2125                                if (*use_fips) == (false) {
2126                                    if (*accelerate) == (false) {
2127                                        #[allow(unused_variables)]
2128                                        if let Some(endpoint) = endpoint {
2129                                            #[allow(unused_variables)]
2130                                            if let Some(url) =
2131                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
2132                                            {
2133                                                if (url.is_ip()) == (false) {
2134                                                    if !((region.as_ref() as &str) == ("aws-global")) {
2135                                                        if (*use_global_endpoint) == (false) {
2136                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2137                                                                .url({
2138                                                                    let mut out = String::new();
2139                                                                    #[allow(clippy::needless_borrow)]
2140                                                                    out.push_str(&url.scheme());
2141                                                                    out.push_str("://");
2142                                                                    #[allow(clippy::needless_borrow)]
2143                                                                    out.push_str(&bucket.as_ref() as &str);
2144                                                                    out.push('.');
2145                                                                    #[allow(clippy::needless_borrow)]
2146                                                                    out.push_str(&url.authority());
2147                                                                    #[allow(clippy::needless_borrow)]
2148                                                                    out.push_str(&url.path());
2149                                                                    out
2150                                                                })
2151                                                                .property(
2152                                                                    "authSchemes",
2153                                                                    vec![::aws_smithy_types::Document::from({
2154                                                                        let mut out =
2155                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
2156                                                                            );
2157                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
2158                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
2159                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
2160                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
2161                                                                        out
2162                                                                    })],
2163                                                                )
2164                                                                .build());
2165                                                        }
2166                                                    }
2167                                                }
2168                                            }
2169                                        }
2170                                    }
2171                                }
2172                            }
2173                            if (*use_dual_stack) == (false) {
2174                                if (*use_fips) == (false) {
2175                                    if (*accelerate) == (true) {
2176                                        if !(endpoint.is_some()) {
2177                                            if (region.as_ref() as &str) == ("aws-global") {
2178                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2179                                                    .url({
2180                                                        let mut out = String::new();
2181                                                        out.push_str("https://");
2182                                                        #[allow(clippy::needless_borrow)]
2183                                                        out.push_str(&bucket.as_ref() as &str);
2184                                                        out.push_str(".s3-accelerate.");
2185                                                        #[allow(clippy::needless_borrow)]
2186                                                        out.push_str(&partition_result.dns_suffix());
2187                                                        out
2188                                                    })
2189                                                    .property(
2190                                                        "authSchemes",
2191                                                        vec![::aws_smithy_types::Document::from({
2192                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2193                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2194                                                            out.insert("name".to_string(), "sigv4".to_string().into());
2195                                                            out.insert("signingName".to_string(), "s3".to_string().into());
2196                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
2197                                                            out
2198                                                        })],
2199                                                    )
2200                                                    .build());
2201                                            }
2202                                        }
2203                                    }
2204                                }
2205                            }
2206                            if (*use_dual_stack) == (false) {
2207                                if (*use_fips) == (false) {
2208                                    if (*accelerate) == (true) {
2209                                        if !(endpoint.is_some()) {
2210                                            if !((region.as_ref() as &str) == ("aws-global")) {
2211                                                if (*use_global_endpoint) == (true) {
2212                                                    if (region.as_ref() as &str) == ("us-east-1") {
2213                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2214                                                            .url({
2215                                                                let mut out = String::new();
2216                                                                out.push_str("https://");
2217                                                                #[allow(clippy::needless_borrow)]
2218                                                                out.push_str(&bucket.as_ref() as &str);
2219                                                                out.push_str(".s3-accelerate.");
2220                                                                #[allow(clippy::needless_borrow)]
2221                                                                out.push_str(&partition_result.dns_suffix());
2222                                                                out
2223                                                            })
2224                                                            .property(
2225                                                                "authSchemes",
2226                                                                vec![::aws_smithy_types::Document::from({
2227                                                                    let mut out =
2228                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2229                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2230                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2231                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
2232                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2233                                                                    out
2234                                                                })],
2235                                                            )
2236                                                            .build());
2237                                                    }
2238                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2239                                                        .url({
2240                                                            let mut out = String::new();
2241                                                            out.push_str("https://");
2242                                                            #[allow(clippy::needless_borrow)]
2243                                                            out.push_str(&bucket.as_ref() as &str);
2244                                                            out.push_str(".s3-accelerate.");
2245                                                            #[allow(clippy::needless_borrow)]
2246                                                            out.push_str(&partition_result.dns_suffix());
2247                                                            out
2248                                                        })
2249                                                        .property(
2250                                                            "authSchemes",
2251                                                            vec![::aws_smithy_types::Document::from({
2252                                                                let mut out =
2253                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2254                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
2255                                                                out.insert("name".to_string(), "sigv4".to_string().into());
2256                                                                out.insert("signingName".to_string(), "s3".to_string().into());
2257                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
2258                                                                out
2259                                                            })],
2260                                                        )
2261                                                        .build());
2262                                                }
2263                                            }
2264                                        }
2265                                    }
2266                                }
2267                            }
2268                            if (*use_dual_stack) == (false) {
2269                                if (*use_fips) == (false) {
2270                                    if (*accelerate) == (true) {
2271                                        if !(endpoint.is_some()) {
2272                                            if !((region.as_ref() as &str) == ("aws-global")) {
2273                                                if (*use_global_endpoint) == (false) {
2274                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2275                                                        .url({
2276                                                            let mut out = String::new();
2277                                                            out.push_str("https://");
2278                                                            #[allow(clippy::needless_borrow)]
2279                                                            out.push_str(&bucket.as_ref() as &str);
2280                                                            out.push_str(".s3-accelerate.");
2281                                                            #[allow(clippy::needless_borrow)]
2282                                                            out.push_str(&partition_result.dns_suffix());
2283                                                            out
2284                                                        })
2285                                                        .property(
2286                                                            "authSchemes",
2287                                                            vec![::aws_smithy_types::Document::from({
2288                                                                let mut out =
2289                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2290                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
2291                                                                out.insert("name".to_string(), "sigv4".to_string().into());
2292                                                                out.insert("signingName".to_string(), "s3".to_string().into());
2293                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
2294                                                                out
2295                                                            })],
2296                                                        )
2297                                                        .build());
2298                                                }
2299                                            }
2300                                        }
2301                                    }
2302                                }
2303                            }
2304                            if (*use_dual_stack) == (false) {
2305                                if (*use_fips) == (false) {
2306                                    if (*accelerate) == (false) {
2307                                        if !(endpoint.is_some()) {
2308                                            if (region.as_ref() as &str) == ("aws-global") {
2309                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2310                                                    .url({
2311                                                        let mut out = String::new();
2312                                                        out.push_str("https://");
2313                                                        #[allow(clippy::needless_borrow)]
2314                                                        out.push_str(&bucket.as_ref() as &str);
2315                                                        out.push_str(".s3.");
2316                                                        #[allow(clippy::needless_borrow)]
2317                                                        out.push_str(&partition_result.dns_suffix());
2318                                                        out
2319                                                    })
2320                                                    .property(
2321                                                        "authSchemes",
2322                                                        vec![::aws_smithy_types::Document::from({
2323                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2324                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2325                                                            out.insert("name".to_string(), "sigv4".to_string().into());
2326                                                            out.insert("signingName".to_string(), "s3".to_string().into());
2327                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
2328                                                            out
2329                                                        })],
2330                                                    )
2331                                                    .build());
2332                                            }
2333                                        }
2334                                    }
2335                                }
2336                            }
2337                            if (*use_dual_stack) == (false) {
2338                                if (*use_fips) == (false) {
2339                                    if (*accelerate) == (false) {
2340                                        if !(endpoint.is_some()) {
2341                                            if !((region.as_ref() as &str) == ("aws-global")) {
2342                                                if (*use_global_endpoint) == (true) {
2343                                                    if (region.as_ref() as &str) == ("us-east-1") {
2344                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2345                                                            .url({
2346                                                                let mut out = String::new();
2347                                                                out.push_str("https://");
2348                                                                #[allow(clippy::needless_borrow)]
2349                                                                out.push_str(&bucket.as_ref() as &str);
2350                                                                out.push_str(".s3.");
2351                                                                #[allow(clippy::needless_borrow)]
2352                                                                out.push_str(&partition_result.dns_suffix());
2353                                                                out
2354                                                            })
2355                                                            .property(
2356                                                                "authSchemes",
2357                                                                vec![::aws_smithy_types::Document::from({
2358                                                                    let mut out =
2359                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2360                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2361                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2362                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
2363                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2364                                                                    out
2365                                                                })],
2366                                                            )
2367                                                            .build());
2368                                                    }
2369                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2370                                                        .url({
2371                                                            let mut out = String::new();
2372                                                            out.push_str("https://");
2373                                                            #[allow(clippy::needless_borrow)]
2374                                                            out.push_str(&bucket.as_ref() as &str);
2375                                                            out.push_str(".s3.");
2376                                                            #[allow(clippy::needless_borrow)]
2377                                                            out.push_str(&region.as_ref() as &str);
2378                                                            out.push('.');
2379                                                            #[allow(clippy::needless_borrow)]
2380                                                            out.push_str(&partition_result.dns_suffix());
2381                                                            out
2382                                                        })
2383                                                        .property(
2384                                                            "authSchemes",
2385                                                            vec![::aws_smithy_types::Document::from({
2386                                                                let mut out =
2387                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2388                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
2389                                                                out.insert("name".to_string(), "sigv4".to_string().into());
2390                                                                out.insert("signingName".to_string(), "s3".to_string().into());
2391                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
2392                                                                out
2393                                                            })],
2394                                                        )
2395                                                        .build());
2396                                                }
2397                                            }
2398                                        }
2399                                    }
2400                                }
2401                            }
2402                            if (*use_dual_stack) == (false) {
2403                                if (*use_fips) == (false) {
2404                                    if (*accelerate) == (false) {
2405                                        if !(endpoint.is_some()) {
2406                                            if !((region.as_ref() as &str) == ("aws-global")) {
2407                                                if (*use_global_endpoint) == (false) {
2408                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2409                                                        .url({
2410                                                            let mut out = String::new();
2411                                                            out.push_str("https://");
2412                                                            #[allow(clippy::needless_borrow)]
2413                                                            out.push_str(&bucket.as_ref() as &str);
2414                                                            out.push_str(".s3.");
2415                                                            #[allow(clippy::needless_borrow)]
2416                                                            out.push_str(&region.as_ref() as &str);
2417                                                            out.push('.');
2418                                                            #[allow(clippy::needless_borrow)]
2419                                                            out.push_str(&partition_result.dns_suffix());
2420                                                            out
2421                                                        })
2422                                                        .property(
2423                                                            "authSchemes",
2424                                                            vec![::aws_smithy_types::Document::from({
2425                                                                let mut out =
2426                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2427                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
2428                                                                out.insert("name".to_string(), "sigv4".to_string().into());
2429                                                                out.insert("signingName".to_string(), "s3".to_string().into());
2430                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
2431                                                                out
2432                                                            })],
2433                                                        )
2434                                                        .build());
2435                                                }
2436                                            }
2437                                        }
2438                                    }
2439                                }
2440                            }
2441                            #[allow(unreachable_code)]
2442                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2443                                "No rules matched these parameters. This is a bug. {:?}",
2444                                _params
2445                            )));
2446                        }
2447                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2448                            "Invalid region: region was not a valid DNS name.".to_string(),
2449                        ));
2450                    }
2451                    #[allow(unreachable_code)]
2452                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2453                        "No rules matched these parameters. This is a bug. {:?}",
2454                        _params
2455                    )));
2456                }
2457            }
2458            #[allow(unused_variables)]
2459            if let Some(endpoint) = endpoint {
2460                #[allow(unused_variables)]
2461                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
2462                    if (url.scheme()) == ("http") {
2463                        if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, true, _diagnostic_collector) {
2464                            if (*force_path_style) == (false) {
2465                                if (*use_fips) == (false) {
2466                                    if (*use_dual_stack) == (false) {
2467                                        if (*accelerate) == (false) {
2468                                            #[allow(unused_variables)]
2469                                            if let Some(partition_result) =
2470                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
2471                                            {
2472                                                if crate::endpoint_lib::host::is_valid_host_label(
2473                                                    region.as_ref() as &str,
2474                                                    false,
2475                                                    _diagnostic_collector,
2476                                                ) {
2477                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2478                                                        .url({
2479                                                            let mut out = String::new();
2480                                                            #[allow(clippy::needless_borrow)]
2481                                                            out.push_str(&url.scheme());
2482                                                            out.push_str("://");
2483                                                            #[allow(clippy::needless_borrow)]
2484                                                            out.push_str(&bucket.as_ref() as &str);
2485                                                            out.push('.');
2486                                                            #[allow(clippy::needless_borrow)]
2487                                                            out.push_str(&url.authority());
2488                                                            #[allow(clippy::needless_borrow)]
2489                                                            out.push_str(&url.path());
2490                                                            out
2491                                                        })
2492                                                        .property(
2493                                                            "authSchemes",
2494                                                            vec![::aws_smithy_types::Document::from({
2495                                                                let mut out =
2496                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2497                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
2498                                                                out.insert("name".to_string(), "sigv4".to_string().into());
2499                                                                out.insert("signingName".to_string(), "s3".to_string().into());
2500                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
2501                                                                out
2502                                                            })],
2503                                                        )
2504                                                        .build());
2505                                                }
2506                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2507                                                    "Invalid region: region was not a valid DNS name.".to_string(),
2508                                                ));
2509                                            }
2510                                            #[allow(unreachable_code)]
2511                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2512                                                "No rules matched these parameters. This is a bug. {:?}",
2513                                                _params
2514                                            )));
2515                                        }
2516                                    }
2517                                }
2518                            }
2519                        }
2520                    }
2521                }
2522            }
2523            if (*force_path_style) == (false) {
2524                #[allow(unused_variables)]
2525                if let Some(bucket_arn) = crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector) {
2526                    #[allow(unused_variables)]
2527                    if let Some(arn_type) = bucket_arn.resource_id().first().cloned() {
2528                        if !((arn_type.as_ref() as &str) == ("")) {
2529                            if (bucket_arn.service()) == ("s3-object-lambda") {
2530                                if (arn_type.as_ref() as &str) == ("accesspoint") {
2531                                    #[allow(unused_variables)]
2532                                    if let Some(access_point_name) = bucket_arn.resource_id().get(1).cloned() {
2533                                        if !((access_point_name.as_ref() as &str) == ("")) {
2534                                            if (*use_dual_stack) == (true) {
2535                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2536                                                    "S3 Object Lambda does not support Dual-stack".to_string(),
2537                                                ));
2538                                            }
2539                                            if (*accelerate) == (true) {
2540                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2541                                                    "S3 Object Lambda does not support S3 Accelerate".to_string(),
2542                                                ));
2543                                            }
2544                                            if !((bucket_arn.region()) == ("")) {
2545                                                #[allow(unused_variables)]
2546                                                if let Some(disable_access_points) = disable_access_points {
2547                                                    if (*disable_access_points) == (true) {
2548                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2549                                                            "Access points are not supported for this operation".to_string(),
2550                                                        ));
2551                                                    }
2552                                                }
2553                                                if !(bucket_arn.resource_id().get(2).cloned().is_some()) {
2554                                                    #[allow(unused_variables)]
2555                                                    if let Some(use_arn_region) = use_arn_region {
2556                                                        if (*use_arn_region) == (false) {
2557                                                            if !((bucket_arn.region()) == (region.as_ref() as &str)) {
2558                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
2559                                                                    let mut out = String::new();
2560                                                                    out.push_str("Invalid configuration: region from ARN `");
2561                                                                    #[allow(clippy::needless_borrow)]
2562                                                                    out.push_str(&bucket_arn.region());
2563                                                                    out.push_str("` does not match client region `");
2564                                                                    #[allow(clippy::needless_borrow)]
2565                                                                    out.push_str(&region.as_ref() as &str);
2566                                                                    out.push_str("` and UseArnRegion is `false`");
2567                                                                    out
2568                                                                }));
2569                                                            }
2570                                                        }
2571                                                    }
2572                                                    #[allow(unused_variables)]
2573                                                    if let Some(bucket_partition) =
2574                                                        partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
2575                                                    {
2576                                                        #[allow(unused_variables)]
2577                                                        if let Some(partition_result) =
2578                                                            partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
2579                                                        {
2580                                                            if (bucket_partition.name()) == (partition_result.name()) {
2581                                                                if crate::endpoint_lib::host::is_valid_host_label(
2582                                                                    bucket_arn.region(),
2583                                                                    true,
2584                                                                    _diagnostic_collector,
2585                                                                ) {
2586                                                                    if (bucket_arn.account_id()) == ("") {
2587                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2588                                                                            "Invalid ARN: Missing account id".to_string(),
2589                                                                        ));
2590                                                                    }
2591                                                                    if crate::endpoint_lib::host::is_valid_host_label(
2592                                                                        bucket_arn.account_id(),
2593                                                                        false,
2594                                                                        _diagnostic_collector,
2595                                                                    ) {
2596                                                                        if crate::endpoint_lib::host::is_valid_host_label(
2597                                                                            access_point_name.as_ref() as &str,
2598                                                                            false,
2599                                                                            _diagnostic_collector,
2600                                                                        ) {
2601                                                                            #[allow(unused_variables)]
2602                                                                            if let Some(endpoint) = endpoint {
2603                                                                                #[allow(unused_variables)]
2604                                                                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
2605                                                                                    endpoint.as_ref() as &str,
2606                                                                                    _diagnostic_collector,
2607                                                                                ) {
2608                                                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2609                                                                                        .url({
2610                                                                                            let mut out = String::new();
2611                                                                                            #[allow(clippy::needless_borrow)]
2612                                                                                            out.push_str(&url.scheme());
2613                                                                                            out.push_str("://");
2614                                                                                            #[allow(clippy::needless_borrow)]
2615                                                                                            out.push_str(&access_point_name.as_ref() as &str);
2616                                                                                            out.push('-');
2617                                                                                            #[allow(clippy::needless_borrow)]
2618                                                                                            out.push_str(&bucket_arn.account_id());
2619                                                                                            out.push('.');
2620                                                                                            #[allow(clippy::needless_borrow)]
2621                                                                                            out.push_str(&url.authority());
2622                                                                                            #[allow(clippy::needless_borrow)]
2623                                                                                            out.push_str(&url.path());
2624                                                                                            out
2625                                                                                        })
2626                                                                                        .property(
2627                                                                                            "authSchemes",
2628                                                                                            vec![::aws_smithy_types::Document::from({
2629                                                                                                let mut out = ::std::collections::HashMap::<
2630                                                                                                    String,
2631                                                                                                    ::aws_smithy_types::Document,
2632                                                                                                >::new(
2633                                                                                                );
2634                                                                                                out.insert(
2635                                                                                                    "disableDoubleEncoding".to_string(),
2636                                                                                                    true.into(),
2637                                                                                                );
2638                                                                                                out.insert(
2639                                                                                                    "name".to_string(),
2640                                                                                                    "sigv4".to_string().into(),
2641                                                                                                );
2642                                                                                                out.insert(
2643                                                                                                    "signingName".to_string(),
2644                                                                                                    "s3-object-lambda".to_string().into(),
2645                                                                                                );
2646                                                                                                out.insert(
2647                                                                                                    "signingRegion".to_string(),
2648                                                                                                    bucket_arn.region().to_owned().into(),
2649                                                                                                );
2650                                                                                                out
2651                                                                                            })],
2652                                                                                        )
2653                                                                                        .build());
2654                                                                                }
2655                                                                            }
2656                                                                            if (*use_fips) == (true) {
2657                                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2658                                                                                    .url({
2659                                                                                        let mut out = String::new();
2660                                                                                        out.push_str("https://");
2661                                                                                        #[allow(clippy::needless_borrow)]
2662                                                                                        out.push_str(&access_point_name.as_ref() as &str);
2663                                                                                        out.push('-');
2664                                                                                        #[allow(clippy::needless_borrow)]
2665                                                                                        out.push_str(&bucket_arn.account_id());
2666                                                                                        out.push_str(".s3-object-lambda-fips.");
2667                                                                                        #[allow(clippy::needless_borrow)]
2668                                                                                        out.push_str(&bucket_arn.region());
2669                                                                                        out.push('.');
2670                                                                                        #[allow(clippy::needless_borrow)]
2671                                                                                        out.push_str(&bucket_partition.dns_suffix());
2672                                                                                        out
2673                                                                                    })
2674                                                                                    .property(
2675                                                                                        "authSchemes",
2676                                                                                        vec![::aws_smithy_types::Document::from({
2677                                                                                            let mut out = ::std::collections::HashMap::<
2678                                                                                                String,
2679                                                                                                ::aws_smithy_types::Document,
2680                                                                                            >::new(
2681                                                                                            );
2682                                                                                            out.insert(
2683                                                                                                "disableDoubleEncoding".to_string(),
2684                                                                                                true.into(),
2685                                                                                            );
2686                                                                                            out.insert(
2687                                                                                                "name".to_string(),
2688                                                                                                "sigv4".to_string().into(),
2689                                                                                            );
2690                                                                                            out.insert(
2691                                                                                                "signingName".to_string(),
2692                                                                                                "s3-object-lambda".to_string().into(),
2693                                                                                            );
2694                                                                                            out.insert(
2695                                                                                                "signingRegion".to_string(),
2696                                                                                                bucket_arn.region().to_owned().into(),
2697                                                                                            );
2698                                                                                            out
2699                                                                                        })],
2700                                                                                    )
2701                                                                                    .build());
2702                                                                            }
2703                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2704                                                                                .url({
2705                                                                                    let mut out = String::new();
2706                                                                                    out.push_str("https://");
2707                                                                                    #[allow(clippy::needless_borrow)]
2708                                                                                    out.push_str(&access_point_name.as_ref() as &str);
2709                                                                                    out.push('-');
2710                                                                                    #[allow(clippy::needless_borrow)]
2711                                                                                    out.push_str(&bucket_arn.account_id());
2712                                                                                    out.push_str(".s3-object-lambda.");
2713                                                                                    #[allow(clippy::needless_borrow)]
2714                                                                                    out.push_str(&bucket_arn.region());
2715                                                                                    out.push('.');
2716                                                                                    #[allow(clippy::needless_borrow)]
2717                                                                                    out.push_str(&bucket_partition.dns_suffix());
2718                                                                                    out
2719                                                                                })
2720                                                                                .property(
2721                                                                                    "authSchemes",
2722                                                                                    vec![::aws_smithy_types::Document::from({
2723                                                                                        let mut out = ::std::collections::HashMap::<
2724                                                                                            String,
2725                                                                                            ::aws_smithy_types::Document,
2726                                                                                        >::new(
2727                                                                                        );
2728                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
2729                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
2730                                                                                        out.insert(
2731                                                                                            "signingName".to_string(),
2732                                                                                            "s3-object-lambda".to_string().into(),
2733                                                                                        );
2734                                                                                        out.insert(
2735                                                                                            "signingRegion".to_string(),
2736                                                                                            bucket_arn.region().to_owned().into(),
2737                                                                                        );
2738                                                                                        out
2739                                                                                    })],
2740                                                                                )
2741                                                                                .build());
2742                                                                        }
2743                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
2744                                                                            let mut out = String::new();
2745                                                                            out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
2746                                                                            #[allow(clippy::needless_borrow)]
2747                                                                            out.push_str(&access_point_name.as_ref() as &str);
2748                                                                            out.push('`');
2749                                                                            out
2750                                                                        }));
2751                                                                    }
2752                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
2753                                                                        let mut out = String::new();
2754                                                                        out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
2755                                                                        #[allow(clippy::needless_borrow)]
2756                                                                        out.push_str(&bucket_arn.account_id());
2757                                                                        out.push('`');
2758                                                                        out
2759                                                                    }));
2760                                                                }
2761                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
2762                                                                    let mut out = String::new();
2763                                                                    out.push_str("Invalid region in ARN: `");
2764                                                                    #[allow(clippy::needless_borrow)]
2765                                                                    out.push_str(&bucket_arn.region());
2766                                                                    out.push_str("` (invalid DNS name)");
2767                                                                    out
2768                                                                }));
2769                                                            }
2770                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
2771                                                                let mut out = String::new();
2772                                                                out.push_str("Client was configured for partition `");
2773                                                                #[allow(clippy::needless_borrow)]
2774                                                                out.push_str(&partition_result.name());
2775                                                                out.push_str("` but ARN (`");
2776                                                                #[allow(clippy::needless_borrow)]
2777                                                                out.push_str(&bucket.as_ref() as &str);
2778                                                                out.push_str("`) has `");
2779                                                                #[allow(clippy::needless_borrow)]
2780                                                                out.push_str(&bucket_partition.name());
2781                                                                out.push('`');
2782                                                                out
2783                                                            }));
2784                                                        }
2785                                                        #[allow(unreachable_code)]
2786                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2787                                                            "No rules matched these parameters. This is a bug. {:?}",
2788                                                            _params
2789                                                        )));
2790                                                    }
2791                                                    #[allow(unreachable_code)]
2792                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2793                                                        "No rules matched these parameters. This is a bug. {:?}",
2794                                                        _params
2795                                                    )));
2796                                                }
2797                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2798                                                    "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
2799                                                        .to_string(),
2800                                                ));
2801                                            }
2802                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2803                                                "Invalid ARN: bucket ARN is missing a region".to_string(),
2804                                            ));
2805                                        }
2806                                    }
2807                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2808                                        "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"
2809                                            .to_string(),
2810                                    ));
2811                                }
2812                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
2813                                    let mut out = String::new();
2814                                    out.push_str("Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `");
2815                                    #[allow(clippy::needless_borrow)]
2816                                    out.push_str(&arn_type.as_ref() as &str);
2817                                    out.push('`');
2818                                    out
2819                                }));
2820                            }
2821                            if (arn_type.as_ref() as &str) == ("accesspoint") {
2822                                #[allow(unused_variables)]
2823                                if let Some(access_point_name) = bucket_arn.resource_id().get(1).cloned() {
2824                                    if !((access_point_name.as_ref() as &str) == ("")) {
2825                                        if !((bucket_arn.region()) == ("")) {
2826                                            if (arn_type.as_ref() as &str) == ("accesspoint") {
2827                                                if !((bucket_arn.region()) == ("")) {
2828                                                    #[allow(unused_variables)]
2829                                                    if let Some(disable_access_points) = disable_access_points {
2830                                                        if (*disable_access_points) == (true) {
2831                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2832                                                                "Access points are not supported for this operation".to_string(),
2833                                                            ));
2834                                                        }
2835                                                    }
2836                                                    if !(bucket_arn.resource_id().get(2).cloned().is_some()) {
2837                                                        #[allow(unused_variables)]
2838                                                        if let Some(use_arn_region) = use_arn_region {
2839                                                            if (*use_arn_region) == (false) {
2840                                                                if !((bucket_arn.region()) == (region.as_ref() as &str)) {
2841                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
2842                                                                        let mut out = String::new();
2843                                                                        out.push_str("Invalid configuration: region from ARN `");
2844                                                                        #[allow(clippy::needless_borrow)]
2845                                                                        out.push_str(&bucket_arn.region());
2846                                                                        out.push_str("` does not match client region `");
2847                                                                        #[allow(clippy::needless_borrow)]
2848                                                                        out.push_str(&region.as_ref() as &str);
2849                                                                        out.push_str("` and UseArnRegion is `false`");
2850                                                                        out
2851                                                                    }));
2852                                                                }
2853                                                            }
2854                                                        }
2855                                                        #[allow(unused_variables)]
2856                                                        if let Some(bucket_partition) =
2857                                                            partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
2858                                                        {
2859                                                            #[allow(unused_variables)]
2860                                                            if let Some(partition_result) =
2861                                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
2862                                                            {
2863                                                                if (bucket_partition.name()) == (partition_result.name()) {
2864                                                                    if crate::endpoint_lib::host::is_valid_host_label(
2865                                                                        bucket_arn.region(),
2866                                                                        true,
2867                                                                        _diagnostic_collector,
2868                                                                    ) {
2869                                                                        if (bucket_arn.service()) == ("s3") {
2870                                                                            if crate::endpoint_lib::host::is_valid_host_label(
2871                                                                                bucket_arn.account_id(),
2872                                                                                false,
2873                                                                                _diagnostic_collector,
2874                                                                            ) {
2875                                                                                if crate::endpoint_lib::host::is_valid_host_label(
2876                                                                                    access_point_name.as_ref() as &str,
2877                                                                                    false,
2878                                                                                    _diagnostic_collector,
2879                                                                                ) {
2880                                                                                    if (*accelerate) == (true) {
2881                                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message("Access Points do not support S3 Accelerate"
2882.to_string()));
2883                                                                                    }
2884                                                                                    if (*use_fips) == (true) {
2885                                                                                        if (*use_dual_stack) == (true) {
2886                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
2887out.push_str("https://");
2888#[allow(clippy::needless_borrow)]
2889out.push_str(&access_point_name.as_ref() as &str);
2890out.push('-');
2891#[allow(clippy::needless_borrow)]
2892out.push_str(&bucket_arn.account_id());
2893out.push_str(".s3-accesspoint-fips.dualstack.");
2894#[allow(clippy::needless_borrow)]
2895out.push_str(&bucket_arn.region());
2896out.push('.');
2897#[allow(clippy::needless_borrow)]
2898out.push_str(&bucket_partition.dns_suffix());
2899out })
2900.property("authSchemes", vec![::aws_smithy_types::Document::from( {
2901    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2902    out.insert("disableDoubleEncoding".to_string(), true.into());
2903    out.insert("name".to_string(), "sigv4"
2904    .to_string().into());
2905    out.insert("signingName".to_string(), "s3"
2906    .to_string().into());
2907    out.insert("signingRegion".to_string(), bucket_arn.region()
2908    .to_owned().into());
2909    out
2910}),])
2911.build());
2912                                                                                        }
2913                                                                                    }
2914                                                                                    if (*use_fips) == (true) {
2915                                                                                        if (*use_dual_stack) == (false) {
2916                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
2917out.push_str("https://");
2918#[allow(clippy::needless_borrow)]
2919out.push_str(&access_point_name.as_ref() as &str);
2920out.push('-');
2921#[allow(clippy::needless_borrow)]
2922out.push_str(&bucket_arn.account_id());
2923out.push_str(".s3-accesspoint-fips.");
2924#[allow(clippy::needless_borrow)]
2925out.push_str(&bucket_arn.region());
2926out.push('.');
2927#[allow(clippy::needless_borrow)]
2928out.push_str(&bucket_partition.dns_suffix());
2929out })
2930.property("authSchemes", vec![::aws_smithy_types::Document::from( {
2931    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2932    out.insert("disableDoubleEncoding".to_string(), true.into());
2933    out.insert("name".to_string(), "sigv4"
2934    .to_string().into());
2935    out.insert("signingName".to_string(), "s3"
2936    .to_string().into());
2937    out.insert("signingRegion".to_string(), bucket_arn.region()
2938    .to_owned().into());
2939    out
2940}),])
2941.build());
2942                                                                                        }
2943                                                                                    }
2944                                                                                    if (*use_fips) == (false) {
2945                                                                                        if (*use_dual_stack) == (true) {
2946                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
2947out.push_str("https://");
2948#[allow(clippy::needless_borrow)]
2949out.push_str(&access_point_name.as_ref() as &str);
2950out.push('-');
2951#[allow(clippy::needless_borrow)]
2952out.push_str(&bucket_arn.account_id());
2953out.push_str(".s3-accesspoint.dualstack.");
2954#[allow(clippy::needless_borrow)]
2955out.push_str(&bucket_arn.region());
2956out.push('.');
2957#[allow(clippy::needless_borrow)]
2958out.push_str(&bucket_partition.dns_suffix());
2959out })
2960.property("authSchemes", vec![::aws_smithy_types::Document::from( {
2961    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2962    out.insert("disableDoubleEncoding".to_string(), true.into());
2963    out.insert("name".to_string(), "sigv4"
2964    .to_string().into());
2965    out.insert("signingName".to_string(), "s3"
2966    .to_string().into());
2967    out.insert("signingRegion".to_string(), bucket_arn.region()
2968    .to_owned().into());
2969    out
2970}),])
2971.build());
2972                                                                                        }
2973                                                                                    }
2974                                                                                    if (*use_fips) == (false) {
2975                                                                                        if (*use_dual_stack) == (false) {
2976                                                                                            #[allow(unused_variables)]
2977                                                                                            if let Some(endpoint) = endpoint {
2978                                                                                                #[allow(unused_variables)]
2979                                                                                                if let Some(url) =
2980                                                                                                    crate::endpoint_lib::parse_url::parse_url(
2981                                                                                                        endpoint.as_ref() as &str,
2982                                                                                                        _diagnostic_collector,
2983                                                                                                    )
2984                                                                                                {
2985                                                                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
2986#[allow(clippy::needless_borrow)]
2987out.push_str(&url.scheme());
2988out.push_str("://");
2989#[allow(clippy::needless_borrow)]
2990out.push_str(&access_point_name.as_ref() as &str);
2991out.push('-');
2992#[allow(clippy::needless_borrow)]
2993out.push_str(&bucket_arn.account_id());
2994out.push('.');
2995#[allow(clippy::needless_borrow)]
2996out.push_str(&url.authority());
2997#[allow(clippy::needless_borrow)]
2998out.push_str(&url.path());
2999out })
3000.property("authSchemes", vec![::aws_smithy_types::Document::from( {
3001    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3002    out.insert("disableDoubleEncoding".to_string(), true.into());
3003    out.insert("name".to_string(), "sigv4"
3004    .to_string().into());
3005    out.insert("signingName".to_string(), "s3"
3006    .to_string().into());
3007    out.insert("signingRegion".to_string(), bucket_arn.region()
3008    .to_owned().into());
3009    out
3010}),])
3011.build());
3012                                                                                                }
3013                                                                                            }
3014                                                                                        }
3015                                                                                    }
3016                                                                                    if (*use_fips) == (false) {
3017                                                                                        if (*use_dual_stack) == (false) {
3018                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
3019out.push_str("https://");
3020#[allow(clippy::needless_borrow)]
3021out.push_str(&access_point_name.as_ref() as &str);
3022out.push('-');
3023#[allow(clippy::needless_borrow)]
3024out.push_str(&bucket_arn.account_id());
3025out.push_str(".s3-accesspoint.");
3026#[allow(clippy::needless_borrow)]
3027out.push_str(&bucket_arn.region());
3028out.push('.');
3029#[allow(clippy::needless_borrow)]
3030out.push_str(&bucket_partition.dns_suffix());
3031out })
3032.property("authSchemes", vec![::aws_smithy_types::Document::from( {
3033    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3034    out.insert("disableDoubleEncoding".to_string(), true.into());
3035    out.insert("name".to_string(), "sigv4"
3036    .to_string().into());
3037    out.insert("signingName".to_string(), "s3"
3038    .to_string().into());
3039    out.insert("signingRegion".to_string(), bucket_arn.region()
3040    .to_owned().into());
3041    out
3042}),])
3043.build());
3044                                                                                        }
3045                                                                                    }
3046                                                                                    #[allow(unreachable_code)]
3047return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!("No rules matched these parameters. This is a bug. {:?}", _params)));
3048                                                                                }
3049                                                                                return Err(
3050                                                                                    ::aws_smithy_http::endpoint::ResolveEndpointError::message({
3051                                                                                        let mut out = String::new();
3052                                                                                        out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
3053                                                                                        #[allow(clippy::needless_borrow)]
3054                                                                                        out.push_str(&access_point_name.as_ref() as &str);
3055                                                                                        out.push('`');
3056                                                                                        out
3057                                                                                    }),
3058                                                                                );
3059                                                                            }
3060                                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3061                                                                                {
3062                                                                                    let mut out = String::new();
3063                                                                                    out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
3064                                                                                    #[allow(clippy::needless_borrow)]
3065                                                                                    out.push_str(&bucket_arn.account_id());
3066                                                                                    out.push('`');
3067                                                                                    out
3068                                                                                },
3069                                                                            ));
3070                                                                        }
3071                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3072                                                                            let mut out = String::new();
3073                                                                            out.push_str("Invalid ARN: The ARN was not for the S3 service, found: ");
3074                                                                            #[allow(clippy::needless_borrow)]
3075                                                                            out.push_str(&bucket_arn.service());
3076                                                                            out
3077                                                                        }));
3078                                                                    }
3079                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3080                                                                        let mut out = String::new();
3081                                                                        out.push_str("Invalid region in ARN: `");
3082                                                                        #[allow(clippy::needless_borrow)]
3083                                                                        out.push_str(&bucket_arn.region());
3084                                                                        out.push_str("` (invalid DNS name)");
3085                                                                        out
3086                                                                    }));
3087                                                                }
3088                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3089                                                                    let mut out = String::new();
3090                                                                    out.push_str("Client was configured for partition `");
3091                                                                    #[allow(clippy::needless_borrow)]
3092                                                                    out.push_str(&partition_result.name());
3093                                                                    out.push_str("` but ARN (`");
3094                                                                    #[allow(clippy::needless_borrow)]
3095                                                                    out.push_str(&bucket.as_ref() as &str);
3096                                                                    out.push_str("`) has `");
3097                                                                    #[allow(clippy::needless_borrow)]
3098                                                                    out.push_str(&bucket_partition.name());
3099                                                                    out.push('`');
3100                                                                    out
3101                                                                }));
3102                                                            }
3103                                                            #[allow(unreachable_code)]
3104                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3105                                                                "No rules matched these parameters. This is a bug. {:?}",
3106                                                                _params
3107                                                            )));
3108                                                        }
3109                                                        #[allow(unreachable_code)]
3110                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3111                                                            "No rules matched these parameters. This is a bug. {:?}",
3112                                                            _params
3113                                                        )));
3114                                                    }
3115                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3116                                                        "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
3117                                                            .to_string(),
3118                                                    ));
3119                                                }
3120                                                #[allow(unreachable_code)]
3121                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3122                                                    "No rules matched these parameters. This is a bug. {:?}",
3123                                                    _params
3124                                                )));
3125                                            }
3126                                            #[allow(unreachable_code)]
3127                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3128                                                "No rules matched these parameters. This is a bug. {:?}",
3129                                                _params
3130                                            )));
3131                                        }
3132                                        if crate::endpoint_lib::host::is_valid_host_label(
3133                                            access_point_name.as_ref() as &str,
3134                                            true,
3135                                            _diagnostic_collector,
3136                                        ) {
3137                                            if (*use_dual_stack) == (true) {
3138                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3139                                                    "S3 MRAP does not support dual-stack".to_string(),
3140                                                ));
3141                                            }
3142                                            if (*use_fips) == (true) {
3143                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3144                                                    "S3 MRAP does not support FIPS".to_string(),
3145                                                ));
3146                                            }
3147                                            if (*accelerate) == (true) {
3148                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3149                                                    "S3 MRAP does not support S3 Accelerate".to_string(),
3150                                                ));
3151                                            }
3152                                            if (*disable_multi_region_access_points) == (true) {
3153                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3154                                                    "Invalid configuration: Multi-Region Access Point ARNs are disabled.".to_string(),
3155                                                ));
3156                                            }
3157                                            #[allow(unused_variables)]
3158                                            if let Some(mrap_partition) =
3159                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
3160                                            {
3161                                                if (mrap_partition.name()) == (bucket_arn.partition()) {
3162                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3163                                                        .url({
3164                                                            let mut out = String::new();
3165                                                            out.push_str("https://");
3166                                                            #[allow(clippy::needless_borrow)]
3167                                                            out.push_str(&access_point_name.as_ref() as &str);
3168                                                            out.push_str(".accesspoint.s3-global.");
3169                                                            #[allow(clippy::needless_borrow)]
3170                                                            out.push_str(&mrap_partition.dns_suffix());
3171                                                            out
3172                                                        })
3173                                                        .property(
3174                                                            "authSchemes",
3175                                                            vec![::aws_smithy_types::Document::from({
3176                                                                let mut out =
3177                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3178                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
3179                                                                out.insert("name".to_string(), "sigv4a".to_string().into());
3180                                                                out.insert("signingName".to_string(), "s3".to_string().into());
3181                                                                out.insert(
3182                                                                    "signingRegionSet".to_string(),
3183                                                                    vec![::aws_smithy_types::Document::from("*".to_string())].into(),
3184                                                                );
3185                                                                out
3186                                                            })],
3187                                                        )
3188                                                        .build());
3189                                                }
3190                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3191                                                    let mut out = String::new();
3192                                                    out.push_str("Client was configured for partition `");
3193                                                    #[allow(clippy::needless_borrow)]
3194                                                    out.push_str(&mrap_partition.name());
3195                                                    out.push_str("` but bucket referred to partition `");
3196                                                    #[allow(clippy::needless_borrow)]
3197                                                    out.push_str(&bucket_arn.partition());
3198                                                    out.push('`');
3199                                                    out
3200                                                }));
3201                                            }
3202                                            #[allow(unreachable_code)]
3203                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3204                                                "No rules matched these parameters. This is a bug. {:?}",
3205                                                _params
3206                                            )));
3207                                        }
3208                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3209                                            "Invalid Access Point Name".to_string(),
3210                                        ));
3211                                    }
3212                                }
3213                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3214                                    "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"
3215                                        .to_string(),
3216                                ));
3217                            }
3218                            if (bucket_arn.service()) == ("s3-outposts") {
3219                                if (*use_dual_stack) == (true) {
3220                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3221                                        "S3 Outposts does not support Dual-stack".to_string(),
3222                                    ));
3223                                }
3224                                if (*use_fips) == (true) {
3225                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3226                                        "S3 Outposts does not support FIPS".to_string(),
3227                                    ));
3228                                }
3229                                if (*accelerate) == (true) {
3230                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3231                                        "S3 Outposts does not support S3 Accelerate".to_string(),
3232                                    ));
3233                                }
3234                                #[allow(unused_variables)]
3235                                if let Some(_) = bucket_arn.resource_id().get(4).cloned() {
3236                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3237                                        "Invalid Arn: Outpost Access Point ARN contains sub resources".to_string(),
3238                                    ));
3239                                }
3240                                #[allow(unused_variables)]
3241                                if let Some(outpost_id) = bucket_arn.resource_id().get(1).cloned() {
3242                                    if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
3243                                        #[allow(unused_variables)]
3244                                        if let Some(use_arn_region) = use_arn_region {
3245                                            if (*use_arn_region) == (false) {
3246                                                if !((bucket_arn.region()) == (region.as_ref() as &str)) {
3247                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3248                                                        let mut out = String::new();
3249                                                        out.push_str("Invalid configuration: region from ARN `");
3250                                                        #[allow(clippy::needless_borrow)]
3251                                                        out.push_str(&bucket_arn.region());
3252                                                        out.push_str("` does not match client region `");
3253                                                        #[allow(clippy::needless_borrow)]
3254                                                        out.push_str(&region.as_ref() as &str);
3255                                                        out.push_str("` and UseArnRegion is `false`");
3256                                                        out
3257                                                    }));
3258                                                }
3259                                            }
3260                                        }
3261                                        #[allow(unused_variables)]
3262                                        if let Some(bucket_partition) =
3263                                            partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
3264                                        {
3265                                            #[allow(unused_variables)]
3266                                            if let Some(partition_result) =
3267                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
3268                                            {
3269                                                if (bucket_partition.name()) == (partition_result.name()) {
3270                                                    if crate::endpoint_lib::host::is_valid_host_label(
3271                                                        bucket_arn.region(),
3272                                                        true,
3273                                                        _diagnostic_collector,
3274                                                    ) {
3275                                                        if crate::endpoint_lib::host::is_valid_host_label(
3276                                                            bucket_arn.account_id(),
3277                                                            false,
3278                                                            _diagnostic_collector,
3279                                                        ) {
3280                                                            #[allow(unused_variables)]
3281                                                            if let Some(outpost_type) = bucket_arn.resource_id().get(2).cloned() {
3282                                                                #[allow(unused_variables)]
3283                                                                if let Some(access_point_name) = bucket_arn.resource_id().get(3).cloned() {
3284                                                                    if (outpost_type.as_ref() as &str) == ("accesspoint") {
3285                                                                        #[allow(unused_variables)]
3286                                                                        if let Some(endpoint) = endpoint {
3287                                                                            #[allow(unused_variables)]
3288                                                                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
3289                                                                                endpoint.as_ref() as &str,
3290                                                                                _diagnostic_collector,
3291                                                                            ) {
3292                                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3293                                                                                    .url({
3294                                                                                        let mut out = String::new();
3295                                                                                        out.push_str("https://");
3296                                                                                        #[allow(clippy::needless_borrow)]
3297                                                                                        out.push_str(&access_point_name.as_ref() as &str);
3298                                                                                        out.push('-');
3299                                                                                        #[allow(clippy::needless_borrow)]
3300                                                                                        out.push_str(&bucket_arn.account_id());
3301                                                                                        out.push('.');
3302                                                                                        #[allow(clippy::needless_borrow)]
3303                                                                                        out.push_str(&outpost_id.as_ref() as &str);
3304                                                                                        out.push('.');
3305                                                                                        #[allow(clippy::needless_borrow)]
3306                                                                                        out.push_str(&url.authority());
3307                                                                                        out
3308                                                                                    })
3309                                                                                    .property(
3310                                                                                        "authSchemes",
3311                                                                                        vec![
3312                                                                                            ::aws_smithy_types::Document::from({
3313                                                                                                let mut out = ::std::collections::HashMap::<
3314                                                                                                    String,
3315                                                                                                    ::aws_smithy_types::Document,
3316                                                                                                >::new(
3317                                                                                                );
3318                                                                                                out.insert(
3319                                                                                                    "disableDoubleEncoding".to_string(),
3320                                                                                                    true.into(),
3321                                                                                                );
3322                                                                                                out.insert(
3323                                                                                                    "name".to_string(),
3324                                                                                                    "sigv4a".to_string().into(),
3325                                                                                                );
3326                                                                                                out.insert(
3327                                                                                                    "signingName".to_string(),
3328                                                                                                    "s3-outposts".to_string().into(),
3329                                                                                                );
3330                                                                                                out.insert(
3331                                                                                                    "signingRegionSet".to_string(),
3332                                                                                                    vec![::aws_smithy_types::Document::from(
3333                                                                                                        "*".to_string(),
3334                                                                                                    )]
3335                                                                                                    .into(),
3336                                                                                                );
3337                                                                                                out
3338                                                                                            }),
3339                                                                                            ::aws_smithy_types::Document::from({
3340                                                                                                let mut out = ::std::collections::HashMap::<
3341                                                                                                    String,
3342                                                                                                    ::aws_smithy_types::Document,
3343                                                                                                >::new(
3344                                                                                                );
3345                                                                                                out.insert(
3346                                                                                                    "disableDoubleEncoding".to_string(),
3347                                                                                                    true.into(),
3348                                                                                                );
3349                                                                                                out.insert(
3350                                                                                                    "name".to_string(),
3351                                                                                                    "sigv4".to_string().into(),
3352                                                                                                );
3353                                                                                                out.insert(
3354                                                                                                    "signingName".to_string(),
3355                                                                                                    "s3-outposts".to_string().into(),
3356                                                                                                );
3357                                                                                                out.insert(
3358                                                                                                    "signingRegion".to_string(),
3359                                                                                                    bucket_arn.region().to_owned().into(),
3360                                                                                                );
3361                                                                                                out
3362                                                                                            }),
3363                                                                                        ],
3364                                                                                    )
3365                                                                                    .build());
3366                                                                            }
3367                                                                        }
3368                                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3369                                                                            .url({
3370                                                                                let mut out = String::new();
3371                                                                                out.push_str("https://");
3372                                                                                #[allow(clippy::needless_borrow)]
3373                                                                                out.push_str(&access_point_name.as_ref() as &str);
3374                                                                                out.push('-');
3375                                                                                #[allow(clippy::needless_borrow)]
3376                                                                                out.push_str(&bucket_arn.account_id());
3377                                                                                out.push('.');
3378                                                                                #[allow(clippy::needless_borrow)]
3379                                                                                out.push_str(&outpost_id.as_ref() as &str);
3380                                                                                out.push_str(".s3-outposts.");
3381                                                                                #[allow(clippy::needless_borrow)]
3382                                                                                out.push_str(&bucket_arn.region());
3383                                                                                out.push('.');
3384                                                                                #[allow(clippy::needless_borrow)]
3385                                                                                out.push_str(&bucket_partition.dns_suffix());
3386                                                                                out
3387                                                                            })
3388                                                                            .property(
3389                                                                                "authSchemes",
3390                                                                                vec![
3391                                                                                    ::aws_smithy_types::Document::from({
3392                                                                                        let mut out = ::std::collections::HashMap::<
3393                                                                                            String,
3394                                                                                            ::aws_smithy_types::Document,
3395                                                                                        >::new(
3396                                                                                        );
3397                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3398                                                                                        out.insert("name".to_string(), "sigv4a".to_string().into());
3399                                                                                        out.insert(
3400                                                                                            "signingName".to_string(),
3401                                                                                            "s3-outposts".to_string().into(),
3402                                                                                        );
3403                                                                                        out.insert(
3404                                                                                            "signingRegionSet".to_string(),
3405                                                                                            vec![::aws_smithy_types::Document::from("*".to_string())]
3406                                                                                                .into(),
3407                                                                                        );
3408                                                                                        out
3409                                                                                    }),
3410                                                                                    ::aws_smithy_types::Document::from({
3411                                                                                        let mut out = ::std::collections::HashMap::<
3412                                                                                            String,
3413                                                                                            ::aws_smithy_types::Document,
3414                                                                                        >::new(
3415                                                                                        );
3416                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3417                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
3418                                                                                        out.insert(
3419                                                                                            "signingName".to_string(),
3420                                                                                            "s3-outposts".to_string().into(),
3421                                                                                        );
3422                                                                                        out.insert(
3423                                                                                            "signingRegion".to_string(),
3424                                                                                            bucket_arn.region().to_owned().into(),
3425                                                                                        );
3426                                                                                        out
3427                                                                                    }),
3428                                                                                ],
3429                                                                            )
3430                                                                            .build());
3431                                                                    }
3432                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3433                                                                        let mut out = String::new();
3434                                                                        out.push_str("Expected an outpost type `accesspoint`, found ");
3435                                                                        #[allow(clippy::needless_borrow)]
3436                                                                        out.push_str(&outpost_type.as_ref() as &str);
3437                                                                        out
3438                                                                    }));
3439                                                                }
3440                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3441                                                                    "Invalid ARN: expected an access point name".to_string(),
3442                                                                ));
3443                                                            }
3444                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3445                                                                "Invalid ARN: Expected a 4-component resource".to_string(),
3446                                                            ));
3447                                                        }
3448                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3449                                                            let mut out = String::new();
3450                                                            out.push_str(
3451                                                                "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `",
3452                                                            );
3453                                                            #[allow(clippy::needless_borrow)]
3454                                                            out.push_str(&bucket_arn.account_id());
3455                                                            out.push('`');
3456                                                            out
3457                                                        }));
3458                                                    }
3459                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3460                                                        let mut out = String::new();
3461                                                        out.push_str("Invalid region in ARN: `");
3462                                                        #[allow(clippy::needless_borrow)]
3463                                                        out.push_str(&bucket_arn.region());
3464                                                        out.push_str("` (invalid DNS name)");
3465                                                        out
3466                                                    }));
3467                                                }
3468                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3469                                                    let mut out = String::new();
3470                                                    out.push_str("Client was configured for partition `");
3471                                                    #[allow(clippy::needless_borrow)]
3472                                                    out.push_str(&partition_result.name());
3473                                                    out.push_str("` but ARN (`");
3474                                                    #[allow(clippy::needless_borrow)]
3475                                                    out.push_str(&bucket.as_ref() as &str);
3476                                                    out.push_str("`) has `");
3477                                                    #[allow(clippy::needless_borrow)]
3478                                                    out.push_str(&bucket_partition.name());
3479                                                    out.push('`');
3480                                                    out
3481                                                }));
3482                                            }
3483                                            #[allow(unreachable_code)]
3484                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3485                                                "No rules matched these parameters. This is a bug. {:?}",
3486                                                _params
3487                                            )));
3488                                        }
3489                                        #[allow(unreachable_code)]
3490                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3491                                            "No rules matched these parameters. This is a bug. {:?}",
3492                                            _params
3493                                        )));
3494                                    }
3495                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3496                                        let mut out = String::new();
3497                                        out.push_str("Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
3498                                        #[allow(clippy::needless_borrow)]
3499                                        out.push_str(&outpost_id.as_ref() as &str);
3500                                        out.push('`');
3501                                        out
3502                                    }));
3503                                }
3504                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3505                                    "Invalid ARN: The Outpost Id was not set".to_string(),
3506                                ));
3507                            }
3508                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3509                                let mut out = String::new();
3510                                out.push_str("Invalid ARN: Unrecognized format: ");
3511                                #[allow(clippy::needless_borrow)]
3512                                out.push_str(&bucket.as_ref() as &str);
3513                                out.push_str(" (type: ");
3514                                #[allow(clippy::needless_borrow)]
3515                                out.push_str(&arn_type.as_ref() as &str);
3516                                out.push(')');
3517                                out
3518                            }));
3519                        }
3520                    }
3521                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3522                        "Invalid ARN: No ARN type specified".to_string(),
3523                    ));
3524                }
3525            }
3526            #[allow(unused_variables)]
3527            if let Some(arn_prefix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 4, false, _diagnostic_collector) {
3528                if (arn_prefix.as_ref() as &str) == ("arn:") {
3529                    if !(crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector).is_some()) {
3530                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
3531                            let mut out = String::new();
3532                            out.push_str("Invalid ARN: `");
3533                            #[allow(clippy::needless_borrow)]
3534                            out.push_str(&bucket.as_ref() as &str);
3535                            out.push_str("` was not a valid ARN");
3536                            out
3537                        }));
3538                    }
3539                }
3540            }
3541            if (*force_path_style) == (true) {
3542                #[allow(unused_variables)]
3543                if let Some(_) = crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector) {
3544                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3545                        "Path-style addressing cannot be used with ARN buckets".to_string(),
3546                    ));
3547                }
3548            }
3549            let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
3550            #[allow(unused_variables)]
3551            if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
3552                if (*accelerate) == (false) {
3553                    if (*use_dual_stack) == (true) {
3554                        if !(endpoint.is_some()) {
3555                            if (*use_fips) == (true) {
3556                                if (region.as_ref() as &str) == ("aws-global") {
3557                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3558                                        .url({
3559                                            let mut out = String::new();
3560                                            out.push_str("https://s3-fips.dualstack.us-east-1.");
3561                                            #[allow(clippy::needless_borrow)]
3562                                            out.push_str(&partition_result.dns_suffix());
3563                                            out.push('/');
3564                                            #[allow(clippy::needless_borrow)]
3565                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
3566                                            out
3567                                        })
3568                                        .property(
3569                                            "authSchemes",
3570                                            vec![::aws_smithy_types::Document::from({
3571                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3572                                                out.insert("disableDoubleEncoding".to_string(), true.into());
3573                                                out.insert("name".to_string(), "sigv4".to_string().into());
3574                                                out.insert("signingName".to_string(), "s3".to_string().into());
3575                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
3576                                                out
3577                                            })],
3578                                        )
3579                                        .build());
3580                                }
3581                            }
3582                        }
3583                    }
3584                    if (*use_dual_stack) == (true) {
3585                        if !(endpoint.is_some()) {
3586                            if (*use_fips) == (true) {
3587                                if !((region.as_ref() as &str) == ("aws-global")) {
3588                                    if (*use_global_endpoint) == (true) {
3589                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3590                                            .url({
3591                                                let mut out = String::new();
3592                                                out.push_str("https://s3-fips.dualstack.");
3593                                                #[allow(clippy::needless_borrow)]
3594                                                out.push_str(&region.as_ref() as &str);
3595                                                out.push('.');
3596                                                #[allow(clippy::needless_borrow)]
3597                                                out.push_str(&partition_result.dns_suffix());
3598                                                out.push('/');
3599                                                #[allow(clippy::needless_borrow)]
3600                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
3601                                                out
3602                                            })
3603                                            .property(
3604                                                "authSchemes",
3605                                                vec![::aws_smithy_types::Document::from({
3606                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3607                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
3608                                                    out.insert("name".to_string(), "sigv4".to_string().into());
3609                                                    out.insert("signingName".to_string(), "s3".to_string().into());
3610                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
3611                                                    out
3612                                                })],
3613                                            )
3614                                            .build());
3615                                    }
3616                                }
3617                            }
3618                        }
3619                    }
3620                    if (*use_dual_stack) == (true) {
3621                        if !(endpoint.is_some()) {
3622                            if (*use_fips) == (true) {
3623                                if !((region.as_ref() as &str) == ("aws-global")) {
3624                                    if (*use_global_endpoint) == (false) {
3625                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3626                                            .url({
3627                                                let mut out = String::new();
3628                                                out.push_str("https://s3-fips.dualstack.");
3629                                                #[allow(clippy::needless_borrow)]
3630                                                out.push_str(&region.as_ref() as &str);
3631                                                out.push('.');
3632                                                #[allow(clippy::needless_borrow)]
3633                                                out.push_str(&partition_result.dns_suffix());
3634                                                out.push('/');
3635                                                #[allow(clippy::needless_borrow)]
3636                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
3637                                                out
3638                                            })
3639                                            .property(
3640                                                "authSchemes",
3641                                                vec![::aws_smithy_types::Document::from({
3642                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3643                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
3644                                                    out.insert("name".to_string(), "sigv4".to_string().into());
3645                                                    out.insert("signingName".to_string(), "s3".to_string().into());
3646                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
3647                                                    out
3648                                                })],
3649                                            )
3650                                            .build());
3651                                    }
3652                                }
3653                            }
3654                        }
3655                    }
3656                    if (*use_dual_stack) == (false) {
3657                        if !(endpoint.is_some()) {
3658                            if (*use_fips) == (true) {
3659                                if (region.as_ref() as &str) == ("aws-global") {
3660                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3661                                        .url({
3662                                            let mut out = String::new();
3663                                            out.push_str("https://s3-fips.us-east-1.");
3664                                            #[allow(clippy::needless_borrow)]
3665                                            out.push_str(&partition_result.dns_suffix());
3666                                            out.push('/');
3667                                            #[allow(clippy::needless_borrow)]
3668                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
3669                                            out
3670                                        })
3671                                        .property(
3672                                            "authSchemes",
3673                                            vec![::aws_smithy_types::Document::from({
3674                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3675                                                out.insert("disableDoubleEncoding".to_string(), true.into());
3676                                                out.insert("name".to_string(), "sigv4".to_string().into());
3677                                                out.insert("signingName".to_string(), "s3".to_string().into());
3678                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
3679                                                out
3680                                            })],
3681                                        )
3682                                        .build());
3683                                }
3684                            }
3685                        }
3686                    }
3687                    if (*use_dual_stack) == (false) {
3688                        if !(endpoint.is_some()) {
3689                            if (*use_fips) == (true) {
3690                                if !((region.as_ref() as &str) == ("aws-global")) {
3691                                    if (*use_global_endpoint) == (true) {
3692                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3693                                            .url({
3694                                                let mut out = String::new();
3695                                                out.push_str("https://s3-fips.");
3696                                                #[allow(clippy::needless_borrow)]
3697                                                out.push_str(&region.as_ref() as &str);
3698                                                out.push('.');
3699                                                #[allow(clippy::needless_borrow)]
3700                                                out.push_str(&partition_result.dns_suffix());
3701                                                out.push('/');
3702                                                #[allow(clippy::needless_borrow)]
3703                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
3704                                                out
3705                                            })
3706                                            .property(
3707                                                "authSchemes",
3708                                                vec![::aws_smithy_types::Document::from({
3709                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3710                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
3711                                                    out.insert("name".to_string(), "sigv4".to_string().into());
3712                                                    out.insert("signingName".to_string(), "s3".to_string().into());
3713                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
3714                                                    out
3715                                                })],
3716                                            )
3717                                            .build());
3718                                    }
3719                                }
3720                            }
3721                        }
3722                    }
3723                    if (*use_dual_stack) == (false) {
3724                        if !(endpoint.is_some()) {
3725                            if (*use_fips) == (true) {
3726                                if !((region.as_ref() as &str) == ("aws-global")) {
3727                                    if (*use_global_endpoint) == (false) {
3728                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3729                                            .url({
3730                                                let mut out = String::new();
3731                                                out.push_str("https://s3-fips.");
3732                                                #[allow(clippy::needless_borrow)]
3733                                                out.push_str(&region.as_ref() as &str);
3734                                                out.push('.');
3735                                                #[allow(clippy::needless_borrow)]
3736                                                out.push_str(&partition_result.dns_suffix());
3737                                                out.push('/');
3738                                                #[allow(clippy::needless_borrow)]
3739                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
3740                                                out
3741                                            })
3742                                            .property(
3743                                                "authSchemes",
3744                                                vec![::aws_smithy_types::Document::from({
3745                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3746                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
3747                                                    out.insert("name".to_string(), "sigv4".to_string().into());
3748                                                    out.insert("signingName".to_string(), "s3".to_string().into());
3749                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
3750                                                    out
3751                                                })],
3752                                            )
3753                                            .build());
3754                                    }
3755                                }
3756                            }
3757                        }
3758                    }
3759                    if (*use_dual_stack) == (true) {
3760                        if !(endpoint.is_some()) {
3761                            if (*use_fips) == (false) {
3762                                if (region.as_ref() as &str) == ("aws-global") {
3763                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3764                                        .url({
3765                                            let mut out = String::new();
3766                                            out.push_str("https://s3.dualstack.us-east-1.");
3767                                            #[allow(clippy::needless_borrow)]
3768                                            out.push_str(&partition_result.dns_suffix());
3769                                            out.push('/');
3770                                            #[allow(clippy::needless_borrow)]
3771                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
3772                                            out
3773                                        })
3774                                        .property(
3775                                            "authSchemes",
3776                                            vec![::aws_smithy_types::Document::from({
3777                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3778                                                out.insert("disableDoubleEncoding".to_string(), true.into());
3779                                                out.insert("name".to_string(), "sigv4".to_string().into());
3780                                                out.insert("signingName".to_string(), "s3".to_string().into());
3781                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
3782                                                out
3783                                            })],
3784                                        )
3785                                        .build());
3786                                }
3787                            }
3788                        }
3789                    }
3790                    if (*use_dual_stack) == (true) {
3791                        if !(endpoint.is_some()) {
3792                            if (*use_fips) == (false) {
3793                                if !((region.as_ref() as &str) == ("aws-global")) {
3794                                    if (*use_global_endpoint) == (true) {
3795                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3796                                            .url({
3797                                                let mut out = String::new();
3798                                                out.push_str("https://s3.dualstack.");
3799                                                #[allow(clippy::needless_borrow)]
3800                                                out.push_str(&region.as_ref() as &str);
3801                                                out.push('.');
3802                                                #[allow(clippy::needless_borrow)]
3803                                                out.push_str(&partition_result.dns_suffix());
3804                                                out.push('/');
3805                                                #[allow(clippy::needless_borrow)]
3806                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
3807                                                out
3808                                            })
3809                                            .property(
3810                                                "authSchemes",
3811                                                vec![::aws_smithy_types::Document::from({
3812                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3813                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
3814                                                    out.insert("name".to_string(), "sigv4".to_string().into());
3815                                                    out.insert("signingName".to_string(), "s3".to_string().into());
3816                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
3817                                                    out
3818                                                })],
3819                                            )
3820                                            .build());
3821                                    }
3822                                }
3823                            }
3824                        }
3825                    }
3826                    if (*use_dual_stack) == (true) {
3827                        if !(endpoint.is_some()) {
3828                            if (*use_fips) == (false) {
3829                                if !((region.as_ref() as &str) == ("aws-global")) {
3830                                    if (*use_global_endpoint) == (false) {
3831                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3832                                            .url({
3833                                                let mut out = String::new();
3834                                                out.push_str("https://s3.dualstack.");
3835                                                #[allow(clippy::needless_borrow)]
3836                                                out.push_str(&region.as_ref() as &str);
3837                                                out.push('.');
3838                                                #[allow(clippy::needless_borrow)]
3839                                                out.push_str(&partition_result.dns_suffix());
3840                                                out.push('/');
3841                                                #[allow(clippy::needless_borrow)]
3842                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
3843                                                out
3844                                            })
3845                                            .property(
3846                                                "authSchemes",
3847                                                vec![::aws_smithy_types::Document::from({
3848                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3849                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
3850                                                    out.insert("name".to_string(), "sigv4".to_string().into());
3851                                                    out.insert("signingName".to_string(), "s3".to_string().into());
3852                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
3853                                                    out
3854                                                })],
3855                                            )
3856                                            .build());
3857                                    }
3858                                }
3859                            }
3860                        }
3861                    }
3862                    if (*use_dual_stack) == (false) {
3863                        #[allow(unused_variables)]
3864                        if let Some(endpoint) = endpoint {
3865                            #[allow(unused_variables)]
3866                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
3867                                if (*use_fips) == (false) {
3868                                    if (region.as_ref() as &str) == ("aws-global") {
3869                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3870                                            .url({
3871                                                let mut out = String::new();
3872                                                #[allow(clippy::needless_borrow)]
3873                                                out.push_str(&url.scheme());
3874                                                out.push_str("://");
3875                                                #[allow(clippy::needless_borrow)]
3876                                                out.push_str(&url.authority());
3877                                                #[allow(clippy::needless_borrow)]
3878                                                out.push_str(&url.normalized_path());
3879                                                #[allow(clippy::needless_borrow)]
3880                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
3881                                                out
3882                                            })
3883                                            .property(
3884                                                "authSchemes",
3885                                                vec![::aws_smithy_types::Document::from({
3886                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3887                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
3888                                                    out.insert("name".to_string(), "sigv4".to_string().into());
3889                                                    out.insert("signingName".to_string(), "s3".to_string().into());
3890                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
3891                                                    out
3892                                                })],
3893                                            )
3894                                            .build());
3895                                    }
3896                                }
3897                            }
3898                        }
3899                    }
3900                    if (*use_dual_stack) == (false) {
3901                        #[allow(unused_variables)]
3902                        if let Some(endpoint) = endpoint {
3903                            #[allow(unused_variables)]
3904                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
3905                                if (*use_fips) == (false) {
3906                                    if !((region.as_ref() as &str) == ("aws-global")) {
3907                                        if (*use_global_endpoint) == (true) {
3908                                            if (region.as_ref() as &str) == ("us-east-1") {
3909                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3910                                                    .url({
3911                                                        let mut out = String::new();
3912                                                        #[allow(clippy::needless_borrow)]
3913                                                        out.push_str(&url.scheme());
3914                                                        out.push_str("://");
3915                                                        #[allow(clippy::needless_borrow)]
3916                                                        out.push_str(&url.authority());
3917                                                        #[allow(clippy::needless_borrow)]
3918                                                        out.push_str(&url.normalized_path());
3919                                                        #[allow(clippy::needless_borrow)]
3920                                                        out.push_str(&uri_encoded_bucket.as_ref() as &str);
3921                                                        out
3922                                                    })
3923                                                    .property(
3924                                                        "authSchemes",
3925                                                        vec![::aws_smithy_types::Document::from({
3926                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3927                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3928                                                            out.insert("name".to_string(), "sigv4".to_string().into());
3929                                                            out.insert("signingName".to_string(), "s3".to_string().into());
3930                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3931                                                            out
3932                                                        })],
3933                                                    )
3934                                                    .build());
3935                                            }
3936                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3937                                                .url({
3938                                                    let mut out = String::new();
3939                                                    #[allow(clippy::needless_borrow)]
3940                                                    out.push_str(&url.scheme());
3941                                                    out.push_str("://");
3942                                                    #[allow(clippy::needless_borrow)]
3943                                                    out.push_str(&url.authority());
3944                                                    #[allow(clippy::needless_borrow)]
3945                                                    out.push_str(&url.normalized_path());
3946                                                    #[allow(clippy::needless_borrow)]
3947                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
3948                                                    out
3949                                                })
3950                                                .property(
3951                                                    "authSchemes",
3952                                                    vec![::aws_smithy_types::Document::from({
3953                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3954                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3955                                                        out.insert("name".to_string(), "sigv4".to_string().into());
3956                                                        out.insert("signingName".to_string(), "s3".to_string().into());
3957                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
3958                                                        out
3959                                                    })],
3960                                                )
3961                                                .build());
3962                                        }
3963                                    }
3964                                }
3965                            }
3966                        }
3967                    }
3968                    if (*use_dual_stack) == (false) {
3969                        #[allow(unused_variables)]
3970                        if let Some(endpoint) = endpoint {
3971                            #[allow(unused_variables)]
3972                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
3973                                if (*use_fips) == (false) {
3974                                    if !((region.as_ref() as &str) == ("aws-global")) {
3975                                        if (*use_global_endpoint) == (false) {
3976                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3977                                                .url({
3978                                                    let mut out = String::new();
3979                                                    #[allow(clippy::needless_borrow)]
3980                                                    out.push_str(&url.scheme());
3981                                                    out.push_str("://");
3982                                                    #[allow(clippy::needless_borrow)]
3983                                                    out.push_str(&url.authority());
3984                                                    #[allow(clippy::needless_borrow)]
3985                                                    out.push_str(&url.normalized_path());
3986                                                    #[allow(clippy::needless_borrow)]
3987                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
3988                                                    out
3989                                                })
3990                                                .property(
3991                                                    "authSchemes",
3992                                                    vec![::aws_smithy_types::Document::from({
3993                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3994                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3995                                                        out.insert("name".to_string(), "sigv4".to_string().into());
3996                                                        out.insert("signingName".to_string(), "s3".to_string().into());
3997                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
3998                                                        out
3999                                                    })],
4000                                                )
4001                                                .build());
4002                                        }
4003                                    }
4004                                }
4005                            }
4006                        }
4007                    }
4008                    if (*use_dual_stack) == (false) {
4009                        if !(endpoint.is_some()) {
4010                            if (*use_fips) == (false) {
4011                                if (region.as_ref() as &str) == ("aws-global") {
4012                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4013                                        .url({
4014                                            let mut out = String::new();
4015                                            out.push_str("https://s3.");
4016                                            #[allow(clippy::needless_borrow)]
4017                                            out.push_str(&partition_result.dns_suffix());
4018                                            out.push('/');
4019                                            #[allow(clippy::needless_borrow)]
4020                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
4021                                            out
4022                                        })
4023                                        .property(
4024                                            "authSchemes",
4025                                            vec![::aws_smithy_types::Document::from({
4026                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4027                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4028                                                out.insert("name".to_string(), "sigv4".to_string().into());
4029                                                out.insert("signingName".to_string(), "s3".to_string().into());
4030                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4031                                                out
4032                                            })],
4033                                        )
4034                                        .build());
4035                                }
4036                            }
4037                        }
4038                    }
4039                    if (*use_dual_stack) == (false) {
4040                        if !(endpoint.is_some()) {
4041                            if (*use_fips) == (false) {
4042                                if !((region.as_ref() as &str) == ("aws-global")) {
4043                                    if (*use_global_endpoint) == (true) {
4044                                        if (region.as_ref() as &str) == ("us-east-1") {
4045                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4046                                                .url({
4047                                                    let mut out = String::new();
4048                                                    out.push_str("https://s3.");
4049                                                    #[allow(clippy::needless_borrow)]
4050                                                    out.push_str(&partition_result.dns_suffix());
4051                                                    out.push('/');
4052                                                    #[allow(clippy::needless_borrow)]
4053                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
4054                                                    out
4055                                                })
4056                                                .property(
4057                                                    "authSchemes",
4058                                                    vec![::aws_smithy_types::Document::from({
4059                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4060                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4061                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4062                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4063                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4064                                                        out
4065                                                    })],
4066                                                )
4067                                                .build());
4068                                        }
4069                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4070                                            .url({
4071                                                let mut out = String::new();
4072                                                out.push_str("https://s3.");
4073                                                #[allow(clippy::needless_borrow)]
4074                                                out.push_str(&region.as_ref() as &str);
4075                                                out.push('.');
4076                                                #[allow(clippy::needless_borrow)]
4077                                                out.push_str(&partition_result.dns_suffix());
4078                                                out.push('/');
4079                                                #[allow(clippy::needless_borrow)]
4080                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
4081                                                out
4082                                            })
4083                                            .property(
4084                                                "authSchemes",
4085                                                vec![::aws_smithy_types::Document::from({
4086                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4087                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4088                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4089                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4090                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4091                                                    out
4092                                                })],
4093                                            )
4094                                            .build());
4095                                    }
4096                                }
4097                            }
4098                        }
4099                    }
4100                    if (*use_dual_stack) == (false) {
4101                        if !(endpoint.is_some()) {
4102                            if (*use_fips) == (false) {
4103                                if !((region.as_ref() as &str) == ("aws-global")) {
4104                                    if (*use_global_endpoint) == (false) {
4105                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4106                                            .url({
4107                                                let mut out = String::new();
4108                                                out.push_str("https://s3.");
4109                                                #[allow(clippy::needless_borrow)]
4110                                                out.push_str(&region.as_ref() as &str);
4111                                                out.push('.');
4112                                                #[allow(clippy::needless_borrow)]
4113                                                out.push_str(&partition_result.dns_suffix());
4114                                                out.push('/');
4115                                                #[allow(clippy::needless_borrow)]
4116                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
4117                                                out
4118                                            })
4119                                            .property(
4120                                                "authSchemes",
4121                                                vec![::aws_smithy_types::Document::from({
4122                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4123                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4124                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4125                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4126                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4127                                                    out
4128                                                })],
4129                                            )
4130                                            .build());
4131                                    }
4132                                }
4133                            }
4134                        }
4135                    }
4136                    #[allow(unreachable_code)]
4137                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
4138                        "No rules matched these parameters. This is a bug. {:?}",
4139                        _params
4140                    )));
4141                }
4142                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4143                    "Path-style addressing cannot be used with S3 Accelerate".to_string(),
4144                ));
4145            }
4146            #[allow(unreachable_code)]
4147            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
4148                "No rules matched these parameters. This is a bug. {:?}",
4149                _params
4150            )));
4151        }
4152        #[allow(unused_variables)]
4153        if let Some(use_object_lambda_endpoint) = use_object_lambda_endpoint {
4154            if (*use_object_lambda_endpoint) == (true) {
4155                #[allow(unused_variables)]
4156                if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
4157                    if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
4158                        if (*use_dual_stack) == (true) {
4159                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4160                                "S3 Object Lambda does not support Dual-stack".to_string(),
4161                            ));
4162                        }
4163                        if (*accelerate) == (true) {
4164                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4165                                "S3 Object Lambda does not support S3 Accelerate".to_string(),
4166                            ));
4167                        }
4168                        #[allow(unused_variables)]
4169                        if let Some(endpoint) = endpoint {
4170                            #[allow(unused_variables)]
4171                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
4172                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4173                                    .url({
4174                                        let mut out = String::new();
4175                                        #[allow(clippy::needless_borrow)]
4176                                        out.push_str(&url.scheme());
4177                                        out.push_str("://");
4178                                        #[allow(clippy::needless_borrow)]
4179                                        out.push_str(&url.authority());
4180                                        #[allow(clippy::needless_borrow)]
4181                                        out.push_str(&url.path());
4182                                        out
4183                                    })
4184                                    .property(
4185                                        "authSchemes",
4186                                        vec![::aws_smithy_types::Document::from({
4187                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4188                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4189                                            out.insert("name".to_string(), "sigv4".to_string().into());
4190                                            out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
4191                                            out.insert("signingRegion".to_string(), region.to_owned().into());
4192                                            out
4193                                        })],
4194                                    )
4195                                    .build());
4196                            }
4197                        }
4198                        if (*use_fips) == (true) {
4199                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4200                                .url({
4201                                    let mut out = String::new();
4202                                    out.push_str("https://s3-object-lambda-fips.");
4203                                    #[allow(clippy::needless_borrow)]
4204                                    out.push_str(&region.as_ref() as &str);
4205                                    out.push('.');
4206                                    #[allow(clippy::needless_borrow)]
4207                                    out.push_str(&partition_result.dns_suffix());
4208                                    out
4209                                })
4210                                .property(
4211                                    "authSchemes",
4212                                    vec![::aws_smithy_types::Document::from({
4213                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4214                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4215                                        out.insert("name".to_string(), "sigv4".to_string().into());
4216                                        out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
4217                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4218                                        out
4219                                    })],
4220                                )
4221                                .build());
4222                        }
4223                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4224                            .url({
4225                                let mut out = String::new();
4226                                out.push_str("https://s3-object-lambda.");
4227                                #[allow(clippy::needless_borrow)]
4228                                out.push_str(&region.as_ref() as &str);
4229                                out.push('.');
4230                                #[allow(clippy::needless_borrow)]
4231                                out.push_str(&partition_result.dns_suffix());
4232                                out
4233                            })
4234                            .property(
4235                                "authSchemes",
4236                                vec![::aws_smithy_types::Document::from({
4237                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4238                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4239                                    out.insert("name".to_string(), "sigv4".to_string().into());
4240                                    out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
4241                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4242                                    out
4243                                })],
4244                            )
4245                            .build());
4246                    }
4247                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4248                        "Invalid region: region was not a valid DNS name.".to_string(),
4249                    ));
4250                }
4251                #[allow(unreachable_code)]
4252                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
4253                    "No rules matched these parameters. This is a bug. {:?}",
4254                    _params
4255                )));
4256            }
4257        }
4258        if !(bucket.is_some()) {
4259            #[allow(unused_variables)]
4260            if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
4261                if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
4262                    if (*use_fips) == (true) {
4263                        if (*use_dual_stack) == (true) {
4264                            if !(endpoint.is_some()) {
4265                                if (region.as_ref() as &str) == ("aws-global") {
4266                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4267                                        .url({
4268                                            let mut out = String::new();
4269                                            out.push_str("https://s3-fips.dualstack.us-east-1.");
4270                                            #[allow(clippy::needless_borrow)]
4271                                            out.push_str(&partition_result.dns_suffix());
4272                                            out
4273                                        })
4274                                        .property(
4275                                            "authSchemes",
4276                                            vec![::aws_smithy_types::Document::from({
4277                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4278                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4279                                                out.insert("name".to_string(), "sigv4".to_string().into());
4280                                                out.insert("signingName".to_string(), "s3".to_string().into());
4281                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4282                                                out
4283                                            })],
4284                                        )
4285                                        .build());
4286                                }
4287                            }
4288                        }
4289                    }
4290                    if (*use_fips) == (true) {
4291                        if (*use_dual_stack) == (true) {
4292                            if !(endpoint.is_some()) {
4293                                if !((region.as_ref() as &str) == ("aws-global")) {
4294                                    if (*use_global_endpoint) == (true) {
4295                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4296                                            .url({
4297                                                let mut out = String::new();
4298                                                out.push_str("https://s3-fips.dualstack.");
4299                                                #[allow(clippy::needless_borrow)]
4300                                                out.push_str(&region.as_ref() as &str);
4301                                                out.push('.');
4302                                                #[allow(clippy::needless_borrow)]
4303                                                out.push_str(&partition_result.dns_suffix());
4304                                                out
4305                                            })
4306                                            .property(
4307                                                "authSchemes",
4308                                                vec![::aws_smithy_types::Document::from({
4309                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4310                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4311                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4312                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4313                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4314                                                    out
4315                                                })],
4316                                            )
4317                                            .build());
4318                                    }
4319                                }
4320                            }
4321                        }
4322                    }
4323                    if (*use_fips) == (true) {
4324                        if (*use_dual_stack) == (true) {
4325                            if !(endpoint.is_some()) {
4326                                if !((region.as_ref() as &str) == ("aws-global")) {
4327                                    if (*use_global_endpoint) == (false) {
4328                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4329                                            .url({
4330                                                let mut out = String::new();
4331                                                out.push_str("https://s3-fips.dualstack.");
4332                                                #[allow(clippy::needless_borrow)]
4333                                                out.push_str(&region.as_ref() as &str);
4334                                                out.push('.');
4335                                                #[allow(clippy::needless_borrow)]
4336                                                out.push_str(&partition_result.dns_suffix());
4337                                                out
4338                                            })
4339                                            .property(
4340                                                "authSchemes",
4341                                                vec![::aws_smithy_types::Document::from({
4342                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4343                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4344                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4345                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4346                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4347                                                    out
4348                                                })],
4349                                            )
4350                                            .build());
4351                                    }
4352                                }
4353                            }
4354                        }
4355                    }
4356                    if (*use_fips) == (true) {
4357                        if (*use_dual_stack) == (false) {
4358                            if !(endpoint.is_some()) {
4359                                if (region.as_ref() as &str) == ("aws-global") {
4360                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4361                                        .url({
4362                                            let mut out = String::new();
4363                                            out.push_str("https://s3-fips.us-east-1.");
4364                                            #[allow(clippy::needless_borrow)]
4365                                            out.push_str(&partition_result.dns_suffix());
4366                                            out
4367                                        })
4368                                        .property(
4369                                            "authSchemes",
4370                                            vec![::aws_smithy_types::Document::from({
4371                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4372                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4373                                                out.insert("name".to_string(), "sigv4".to_string().into());
4374                                                out.insert("signingName".to_string(), "s3".to_string().into());
4375                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4376                                                out
4377                                            })],
4378                                        )
4379                                        .build());
4380                                }
4381                            }
4382                        }
4383                    }
4384                    if (*use_fips) == (true) {
4385                        if (*use_dual_stack) == (false) {
4386                            if !(endpoint.is_some()) {
4387                                if !((region.as_ref() as &str) == ("aws-global")) {
4388                                    if (*use_global_endpoint) == (true) {
4389                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4390                                            .url({
4391                                                let mut out = String::new();
4392                                                out.push_str("https://s3-fips.");
4393                                                #[allow(clippy::needless_borrow)]
4394                                                out.push_str(&region.as_ref() as &str);
4395                                                out.push('.');
4396                                                #[allow(clippy::needless_borrow)]
4397                                                out.push_str(&partition_result.dns_suffix());
4398                                                out
4399                                            })
4400                                            .property(
4401                                                "authSchemes",
4402                                                vec![::aws_smithy_types::Document::from({
4403                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4404                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4405                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4406                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4407                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4408                                                    out
4409                                                })],
4410                                            )
4411                                            .build());
4412                                    }
4413                                }
4414                            }
4415                        }
4416                    }
4417                    if (*use_fips) == (true) {
4418                        if (*use_dual_stack) == (false) {
4419                            if !(endpoint.is_some()) {
4420                                if !((region.as_ref() as &str) == ("aws-global")) {
4421                                    if (*use_global_endpoint) == (false) {
4422                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4423                                            .url({
4424                                                let mut out = String::new();
4425                                                out.push_str("https://s3-fips.");
4426                                                #[allow(clippy::needless_borrow)]
4427                                                out.push_str(&region.as_ref() as &str);
4428                                                out.push('.');
4429                                                #[allow(clippy::needless_borrow)]
4430                                                out.push_str(&partition_result.dns_suffix());
4431                                                out
4432                                            })
4433                                            .property(
4434                                                "authSchemes",
4435                                                vec![::aws_smithy_types::Document::from({
4436                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4437                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4438                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4439                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4440                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4441                                                    out
4442                                                })],
4443                                            )
4444                                            .build());
4445                                    }
4446                                }
4447                            }
4448                        }
4449                    }
4450                    if (*use_fips) == (false) {
4451                        if (*use_dual_stack) == (true) {
4452                            if !(endpoint.is_some()) {
4453                                if (region.as_ref() as &str) == ("aws-global") {
4454                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4455                                        .url({
4456                                            let mut out = String::new();
4457                                            out.push_str("https://s3.dualstack.us-east-1.");
4458                                            #[allow(clippy::needless_borrow)]
4459                                            out.push_str(&partition_result.dns_suffix());
4460                                            out
4461                                        })
4462                                        .property(
4463                                            "authSchemes",
4464                                            vec![::aws_smithy_types::Document::from({
4465                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4466                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4467                                                out.insert("name".to_string(), "sigv4".to_string().into());
4468                                                out.insert("signingName".to_string(), "s3".to_string().into());
4469                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4470                                                out
4471                                            })],
4472                                        )
4473                                        .build());
4474                                }
4475                            }
4476                        }
4477                    }
4478                    if (*use_fips) == (false) {
4479                        if (*use_dual_stack) == (true) {
4480                            if !(endpoint.is_some()) {
4481                                if !((region.as_ref() as &str) == ("aws-global")) {
4482                                    if (*use_global_endpoint) == (true) {
4483                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4484                                            .url({
4485                                                let mut out = String::new();
4486                                                out.push_str("https://s3.dualstack.");
4487                                                #[allow(clippy::needless_borrow)]
4488                                                out.push_str(&region.as_ref() as &str);
4489                                                out.push('.');
4490                                                #[allow(clippy::needless_borrow)]
4491                                                out.push_str(&partition_result.dns_suffix());
4492                                                out
4493                                            })
4494                                            .property(
4495                                                "authSchemes",
4496                                                vec![::aws_smithy_types::Document::from({
4497                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4498                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4499                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4500                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4501                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4502                                                    out
4503                                                })],
4504                                            )
4505                                            .build());
4506                                    }
4507                                }
4508                            }
4509                        }
4510                    }
4511                    if (*use_fips) == (false) {
4512                        if (*use_dual_stack) == (true) {
4513                            if !(endpoint.is_some()) {
4514                                if !((region.as_ref() as &str) == ("aws-global")) {
4515                                    if (*use_global_endpoint) == (false) {
4516                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4517                                            .url({
4518                                                let mut out = String::new();
4519                                                out.push_str("https://s3.dualstack.");
4520                                                #[allow(clippy::needless_borrow)]
4521                                                out.push_str(&region.as_ref() as &str);
4522                                                out.push('.');
4523                                                #[allow(clippy::needless_borrow)]
4524                                                out.push_str(&partition_result.dns_suffix());
4525                                                out
4526                                            })
4527                                            .property(
4528                                                "authSchemes",
4529                                                vec![::aws_smithy_types::Document::from({
4530                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4531                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4532                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4533                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4534                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4535                                                    out
4536                                                })],
4537                                            )
4538                                            .build());
4539                                    }
4540                                }
4541                            }
4542                        }
4543                    }
4544                    if (*use_fips) == (false) {
4545                        if (*use_dual_stack) == (false) {
4546                            #[allow(unused_variables)]
4547                            if let Some(endpoint) = endpoint {
4548                                #[allow(unused_variables)]
4549                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
4550                                    if (region.as_ref() as &str) == ("aws-global") {
4551                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4552                                            .url({
4553                                                let mut out = String::new();
4554                                                #[allow(clippy::needless_borrow)]
4555                                                out.push_str(&url.scheme());
4556                                                out.push_str("://");
4557                                                #[allow(clippy::needless_borrow)]
4558                                                out.push_str(&url.authority());
4559                                                #[allow(clippy::needless_borrow)]
4560                                                out.push_str(&url.path());
4561                                                out
4562                                            })
4563                                            .property(
4564                                                "authSchemes",
4565                                                vec![::aws_smithy_types::Document::from({
4566                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4567                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4568                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4569                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4570                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4571                                                    out
4572                                                })],
4573                                            )
4574                                            .build());
4575                                    }
4576                                }
4577                            }
4578                        }
4579                    }
4580                    if (*use_fips) == (false) {
4581                        if (*use_dual_stack) == (false) {
4582                            #[allow(unused_variables)]
4583                            if let Some(endpoint) = endpoint {
4584                                #[allow(unused_variables)]
4585                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
4586                                    if !((region.as_ref() as &str) == ("aws-global")) {
4587                                        if (*use_global_endpoint) == (true) {
4588                                            if (region.as_ref() as &str) == ("us-east-1") {
4589                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4590                                                    .url({
4591                                                        let mut out = String::new();
4592                                                        #[allow(clippy::needless_borrow)]
4593                                                        out.push_str(&url.scheme());
4594                                                        out.push_str("://");
4595                                                        #[allow(clippy::needless_borrow)]
4596                                                        out.push_str(&url.authority());
4597                                                        #[allow(clippy::needless_borrow)]
4598                                                        out.push_str(&url.path());
4599                                                        out
4600                                                    })
4601                                                    .property(
4602                                                        "authSchemes",
4603                                                        vec![::aws_smithy_types::Document::from({
4604                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4605                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4606                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4607                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4608                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
4609                                                            out
4610                                                        })],
4611                                                    )
4612                                                    .build());
4613                                            }
4614                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4615                                                .url({
4616                                                    let mut out = String::new();
4617                                                    #[allow(clippy::needless_borrow)]
4618                                                    out.push_str(&url.scheme());
4619                                                    out.push_str("://");
4620                                                    #[allow(clippy::needless_borrow)]
4621                                                    out.push_str(&url.authority());
4622                                                    #[allow(clippy::needless_borrow)]
4623                                                    out.push_str(&url.path());
4624                                                    out
4625                                                })
4626                                                .property(
4627                                                    "authSchemes",
4628                                                    vec![::aws_smithy_types::Document::from({
4629                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4630                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4631                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4632                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4633                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4634                                                        out
4635                                                    })],
4636                                                )
4637                                                .build());
4638                                        }
4639                                    }
4640                                }
4641                            }
4642                        }
4643                    }
4644                    if (*use_fips) == (false) {
4645                        if (*use_dual_stack) == (false) {
4646                            #[allow(unused_variables)]
4647                            if let Some(endpoint) = endpoint {
4648                                #[allow(unused_variables)]
4649                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
4650                                    if !((region.as_ref() as &str) == ("aws-global")) {
4651                                        if (*use_global_endpoint) == (false) {
4652                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4653                                                .url({
4654                                                    let mut out = String::new();
4655                                                    #[allow(clippy::needless_borrow)]
4656                                                    out.push_str(&url.scheme());
4657                                                    out.push_str("://");
4658                                                    #[allow(clippy::needless_borrow)]
4659                                                    out.push_str(&url.authority());
4660                                                    #[allow(clippy::needless_borrow)]
4661                                                    out.push_str(&url.path());
4662                                                    out
4663                                                })
4664                                                .property(
4665                                                    "authSchemes",
4666                                                    vec![::aws_smithy_types::Document::from({
4667                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4668                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4669                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4670                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4671                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4672                                                        out
4673                                                    })],
4674                                                )
4675                                                .build());
4676                                        }
4677                                    }
4678                                }
4679                            }
4680                        }
4681                    }
4682                    if (*use_fips) == (false) {
4683                        if (*use_dual_stack) == (false) {
4684                            if !(endpoint.is_some()) {
4685                                if (region.as_ref() as &str) == ("aws-global") {
4686                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4687                                        .url({
4688                                            let mut out = String::new();
4689                                            out.push_str("https://s3.");
4690                                            #[allow(clippy::needless_borrow)]
4691                                            out.push_str(&partition_result.dns_suffix());
4692                                            out
4693                                        })
4694                                        .property(
4695                                            "authSchemes",
4696                                            vec![::aws_smithy_types::Document::from({
4697                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4698                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4699                                                out.insert("name".to_string(), "sigv4".to_string().into());
4700                                                out.insert("signingName".to_string(), "s3".to_string().into());
4701                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4702                                                out
4703                                            })],
4704                                        )
4705                                        .build());
4706                                }
4707                            }
4708                        }
4709                    }
4710                    if (*use_fips) == (false) {
4711                        if (*use_dual_stack) == (false) {
4712                            if !(endpoint.is_some()) {
4713                                if !((region.as_ref() as &str) == ("aws-global")) {
4714                                    if (*use_global_endpoint) == (true) {
4715                                        if (region.as_ref() as &str) == ("us-east-1") {
4716                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4717                                                .url({
4718                                                    let mut out = String::new();
4719                                                    out.push_str("https://s3.");
4720                                                    #[allow(clippy::needless_borrow)]
4721                                                    out.push_str(&partition_result.dns_suffix());
4722                                                    out
4723                                                })
4724                                                .property(
4725                                                    "authSchemes",
4726                                                    vec![::aws_smithy_types::Document::from({
4727                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4728                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4729                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4730                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4731                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4732                                                        out
4733                                                    })],
4734                                                )
4735                                                .build());
4736                                        }
4737                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4738                                            .url({
4739                                                let mut out = String::new();
4740                                                out.push_str("https://s3.");
4741                                                #[allow(clippy::needless_borrow)]
4742                                                out.push_str(&region.as_ref() as &str);
4743                                                out.push('.');
4744                                                #[allow(clippy::needless_borrow)]
4745                                                out.push_str(&partition_result.dns_suffix());
4746                                                out
4747                                            })
4748                                            .property(
4749                                                "authSchemes",
4750                                                vec![::aws_smithy_types::Document::from({
4751                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4752                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4753                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4754                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4755                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4756                                                    out
4757                                                })],
4758                                            )
4759                                            .build());
4760                                    }
4761                                }
4762                            }
4763                        }
4764                    }
4765                    if (*use_fips) == (false) {
4766                        if (*use_dual_stack) == (false) {
4767                            if !(endpoint.is_some()) {
4768                                if !((region.as_ref() as &str) == ("aws-global")) {
4769                                    if (*use_global_endpoint) == (false) {
4770                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4771                                            .url({
4772                                                let mut out = String::new();
4773                                                out.push_str("https://s3.");
4774                                                #[allow(clippy::needless_borrow)]
4775                                                out.push_str(&region.as_ref() as &str);
4776                                                out.push('.');
4777                                                #[allow(clippy::needless_borrow)]
4778                                                out.push_str(&partition_result.dns_suffix());
4779                                                out
4780                                            })
4781                                            .property(
4782                                                "authSchemes",
4783                                                vec![::aws_smithy_types::Document::from({
4784                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4785                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4786                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4787                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4788                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4789                                                    out
4790                                                })],
4791                                            )
4792                                            .build());
4793                                    }
4794                                }
4795                            }
4796                        }
4797                    }
4798                    #[allow(unreachable_code)]
4799                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
4800                        "No rules matched these parameters. This is a bug. {:?}",
4801                        _params
4802                    )));
4803                }
4804                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4805                    "Invalid region: region was not a valid DNS name.".to_string(),
4806                ));
4807            }
4808            #[allow(unreachable_code)]
4809            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
4810                "No rules matched these parameters. This is a bug. {:?}",
4811                _params
4812            )));
4813        }
4814        #[allow(unreachable_code)]
4815        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
4816            "No rules matched these parameters. This is a bug. {:?}",
4817            _params
4818        )));
4819    }
4820    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4821        "A region must be set when sending requests to S3.".to_string(),
4822    ));
4823}