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 (*accelerate) == (true) {
98                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
99                            "S3Express does not support S3 Accelerate.".to_string(),
100                        ));
101                    }
102                    #[allow(unused_variables)]
103                    if let Some(endpoint) = endpoint {
104                        #[allow(unused_variables)]
105                        if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
106                            #[allow(unused_variables)]
107                            if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
108                                if (*disable_s3_express_session_auth) == (true) {
109                                    if (url.is_ip()) == (true) {
110                                        let uri_encoded_bucket =
111                                            crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
112                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
113                                            .url({
114                                                let mut out = String::new();
115                                                #[allow(clippy::needless_borrow)]
116                                                out.push_str(&url.scheme());
117                                                out.push_str("://");
118                                                #[allow(clippy::needless_borrow)]
119                                                out.push_str(&url.authority());
120                                                out.push('/');
121                                                #[allow(clippy::needless_borrow)]
122                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
123                                                #[allow(clippy::needless_borrow)]
124                                                out.push_str(&url.path());
125                                                out
126                                            })
127                                            .property("backend", "S3Express".to_string())
128                                            .property(
129                                                "authSchemes",
130                                                vec![::aws_smithy_types::Document::from({
131                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
132                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
133                                                    out.insert("name".to_string(), "sigv4".to_string().into());
134                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
135                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
136                                                    out
137                                                })],
138                                            )
139                                            .build());
140                                    }
141                                    if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
142                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
143                                            .url({
144                                                let mut out = String::new();
145                                                #[allow(clippy::needless_borrow)]
146                                                out.push_str(&url.scheme());
147                                                out.push_str("://");
148                                                #[allow(clippy::needless_borrow)]
149                                                out.push_str(&bucket.as_ref() as &str);
150                                                out.push('.');
151                                                #[allow(clippy::needless_borrow)]
152                                                out.push_str(&url.authority());
153                                                #[allow(clippy::needless_borrow)]
154                                                out.push_str(&url.path());
155                                                out
156                                            })
157                                            .property("backend", "S3Express".to_string())
158                                            .property(
159                                                "authSchemes",
160                                                vec![::aws_smithy_types::Document::from({
161                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
162                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
163                                                    out.insert("name".to_string(), "sigv4".to_string().into());
164                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
165                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
166                                                    out
167                                                })],
168                                            )
169                                            .build());
170                                    }
171                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
172                                        "S3Express bucket name is not a valid virtual hostable name.".to_string(),
173                                    ));
174                                }
175                            }
176                            if (url.is_ip()) == (true) {
177                                let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
178                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
179                                    .url({
180                                        let mut out = String::new();
181                                        #[allow(clippy::needless_borrow)]
182                                        out.push_str(&url.scheme());
183                                        out.push_str("://");
184                                        #[allow(clippy::needless_borrow)]
185                                        out.push_str(&url.authority());
186                                        out.push('/');
187                                        #[allow(clippy::needless_borrow)]
188                                        out.push_str(&uri_encoded_bucket.as_ref() as &str);
189                                        #[allow(clippy::needless_borrow)]
190                                        out.push_str(&url.path());
191                                        out
192                                    })
193                                    .property("backend", "S3Express".to_string())
194                                    .property(
195                                        "authSchemes",
196                                        vec![::aws_smithy_types::Document::from({
197                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
198                                            out.insert("disableDoubleEncoding".to_string(), true.into());
199                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
200                                            out.insert("signingName".to_string(), "s3express".to_string().into());
201                                            out.insert("signingRegion".to_string(), region.to_owned().into());
202                                            out
203                                        })],
204                                    )
205                                    .build());
206                            }
207                            if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
208                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
209                                    .url({
210                                        let mut out = String::new();
211                                        #[allow(clippy::needless_borrow)]
212                                        out.push_str(&url.scheme());
213                                        out.push_str("://");
214                                        #[allow(clippy::needless_borrow)]
215                                        out.push_str(&bucket.as_ref() as &str);
216                                        out.push('.');
217                                        #[allow(clippy::needless_borrow)]
218                                        out.push_str(&url.authority());
219                                        #[allow(clippy::needless_borrow)]
220                                        out.push_str(&url.path());
221                                        out
222                                    })
223                                    .property("backend", "S3Express".to_string())
224                                    .property(
225                                        "authSchemes",
226                                        vec![::aws_smithy_types::Document::from({
227                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
228                                            out.insert("disableDoubleEncoding".to_string(), true.into());
229                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
230                                            out.insert("signingName".to_string(), "s3express".to_string().into());
231                                            out.insert("signingRegion".to_string(), region.to_owned().into());
232                                            out
233                                        })],
234                                    )
235                                    .build());
236                            }
237                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
238                                "S3Express bucket name is not a valid virtual hostable name.".to_string(),
239                            ));
240                        }
241                    }
242                    #[allow(unused_variables)]
243                    if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
244                        if (*use_s3_express_control_endpoint) == (true) {
245                            #[allow(unused_variables)]
246                            if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
247                                let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
248                                if !(endpoint.is_some()) {
249                                    if (*use_fips) == (true) {
250                                        if (*use_dual_stack) == (true) {
251                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
252                                                .url({
253                                                    let mut out = String::new();
254                                                    out.push_str("https://s3express-control-fips.dualstack.");
255                                                    #[allow(clippy::needless_borrow)]
256                                                    out.push_str(&region.as_ref() as &str);
257                                                    out.push('.');
258                                                    #[allow(clippy::needless_borrow)]
259                                                    out.push_str(&partition_result.dns_suffix());
260                                                    out.push('/');
261                                                    #[allow(clippy::needless_borrow)]
262                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
263                                                    out
264                                                })
265                                                .property("backend", "S3Express".to_string())
266                                                .property(
267                                                    "authSchemes",
268                                                    vec![::aws_smithy_types::Document::from({
269                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
270                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
271                                                        out.insert("name".to_string(), "sigv4".to_string().into());
272                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
273                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
274                                                        out
275                                                    })],
276                                                )
277                                                .build());
278                                        }
279                                    }
280                                    if (*use_fips) == (true) {
281                                        if (*use_dual_stack) == (false) {
282                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
283                                                .url({
284                                                    let mut out = String::new();
285                                                    out.push_str("https://s3express-control-fips.");
286                                                    #[allow(clippy::needless_borrow)]
287                                                    out.push_str(&region.as_ref() as &str);
288                                                    out.push('.');
289                                                    #[allow(clippy::needless_borrow)]
290                                                    out.push_str(&partition_result.dns_suffix());
291                                                    out.push('/');
292                                                    #[allow(clippy::needless_borrow)]
293                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
294                                                    out
295                                                })
296                                                .property("backend", "S3Express".to_string())
297                                                .property(
298                                                    "authSchemes",
299                                                    vec![::aws_smithy_types::Document::from({
300                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
301                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
302                                                        out.insert("name".to_string(), "sigv4".to_string().into());
303                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
304                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
305                                                        out
306                                                    })],
307                                                )
308                                                .build());
309                                        }
310                                    }
311                                    if (*use_fips) == (false) {
312                                        if (*use_dual_stack) == (true) {
313                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
314                                                .url({
315                                                    let mut out = String::new();
316                                                    out.push_str("https://s3express-control.dualstack.");
317                                                    #[allow(clippy::needless_borrow)]
318                                                    out.push_str(&region.as_ref() as &str);
319                                                    out.push('.');
320                                                    #[allow(clippy::needless_borrow)]
321                                                    out.push_str(&partition_result.dns_suffix());
322                                                    out.push('/');
323                                                    #[allow(clippy::needless_borrow)]
324                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
325                                                    out
326                                                })
327                                                .property("backend", "S3Express".to_string())
328                                                .property(
329                                                    "authSchemes",
330                                                    vec![::aws_smithy_types::Document::from({
331                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
332                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
333                                                        out.insert("name".to_string(), "sigv4".to_string().into());
334                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
335                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
336                                                        out
337                                                    })],
338                                                )
339                                                .build());
340                                        }
341                                    }
342                                    if (*use_fips) == (false) {
343                                        if (*use_dual_stack) == (false) {
344                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
345                                                .url({
346                                                    let mut out = String::new();
347                                                    out.push_str("https://s3express-control.");
348                                                    #[allow(clippy::needless_borrow)]
349                                                    out.push_str(&region.as_ref() as &str);
350                                                    out.push('.');
351                                                    #[allow(clippy::needless_borrow)]
352                                                    out.push_str(&partition_result.dns_suffix());
353                                                    out.push('/');
354                                                    #[allow(clippy::needless_borrow)]
355                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
356                                                    out
357                                                })
358                                                .property("backend", "S3Express".to_string())
359                                                .property(
360                                                    "authSchemes",
361                                                    vec![::aws_smithy_types::Document::from({
362                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
363                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
364                                                        out.insert("name".to_string(), "sigv4".to_string().into());
365                                                        out.insert("signingName".to_string(), "s3express".to_string().into());
366                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
367                                                        out
368                                                    })],
369                                                )
370                                                .build());
371                                        }
372                                    }
373                                    #[allow(unreachable_code)]
374                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
375                                        "No rules matched these parameters. This is a bug. {_params:?}"
376                                    )));
377                                }
378                                #[allow(unreachable_code)]
379                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
380                                    "No rules matched these parameters. This is a bug. {_params:?}"
381                                )));
382                            }
383                            #[allow(unreachable_code)]
384                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
385                                "No rules matched these parameters. This is a bug. {_params:?}"
386                            )));
387                        }
388                    }
389                    if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
390                        #[allow(unused_variables)]
391                        if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
392                            #[allow(unused_variables)]
393                            if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
394                                if (*disable_s3_express_session_auth) == (true) {
395                                    #[allow(unused_variables)]
396                                    if let Some(s3express_availability_zone_id) =
397                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 14, true, _diagnostic_collector)
398                                    {
399                                        #[allow(unused_variables)]
400                                        if let Some(s3express_availability_zone_delim) =
401                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 14, 16, true, _diagnostic_collector)
402                                        {
403                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
404                                                if (*use_fips) == (true) {
405                                                    if (*use_dual_stack) == (true) {
406                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
407                                                            .url({
408                                                                let mut out = String::new();
409                                                                out.push_str("https://");
410                                                                #[allow(clippy::needless_borrow)]
411                                                                out.push_str(&bucket.as_ref() as &str);
412                                                                out.push_str(".s3express-fips-");
413                                                                #[allow(clippy::needless_borrow)]
414                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
415                                                                out.push_str(".dualstack.");
416                                                                #[allow(clippy::needless_borrow)]
417                                                                out.push_str(&region.as_ref() as &str);
418                                                                out.push('.');
419                                                                #[allow(clippy::needless_borrow)]
420                                                                out.push_str(&partition_result.dns_suffix());
421                                                                out
422                                                            })
423                                                            .property("backend", "S3Express".to_string())
424                                                            .property(
425                                                                "authSchemes",
426                                                                vec![::aws_smithy_types::Document::from({
427                                                                    let mut out =
428                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
429                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
430                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
431                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
432                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
433                                                                    out
434                                                                })],
435                                                            )
436                                                            .build());
437                                                    }
438                                                }
439                                                if (*use_fips) == (true) {
440                                                    if (*use_dual_stack) == (false) {
441                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
442                                                            .url({
443                                                                let mut out = String::new();
444                                                                out.push_str("https://");
445                                                                #[allow(clippy::needless_borrow)]
446                                                                out.push_str(&bucket.as_ref() as &str);
447                                                                out.push_str(".s3express-fips-");
448                                                                #[allow(clippy::needless_borrow)]
449                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
450                                                                out.push('.');
451                                                                #[allow(clippy::needless_borrow)]
452                                                                out.push_str(&region.as_ref() as &str);
453                                                                out.push('.');
454                                                                #[allow(clippy::needless_borrow)]
455                                                                out.push_str(&partition_result.dns_suffix());
456                                                                out
457                                                            })
458                                                            .property("backend", "S3Express".to_string())
459                                                            .property(
460                                                                "authSchemes",
461                                                                vec![::aws_smithy_types::Document::from({
462                                                                    let mut out =
463                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
464                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
465                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
466                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
467                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
468                                                                    out
469                                                                })],
470                                                            )
471                                                            .build());
472                                                    }
473                                                }
474                                                if (*use_fips) == (false) {
475                                                    if (*use_dual_stack) == (true) {
476                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
477                                                            .url({
478                                                                let mut out = String::new();
479                                                                out.push_str("https://");
480                                                                #[allow(clippy::needless_borrow)]
481                                                                out.push_str(&bucket.as_ref() as &str);
482                                                                out.push_str(".s3express-");
483                                                                #[allow(clippy::needless_borrow)]
484                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
485                                                                out.push_str(".dualstack.");
486                                                                #[allow(clippy::needless_borrow)]
487                                                                out.push_str(&region.as_ref() as &str);
488                                                                out.push('.');
489                                                                #[allow(clippy::needless_borrow)]
490                                                                out.push_str(&partition_result.dns_suffix());
491                                                                out
492                                                            })
493                                                            .property("backend", "S3Express".to_string())
494                                                            .property(
495                                                                "authSchemes",
496                                                                vec![::aws_smithy_types::Document::from({
497                                                                    let mut out =
498                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
499                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
500                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
501                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
502                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
503                                                                    out
504                                                                })],
505                                                            )
506                                                            .build());
507                                                    }
508                                                }
509                                                if (*use_fips) == (false) {
510                                                    if (*use_dual_stack) == (false) {
511                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
512                                                            .url({
513                                                                let mut out = String::new();
514                                                                out.push_str("https://");
515                                                                #[allow(clippy::needless_borrow)]
516                                                                out.push_str(&bucket.as_ref() as &str);
517                                                                out.push_str(".s3express-");
518                                                                #[allow(clippy::needless_borrow)]
519                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
520                                                                out.push('.');
521                                                                #[allow(clippy::needless_borrow)]
522                                                                out.push_str(&region.as_ref() as &str);
523                                                                out.push('.');
524                                                                #[allow(clippy::needless_borrow)]
525                                                                out.push_str(&partition_result.dns_suffix());
526                                                                out
527                                                            })
528                                                            .property("backend", "S3Express".to_string())
529                                                            .property(
530                                                                "authSchemes",
531                                                                vec![::aws_smithy_types::Document::from({
532                                                                    let mut out =
533                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
534                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
535                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
536                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
537                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
538                                                                    out
539                                                                })],
540                                                            )
541                                                            .build());
542                                                    }
543                                                }
544                                                #[allow(unreachable_code)]
545                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
546                                                    "No rules matched these parameters. This is a bug. {_params:?}"
547                                                )));
548                                            }
549                                        }
550                                    }
551                                    #[allow(unused_variables)]
552                                    if let Some(s3express_availability_zone_id) =
553                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 15, true, _diagnostic_collector)
554                                    {
555                                        #[allow(unused_variables)]
556                                        if let Some(s3express_availability_zone_delim) =
557                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
558                                        {
559                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
560                                                if (*use_fips) == (true) {
561                                                    if (*use_dual_stack) == (true) {
562                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
563                                                            .url({
564                                                                let mut out = String::new();
565                                                                out.push_str("https://");
566                                                                #[allow(clippy::needless_borrow)]
567                                                                out.push_str(&bucket.as_ref() as &str);
568                                                                out.push_str(".s3express-fips-");
569                                                                #[allow(clippy::needless_borrow)]
570                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
571                                                                out.push_str(".dualstack.");
572                                                                #[allow(clippy::needless_borrow)]
573                                                                out.push_str(&region.as_ref() as &str);
574                                                                out.push('.');
575                                                                #[allow(clippy::needless_borrow)]
576                                                                out.push_str(&partition_result.dns_suffix());
577                                                                out
578                                                            })
579                                                            .property("backend", "S3Express".to_string())
580                                                            .property(
581                                                                "authSchemes",
582                                                                vec![::aws_smithy_types::Document::from({
583                                                                    let mut out =
584                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
585                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
586                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
587                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
588                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
589                                                                    out
590                                                                })],
591                                                            )
592                                                            .build());
593                                                    }
594                                                }
595                                                if (*use_fips) == (true) {
596                                                    if (*use_dual_stack) == (false) {
597                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
598                                                            .url({
599                                                                let mut out = String::new();
600                                                                out.push_str("https://");
601                                                                #[allow(clippy::needless_borrow)]
602                                                                out.push_str(&bucket.as_ref() as &str);
603                                                                out.push_str(".s3express-fips-");
604                                                                #[allow(clippy::needless_borrow)]
605                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
606                                                                out.push('.');
607                                                                #[allow(clippy::needless_borrow)]
608                                                                out.push_str(&region.as_ref() as &str);
609                                                                out.push('.');
610                                                                #[allow(clippy::needless_borrow)]
611                                                                out.push_str(&partition_result.dns_suffix());
612                                                                out
613                                                            })
614                                                            .property("backend", "S3Express".to_string())
615                                                            .property(
616                                                                "authSchemes",
617                                                                vec![::aws_smithy_types::Document::from({
618                                                                    let mut out =
619                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
620                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
621                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
622                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
623                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
624                                                                    out
625                                                                })],
626                                                            )
627                                                            .build());
628                                                    }
629                                                }
630                                                if (*use_fips) == (false) {
631                                                    if (*use_dual_stack) == (true) {
632                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
633                                                            .url({
634                                                                let mut out = String::new();
635                                                                out.push_str("https://");
636                                                                #[allow(clippy::needless_borrow)]
637                                                                out.push_str(&bucket.as_ref() as &str);
638                                                                out.push_str(".s3express-");
639                                                                #[allow(clippy::needless_borrow)]
640                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
641                                                                out.push_str(".dualstack.");
642                                                                #[allow(clippy::needless_borrow)]
643                                                                out.push_str(&region.as_ref() as &str);
644                                                                out.push('.');
645                                                                #[allow(clippy::needless_borrow)]
646                                                                out.push_str(&partition_result.dns_suffix());
647                                                                out
648                                                            })
649                                                            .property("backend", "S3Express".to_string())
650                                                            .property(
651                                                                "authSchemes",
652                                                                vec![::aws_smithy_types::Document::from({
653                                                                    let mut out =
654                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
655                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
656                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
657                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
658                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
659                                                                    out
660                                                                })],
661                                                            )
662                                                            .build());
663                                                    }
664                                                }
665                                                if (*use_fips) == (false) {
666                                                    if (*use_dual_stack) == (false) {
667                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
668                                                            .url({
669                                                                let mut out = String::new();
670                                                                out.push_str("https://");
671                                                                #[allow(clippy::needless_borrow)]
672                                                                out.push_str(&bucket.as_ref() as &str);
673                                                                out.push_str(".s3express-");
674                                                                #[allow(clippy::needless_borrow)]
675                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
676                                                                out.push('.');
677                                                                #[allow(clippy::needless_borrow)]
678                                                                out.push_str(&region.as_ref() as &str);
679                                                                out.push('.');
680                                                                #[allow(clippy::needless_borrow)]
681                                                                out.push_str(&partition_result.dns_suffix());
682                                                                out
683                                                            })
684                                                            .property("backend", "S3Express".to_string())
685                                                            .property(
686                                                                "authSchemes",
687                                                                vec![::aws_smithy_types::Document::from({
688                                                                    let mut out =
689                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
690                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
691                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
692                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
693                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
694                                                                    out
695                                                                })],
696                                                            )
697                                                            .build());
698                                                    }
699                                                }
700                                                #[allow(unreachable_code)]
701                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
702                                                    "No rules matched these parameters. This is a bug. {_params:?}"
703                                                )));
704                                            }
705                                        }
706                                    }
707                                    #[allow(unused_variables)]
708                                    if let Some(s3express_availability_zone_id) =
709                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 19, true, _diagnostic_collector)
710                                    {
711                                        #[allow(unused_variables)]
712                                        if let Some(s3express_availability_zone_delim) =
713                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 19, 21, true, _diagnostic_collector)
714                                        {
715                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
716                                                if (*use_fips) == (true) {
717                                                    if (*use_dual_stack) == (true) {
718                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
719                                                            .url({
720                                                                let mut out = String::new();
721                                                                out.push_str("https://");
722                                                                #[allow(clippy::needless_borrow)]
723                                                                out.push_str(&bucket.as_ref() as &str);
724                                                                out.push_str(".s3express-fips-");
725                                                                #[allow(clippy::needless_borrow)]
726                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
727                                                                out.push_str(".dualstack.");
728                                                                #[allow(clippy::needless_borrow)]
729                                                                out.push_str(&region.as_ref() as &str);
730                                                                out.push('.');
731                                                                #[allow(clippy::needless_borrow)]
732                                                                out.push_str(&partition_result.dns_suffix());
733                                                                out
734                                                            })
735                                                            .property("backend", "S3Express".to_string())
736                                                            .property(
737                                                                "authSchemes",
738                                                                vec![::aws_smithy_types::Document::from({
739                                                                    let mut out =
740                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
741                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
742                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
743                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
744                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
745                                                                    out
746                                                                })],
747                                                            )
748                                                            .build());
749                                                    }
750                                                }
751                                                if (*use_fips) == (true) {
752                                                    if (*use_dual_stack) == (false) {
753                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
754                                                            .url({
755                                                                let mut out = String::new();
756                                                                out.push_str("https://");
757                                                                #[allow(clippy::needless_borrow)]
758                                                                out.push_str(&bucket.as_ref() as &str);
759                                                                out.push_str(".s3express-fips-");
760                                                                #[allow(clippy::needless_borrow)]
761                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
762                                                                out.push('.');
763                                                                #[allow(clippy::needless_borrow)]
764                                                                out.push_str(&region.as_ref() as &str);
765                                                                out.push('.');
766                                                                #[allow(clippy::needless_borrow)]
767                                                                out.push_str(&partition_result.dns_suffix());
768                                                                out
769                                                            })
770                                                            .property("backend", "S3Express".to_string())
771                                                            .property(
772                                                                "authSchemes",
773                                                                vec![::aws_smithy_types::Document::from({
774                                                                    let mut out =
775                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
776                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
777                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
778                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
779                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
780                                                                    out
781                                                                })],
782                                                            )
783                                                            .build());
784                                                    }
785                                                }
786                                                if (*use_fips) == (false) {
787                                                    if (*use_dual_stack) == (true) {
788                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
789                                                            .url({
790                                                                let mut out = String::new();
791                                                                out.push_str("https://");
792                                                                #[allow(clippy::needless_borrow)]
793                                                                out.push_str(&bucket.as_ref() as &str);
794                                                                out.push_str(".s3express-");
795                                                                #[allow(clippy::needless_borrow)]
796                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
797                                                                out.push_str(".dualstack.");
798                                                                #[allow(clippy::needless_borrow)]
799                                                                out.push_str(&region.as_ref() as &str);
800                                                                out.push('.');
801                                                                #[allow(clippy::needless_borrow)]
802                                                                out.push_str(&partition_result.dns_suffix());
803                                                                out
804                                                            })
805                                                            .property("backend", "S3Express".to_string())
806                                                            .property(
807                                                                "authSchemes",
808                                                                vec![::aws_smithy_types::Document::from({
809                                                                    let mut out =
810                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
811                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
812                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
813                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
814                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
815                                                                    out
816                                                                })],
817                                                            )
818                                                            .build());
819                                                    }
820                                                }
821                                                if (*use_fips) == (false) {
822                                                    if (*use_dual_stack) == (false) {
823                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
824                                                            .url({
825                                                                let mut out = String::new();
826                                                                out.push_str("https://");
827                                                                #[allow(clippy::needless_borrow)]
828                                                                out.push_str(&bucket.as_ref() as &str);
829                                                                out.push_str(".s3express-");
830                                                                #[allow(clippy::needless_borrow)]
831                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
832                                                                out.push('.');
833                                                                #[allow(clippy::needless_borrow)]
834                                                                out.push_str(&region.as_ref() as &str);
835                                                                out.push('.');
836                                                                #[allow(clippy::needless_borrow)]
837                                                                out.push_str(&partition_result.dns_suffix());
838                                                                out
839                                                            })
840                                                            .property("backend", "S3Express".to_string())
841                                                            .property(
842                                                                "authSchemes",
843                                                                vec![::aws_smithy_types::Document::from({
844                                                                    let mut out =
845                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
846                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
847                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
848                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
849                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
850                                                                    out
851                                                                })],
852                                                            )
853                                                            .build());
854                                                    }
855                                                }
856                                                #[allow(unreachable_code)]
857                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
858                                                    "No rules matched these parameters. This is a bug. {_params:?}"
859                                                )));
860                                            }
861                                        }
862                                    }
863                                    #[allow(unused_variables)]
864                                    if let Some(s3express_availability_zone_id) =
865                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 20, true, _diagnostic_collector)
866                                    {
867                                        #[allow(unused_variables)]
868                                        if let Some(s3express_availability_zone_delim) =
869                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
870                                        {
871                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
872                                                if (*use_fips) == (true) {
873                                                    if (*use_dual_stack) == (true) {
874                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
875                                                            .url({
876                                                                let mut out = String::new();
877                                                                out.push_str("https://");
878                                                                #[allow(clippy::needless_borrow)]
879                                                                out.push_str(&bucket.as_ref() as &str);
880                                                                out.push_str(".s3express-fips-");
881                                                                #[allow(clippy::needless_borrow)]
882                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
883                                                                out.push_str(".dualstack.");
884                                                                #[allow(clippy::needless_borrow)]
885                                                                out.push_str(&region.as_ref() as &str);
886                                                                out.push('.');
887                                                                #[allow(clippy::needless_borrow)]
888                                                                out.push_str(&partition_result.dns_suffix());
889                                                                out
890                                                            })
891                                                            .property("backend", "S3Express".to_string())
892                                                            .property(
893                                                                "authSchemes",
894                                                                vec![::aws_smithy_types::Document::from({
895                                                                    let mut out =
896                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
897                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
898                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
899                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
900                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
901                                                                    out
902                                                                })],
903                                                            )
904                                                            .build());
905                                                    }
906                                                }
907                                                if (*use_fips) == (true) {
908                                                    if (*use_dual_stack) == (false) {
909                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
910                                                            .url({
911                                                                let mut out = String::new();
912                                                                out.push_str("https://");
913                                                                #[allow(clippy::needless_borrow)]
914                                                                out.push_str(&bucket.as_ref() as &str);
915                                                                out.push_str(".s3express-fips-");
916                                                                #[allow(clippy::needless_borrow)]
917                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
918                                                                out.push('.');
919                                                                #[allow(clippy::needless_borrow)]
920                                                                out.push_str(&region.as_ref() as &str);
921                                                                out.push('.');
922                                                                #[allow(clippy::needless_borrow)]
923                                                                out.push_str(&partition_result.dns_suffix());
924                                                                out
925                                                            })
926                                                            .property("backend", "S3Express".to_string())
927                                                            .property(
928                                                                "authSchemes",
929                                                                vec![::aws_smithy_types::Document::from({
930                                                                    let mut out =
931                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
932                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
933                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
934                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
935                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
936                                                                    out
937                                                                })],
938                                                            )
939                                                            .build());
940                                                    }
941                                                }
942                                                if (*use_fips) == (false) {
943                                                    if (*use_dual_stack) == (true) {
944                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
945                                                            .url({
946                                                                let mut out = String::new();
947                                                                out.push_str("https://");
948                                                                #[allow(clippy::needless_borrow)]
949                                                                out.push_str(&bucket.as_ref() as &str);
950                                                                out.push_str(".s3express-");
951                                                                #[allow(clippy::needless_borrow)]
952                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
953                                                                out.push_str(".dualstack.");
954                                                                #[allow(clippy::needless_borrow)]
955                                                                out.push_str(&region.as_ref() as &str);
956                                                                out.push('.');
957                                                                #[allow(clippy::needless_borrow)]
958                                                                out.push_str(&partition_result.dns_suffix());
959                                                                out
960                                                            })
961                                                            .property("backend", "S3Express".to_string())
962                                                            .property(
963                                                                "authSchemes",
964                                                                vec![::aws_smithy_types::Document::from({
965                                                                    let mut out =
966                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
967                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
968                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
969                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
970                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
971                                                                    out
972                                                                })],
973                                                            )
974                                                            .build());
975                                                    }
976                                                }
977                                                if (*use_fips) == (false) {
978                                                    if (*use_dual_stack) == (false) {
979                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
980                                                            .url({
981                                                                let mut out = String::new();
982                                                                out.push_str("https://");
983                                                                #[allow(clippy::needless_borrow)]
984                                                                out.push_str(&bucket.as_ref() as &str);
985                                                                out.push_str(".s3express-");
986                                                                #[allow(clippy::needless_borrow)]
987                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
988                                                                out.push('.');
989                                                                #[allow(clippy::needless_borrow)]
990                                                                out.push_str(&region.as_ref() as &str);
991                                                                out.push('.');
992                                                                #[allow(clippy::needless_borrow)]
993                                                                out.push_str(&partition_result.dns_suffix());
994                                                                out
995                                                            })
996                                                            .property("backend", "S3Express".to_string())
997                                                            .property(
998                                                                "authSchemes",
999                                                                vec![::aws_smithy_types::Document::from({
1000                                                                    let mut out =
1001                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1002                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1003                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1004                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
1005                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
1006                                                                    out
1007                                                                })],
1008                                                            )
1009                                                            .build());
1010                                                    }
1011                                                }
1012                                                #[allow(unreachable_code)]
1013                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1014                                                    "No rules matched these parameters. This is a bug. {_params:?}"
1015                                                )));
1016                                            }
1017                                        }
1018                                    }
1019                                    #[allow(unused_variables)]
1020                                    if let Some(s3express_availability_zone_id) =
1021                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 26, true, _diagnostic_collector)
1022                                    {
1023                                        #[allow(unused_variables)]
1024                                        if let Some(s3express_availability_zone_delim) =
1025                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 26, 28, true, _diagnostic_collector)
1026                                        {
1027                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
1028                                                if (*use_fips) == (true) {
1029                                                    if (*use_dual_stack) == (true) {
1030                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1031                                                            .url({
1032                                                                let mut out = String::new();
1033                                                                out.push_str("https://");
1034                                                                #[allow(clippy::needless_borrow)]
1035                                                                out.push_str(&bucket.as_ref() as &str);
1036                                                                out.push_str(".s3express-fips-");
1037                                                                #[allow(clippy::needless_borrow)]
1038                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1039                                                                out.push_str(".dualstack.");
1040                                                                #[allow(clippy::needless_borrow)]
1041                                                                out.push_str(&region.as_ref() as &str);
1042                                                                out.push('.');
1043                                                                #[allow(clippy::needless_borrow)]
1044                                                                out.push_str(&partition_result.dns_suffix());
1045                                                                out
1046                                                            })
1047                                                            .property("backend", "S3Express".to_string())
1048                                                            .property(
1049                                                                "authSchemes",
1050                                                                vec![::aws_smithy_types::Document::from({
1051                                                                    let mut out =
1052                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1053                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1054                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1055                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
1056                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
1057                                                                    out
1058                                                                })],
1059                                                            )
1060                                                            .build());
1061                                                    }
1062                                                }
1063                                                if (*use_fips) == (true) {
1064                                                    if (*use_dual_stack) == (false) {
1065                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1066                                                            .url({
1067                                                                let mut out = String::new();
1068                                                                out.push_str("https://");
1069                                                                #[allow(clippy::needless_borrow)]
1070                                                                out.push_str(&bucket.as_ref() as &str);
1071                                                                out.push_str(".s3express-fips-");
1072                                                                #[allow(clippy::needless_borrow)]
1073                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1074                                                                out.push('.');
1075                                                                #[allow(clippy::needless_borrow)]
1076                                                                out.push_str(&region.as_ref() as &str);
1077                                                                out.push('.');
1078                                                                #[allow(clippy::needless_borrow)]
1079                                                                out.push_str(&partition_result.dns_suffix());
1080                                                                out
1081                                                            })
1082                                                            .property("backend", "S3Express".to_string())
1083                                                            .property(
1084                                                                "authSchemes",
1085                                                                vec![::aws_smithy_types::Document::from({
1086                                                                    let mut out =
1087                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1088                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1089                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1090                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
1091                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
1092                                                                    out
1093                                                                })],
1094                                                            )
1095                                                            .build());
1096                                                    }
1097                                                }
1098                                                if (*use_fips) == (false) {
1099                                                    if (*use_dual_stack) == (true) {
1100                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1101                                                            .url({
1102                                                                let mut out = String::new();
1103                                                                out.push_str("https://");
1104                                                                #[allow(clippy::needless_borrow)]
1105                                                                out.push_str(&bucket.as_ref() as &str);
1106                                                                out.push_str(".s3express-");
1107                                                                #[allow(clippy::needless_borrow)]
1108                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1109                                                                out.push_str(".dualstack.");
1110                                                                #[allow(clippy::needless_borrow)]
1111                                                                out.push_str(&region.as_ref() as &str);
1112                                                                out.push('.');
1113                                                                #[allow(clippy::needless_borrow)]
1114                                                                out.push_str(&partition_result.dns_suffix());
1115                                                                out
1116                                                            })
1117                                                            .property("backend", "S3Express".to_string())
1118                                                            .property(
1119                                                                "authSchemes",
1120                                                                vec![::aws_smithy_types::Document::from({
1121                                                                    let mut out =
1122                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1123                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1124                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1125                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
1126                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
1127                                                                    out
1128                                                                })],
1129                                                            )
1130                                                            .build());
1131                                                    }
1132                                                }
1133                                                if (*use_fips) == (false) {
1134                                                    if (*use_dual_stack) == (false) {
1135                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1136                                                            .url({
1137                                                                let mut out = String::new();
1138                                                                out.push_str("https://");
1139                                                                #[allow(clippy::needless_borrow)]
1140                                                                out.push_str(&bucket.as_ref() as &str);
1141                                                                out.push_str(".s3express-");
1142                                                                #[allow(clippy::needless_borrow)]
1143                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1144                                                                out.push('.');
1145                                                                #[allow(clippy::needless_borrow)]
1146                                                                out.push_str(&region.as_ref() as &str);
1147                                                                out.push('.');
1148                                                                #[allow(clippy::needless_borrow)]
1149                                                                out.push_str(&partition_result.dns_suffix());
1150                                                                out
1151                                                            })
1152                                                            .property("backend", "S3Express".to_string())
1153                                                            .property(
1154                                                                "authSchemes",
1155                                                                vec![::aws_smithy_types::Document::from({
1156                                                                    let mut out =
1157                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1158                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1159                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1160                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
1161                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
1162                                                                    out
1163                                                                })],
1164                                                            )
1165                                                            .build());
1166                                                    }
1167                                                }
1168                                                #[allow(unreachable_code)]
1169                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1170                                                    "No rules matched these parameters. This is a bug. {_params:?}"
1171                                                )));
1172                                            }
1173                                        }
1174                                    }
1175                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1176                                        "Unrecognized S3Express bucket name format.".to_string(),
1177                                    ));
1178                                }
1179                            }
1180                            #[allow(unused_variables)]
1181                            if let Some(s3express_availability_zone_id) =
1182                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 14, true, _diagnostic_collector)
1183                            {
1184                                #[allow(unused_variables)]
1185                                if let Some(s3express_availability_zone_delim) =
1186                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 14, 16, true, _diagnostic_collector)
1187                                {
1188                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
1189                                        if (*use_fips) == (true) {
1190                                            if (*use_dual_stack) == (true) {
1191                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1192                                                    .url({
1193                                                        let mut out = String::new();
1194                                                        out.push_str("https://");
1195                                                        #[allow(clippy::needless_borrow)]
1196                                                        out.push_str(&bucket.as_ref() as &str);
1197                                                        out.push_str(".s3express-fips-");
1198                                                        #[allow(clippy::needless_borrow)]
1199                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1200                                                        out.push_str(".dualstack.");
1201                                                        #[allow(clippy::needless_borrow)]
1202                                                        out.push_str(&region.as_ref() as &str);
1203                                                        out.push('.');
1204                                                        #[allow(clippy::needless_borrow)]
1205                                                        out.push_str(&partition_result.dns_suffix());
1206                                                        out
1207                                                    })
1208                                                    .property("backend", "S3Express".to_string())
1209                                                    .property(
1210                                                        "authSchemes",
1211                                                        vec![::aws_smithy_types::Document::from({
1212                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1213                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1214                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1215                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1216                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1217                                                            out
1218                                                        })],
1219                                                    )
1220                                                    .build());
1221                                            }
1222                                        }
1223                                        if (*use_fips) == (true) {
1224                                            if (*use_dual_stack) == (false) {
1225                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1226                                                    .url({
1227                                                        let mut out = String::new();
1228                                                        out.push_str("https://");
1229                                                        #[allow(clippy::needless_borrow)]
1230                                                        out.push_str(&bucket.as_ref() as &str);
1231                                                        out.push_str(".s3express-fips-");
1232                                                        #[allow(clippy::needless_borrow)]
1233                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1234                                                        out.push('.');
1235                                                        #[allow(clippy::needless_borrow)]
1236                                                        out.push_str(&region.as_ref() as &str);
1237                                                        out.push('.');
1238                                                        #[allow(clippy::needless_borrow)]
1239                                                        out.push_str(&partition_result.dns_suffix());
1240                                                        out
1241                                                    })
1242                                                    .property("backend", "S3Express".to_string())
1243                                                    .property(
1244                                                        "authSchemes",
1245                                                        vec![::aws_smithy_types::Document::from({
1246                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1247                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1248                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1249                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1250                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1251                                                            out
1252                                                        })],
1253                                                    )
1254                                                    .build());
1255                                            }
1256                                        }
1257                                        if (*use_fips) == (false) {
1258                                            if (*use_dual_stack) == (true) {
1259                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1260                                                    .url({
1261                                                        let mut out = String::new();
1262                                                        out.push_str("https://");
1263                                                        #[allow(clippy::needless_borrow)]
1264                                                        out.push_str(&bucket.as_ref() as &str);
1265                                                        out.push_str(".s3express-");
1266                                                        #[allow(clippy::needless_borrow)]
1267                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1268                                                        out.push_str(".dualstack.");
1269                                                        #[allow(clippy::needless_borrow)]
1270                                                        out.push_str(&region.as_ref() as &str);
1271                                                        out.push('.');
1272                                                        #[allow(clippy::needless_borrow)]
1273                                                        out.push_str(&partition_result.dns_suffix());
1274                                                        out
1275                                                    })
1276                                                    .property("backend", "S3Express".to_string())
1277                                                    .property(
1278                                                        "authSchemes",
1279                                                        vec![::aws_smithy_types::Document::from({
1280                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1281                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1282                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1283                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1284                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1285                                                            out
1286                                                        })],
1287                                                    )
1288                                                    .build());
1289                                            }
1290                                        }
1291                                        if (*use_fips) == (false) {
1292                                            if (*use_dual_stack) == (false) {
1293                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1294                                                    .url({
1295                                                        let mut out = String::new();
1296                                                        out.push_str("https://");
1297                                                        #[allow(clippy::needless_borrow)]
1298                                                        out.push_str(&bucket.as_ref() as &str);
1299                                                        out.push_str(".s3express-");
1300                                                        #[allow(clippy::needless_borrow)]
1301                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1302                                                        out.push('.');
1303                                                        #[allow(clippy::needless_borrow)]
1304                                                        out.push_str(&region.as_ref() as &str);
1305                                                        out.push('.');
1306                                                        #[allow(clippy::needless_borrow)]
1307                                                        out.push_str(&partition_result.dns_suffix());
1308                                                        out
1309                                                    })
1310                                                    .property("backend", "S3Express".to_string())
1311                                                    .property(
1312                                                        "authSchemes",
1313                                                        vec![::aws_smithy_types::Document::from({
1314                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1315                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1316                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1317                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1318                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1319                                                            out
1320                                                        })],
1321                                                    )
1322                                                    .build());
1323                                            }
1324                                        }
1325                                        #[allow(unreachable_code)]
1326                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1327                                            "No rules matched these parameters. This is a bug. {_params:?}"
1328                                        )));
1329                                    }
1330                                }
1331                            }
1332                            #[allow(unused_variables)]
1333                            if let Some(s3express_availability_zone_id) =
1334                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 15, true, _diagnostic_collector)
1335                            {
1336                                #[allow(unused_variables)]
1337                                if let Some(s3express_availability_zone_delim) =
1338                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
1339                                {
1340                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
1341                                        if (*use_fips) == (true) {
1342                                            if (*use_dual_stack) == (true) {
1343                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1344                                                    .url({
1345                                                        let mut out = String::new();
1346                                                        out.push_str("https://");
1347                                                        #[allow(clippy::needless_borrow)]
1348                                                        out.push_str(&bucket.as_ref() as &str);
1349                                                        out.push_str(".s3express-fips-");
1350                                                        #[allow(clippy::needless_borrow)]
1351                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1352                                                        out.push_str(".dualstack.");
1353                                                        #[allow(clippy::needless_borrow)]
1354                                                        out.push_str(&region.as_ref() as &str);
1355                                                        out.push('.');
1356                                                        #[allow(clippy::needless_borrow)]
1357                                                        out.push_str(&partition_result.dns_suffix());
1358                                                        out
1359                                                    })
1360                                                    .property("backend", "S3Express".to_string())
1361                                                    .property(
1362                                                        "authSchemes",
1363                                                        vec![::aws_smithy_types::Document::from({
1364                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1365                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1366                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1367                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1368                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1369                                                            out
1370                                                        })],
1371                                                    )
1372                                                    .build());
1373                                            }
1374                                        }
1375                                        if (*use_fips) == (true) {
1376                                            if (*use_dual_stack) == (false) {
1377                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1378                                                    .url({
1379                                                        let mut out = String::new();
1380                                                        out.push_str("https://");
1381                                                        #[allow(clippy::needless_borrow)]
1382                                                        out.push_str(&bucket.as_ref() as &str);
1383                                                        out.push_str(".s3express-fips-");
1384                                                        #[allow(clippy::needless_borrow)]
1385                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1386                                                        out.push('.');
1387                                                        #[allow(clippy::needless_borrow)]
1388                                                        out.push_str(&region.as_ref() as &str);
1389                                                        out.push('.');
1390                                                        #[allow(clippy::needless_borrow)]
1391                                                        out.push_str(&partition_result.dns_suffix());
1392                                                        out
1393                                                    })
1394                                                    .property("backend", "S3Express".to_string())
1395                                                    .property(
1396                                                        "authSchemes",
1397                                                        vec![::aws_smithy_types::Document::from({
1398                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1399                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1400                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1401                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1402                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1403                                                            out
1404                                                        })],
1405                                                    )
1406                                                    .build());
1407                                            }
1408                                        }
1409                                        if (*use_fips) == (false) {
1410                                            if (*use_dual_stack) == (true) {
1411                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1412                                                    .url({
1413                                                        let mut out = String::new();
1414                                                        out.push_str("https://");
1415                                                        #[allow(clippy::needless_borrow)]
1416                                                        out.push_str(&bucket.as_ref() as &str);
1417                                                        out.push_str(".s3express-");
1418                                                        #[allow(clippy::needless_borrow)]
1419                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1420                                                        out.push_str(".dualstack.");
1421                                                        #[allow(clippy::needless_borrow)]
1422                                                        out.push_str(&region.as_ref() as &str);
1423                                                        out.push('.');
1424                                                        #[allow(clippy::needless_borrow)]
1425                                                        out.push_str(&partition_result.dns_suffix());
1426                                                        out
1427                                                    })
1428                                                    .property("backend", "S3Express".to_string())
1429                                                    .property(
1430                                                        "authSchemes",
1431                                                        vec![::aws_smithy_types::Document::from({
1432                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1433                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1434                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1435                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1436                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1437                                                            out
1438                                                        })],
1439                                                    )
1440                                                    .build());
1441                                            }
1442                                        }
1443                                        if (*use_fips) == (false) {
1444                                            if (*use_dual_stack) == (false) {
1445                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1446                                                    .url({
1447                                                        let mut out = String::new();
1448                                                        out.push_str("https://");
1449                                                        #[allow(clippy::needless_borrow)]
1450                                                        out.push_str(&bucket.as_ref() as &str);
1451                                                        out.push_str(".s3express-");
1452                                                        #[allow(clippy::needless_borrow)]
1453                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1454                                                        out.push('.');
1455                                                        #[allow(clippy::needless_borrow)]
1456                                                        out.push_str(&region.as_ref() as &str);
1457                                                        out.push('.');
1458                                                        #[allow(clippy::needless_borrow)]
1459                                                        out.push_str(&partition_result.dns_suffix());
1460                                                        out
1461                                                    })
1462                                                    .property("backend", "S3Express".to_string())
1463                                                    .property(
1464                                                        "authSchemes",
1465                                                        vec![::aws_smithy_types::Document::from({
1466                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1467                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1468                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1469                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1470                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1471                                                            out
1472                                                        })],
1473                                                    )
1474                                                    .build());
1475                                            }
1476                                        }
1477                                        #[allow(unreachable_code)]
1478                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1479                                            "No rules matched these parameters. This is a bug. {_params:?}"
1480                                        )));
1481                                    }
1482                                }
1483                            }
1484                            #[allow(unused_variables)]
1485                            if let Some(s3express_availability_zone_id) =
1486                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 19, true, _diagnostic_collector)
1487                            {
1488                                #[allow(unused_variables)]
1489                                if let Some(s3express_availability_zone_delim) =
1490                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 19, 21, true, _diagnostic_collector)
1491                                {
1492                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
1493                                        if (*use_fips) == (true) {
1494                                            if (*use_dual_stack) == (true) {
1495                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1496                                                    .url({
1497                                                        let mut out = String::new();
1498                                                        out.push_str("https://");
1499                                                        #[allow(clippy::needless_borrow)]
1500                                                        out.push_str(&bucket.as_ref() as &str);
1501                                                        out.push_str(".s3express-fips-");
1502                                                        #[allow(clippy::needless_borrow)]
1503                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1504                                                        out.push_str(".dualstack.");
1505                                                        #[allow(clippy::needless_borrow)]
1506                                                        out.push_str(&region.as_ref() as &str);
1507                                                        out.push('.');
1508                                                        #[allow(clippy::needless_borrow)]
1509                                                        out.push_str(&partition_result.dns_suffix());
1510                                                        out
1511                                                    })
1512                                                    .property("backend", "S3Express".to_string())
1513                                                    .property(
1514                                                        "authSchemes",
1515                                                        vec![::aws_smithy_types::Document::from({
1516                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1517                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1518                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1519                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1520                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1521                                                            out
1522                                                        })],
1523                                                    )
1524                                                    .build());
1525                                            }
1526                                        }
1527                                        if (*use_fips) == (true) {
1528                                            if (*use_dual_stack) == (false) {
1529                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1530                                                    .url({
1531                                                        let mut out = String::new();
1532                                                        out.push_str("https://");
1533                                                        #[allow(clippy::needless_borrow)]
1534                                                        out.push_str(&bucket.as_ref() as &str);
1535                                                        out.push_str(".s3express-fips-");
1536                                                        #[allow(clippy::needless_borrow)]
1537                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1538                                                        out.push('.');
1539                                                        #[allow(clippy::needless_borrow)]
1540                                                        out.push_str(&region.as_ref() as &str);
1541                                                        out.push('.');
1542                                                        #[allow(clippy::needless_borrow)]
1543                                                        out.push_str(&partition_result.dns_suffix());
1544                                                        out
1545                                                    })
1546                                                    .property("backend", "S3Express".to_string())
1547                                                    .property(
1548                                                        "authSchemes",
1549                                                        vec![::aws_smithy_types::Document::from({
1550                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1551                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1552                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1553                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1554                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1555                                                            out
1556                                                        })],
1557                                                    )
1558                                                    .build());
1559                                            }
1560                                        }
1561                                        if (*use_fips) == (false) {
1562                                            if (*use_dual_stack) == (true) {
1563                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1564                                                    .url({
1565                                                        let mut out = String::new();
1566                                                        out.push_str("https://");
1567                                                        #[allow(clippy::needless_borrow)]
1568                                                        out.push_str(&bucket.as_ref() as &str);
1569                                                        out.push_str(".s3express-");
1570                                                        #[allow(clippy::needless_borrow)]
1571                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1572                                                        out.push_str(".dualstack.");
1573                                                        #[allow(clippy::needless_borrow)]
1574                                                        out.push_str(&region.as_ref() as &str);
1575                                                        out.push('.');
1576                                                        #[allow(clippy::needless_borrow)]
1577                                                        out.push_str(&partition_result.dns_suffix());
1578                                                        out
1579                                                    })
1580                                                    .property("backend", "S3Express".to_string())
1581                                                    .property(
1582                                                        "authSchemes",
1583                                                        vec![::aws_smithy_types::Document::from({
1584                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1585                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1586                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1587                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1588                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1589                                                            out
1590                                                        })],
1591                                                    )
1592                                                    .build());
1593                                            }
1594                                        }
1595                                        if (*use_fips) == (false) {
1596                                            if (*use_dual_stack) == (false) {
1597                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1598                                                    .url({
1599                                                        let mut out = String::new();
1600                                                        out.push_str("https://");
1601                                                        #[allow(clippy::needless_borrow)]
1602                                                        out.push_str(&bucket.as_ref() as &str);
1603                                                        out.push_str(".s3express-");
1604                                                        #[allow(clippy::needless_borrow)]
1605                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1606                                                        out.push('.');
1607                                                        #[allow(clippy::needless_borrow)]
1608                                                        out.push_str(&region.as_ref() as &str);
1609                                                        out.push('.');
1610                                                        #[allow(clippy::needless_borrow)]
1611                                                        out.push_str(&partition_result.dns_suffix());
1612                                                        out
1613                                                    })
1614                                                    .property("backend", "S3Express".to_string())
1615                                                    .property(
1616                                                        "authSchemes",
1617                                                        vec![::aws_smithy_types::Document::from({
1618                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1619                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1620                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1621                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1622                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1623                                                            out
1624                                                        })],
1625                                                    )
1626                                                    .build());
1627                                            }
1628                                        }
1629                                        #[allow(unreachable_code)]
1630                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1631                                            "No rules matched these parameters. This is a bug. {_params:?}"
1632                                        )));
1633                                    }
1634                                }
1635                            }
1636                            #[allow(unused_variables)]
1637                            if let Some(s3express_availability_zone_id) =
1638                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 20, true, _diagnostic_collector)
1639                            {
1640                                #[allow(unused_variables)]
1641                                if let Some(s3express_availability_zone_delim) =
1642                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
1643                                {
1644                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
1645                                        if (*use_fips) == (true) {
1646                                            if (*use_dual_stack) == (true) {
1647                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1648                                                    .url({
1649                                                        let mut out = String::new();
1650                                                        out.push_str("https://");
1651                                                        #[allow(clippy::needless_borrow)]
1652                                                        out.push_str(&bucket.as_ref() as &str);
1653                                                        out.push_str(".s3express-fips-");
1654                                                        #[allow(clippy::needless_borrow)]
1655                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1656                                                        out.push_str(".dualstack.");
1657                                                        #[allow(clippy::needless_borrow)]
1658                                                        out.push_str(&region.as_ref() as &str);
1659                                                        out.push('.');
1660                                                        #[allow(clippy::needless_borrow)]
1661                                                        out.push_str(&partition_result.dns_suffix());
1662                                                        out
1663                                                    })
1664                                                    .property("backend", "S3Express".to_string())
1665                                                    .property(
1666                                                        "authSchemes",
1667                                                        vec![::aws_smithy_types::Document::from({
1668                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1669                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1670                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1671                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1672                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1673                                                            out
1674                                                        })],
1675                                                    )
1676                                                    .build());
1677                                            }
1678                                        }
1679                                        if (*use_fips) == (true) {
1680                                            if (*use_dual_stack) == (false) {
1681                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1682                                                    .url({
1683                                                        let mut out = String::new();
1684                                                        out.push_str("https://");
1685                                                        #[allow(clippy::needless_borrow)]
1686                                                        out.push_str(&bucket.as_ref() as &str);
1687                                                        out.push_str(".s3express-fips-");
1688                                                        #[allow(clippy::needless_borrow)]
1689                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1690                                                        out.push('.');
1691                                                        #[allow(clippy::needless_borrow)]
1692                                                        out.push_str(&region.as_ref() as &str);
1693                                                        out.push('.');
1694                                                        #[allow(clippy::needless_borrow)]
1695                                                        out.push_str(&partition_result.dns_suffix());
1696                                                        out
1697                                                    })
1698                                                    .property("backend", "S3Express".to_string())
1699                                                    .property(
1700                                                        "authSchemes",
1701                                                        vec![::aws_smithy_types::Document::from({
1702                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1703                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1704                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1705                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1706                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1707                                                            out
1708                                                        })],
1709                                                    )
1710                                                    .build());
1711                                            }
1712                                        }
1713                                        if (*use_fips) == (false) {
1714                                            if (*use_dual_stack) == (true) {
1715                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1716                                                    .url({
1717                                                        let mut out = String::new();
1718                                                        out.push_str("https://");
1719                                                        #[allow(clippy::needless_borrow)]
1720                                                        out.push_str(&bucket.as_ref() as &str);
1721                                                        out.push_str(".s3express-");
1722                                                        #[allow(clippy::needless_borrow)]
1723                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1724                                                        out.push_str(".dualstack.");
1725                                                        #[allow(clippy::needless_borrow)]
1726                                                        out.push_str(&region.as_ref() as &str);
1727                                                        out.push('.');
1728                                                        #[allow(clippy::needless_borrow)]
1729                                                        out.push_str(&partition_result.dns_suffix());
1730                                                        out
1731                                                    })
1732                                                    .property("backend", "S3Express".to_string())
1733                                                    .property(
1734                                                        "authSchemes",
1735                                                        vec![::aws_smithy_types::Document::from({
1736                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1737                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1738                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1739                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1740                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1741                                                            out
1742                                                        })],
1743                                                    )
1744                                                    .build());
1745                                            }
1746                                        }
1747                                        if (*use_fips) == (false) {
1748                                            if (*use_dual_stack) == (false) {
1749                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1750                                                    .url({
1751                                                        let mut out = String::new();
1752                                                        out.push_str("https://");
1753                                                        #[allow(clippy::needless_borrow)]
1754                                                        out.push_str(&bucket.as_ref() as &str);
1755                                                        out.push_str(".s3express-");
1756                                                        #[allow(clippy::needless_borrow)]
1757                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1758                                                        out.push('.');
1759                                                        #[allow(clippy::needless_borrow)]
1760                                                        out.push_str(&region.as_ref() as &str);
1761                                                        out.push('.');
1762                                                        #[allow(clippy::needless_borrow)]
1763                                                        out.push_str(&partition_result.dns_suffix());
1764                                                        out
1765                                                    })
1766                                                    .property("backend", "S3Express".to_string())
1767                                                    .property(
1768                                                        "authSchemes",
1769                                                        vec![::aws_smithy_types::Document::from({
1770                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1771                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1772                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1773                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1774                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1775                                                            out
1776                                                        })],
1777                                                    )
1778                                                    .build());
1779                                            }
1780                                        }
1781                                        #[allow(unreachable_code)]
1782                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1783                                            "No rules matched these parameters. This is a bug. {_params:?}"
1784                                        )));
1785                                    }
1786                                }
1787                            }
1788                            #[allow(unused_variables)]
1789                            if let Some(s3express_availability_zone_id) =
1790                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 6, 26, true, _diagnostic_collector)
1791                            {
1792                                #[allow(unused_variables)]
1793                                if let Some(s3express_availability_zone_delim) =
1794                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 26, 28, true, _diagnostic_collector)
1795                                {
1796                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
1797                                        if (*use_fips) == (true) {
1798                                            if (*use_dual_stack) == (true) {
1799                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1800                                                    .url({
1801                                                        let mut out = String::new();
1802                                                        out.push_str("https://");
1803                                                        #[allow(clippy::needless_borrow)]
1804                                                        out.push_str(&bucket.as_ref() as &str);
1805                                                        out.push_str(".s3express-fips-");
1806                                                        #[allow(clippy::needless_borrow)]
1807                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1808                                                        out.push_str(".dualstack.");
1809                                                        #[allow(clippy::needless_borrow)]
1810                                                        out.push_str(&region.as_ref() as &str);
1811                                                        out.push('.');
1812                                                        #[allow(clippy::needless_borrow)]
1813                                                        out.push_str(&partition_result.dns_suffix());
1814                                                        out
1815                                                    })
1816                                                    .property("backend", "S3Express".to_string())
1817                                                    .property(
1818                                                        "authSchemes",
1819                                                        vec![::aws_smithy_types::Document::from({
1820                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1821                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1822                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1823                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1824                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1825                                                            out
1826                                                        })],
1827                                                    )
1828                                                    .build());
1829                                            }
1830                                        }
1831                                        if (*use_fips) == (true) {
1832                                            if (*use_dual_stack) == (false) {
1833                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1834                                                    .url({
1835                                                        let mut out = String::new();
1836                                                        out.push_str("https://");
1837                                                        #[allow(clippy::needless_borrow)]
1838                                                        out.push_str(&bucket.as_ref() as &str);
1839                                                        out.push_str(".s3express-fips-");
1840                                                        #[allow(clippy::needless_borrow)]
1841                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1842                                                        out.push('.');
1843                                                        #[allow(clippy::needless_borrow)]
1844                                                        out.push_str(&region.as_ref() as &str);
1845                                                        out.push('.');
1846                                                        #[allow(clippy::needless_borrow)]
1847                                                        out.push_str(&partition_result.dns_suffix());
1848                                                        out
1849                                                    })
1850                                                    .property("backend", "S3Express".to_string())
1851                                                    .property(
1852                                                        "authSchemes",
1853                                                        vec![::aws_smithy_types::Document::from({
1854                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1855                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1856                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1857                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1858                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1859                                                            out
1860                                                        })],
1861                                                    )
1862                                                    .build());
1863                                            }
1864                                        }
1865                                        if (*use_fips) == (false) {
1866                                            if (*use_dual_stack) == (true) {
1867                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1868                                                    .url({
1869                                                        let mut out = String::new();
1870                                                        out.push_str("https://");
1871                                                        #[allow(clippy::needless_borrow)]
1872                                                        out.push_str(&bucket.as_ref() as &str);
1873                                                        out.push_str(".s3express-");
1874                                                        #[allow(clippy::needless_borrow)]
1875                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1876                                                        out.push_str(".dualstack.");
1877                                                        #[allow(clippy::needless_borrow)]
1878                                                        out.push_str(&region.as_ref() as &str);
1879                                                        out.push('.');
1880                                                        #[allow(clippy::needless_borrow)]
1881                                                        out.push_str(&partition_result.dns_suffix());
1882                                                        out
1883                                                    })
1884                                                    .property("backend", "S3Express".to_string())
1885                                                    .property(
1886                                                        "authSchemes",
1887                                                        vec![::aws_smithy_types::Document::from({
1888                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1889                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1890                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1891                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1892                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1893                                                            out
1894                                                        })],
1895                                                    )
1896                                                    .build());
1897                                            }
1898                                        }
1899                                        if (*use_fips) == (false) {
1900                                            if (*use_dual_stack) == (false) {
1901                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1902                                                    .url({
1903                                                        let mut out = String::new();
1904                                                        out.push_str("https://");
1905                                                        #[allow(clippy::needless_borrow)]
1906                                                        out.push_str(&bucket.as_ref() as &str);
1907                                                        out.push_str(".s3express-");
1908                                                        #[allow(clippy::needless_borrow)]
1909                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
1910                                                        out.push('.');
1911                                                        #[allow(clippy::needless_borrow)]
1912                                                        out.push_str(&region.as_ref() as &str);
1913                                                        out.push('.');
1914                                                        #[allow(clippy::needless_borrow)]
1915                                                        out.push_str(&partition_result.dns_suffix());
1916                                                        out
1917                                                    })
1918                                                    .property("backend", "S3Express".to_string())
1919                                                    .property(
1920                                                        "authSchemes",
1921                                                        vec![::aws_smithy_types::Document::from({
1922                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1923                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
1924                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
1925                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
1926                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
1927                                                            out
1928                                                        })],
1929                                                    )
1930                                                    .build());
1931                                            }
1932                                        }
1933                                        #[allow(unreachable_code)]
1934                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1935                                            "No rules matched these parameters. This is a bug. {_params:?}"
1936                                        )));
1937                                    }
1938                                }
1939                            }
1940                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1941                                "Unrecognized S3Express bucket name format.".to_string(),
1942                            ));
1943                        }
1944                        #[allow(unreachable_code)]
1945                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
1946                            "No rules matched these parameters. This is a bug. {_params:?}"
1947                        )));
1948                    }
1949                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1950                        "S3Express bucket name is not a valid virtual hostable name.".to_string(),
1951                    ));
1952                }
1953            }
1954        }
1955        #[allow(unused_variables)]
1956        if let Some(bucket) = bucket {
1957            #[allow(unused_variables)]
1958            if let Some(access_point_suffix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 7, true, _diagnostic_collector) {
1959                if (access_point_suffix.as_ref() as &str) == ("--xa-s3") {
1960                    if (*accelerate) == (true) {
1961                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
1962                            "S3Express does not support S3 Accelerate.".to_string(),
1963                        ));
1964                    }
1965                    #[allow(unused_variables)]
1966                    if let Some(endpoint) = endpoint {
1967                        #[allow(unused_variables)]
1968                        if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
1969                            #[allow(unused_variables)]
1970                            if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
1971                                if (*disable_s3_express_session_auth) == (true) {
1972                                    if (url.is_ip()) == (true) {
1973                                        let uri_encoded_bucket =
1974                                            crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
1975                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
1976                                            .url({
1977                                                let mut out = String::new();
1978                                                #[allow(clippy::needless_borrow)]
1979                                                out.push_str(&url.scheme());
1980                                                out.push_str("://");
1981                                                #[allow(clippy::needless_borrow)]
1982                                                out.push_str(&url.authority());
1983                                                out.push('/');
1984                                                #[allow(clippy::needless_borrow)]
1985                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
1986                                                #[allow(clippy::needless_borrow)]
1987                                                out.push_str(&url.path());
1988                                                out
1989                                            })
1990                                            .property("backend", "S3Express".to_string())
1991                                            .property(
1992                                                "authSchemes",
1993                                                vec![::aws_smithy_types::Document::from({
1994                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
1995                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
1996                                                    out.insert("name".to_string(), "sigv4".to_string().into());
1997                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
1998                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
1999                                                    out
2000                                                })],
2001                                            )
2002                                            .build());
2003                                    }
2004                                    if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
2005                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2006                                            .url({
2007                                                let mut out = String::new();
2008                                                #[allow(clippy::needless_borrow)]
2009                                                out.push_str(&url.scheme());
2010                                                out.push_str("://");
2011                                                #[allow(clippy::needless_borrow)]
2012                                                out.push_str(&bucket.as_ref() as &str);
2013                                                out.push('.');
2014                                                #[allow(clippy::needless_borrow)]
2015                                                out.push_str(&url.authority());
2016                                                #[allow(clippy::needless_borrow)]
2017                                                out.push_str(&url.path());
2018                                                out
2019                                            })
2020                                            .property("backend", "S3Express".to_string())
2021                                            .property(
2022                                                "authSchemes",
2023                                                vec![::aws_smithy_types::Document::from({
2024                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2025                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2026                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2027                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2028                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2029                                                    out
2030                                                })],
2031                                            )
2032                                            .build());
2033                                    }
2034                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2035                                        "S3Express bucket name is not a valid virtual hostable name.".to_string(),
2036                                    ));
2037                                }
2038                            }
2039                            if (url.is_ip()) == (true) {
2040                                let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
2041                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2042                                    .url({
2043                                        let mut out = String::new();
2044                                        #[allow(clippy::needless_borrow)]
2045                                        out.push_str(&url.scheme());
2046                                        out.push_str("://");
2047                                        #[allow(clippy::needless_borrow)]
2048                                        out.push_str(&url.authority());
2049                                        out.push('/');
2050                                        #[allow(clippy::needless_borrow)]
2051                                        out.push_str(&uri_encoded_bucket.as_ref() as &str);
2052                                        #[allow(clippy::needless_borrow)]
2053                                        out.push_str(&url.path());
2054                                        out
2055                                    })
2056                                    .property("backend", "S3Express".to_string())
2057                                    .property(
2058                                        "authSchemes",
2059                                        vec![::aws_smithy_types::Document::from({
2060                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2061                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2062                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
2063                                            out.insert("signingName".to_string(), "s3express".to_string().into());
2064                                            out.insert("signingRegion".to_string(), region.to_owned().into());
2065                                            out
2066                                        })],
2067                                    )
2068                                    .build());
2069                            }
2070                            if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
2071                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2072                                    .url({
2073                                        let mut out = String::new();
2074                                        #[allow(clippy::needless_borrow)]
2075                                        out.push_str(&url.scheme());
2076                                        out.push_str("://");
2077                                        #[allow(clippy::needless_borrow)]
2078                                        out.push_str(&bucket.as_ref() as &str);
2079                                        out.push('.');
2080                                        #[allow(clippy::needless_borrow)]
2081                                        out.push_str(&url.authority());
2082                                        #[allow(clippy::needless_borrow)]
2083                                        out.push_str(&url.path());
2084                                        out
2085                                    })
2086                                    .property("backend", "S3Express".to_string())
2087                                    .property(
2088                                        "authSchemes",
2089                                        vec![::aws_smithy_types::Document::from({
2090                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2091                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2092                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
2093                                            out.insert("signingName".to_string(), "s3express".to_string().into());
2094                                            out.insert("signingRegion".to_string(), region.to_owned().into());
2095                                            out
2096                                        })],
2097                                    )
2098                                    .build());
2099                            }
2100                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2101                                "S3Express bucket name is not a valid virtual hostable name.".to_string(),
2102                            ));
2103                        }
2104                    }
2105                    if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
2106                        #[allow(unused_variables)]
2107                        if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
2108                            #[allow(unused_variables)]
2109                            if let Some(disable_s3_express_session_auth) = disable_s3_express_session_auth {
2110                                if (*disable_s3_express_session_auth) == (true) {
2111                                    #[allow(unused_variables)]
2112                                    if let Some(s3express_availability_zone_id) =
2113                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 15, true, _diagnostic_collector)
2114                                    {
2115                                        #[allow(unused_variables)]
2116                                        if let Some(s3express_availability_zone_delim) =
2117                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
2118                                        {
2119                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
2120                                                if (*use_fips) == (true) {
2121                                                    if (*use_dual_stack) == (true) {
2122                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2123                                                            .url({
2124                                                                let mut out = String::new();
2125                                                                out.push_str("https://");
2126                                                                #[allow(clippy::needless_borrow)]
2127                                                                out.push_str(&bucket.as_ref() as &str);
2128                                                                out.push_str(".s3express-fips-");
2129                                                                #[allow(clippy::needless_borrow)]
2130                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2131                                                                out.push_str(".dualstack.");
2132                                                                #[allow(clippy::needless_borrow)]
2133                                                                out.push_str(&region.as_ref() as &str);
2134                                                                out.push('.');
2135                                                                #[allow(clippy::needless_borrow)]
2136                                                                out.push_str(&partition_result.dns_suffix());
2137                                                                out
2138                                                            })
2139                                                            .property("backend", "S3Express".to_string())
2140                                                            .property(
2141                                                                "authSchemes",
2142                                                                vec![::aws_smithy_types::Document::from({
2143                                                                    let mut out =
2144                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2145                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2146                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2147                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2148                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2149                                                                    out
2150                                                                })],
2151                                                            )
2152                                                            .build());
2153                                                    }
2154                                                }
2155                                                if (*use_fips) == (true) {
2156                                                    if (*use_dual_stack) == (false) {
2157                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2158                                                            .url({
2159                                                                let mut out = String::new();
2160                                                                out.push_str("https://");
2161                                                                #[allow(clippy::needless_borrow)]
2162                                                                out.push_str(&bucket.as_ref() as &str);
2163                                                                out.push_str(".s3express-fips-");
2164                                                                #[allow(clippy::needless_borrow)]
2165                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2166                                                                out.push('.');
2167                                                                #[allow(clippy::needless_borrow)]
2168                                                                out.push_str(&region.as_ref() as &str);
2169                                                                out.push('.');
2170                                                                #[allow(clippy::needless_borrow)]
2171                                                                out.push_str(&partition_result.dns_suffix());
2172                                                                out
2173                                                            })
2174                                                            .property("backend", "S3Express".to_string())
2175                                                            .property(
2176                                                                "authSchemes",
2177                                                                vec![::aws_smithy_types::Document::from({
2178                                                                    let mut out =
2179                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2180                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2181                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2182                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2183                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2184                                                                    out
2185                                                                })],
2186                                                            )
2187                                                            .build());
2188                                                    }
2189                                                }
2190                                                if (*use_fips) == (false) {
2191                                                    if (*use_dual_stack) == (true) {
2192                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2193                                                            .url({
2194                                                                let mut out = String::new();
2195                                                                out.push_str("https://");
2196                                                                #[allow(clippy::needless_borrow)]
2197                                                                out.push_str(&bucket.as_ref() as &str);
2198                                                                out.push_str(".s3express-");
2199                                                                #[allow(clippy::needless_borrow)]
2200                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2201                                                                out.push_str(".dualstack.");
2202                                                                #[allow(clippy::needless_borrow)]
2203                                                                out.push_str(&region.as_ref() as &str);
2204                                                                out.push('.');
2205                                                                #[allow(clippy::needless_borrow)]
2206                                                                out.push_str(&partition_result.dns_suffix());
2207                                                                out
2208                                                            })
2209                                                            .property("backend", "S3Express".to_string())
2210                                                            .property(
2211                                                                "authSchemes",
2212                                                                vec![::aws_smithy_types::Document::from({
2213                                                                    let mut out =
2214                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2215                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2216                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2217                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2218                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2219                                                                    out
2220                                                                })],
2221                                                            )
2222                                                            .build());
2223                                                    }
2224                                                }
2225                                                if (*use_fips) == (false) {
2226                                                    if (*use_dual_stack) == (false) {
2227                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2228                                                            .url({
2229                                                                let mut out = String::new();
2230                                                                out.push_str("https://");
2231                                                                #[allow(clippy::needless_borrow)]
2232                                                                out.push_str(&bucket.as_ref() as &str);
2233                                                                out.push_str(".s3express-");
2234                                                                #[allow(clippy::needless_borrow)]
2235                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2236                                                                out.push('.');
2237                                                                #[allow(clippy::needless_borrow)]
2238                                                                out.push_str(&region.as_ref() as &str);
2239                                                                out.push('.');
2240                                                                #[allow(clippy::needless_borrow)]
2241                                                                out.push_str(&partition_result.dns_suffix());
2242                                                                out
2243                                                            })
2244                                                            .property("backend", "S3Express".to_string())
2245                                                            .property(
2246                                                                "authSchemes",
2247                                                                vec![::aws_smithy_types::Document::from({
2248                                                                    let mut out =
2249                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2250                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2251                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2252                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2253                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2254                                                                    out
2255                                                                })],
2256                                                            )
2257                                                            .build());
2258                                                    }
2259                                                }
2260                                                #[allow(unreachable_code)]
2261                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2262                                                    "No rules matched these parameters. This is a bug. {_params:?}"
2263                                                )));
2264                                            }
2265                                        }
2266                                    }
2267                                    #[allow(unused_variables)]
2268                                    if let Some(s3express_availability_zone_id) =
2269                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 16, true, _diagnostic_collector)
2270                                    {
2271                                        #[allow(unused_variables)]
2272                                        if let Some(s3express_availability_zone_delim) =
2273                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 16, 18, true, _diagnostic_collector)
2274                                        {
2275                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
2276                                                if (*use_fips) == (true) {
2277                                                    if (*use_dual_stack) == (true) {
2278                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2279                                                            .url({
2280                                                                let mut out = String::new();
2281                                                                out.push_str("https://");
2282                                                                #[allow(clippy::needless_borrow)]
2283                                                                out.push_str(&bucket.as_ref() as &str);
2284                                                                out.push_str(".s3express-fips-");
2285                                                                #[allow(clippy::needless_borrow)]
2286                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2287                                                                out.push_str(".dualstack.");
2288                                                                #[allow(clippy::needless_borrow)]
2289                                                                out.push_str(&region.as_ref() as &str);
2290                                                                out.push('.');
2291                                                                #[allow(clippy::needless_borrow)]
2292                                                                out.push_str(&partition_result.dns_suffix());
2293                                                                out
2294                                                            })
2295                                                            .property("backend", "S3Express".to_string())
2296                                                            .property(
2297                                                                "authSchemes",
2298                                                                vec![::aws_smithy_types::Document::from({
2299                                                                    let mut out =
2300                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2301                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2302                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2303                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2304                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2305                                                                    out
2306                                                                })],
2307                                                            )
2308                                                            .build());
2309                                                    }
2310                                                }
2311                                                if (*use_fips) == (true) {
2312                                                    if (*use_dual_stack) == (false) {
2313                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2314                                                            .url({
2315                                                                let mut out = String::new();
2316                                                                out.push_str("https://");
2317                                                                #[allow(clippy::needless_borrow)]
2318                                                                out.push_str(&bucket.as_ref() as &str);
2319                                                                out.push_str(".s3express-fips-");
2320                                                                #[allow(clippy::needless_borrow)]
2321                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2322                                                                out.push('.');
2323                                                                #[allow(clippy::needless_borrow)]
2324                                                                out.push_str(&region.as_ref() as &str);
2325                                                                out.push('.');
2326                                                                #[allow(clippy::needless_borrow)]
2327                                                                out.push_str(&partition_result.dns_suffix());
2328                                                                out
2329                                                            })
2330                                                            .property("backend", "S3Express".to_string())
2331                                                            .property(
2332                                                                "authSchemes",
2333                                                                vec![::aws_smithy_types::Document::from({
2334                                                                    let mut out =
2335                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2336                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2337                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2338                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2339                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2340                                                                    out
2341                                                                })],
2342                                                            )
2343                                                            .build());
2344                                                    }
2345                                                }
2346                                                if (*use_fips) == (false) {
2347                                                    if (*use_dual_stack) == (true) {
2348                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2349                                                            .url({
2350                                                                let mut out = String::new();
2351                                                                out.push_str("https://");
2352                                                                #[allow(clippy::needless_borrow)]
2353                                                                out.push_str(&bucket.as_ref() as &str);
2354                                                                out.push_str(".s3express-");
2355                                                                #[allow(clippy::needless_borrow)]
2356                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2357                                                                out.push_str(".dualstack.");
2358                                                                #[allow(clippy::needless_borrow)]
2359                                                                out.push_str(&region.as_ref() as &str);
2360                                                                out.push('.');
2361                                                                #[allow(clippy::needless_borrow)]
2362                                                                out.push_str(&partition_result.dns_suffix());
2363                                                                out
2364                                                            })
2365                                                            .property("backend", "S3Express".to_string())
2366                                                            .property(
2367                                                                "authSchemes",
2368                                                                vec![::aws_smithy_types::Document::from({
2369                                                                    let mut out =
2370                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2371                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2372                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2373                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2374                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2375                                                                    out
2376                                                                })],
2377                                                            )
2378                                                            .build());
2379                                                    }
2380                                                }
2381                                                if (*use_fips) == (false) {
2382                                                    if (*use_dual_stack) == (false) {
2383                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2384                                                            .url({
2385                                                                let mut out = String::new();
2386                                                                out.push_str("https://");
2387                                                                #[allow(clippy::needless_borrow)]
2388                                                                out.push_str(&bucket.as_ref() as &str);
2389                                                                out.push_str(".s3express-");
2390                                                                #[allow(clippy::needless_borrow)]
2391                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2392                                                                out.push('.');
2393                                                                #[allow(clippy::needless_borrow)]
2394                                                                out.push_str(&region.as_ref() as &str);
2395                                                                out.push('.');
2396                                                                #[allow(clippy::needless_borrow)]
2397                                                                out.push_str(&partition_result.dns_suffix());
2398                                                                out
2399                                                            })
2400                                                            .property("backend", "S3Express".to_string())
2401                                                            .property(
2402                                                                "authSchemes",
2403                                                                vec![::aws_smithy_types::Document::from({
2404                                                                    let mut out =
2405                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2406                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2407                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2408                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2409                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2410                                                                    out
2411                                                                })],
2412                                                            )
2413                                                            .build());
2414                                                    }
2415                                                }
2416                                                #[allow(unreachable_code)]
2417                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2418                                                    "No rules matched these parameters. This is a bug. {_params:?}"
2419                                                )));
2420                                            }
2421                                        }
2422                                    }
2423                                    #[allow(unused_variables)]
2424                                    if let Some(s3express_availability_zone_id) =
2425                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 20, true, _diagnostic_collector)
2426                                    {
2427                                        #[allow(unused_variables)]
2428                                        if let Some(s3express_availability_zone_delim) =
2429                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
2430                                        {
2431                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
2432                                                if (*use_fips) == (true) {
2433                                                    if (*use_dual_stack) == (true) {
2434                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2435                                                            .url({
2436                                                                let mut out = String::new();
2437                                                                out.push_str("https://");
2438                                                                #[allow(clippy::needless_borrow)]
2439                                                                out.push_str(&bucket.as_ref() as &str);
2440                                                                out.push_str(".s3express-fips-");
2441                                                                #[allow(clippy::needless_borrow)]
2442                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2443                                                                out.push_str(".dualstack.");
2444                                                                #[allow(clippy::needless_borrow)]
2445                                                                out.push_str(&region.as_ref() as &str);
2446                                                                out.push('.');
2447                                                                #[allow(clippy::needless_borrow)]
2448                                                                out.push_str(&partition_result.dns_suffix());
2449                                                                out
2450                                                            })
2451                                                            .property("backend", "S3Express".to_string())
2452                                                            .property(
2453                                                                "authSchemes",
2454                                                                vec![::aws_smithy_types::Document::from({
2455                                                                    let mut out =
2456                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2457                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2458                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2459                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2460                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2461                                                                    out
2462                                                                })],
2463                                                            )
2464                                                            .build());
2465                                                    }
2466                                                }
2467                                                if (*use_fips) == (true) {
2468                                                    if (*use_dual_stack) == (false) {
2469                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2470                                                            .url({
2471                                                                let mut out = String::new();
2472                                                                out.push_str("https://");
2473                                                                #[allow(clippy::needless_borrow)]
2474                                                                out.push_str(&bucket.as_ref() as &str);
2475                                                                out.push_str(".s3express-fips-");
2476                                                                #[allow(clippy::needless_borrow)]
2477                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2478                                                                out.push('.');
2479                                                                #[allow(clippy::needless_borrow)]
2480                                                                out.push_str(&region.as_ref() as &str);
2481                                                                out.push('.');
2482                                                                #[allow(clippy::needless_borrow)]
2483                                                                out.push_str(&partition_result.dns_suffix());
2484                                                                out
2485                                                            })
2486                                                            .property("backend", "S3Express".to_string())
2487                                                            .property(
2488                                                                "authSchemes",
2489                                                                vec![::aws_smithy_types::Document::from({
2490                                                                    let mut out =
2491                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2492                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2493                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2494                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2495                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2496                                                                    out
2497                                                                })],
2498                                                            )
2499                                                            .build());
2500                                                    }
2501                                                }
2502                                                if (*use_fips) == (false) {
2503                                                    if (*use_dual_stack) == (true) {
2504                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2505                                                            .url({
2506                                                                let mut out = String::new();
2507                                                                out.push_str("https://");
2508                                                                #[allow(clippy::needless_borrow)]
2509                                                                out.push_str(&bucket.as_ref() as &str);
2510                                                                out.push_str(".s3express-");
2511                                                                #[allow(clippy::needless_borrow)]
2512                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2513                                                                out.push_str(".dualstack.");
2514                                                                #[allow(clippy::needless_borrow)]
2515                                                                out.push_str(&region.as_ref() as &str);
2516                                                                out.push('.');
2517                                                                #[allow(clippy::needless_borrow)]
2518                                                                out.push_str(&partition_result.dns_suffix());
2519                                                                out
2520                                                            })
2521                                                            .property("backend", "S3Express".to_string())
2522                                                            .property(
2523                                                                "authSchemes",
2524                                                                vec![::aws_smithy_types::Document::from({
2525                                                                    let mut out =
2526                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2527                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2528                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2529                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2530                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2531                                                                    out
2532                                                                })],
2533                                                            )
2534                                                            .build());
2535                                                    }
2536                                                }
2537                                                if (*use_fips) == (false) {
2538                                                    if (*use_dual_stack) == (false) {
2539                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2540                                                            .url({
2541                                                                let mut out = String::new();
2542                                                                out.push_str("https://");
2543                                                                #[allow(clippy::needless_borrow)]
2544                                                                out.push_str(&bucket.as_ref() as &str);
2545                                                                out.push_str(".s3express-");
2546                                                                #[allow(clippy::needless_borrow)]
2547                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2548                                                                out.push('.');
2549                                                                #[allow(clippy::needless_borrow)]
2550                                                                out.push_str(&region.as_ref() as &str);
2551                                                                out.push('.');
2552                                                                #[allow(clippy::needless_borrow)]
2553                                                                out.push_str(&partition_result.dns_suffix());
2554                                                                out
2555                                                            })
2556                                                            .property("backend", "S3Express".to_string())
2557                                                            .property(
2558                                                                "authSchemes",
2559                                                                vec![::aws_smithy_types::Document::from({
2560                                                                    let mut out =
2561                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2562                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2563                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2564                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2565                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2566                                                                    out
2567                                                                })],
2568                                                            )
2569                                                            .build());
2570                                                    }
2571                                                }
2572                                                #[allow(unreachable_code)]
2573                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2574                                                    "No rules matched these parameters. This is a bug. {_params:?}"
2575                                                )));
2576                                            }
2577                                        }
2578                                    }
2579                                    #[allow(unused_variables)]
2580                                    if let Some(s3express_availability_zone_id) =
2581                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 21, true, _diagnostic_collector)
2582                                    {
2583                                        #[allow(unused_variables)]
2584                                        if let Some(s3express_availability_zone_delim) =
2585                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 21, 23, true, _diagnostic_collector)
2586                                        {
2587                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
2588                                                if (*use_fips) == (true) {
2589                                                    if (*use_dual_stack) == (true) {
2590                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2591                                                            .url({
2592                                                                let mut out = String::new();
2593                                                                out.push_str("https://");
2594                                                                #[allow(clippy::needless_borrow)]
2595                                                                out.push_str(&bucket.as_ref() as &str);
2596                                                                out.push_str(".s3express-fips-");
2597                                                                #[allow(clippy::needless_borrow)]
2598                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2599                                                                out.push_str(".dualstack.");
2600                                                                #[allow(clippy::needless_borrow)]
2601                                                                out.push_str(&region.as_ref() as &str);
2602                                                                out.push('.');
2603                                                                #[allow(clippy::needless_borrow)]
2604                                                                out.push_str(&partition_result.dns_suffix());
2605                                                                out
2606                                                            })
2607                                                            .property("backend", "S3Express".to_string())
2608                                                            .property(
2609                                                                "authSchemes",
2610                                                                vec![::aws_smithy_types::Document::from({
2611                                                                    let mut out =
2612                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2613                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2614                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2615                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2616                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2617                                                                    out
2618                                                                })],
2619                                                            )
2620                                                            .build());
2621                                                    }
2622                                                }
2623                                                if (*use_fips) == (true) {
2624                                                    if (*use_dual_stack) == (false) {
2625                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2626                                                            .url({
2627                                                                let mut out = String::new();
2628                                                                out.push_str("https://");
2629                                                                #[allow(clippy::needless_borrow)]
2630                                                                out.push_str(&bucket.as_ref() as &str);
2631                                                                out.push_str(".s3express-fips-");
2632                                                                #[allow(clippy::needless_borrow)]
2633                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2634                                                                out.push('.');
2635                                                                #[allow(clippy::needless_borrow)]
2636                                                                out.push_str(&region.as_ref() as &str);
2637                                                                out.push('.');
2638                                                                #[allow(clippy::needless_borrow)]
2639                                                                out.push_str(&partition_result.dns_suffix());
2640                                                                out
2641                                                            })
2642                                                            .property("backend", "S3Express".to_string())
2643                                                            .property(
2644                                                                "authSchemes",
2645                                                                vec![::aws_smithy_types::Document::from({
2646                                                                    let mut out =
2647                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2648                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2649                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2650                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2651                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2652                                                                    out
2653                                                                })],
2654                                                            )
2655                                                            .build());
2656                                                    }
2657                                                }
2658                                                if (*use_fips) == (false) {
2659                                                    if (*use_dual_stack) == (true) {
2660                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2661                                                            .url({
2662                                                                let mut out = String::new();
2663                                                                out.push_str("https://");
2664                                                                #[allow(clippy::needless_borrow)]
2665                                                                out.push_str(&bucket.as_ref() as &str);
2666                                                                out.push_str(".s3express-");
2667                                                                #[allow(clippy::needless_borrow)]
2668                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2669                                                                out.push_str(".dualstack.");
2670                                                                #[allow(clippy::needless_borrow)]
2671                                                                out.push_str(&region.as_ref() as &str);
2672                                                                out.push('.');
2673                                                                #[allow(clippy::needless_borrow)]
2674                                                                out.push_str(&partition_result.dns_suffix());
2675                                                                out
2676                                                            })
2677                                                            .property("backend", "S3Express".to_string())
2678                                                            .property(
2679                                                                "authSchemes",
2680                                                                vec![::aws_smithy_types::Document::from({
2681                                                                    let mut out =
2682                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2683                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2684                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2685                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2686                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2687                                                                    out
2688                                                                })],
2689                                                            )
2690                                                            .build());
2691                                                    }
2692                                                }
2693                                                if (*use_fips) == (false) {
2694                                                    if (*use_dual_stack) == (false) {
2695                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2696                                                            .url({
2697                                                                let mut out = String::new();
2698                                                                out.push_str("https://");
2699                                                                #[allow(clippy::needless_borrow)]
2700                                                                out.push_str(&bucket.as_ref() as &str);
2701                                                                out.push_str(".s3express-");
2702                                                                #[allow(clippy::needless_borrow)]
2703                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2704                                                                out.push('.');
2705                                                                #[allow(clippy::needless_borrow)]
2706                                                                out.push_str(&region.as_ref() as &str);
2707                                                                out.push('.');
2708                                                                #[allow(clippy::needless_borrow)]
2709                                                                out.push_str(&partition_result.dns_suffix());
2710                                                                out
2711                                                            })
2712                                                            .property("backend", "S3Express".to_string())
2713                                                            .property(
2714                                                                "authSchemes",
2715                                                                vec![::aws_smithy_types::Document::from({
2716                                                                    let mut out =
2717                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2718                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2719                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2720                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2721                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2722                                                                    out
2723                                                                })],
2724                                                            )
2725                                                            .build());
2726                                                    }
2727                                                }
2728                                                #[allow(unreachable_code)]
2729                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2730                                                    "No rules matched these parameters. This is a bug. {_params:?}"
2731                                                )));
2732                                            }
2733                                        }
2734                                    }
2735                                    #[allow(unused_variables)]
2736                                    if let Some(s3express_availability_zone_id) =
2737                                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 27, true, _diagnostic_collector)
2738                                    {
2739                                        #[allow(unused_variables)]
2740                                        if let Some(s3express_availability_zone_delim) =
2741                                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 27, 29, true, _diagnostic_collector)
2742                                        {
2743                                            if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
2744                                                if (*use_fips) == (true) {
2745                                                    if (*use_dual_stack) == (true) {
2746                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2747                                                            .url({
2748                                                                let mut out = String::new();
2749                                                                out.push_str("https://");
2750                                                                #[allow(clippy::needless_borrow)]
2751                                                                out.push_str(&bucket.as_ref() as &str);
2752                                                                out.push_str(".s3express-fips-");
2753                                                                #[allow(clippy::needless_borrow)]
2754                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2755                                                                out.push_str(".dualstack.");
2756                                                                #[allow(clippy::needless_borrow)]
2757                                                                out.push_str(&region.as_ref() as &str);
2758                                                                out.push('.');
2759                                                                #[allow(clippy::needless_borrow)]
2760                                                                out.push_str(&partition_result.dns_suffix());
2761                                                                out
2762                                                            })
2763                                                            .property("backend", "S3Express".to_string())
2764                                                            .property(
2765                                                                "authSchemes",
2766                                                                vec![::aws_smithy_types::Document::from({
2767                                                                    let mut out =
2768                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2769                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2770                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2771                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2772                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2773                                                                    out
2774                                                                })],
2775                                                            )
2776                                                            .build());
2777                                                    }
2778                                                }
2779                                                if (*use_fips) == (true) {
2780                                                    if (*use_dual_stack) == (false) {
2781                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2782                                                            .url({
2783                                                                let mut out = String::new();
2784                                                                out.push_str("https://");
2785                                                                #[allow(clippy::needless_borrow)]
2786                                                                out.push_str(&bucket.as_ref() as &str);
2787                                                                out.push_str(".s3express-fips-");
2788                                                                #[allow(clippy::needless_borrow)]
2789                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2790                                                                out.push('.');
2791                                                                #[allow(clippy::needless_borrow)]
2792                                                                out.push_str(&region.as_ref() as &str);
2793                                                                out.push('.');
2794                                                                #[allow(clippy::needless_borrow)]
2795                                                                out.push_str(&partition_result.dns_suffix());
2796                                                                out
2797                                                            })
2798                                                            .property("backend", "S3Express".to_string())
2799                                                            .property(
2800                                                                "authSchemes",
2801                                                                vec![::aws_smithy_types::Document::from({
2802                                                                    let mut out =
2803                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2804                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2805                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2806                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2807                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2808                                                                    out
2809                                                                })],
2810                                                            )
2811                                                            .build());
2812                                                    }
2813                                                }
2814                                                if (*use_fips) == (false) {
2815                                                    if (*use_dual_stack) == (true) {
2816                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2817                                                            .url({
2818                                                                let mut out = String::new();
2819                                                                out.push_str("https://");
2820                                                                #[allow(clippy::needless_borrow)]
2821                                                                out.push_str(&bucket.as_ref() as &str);
2822                                                                out.push_str(".s3express-");
2823                                                                #[allow(clippy::needless_borrow)]
2824                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2825                                                                out.push_str(".dualstack.");
2826                                                                #[allow(clippy::needless_borrow)]
2827                                                                out.push_str(&region.as_ref() as &str);
2828                                                                out.push('.');
2829                                                                #[allow(clippy::needless_borrow)]
2830                                                                out.push_str(&partition_result.dns_suffix());
2831                                                                out
2832                                                            })
2833                                                            .property("backend", "S3Express".to_string())
2834                                                            .property(
2835                                                                "authSchemes",
2836                                                                vec![::aws_smithy_types::Document::from({
2837                                                                    let mut out =
2838                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2839                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2840                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2841                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2842                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2843                                                                    out
2844                                                                })],
2845                                                            )
2846                                                            .build());
2847                                                    }
2848                                                }
2849                                                if (*use_fips) == (false) {
2850                                                    if (*use_dual_stack) == (false) {
2851                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2852                                                            .url({
2853                                                                let mut out = String::new();
2854                                                                out.push_str("https://");
2855                                                                #[allow(clippy::needless_borrow)]
2856                                                                out.push_str(&bucket.as_ref() as &str);
2857                                                                out.push_str(".s3express-");
2858                                                                #[allow(clippy::needless_borrow)]
2859                                                                out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2860                                                                out.push('.');
2861                                                                #[allow(clippy::needless_borrow)]
2862                                                                out.push_str(&region.as_ref() as &str);
2863                                                                out.push('.');
2864                                                                #[allow(clippy::needless_borrow)]
2865                                                                out.push_str(&partition_result.dns_suffix());
2866                                                                out
2867                                                            })
2868                                                            .property("backend", "S3Express".to_string())
2869                                                            .property(
2870                                                                "authSchemes",
2871                                                                vec![::aws_smithy_types::Document::from({
2872                                                                    let mut out =
2873                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2874                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
2875                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
2876                                                                    out.insert("signingName".to_string(), "s3express".to_string().into());
2877                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
2878                                                                    out
2879                                                                })],
2880                                                            )
2881                                                            .build());
2882                                                    }
2883                                                }
2884                                                #[allow(unreachable_code)]
2885                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
2886                                                    "No rules matched these parameters. This is a bug. {_params:?}"
2887                                                )));
2888                                            }
2889                                        }
2890                                    }
2891                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
2892                                        "Unrecognized S3Express bucket name format.".to_string(),
2893                                    ));
2894                                }
2895                            }
2896                            #[allow(unused_variables)]
2897                            if let Some(s3express_availability_zone_id) =
2898                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 15, true, _diagnostic_collector)
2899                            {
2900                                #[allow(unused_variables)]
2901                                if let Some(s3express_availability_zone_delim) =
2902                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 15, 17, true, _diagnostic_collector)
2903                                {
2904                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
2905                                        if (*use_fips) == (true) {
2906                                            if (*use_dual_stack) == (true) {
2907                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2908                                                    .url({
2909                                                        let mut out = String::new();
2910                                                        out.push_str("https://");
2911                                                        #[allow(clippy::needless_borrow)]
2912                                                        out.push_str(&bucket.as_ref() as &str);
2913                                                        out.push_str(".s3express-fips-");
2914                                                        #[allow(clippy::needless_borrow)]
2915                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2916                                                        out.push_str(".dualstack.");
2917                                                        #[allow(clippy::needless_borrow)]
2918                                                        out.push_str(&region.as_ref() as &str);
2919                                                        out.push('.');
2920                                                        #[allow(clippy::needless_borrow)]
2921                                                        out.push_str(&partition_result.dns_suffix());
2922                                                        out
2923                                                    })
2924                                                    .property("backend", "S3Express".to_string())
2925                                                    .property(
2926                                                        "authSchemes",
2927                                                        vec![::aws_smithy_types::Document::from({
2928                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2929                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2930                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
2931                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
2932                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
2933                                                            out
2934                                                        })],
2935                                                    )
2936                                                    .build());
2937                                            }
2938                                        }
2939                                        if (*use_fips) == (true) {
2940                                            if (*use_dual_stack) == (false) {
2941                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2942                                                    .url({
2943                                                        let mut out = String::new();
2944                                                        out.push_str("https://");
2945                                                        #[allow(clippy::needless_borrow)]
2946                                                        out.push_str(&bucket.as_ref() as &str);
2947                                                        out.push_str(".s3express-fips-");
2948                                                        #[allow(clippy::needless_borrow)]
2949                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2950                                                        out.push('.');
2951                                                        #[allow(clippy::needless_borrow)]
2952                                                        out.push_str(&region.as_ref() as &str);
2953                                                        out.push('.');
2954                                                        #[allow(clippy::needless_borrow)]
2955                                                        out.push_str(&partition_result.dns_suffix());
2956                                                        out
2957                                                    })
2958                                                    .property("backend", "S3Express".to_string())
2959                                                    .property(
2960                                                        "authSchemes",
2961                                                        vec![::aws_smithy_types::Document::from({
2962                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2963                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2964                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
2965                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
2966                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
2967                                                            out
2968                                                        })],
2969                                                    )
2970                                                    .build());
2971                                            }
2972                                        }
2973                                        if (*use_fips) == (false) {
2974                                            if (*use_dual_stack) == (true) {
2975                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
2976                                                    .url({
2977                                                        let mut out = String::new();
2978                                                        out.push_str("https://");
2979                                                        #[allow(clippy::needless_borrow)]
2980                                                        out.push_str(&bucket.as_ref() as &str);
2981                                                        out.push_str(".s3express-");
2982                                                        #[allow(clippy::needless_borrow)]
2983                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
2984                                                        out.push_str(".dualstack.");
2985                                                        #[allow(clippy::needless_borrow)]
2986                                                        out.push_str(&region.as_ref() as &str);
2987                                                        out.push('.');
2988                                                        #[allow(clippy::needless_borrow)]
2989                                                        out.push_str(&partition_result.dns_suffix());
2990                                                        out
2991                                                    })
2992                                                    .property("backend", "S3Express".to_string())
2993                                                    .property(
2994                                                        "authSchemes",
2995                                                        vec![::aws_smithy_types::Document::from({
2996                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
2997                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
2998                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
2999                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3000                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3001                                                            out
3002                                                        })],
3003                                                    )
3004                                                    .build());
3005                                            }
3006                                        }
3007                                        if (*use_fips) == (false) {
3008                                            if (*use_dual_stack) == (false) {
3009                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3010                                                    .url({
3011                                                        let mut out = String::new();
3012                                                        out.push_str("https://");
3013                                                        #[allow(clippy::needless_borrow)]
3014                                                        out.push_str(&bucket.as_ref() as &str);
3015                                                        out.push_str(".s3express-");
3016                                                        #[allow(clippy::needless_borrow)]
3017                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3018                                                        out.push('.');
3019                                                        #[allow(clippy::needless_borrow)]
3020                                                        out.push_str(&region.as_ref() as &str);
3021                                                        out.push('.');
3022                                                        #[allow(clippy::needless_borrow)]
3023                                                        out.push_str(&partition_result.dns_suffix());
3024                                                        out
3025                                                    })
3026                                                    .property("backend", "S3Express".to_string())
3027                                                    .property(
3028                                                        "authSchemes",
3029                                                        vec![::aws_smithy_types::Document::from({
3030                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3031                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3032                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3033                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3034                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3035                                                            out
3036                                                        })],
3037                                                    )
3038                                                    .build());
3039                                            }
3040                                        }
3041                                        #[allow(unreachable_code)]
3042                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3043                                            "No rules matched these parameters. This is a bug. {_params:?}"
3044                                        )));
3045                                    }
3046                                }
3047                            }
3048                            #[allow(unused_variables)]
3049                            if let Some(s3express_availability_zone_id) =
3050                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 16, true, _diagnostic_collector)
3051                            {
3052                                #[allow(unused_variables)]
3053                                if let Some(s3express_availability_zone_delim) =
3054                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 16, 18, true, _diagnostic_collector)
3055                                {
3056                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
3057                                        if (*use_fips) == (true) {
3058                                            if (*use_dual_stack) == (true) {
3059                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3060                                                    .url({
3061                                                        let mut out = String::new();
3062                                                        out.push_str("https://");
3063                                                        #[allow(clippy::needless_borrow)]
3064                                                        out.push_str(&bucket.as_ref() as &str);
3065                                                        out.push_str(".s3express-fips-");
3066                                                        #[allow(clippy::needless_borrow)]
3067                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3068                                                        out.push_str(".dualstack.");
3069                                                        #[allow(clippy::needless_borrow)]
3070                                                        out.push_str(&region.as_ref() as &str);
3071                                                        out.push('.');
3072                                                        #[allow(clippy::needless_borrow)]
3073                                                        out.push_str(&partition_result.dns_suffix());
3074                                                        out
3075                                                    })
3076                                                    .property("backend", "S3Express".to_string())
3077                                                    .property(
3078                                                        "authSchemes",
3079                                                        vec![::aws_smithy_types::Document::from({
3080                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3081                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3082                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3083                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3084                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3085                                                            out
3086                                                        })],
3087                                                    )
3088                                                    .build());
3089                                            }
3090                                        }
3091                                        if (*use_fips) == (true) {
3092                                            if (*use_dual_stack) == (false) {
3093                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3094                                                    .url({
3095                                                        let mut out = String::new();
3096                                                        out.push_str("https://");
3097                                                        #[allow(clippy::needless_borrow)]
3098                                                        out.push_str(&bucket.as_ref() as &str);
3099                                                        out.push_str(".s3express-fips-");
3100                                                        #[allow(clippy::needless_borrow)]
3101                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3102                                                        out.push('.');
3103                                                        #[allow(clippy::needless_borrow)]
3104                                                        out.push_str(&region.as_ref() as &str);
3105                                                        out.push('.');
3106                                                        #[allow(clippy::needless_borrow)]
3107                                                        out.push_str(&partition_result.dns_suffix());
3108                                                        out
3109                                                    })
3110                                                    .property("backend", "S3Express".to_string())
3111                                                    .property(
3112                                                        "authSchemes",
3113                                                        vec![::aws_smithy_types::Document::from({
3114                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3115                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3116                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3117                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3118                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3119                                                            out
3120                                                        })],
3121                                                    )
3122                                                    .build());
3123                                            }
3124                                        }
3125                                        if (*use_fips) == (false) {
3126                                            if (*use_dual_stack) == (true) {
3127                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3128                                                    .url({
3129                                                        let mut out = String::new();
3130                                                        out.push_str("https://");
3131                                                        #[allow(clippy::needless_borrow)]
3132                                                        out.push_str(&bucket.as_ref() as &str);
3133                                                        out.push_str(".s3express-");
3134                                                        #[allow(clippy::needless_borrow)]
3135                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3136                                                        out.push_str(".dualstack.");
3137                                                        #[allow(clippy::needless_borrow)]
3138                                                        out.push_str(&region.as_ref() as &str);
3139                                                        out.push('.');
3140                                                        #[allow(clippy::needless_borrow)]
3141                                                        out.push_str(&partition_result.dns_suffix());
3142                                                        out
3143                                                    })
3144                                                    .property("backend", "S3Express".to_string())
3145                                                    .property(
3146                                                        "authSchemes",
3147                                                        vec![::aws_smithy_types::Document::from({
3148                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3149                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3150                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3151                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3152                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3153                                                            out
3154                                                        })],
3155                                                    )
3156                                                    .build());
3157                                            }
3158                                        }
3159                                        if (*use_fips) == (false) {
3160                                            if (*use_dual_stack) == (false) {
3161                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3162                                                    .url({
3163                                                        let mut out = String::new();
3164                                                        out.push_str("https://");
3165                                                        #[allow(clippy::needless_borrow)]
3166                                                        out.push_str(&bucket.as_ref() as &str);
3167                                                        out.push_str(".s3express-");
3168                                                        #[allow(clippy::needless_borrow)]
3169                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3170                                                        out.push('.');
3171                                                        #[allow(clippy::needless_borrow)]
3172                                                        out.push_str(&region.as_ref() as &str);
3173                                                        out.push('.');
3174                                                        #[allow(clippy::needless_borrow)]
3175                                                        out.push_str(&partition_result.dns_suffix());
3176                                                        out
3177                                                    })
3178                                                    .property("backend", "S3Express".to_string())
3179                                                    .property(
3180                                                        "authSchemes",
3181                                                        vec![::aws_smithy_types::Document::from({
3182                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3183                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3184                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3185                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3186                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3187                                                            out
3188                                                        })],
3189                                                    )
3190                                                    .build());
3191                                            }
3192                                        }
3193                                        #[allow(unreachable_code)]
3194                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3195                                            "No rules matched these parameters. This is a bug. {_params:?}"
3196                                        )));
3197                                    }
3198                                }
3199                            }
3200                            #[allow(unused_variables)]
3201                            if let Some(s3express_availability_zone_id) =
3202                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 20, true, _diagnostic_collector)
3203                            {
3204                                #[allow(unused_variables)]
3205                                if let Some(s3express_availability_zone_delim) =
3206                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 20, 22, true, _diagnostic_collector)
3207                                {
3208                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
3209                                        if (*use_fips) == (true) {
3210                                            if (*use_dual_stack) == (true) {
3211                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3212                                                    .url({
3213                                                        let mut out = String::new();
3214                                                        out.push_str("https://");
3215                                                        #[allow(clippy::needless_borrow)]
3216                                                        out.push_str(&bucket.as_ref() as &str);
3217                                                        out.push_str(".s3express-fips-");
3218                                                        #[allow(clippy::needless_borrow)]
3219                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3220                                                        out.push_str(".dualstack.");
3221                                                        #[allow(clippy::needless_borrow)]
3222                                                        out.push_str(&region.as_ref() as &str);
3223                                                        out.push('.');
3224                                                        #[allow(clippy::needless_borrow)]
3225                                                        out.push_str(&partition_result.dns_suffix());
3226                                                        out
3227                                                    })
3228                                                    .property("backend", "S3Express".to_string())
3229                                                    .property(
3230                                                        "authSchemes",
3231                                                        vec![::aws_smithy_types::Document::from({
3232                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3233                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3234                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3235                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3236                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3237                                                            out
3238                                                        })],
3239                                                    )
3240                                                    .build());
3241                                            }
3242                                        }
3243                                        if (*use_fips) == (true) {
3244                                            if (*use_dual_stack) == (false) {
3245                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3246                                                    .url({
3247                                                        let mut out = String::new();
3248                                                        out.push_str("https://");
3249                                                        #[allow(clippy::needless_borrow)]
3250                                                        out.push_str(&bucket.as_ref() as &str);
3251                                                        out.push_str(".s3express-fips-");
3252                                                        #[allow(clippy::needless_borrow)]
3253                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3254                                                        out.push('.');
3255                                                        #[allow(clippy::needless_borrow)]
3256                                                        out.push_str(&region.as_ref() as &str);
3257                                                        out.push('.');
3258                                                        #[allow(clippy::needless_borrow)]
3259                                                        out.push_str(&partition_result.dns_suffix());
3260                                                        out
3261                                                    })
3262                                                    .property("backend", "S3Express".to_string())
3263                                                    .property(
3264                                                        "authSchemes",
3265                                                        vec![::aws_smithy_types::Document::from({
3266                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3267                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3268                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3269                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3270                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3271                                                            out
3272                                                        })],
3273                                                    )
3274                                                    .build());
3275                                            }
3276                                        }
3277                                        if (*use_fips) == (false) {
3278                                            if (*use_dual_stack) == (true) {
3279                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3280                                                    .url({
3281                                                        let mut out = String::new();
3282                                                        out.push_str("https://");
3283                                                        #[allow(clippy::needless_borrow)]
3284                                                        out.push_str(&bucket.as_ref() as &str);
3285                                                        out.push_str(".s3express-");
3286                                                        #[allow(clippy::needless_borrow)]
3287                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3288                                                        out.push_str(".dualstack.");
3289                                                        #[allow(clippy::needless_borrow)]
3290                                                        out.push_str(&region.as_ref() as &str);
3291                                                        out.push('.');
3292                                                        #[allow(clippy::needless_borrow)]
3293                                                        out.push_str(&partition_result.dns_suffix());
3294                                                        out
3295                                                    })
3296                                                    .property("backend", "S3Express".to_string())
3297                                                    .property(
3298                                                        "authSchemes",
3299                                                        vec![::aws_smithy_types::Document::from({
3300                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3301                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3302                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3303                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3304                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3305                                                            out
3306                                                        })],
3307                                                    )
3308                                                    .build());
3309                                            }
3310                                        }
3311                                        if (*use_fips) == (false) {
3312                                            if (*use_dual_stack) == (false) {
3313                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3314                                                    .url({
3315                                                        let mut out = String::new();
3316                                                        out.push_str("https://");
3317                                                        #[allow(clippy::needless_borrow)]
3318                                                        out.push_str(&bucket.as_ref() as &str);
3319                                                        out.push_str(".s3express-");
3320                                                        #[allow(clippy::needless_borrow)]
3321                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3322                                                        out.push('.');
3323                                                        #[allow(clippy::needless_borrow)]
3324                                                        out.push_str(&region.as_ref() as &str);
3325                                                        out.push('.');
3326                                                        #[allow(clippy::needless_borrow)]
3327                                                        out.push_str(&partition_result.dns_suffix());
3328                                                        out
3329                                                    })
3330                                                    .property("backend", "S3Express".to_string())
3331                                                    .property(
3332                                                        "authSchemes",
3333                                                        vec![::aws_smithy_types::Document::from({
3334                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3335                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3336                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3337                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3338                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3339                                                            out
3340                                                        })],
3341                                                    )
3342                                                    .build());
3343                                            }
3344                                        }
3345                                        #[allow(unreachable_code)]
3346                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3347                                            "No rules matched these parameters. This is a bug. {_params:?}"
3348                                        )));
3349                                    }
3350                                }
3351                            }
3352                            #[allow(unused_variables)]
3353                            if let Some(s3express_availability_zone_id) =
3354                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 21, true, _diagnostic_collector)
3355                            {
3356                                #[allow(unused_variables)]
3357                                if let Some(s3express_availability_zone_delim) =
3358                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 21, 23, true, _diagnostic_collector)
3359                                {
3360                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
3361                                        if (*use_fips) == (true) {
3362                                            if (*use_dual_stack) == (true) {
3363                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3364                                                    .url({
3365                                                        let mut out = String::new();
3366                                                        out.push_str("https://");
3367                                                        #[allow(clippy::needless_borrow)]
3368                                                        out.push_str(&bucket.as_ref() as &str);
3369                                                        out.push_str(".s3express-fips-");
3370                                                        #[allow(clippy::needless_borrow)]
3371                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3372                                                        out.push_str(".dualstack.");
3373                                                        #[allow(clippy::needless_borrow)]
3374                                                        out.push_str(&region.as_ref() as &str);
3375                                                        out.push('.');
3376                                                        #[allow(clippy::needless_borrow)]
3377                                                        out.push_str(&partition_result.dns_suffix());
3378                                                        out
3379                                                    })
3380                                                    .property("backend", "S3Express".to_string())
3381                                                    .property(
3382                                                        "authSchemes",
3383                                                        vec![::aws_smithy_types::Document::from({
3384                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3385                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3386                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3387                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3388                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3389                                                            out
3390                                                        })],
3391                                                    )
3392                                                    .build());
3393                                            }
3394                                        }
3395                                        if (*use_fips) == (true) {
3396                                            if (*use_dual_stack) == (false) {
3397                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3398                                                    .url({
3399                                                        let mut out = String::new();
3400                                                        out.push_str("https://");
3401                                                        #[allow(clippy::needless_borrow)]
3402                                                        out.push_str(&bucket.as_ref() as &str);
3403                                                        out.push_str(".s3express-fips-");
3404                                                        #[allow(clippy::needless_borrow)]
3405                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3406                                                        out.push('.');
3407                                                        #[allow(clippy::needless_borrow)]
3408                                                        out.push_str(&region.as_ref() as &str);
3409                                                        out.push('.');
3410                                                        #[allow(clippy::needless_borrow)]
3411                                                        out.push_str(&partition_result.dns_suffix());
3412                                                        out
3413                                                    })
3414                                                    .property("backend", "S3Express".to_string())
3415                                                    .property(
3416                                                        "authSchemes",
3417                                                        vec![::aws_smithy_types::Document::from({
3418                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3419                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3420                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3421                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3422                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3423                                                            out
3424                                                        })],
3425                                                    )
3426                                                    .build());
3427                                            }
3428                                        }
3429                                        if (*use_fips) == (false) {
3430                                            if (*use_dual_stack) == (true) {
3431                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3432                                                    .url({
3433                                                        let mut out = String::new();
3434                                                        out.push_str("https://");
3435                                                        #[allow(clippy::needless_borrow)]
3436                                                        out.push_str(&bucket.as_ref() as &str);
3437                                                        out.push_str(".s3express-");
3438                                                        #[allow(clippy::needless_borrow)]
3439                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3440                                                        out.push_str(".dualstack.");
3441                                                        #[allow(clippy::needless_borrow)]
3442                                                        out.push_str(&region.as_ref() as &str);
3443                                                        out.push('.');
3444                                                        #[allow(clippy::needless_borrow)]
3445                                                        out.push_str(&partition_result.dns_suffix());
3446                                                        out
3447                                                    })
3448                                                    .property("backend", "S3Express".to_string())
3449                                                    .property(
3450                                                        "authSchemes",
3451                                                        vec![::aws_smithy_types::Document::from({
3452                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3453                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3454                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3455                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3456                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3457                                                            out
3458                                                        })],
3459                                                    )
3460                                                    .build());
3461                                            }
3462                                        }
3463                                        if (*use_fips) == (false) {
3464                                            if (*use_dual_stack) == (false) {
3465                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3466                                                    .url({
3467                                                        let mut out = String::new();
3468                                                        out.push_str("https://");
3469                                                        #[allow(clippy::needless_borrow)]
3470                                                        out.push_str(&bucket.as_ref() as &str);
3471                                                        out.push_str(".s3express-");
3472                                                        #[allow(clippy::needless_borrow)]
3473                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3474                                                        out.push('.');
3475                                                        #[allow(clippy::needless_borrow)]
3476                                                        out.push_str(&region.as_ref() as &str);
3477                                                        out.push('.');
3478                                                        #[allow(clippy::needless_borrow)]
3479                                                        out.push_str(&partition_result.dns_suffix());
3480                                                        out
3481                                                    })
3482                                                    .property("backend", "S3Express".to_string())
3483                                                    .property(
3484                                                        "authSchemes",
3485                                                        vec![::aws_smithy_types::Document::from({
3486                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3487                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3488                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3489                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3490                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3491                                                            out
3492                                                        })],
3493                                                    )
3494                                                    .build());
3495                                            }
3496                                        }
3497                                        #[allow(unreachable_code)]
3498                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3499                                            "No rules matched these parameters. This is a bug. {_params:?}"
3500                                        )));
3501                                    }
3502                                }
3503                            }
3504                            #[allow(unused_variables)]
3505                            if let Some(s3express_availability_zone_id) =
3506                                crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 7, 27, true, _diagnostic_collector)
3507                            {
3508                                #[allow(unused_variables)]
3509                                if let Some(s3express_availability_zone_delim) =
3510                                    crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 27, 29, true, _diagnostic_collector)
3511                                {
3512                                    if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
3513                                        if (*use_fips) == (true) {
3514                                            if (*use_dual_stack) == (true) {
3515                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3516                                                    .url({
3517                                                        let mut out = String::new();
3518                                                        out.push_str("https://");
3519                                                        #[allow(clippy::needless_borrow)]
3520                                                        out.push_str(&bucket.as_ref() as &str);
3521                                                        out.push_str(".s3express-fips-");
3522                                                        #[allow(clippy::needless_borrow)]
3523                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3524                                                        out.push_str(".dualstack.");
3525                                                        #[allow(clippy::needless_borrow)]
3526                                                        out.push_str(&region.as_ref() as &str);
3527                                                        out.push('.');
3528                                                        #[allow(clippy::needless_borrow)]
3529                                                        out.push_str(&partition_result.dns_suffix());
3530                                                        out
3531                                                    })
3532                                                    .property("backend", "S3Express".to_string())
3533                                                    .property(
3534                                                        "authSchemes",
3535                                                        vec![::aws_smithy_types::Document::from({
3536                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3537                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3538                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3539                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3540                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3541                                                            out
3542                                                        })],
3543                                                    )
3544                                                    .build());
3545                                            }
3546                                        }
3547                                        if (*use_fips) == (true) {
3548                                            if (*use_dual_stack) == (false) {
3549                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3550                                                    .url({
3551                                                        let mut out = String::new();
3552                                                        out.push_str("https://");
3553                                                        #[allow(clippy::needless_borrow)]
3554                                                        out.push_str(&bucket.as_ref() as &str);
3555                                                        out.push_str(".s3express-fips-");
3556                                                        #[allow(clippy::needless_borrow)]
3557                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3558                                                        out.push('.');
3559                                                        #[allow(clippy::needless_borrow)]
3560                                                        out.push_str(&region.as_ref() as &str);
3561                                                        out.push('.');
3562                                                        #[allow(clippy::needless_borrow)]
3563                                                        out.push_str(&partition_result.dns_suffix());
3564                                                        out
3565                                                    })
3566                                                    .property("backend", "S3Express".to_string())
3567                                                    .property(
3568                                                        "authSchemes",
3569                                                        vec![::aws_smithy_types::Document::from({
3570                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3571                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3572                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3573                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3574                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3575                                                            out
3576                                                        })],
3577                                                    )
3578                                                    .build());
3579                                            }
3580                                        }
3581                                        if (*use_fips) == (false) {
3582                                            if (*use_dual_stack) == (true) {
3583                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3584                                                    .url({
3585                                                        let mut out = String::new();
3586                                                        out.push_str("https://");
3587                                                        #[allow(clippy::needless_borrow)]
3588                                                        out.push_str(&bucket.as_ref() as &str);
3589                                                        out.push_str(".s3express-");
3590                                                        #[allow(clippy::needless_borrow)]
3591                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3592                                                        out.push_str(".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
3599                                                    })
3600                                                    .property("backend", "S3Express".to_string())
3601                                                    .property(
3602                                                        "authSchemes",
3603                                                        vec![::aws_smithy_types::Document::from({
3604                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3605                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3606                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3607                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3608                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3609                                                            out
3610                                                        })],
3611                                                    )
3612                                                    .build());
3613                                            }
3614                                        }
3615                                        if (*use_fips) == (false) {
3616                                            if (*use_dual_stack) == (false) {
3617                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3618                                                    .url({
3619                                                        let mut out = String::new();
3620                                                        out.push_str("https://");
3621                                                        #[allow(clippy::needless_borrow)]
3622                                                        out.push_str(&bucket.as_ref() as &str);
3623                                                        out.push_str(".s3express-");
3624                                                        #[allow(clippy::needless_borrow)]
3625                                                        out.push_str(&s3express_availability_zone_id.as_ref() as &str);
3626                                                        out.push('.');
3627                                                        #[allow(clippy::needless_borrow)]
3628                                                        out.push_str(&region.as_ref() as &str);
3629                                                        out.push('.');
3630                                                        #[allow(clippy::needless_borrow)]
3631                                                        out.push_str(&partition_result.dns_suffix());
3632                                                        out
3633                                                    })
3634                                                    .property("backend", "S3Express".to_string())
3635                                                    .property(
3636                                                        "authSchemes",
3637                                                        vec![::aws_smithy_types::Document::from({
3638                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3639                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3640                                                            out.insert("name".to_string(), "sigv4-s3express".to_string().into());
3641                                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3642                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3643                                                            out
3644                                                        })],
3645                                                    )
3646                                                    .build());
3647                                            }
3648                                        }
3649                                        #[allow(unreachable_code)]
3650                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3651                                            "No rules matched these parameters. This is a bug. {_params:?}"
3652                                        )));
3653                                    }
3654                                }
3655                            }
3656                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3657                                "Unrecognized S3Express bucket name format.".to_string(),
3658                            ));
3659                        }
3660                        #[allow(unreachable_code)]
3661                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3662                            "No rules matched these parameters. This is a bug. {_params:?}"
3663                        )));
3664                    }
3665                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3666                        "S3Express bucket name is not a valid virtual hostable name.".to_string(),
3667                    ));
3668                }
3669            }
3670        }
3671        if !(bucket.is_some()) {
3672            #[allow(unused_variables)]
3673            if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
3674                if (*use_s3_express_control_endpoint) == (true) {
3675                    #[allow(unused_variables)]
3676                    if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
3677                        #[allow(unused_variables)]
3678                        if let Some(endpoint) = endpoint {
3679                            #[allow(unused_variables)]
3680                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
3681                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3682                                    .url({
3683                                        let mut out = String::new();
3684                                        #[allow(clippy::needless_borrow)]
3685                                        out.push_str(&url.scheme());
3686                                        out.push_str("://");
3687                                        #[allow(clippy::needless_borrow)]
3688                                        out.push_str(&url.authority());
3689                                        #[allow(clippy::needless_borrow)]
3690                                        out.push_str(&url.path());
3691                                        out
3692                                    })
3693                                    .property("backend", "S3Express".to_string())
3694                                    .property(
3695                                        "authSchemes",
3696                                        vec![::aws_smithy_types::Document::from({
3697                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3698                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3699                                            out.insert("name".to_string(), "sigv4".to_string().into());
3700                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3701                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3702                                            out
3703                                        })],
3704                                    )
3705                                    .build());
3706                            }
3707                        }
3708                        if (*use_fips) == (true) {
3709                            if (*use_dual_stack) == (true) {
3710                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3711                                    .url({
3712                                        let mut out = String::new();
3713                                        out.push_str("https://s3express-control-fips.dualstack.");
3714                                        #[allow(clippy::needless_borrow)]
3715                                        out.push_str(&region.as_ref() as &str);
3716                                        out.push('.');
3717                                        #[allow(clippy::needless_borrow)]
3718                                        out.push_str(&partition_result.dns_suffix());
3719                                        out
3720                                    })
3721                                    .property("backend", "S3Express".to_string())
3722                                    .property(
3723                                        "authSchemes",
3724                                        vec![::aws_smithy_types::Document::from({
3725                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3726                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3727                                            out.insert("name".to_string(), "sigv4".to_string().into());
3728                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3729                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3730                                            out
3731                                        })],
3732                                    )
3733                                    .build());
3734                            }
3735                        }
3736                        if (*use_fips) == (true) {
3737                            if (*use_dual_stack) == (false) {
3738                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3739                                    .url({
3740                                        let mut out = String::new();
3741                                        out.push_str("https://s3express-control-fips.");
3742                                        #[allow(clippy::needless_borrow)]
3743                                        out.push_str(&region.as_ref() as &str);
3744                                        out.push('.');
3745                                        #[allow(clippy::needless_borrow)]
3746                                        out.push_str(&partition_result.dns_suffix());
3747                                        out
3748                                    })
3749                                    .property("backend", "S3Express".to_string())
3750                                    .property(
3751                                        "authSchemes",
3752                                        vec![::aws_smithy_types::Document::from({
3753                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3754                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3755                                            out.insert("name".to_string(), "sigv4".to_string().into());
3756                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3757                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3758                                            out
3759                                        })],
3760                                    )
3761                                    .build());
3762                            }
3763                        }
3764                        if (*use_fips) == (false) {
3765                            if (*use_dual_stack) == (true) {
3766                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3767                                    .url({
3768                                        let mut out = String::new();
3769                                        out.push_str("https://s3express-control.dualstack.");
3770                                        #[allow(clippy::needless_borrow)]
3771                                        out.push_str(&region.as_ref() as &str);
3772                                        out.push('.');
3773                                        #[allow(clippy::needless_borrow)]
3774                                        out.push_str(&partition_result.dns_suffix());
3775                                        out
3776                                    })
3777                                    .property("backend", "S3Express".to_string())
3778                                    .property(
3779                                        "authSchemes",
3780                                        vec![::aws_smithy_types::Document::from({
3781                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3782                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3783                                            out.insert("name".to_string(), "sigv4".to_string().into());
3784                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3785                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3786                                            out
3787                                        })],
3788                                    )
3789                                    .build());
3790                            }
3791                        }
3792                        if (*use_fips) == (false) {
3793                            if (*use_dual_stack) == (false) {
3794                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3795                                    .url({
3796                                        let mut out = String::new();
3797                                        out.push_str("https://s3express-control.");
3798                                        #[allow(clippy::needless_borrow)]
3799                                        out.push_str(&region.as_ref() as &str);
3800                                        out.push('.');
3801                                        #[allow(clippy::needless_borrow)]
3802                                        out.push_str(&partition_result.dns_suffix());
3803                                        out
3804                                    })
3805                                    .property("backend", "S3Express".to_string())
3806                                    .property(
3807                                        "authSchemes",
3808                                        vec![::aws_smithy_types::Document::from({
3809                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3810                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3811                                            out.insert("name".to_string(), "sigv4".to_string().into());
3812                                            out.insert("signingName".to_string(), "s3express".to_string().into());
3813                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3814                                            out
3815                                        })],
3816                                    )
3817                                    .build());
3818                            }
3819                        }
3820                        #[allow(unreachable_code)]
3821                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3822                            "No rules matched these parameters. This is a bug. {_params:?}"
3823                        )));
3824                    }
3825                    #[allow(unreachable_code)]
3826                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3827                        "No rules matched these parameters. This is a bug. {_params:?}"
3828                    )));
3829                }
3830            }
3831        }
3832        #[allow(unused_variables)]
3833        if let Some(bucket) = bucket {
3834            #[allow(unused_variables)]
3835            if let Some(hardware_type) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 49, 50, true, _diagnostic_collector) {
3836                #[allow(unused_variables)]
3837                if let Some(region_prefix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 8, 12, true, _diagnostic_collector) {
3838                    #[allow(unused_variables)]
3839                    if let Some(bucket_alias_suffix) =
3840                        crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 7, true, _diagnostic_collector)
3841                    {
3842                        #[allow(unused_variables)]
3843                        if let Some(outpost_id) =
3844                            crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 32, 49, true, _diagnostic_collector)
3845                        {
3846                            #[allow(unused_variables)]
3847                            if let Some(region_partition) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
3848                                if (bucket_alias_suffix.as_ref() as &str) == ("--op-s3") {
3849                                    if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
3850                                        if (hardware_type.as_ref() as &str) == ("e") {
3851                                            if (region_prefix.as_ref() as &str) == ("beta") {
3852                                                if !(endpoint.is_some()) {
3853                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3854                                                        "Expected a endpoint to be specified but no endpoint was found".to_string(),
3855                                                    ));
3856                                                }
3857                                                #[allow(unused_variables)]
3858                                                if let Some(endpoint) = endpoint {
3859                                                    #[allow(unused_variables)]
3860                                                    if let Some(url) =
3861                                                        crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
3862                                                    {
3863                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3864                                                            .url({
3865                                                                let mut out = String::new();
3866                                                                out.push_str("https://");
3867                                                                #[allow(clippy::needless_borrow)]
3868                                                                out.push_str(&bucket.as_ref() as &str);
3869                                                                out.push_str(".ec2.");
3870                                                                #[allow(clippy::needless_borrow)]
3871                                                                out.push_str(&url.authority());
3872                                                                out
3873                                                            })
3874                                                            .property(
3875                                                                "authSchemes",
3876                                                                vec![
3877                                                                    ::aws_smithy_types::Document::from({
3878                                                                        let mut out =
3879                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
3880                                                                            );
3881                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3882                                                                        out.insert("name".to_string(), "sigv4a".to_string().into());
3883                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
3884                                                                        out.insert(
3885                                                                            "signingRegionSet".to_string(),
3886                                                                            vec![::aws_smithy_types::Document::from("*".to_string())].into(),
3887                                                                        );
3888                                                                        out
3889                                                                    }),
3890                                                                    ::aws_smithy_types::Document::from({
3891                                                                        let mut out =
3892                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
3893                                                                            );
3894                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3895                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
3896                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
3897                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
3898                                                                        out
3899                                                                    }),
3900                                                                ],
3901                                                            )
3902                                                            .build());
3903                                                    }
3904                                                }
3905                                                #[allow(unreachable_code)]
3906                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
3907                                                    "No rules matched these parameters. This is a bug. {_params:?}"
3908                                                )));
3909                                            }
3910                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3911                                                .url({
3912                                                    let mut out = String::new();
3913                                                    out.push_str("https://");
3914                                                    #[allow(clippy::needless_borrow)]
3915                                                    out.push_str(&bucket.as_ref() as &str);
3916                                                    out.push_str(".ec2.s3-outposts.");
3917                                                    #[allow(clippy::needless_borrow)]
3918                                                    out.push_str(&region.as_ref() as &str);
3919                                                    out.push('.');
3920                                                    #[allow(clippy::needless_borrow)]
3921                                                    out.push_str(&region_partition.dns_suffix());
3922                                                    out
3923                                                })
3924                                                .property(
3925                                                    "authSchemes",
3926                                                    vec![
3927                                                        ::aws_smithy_types::Document::from({
3928                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3929                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3930                                                            out.insert("name".to_string(), "sigv4a".to_string().into());
3931                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
3932                                                            out.insert(
3933                                                                "signingRegionSet".to_string(),
3934                                                                vec![::aws_smithy_types::Document::from("*".to_string())].into(),
3935                                                            );
3936                                                            out
3937                                                        }),
3938                                                        ::aws_smithy_types::Document::from({
3939                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
3940                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
3941                                                            out.insert("name".to_string(), "sigv4".to_string().into());
3942                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
3943                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
3944                                                            out
3945                                                        }),
3946                                                    ],
3947                                                )
3948                                                .build());
3949                                        }
3950                                        if (hardware_type.as_ref() as &str) == ("o") {
3951                                            if (region_prefix.as_ref() as &str) == ("beta") {
3952                                                if !(endpoint.is_some()) {
3953                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
3954                                                        "Expected a endpoint to be specified but no endpoint was found".to_string(),
3955                                                    ));
3956                                                }
3957                                                #[allow(unused_variables)]
3958                                                if let Some(endpoint) = endpoint {
3959                                                    #[allow(unused_variables)]
3960                                                    if let Some(url) =
3961                                                        crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
3962                                                    {
3963                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
3964                                                            .url({
3965                                                                let mut out = String::new();
3966                                                                out.push_str("https://");
3967                                                                #[allow(clippy::needless_borrow)]
3968                                                                out.push_str(&bucket.as_ref() as &str);
3969                                                                out.push_str(".op-");
3970                                                                #[allow(clippy::needless_borrow)]
3971                                                                out.push_str(&outpost_id.as_ref() as &str);
3972                                                                out.push('.');
3973                                                                #[allow(clippy::needless_borrow)]
3974                                                                out.push_str(&url.authority());
3975                                                                out
3976                                                            })
3977                                                            .property(
3978                                                                "authSchemes",
3979                                                                vec![
3980                                                                    ::aws_smithy_types::Document::from({
3981                                                                        let mut out =
3982                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
3983                                                                            );
3984                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3985                                                                        out.insert("name".to_string(), "sigv4a".to_string().into());
3986                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
3987                                                                        out.insert(
3988                                                                            "signingRegionSet".to_string(),
3989                                                                            vec![::aws_smithy_types::Document::from("*".to_string())].into(),
3990                                                                        );
3991                                                                        out
3992                                                                    }),
3993                                                                    ::aws_smithy_types::Document::from({
3994                                                                        let mut out =
3995                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
3996                                                                            );
3997                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
3998                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
3999                                                                        out.insert("signingName".to_string(), "s3-outposts".to_string().into());
4000                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4001                                                                        out
4002                                                                    }),
4003                                                                ],
4004                                                            )
4005                                                            .build());
4006                                                    }
4007                                                }
4008                                                #[allow(unreachable_code)]
4009                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
4010                                                    "No rules matched these parameters. This is a bug. {_params:?}"
4011                                                )));
4012                                            }
4013                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4014                                                .url({
4015                                                    let mut out = String::new();
4016                                                    out.push_str("https://");
4017                                                    #[allow(clippy::needless_borrow)]
4018                                                    out.push_str(&bucket.as_ref() as &str);
4019                                                    out.push_str(".op-");
4020                                                    #[allow(clippy::needless_borrow)]
4021                                                    out.push_str(&outpost_id.as_ref() as &str);
4022                                                    out.push_str(".s3-outposts.");
4023                                                    #[allow(clippy::needless_borrow)]
4024                                                    out.push_str(&region.as_ref() as &str);
4025                                                    out.push('.');
4026                                                    #[allow(clippy::needless_borrow)]
4027                                                    out.push_str(&region_partition.dns_suffix());
4028                                                    out
4029                                                })
4030                                                .property(
4031                                                    "authSchemes",
4032                                                    vec![
4033                                                        ::aws_smithy_types::Document::from({
4034                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4035                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4036                                                            out.insert("name".to_string(), "sigv4a".to_string().into());
4037                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
4038                                                            out.insert(
4039                                                                "signingRegionSet".to_string(),
4040                                                                vec![::aws_smithy_types::Document::from("*".to_string())].into(),
4041                                                            );
4042                                                            out
4043                                                        }),
4044                                                        ::aws_smithy_types::Document::from({
4045                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4046                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4047                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4048                                                            out.insert("signingName".to_string(), "s3-outposts".to_string().into());
4049                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
4050                                                            out
4051                                                        }),
4052                                                    ],
4053                                                )
4054                                                .build());
4055                                        }
4056                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
4057                                            let mut out = String::new();
4058                                            out.push_str("Unrecognized hardware type: \"Expected hardware type o or e but got ");
4059                                            #[allow(clippy::needless_borrow)]
4060                                            out.push_str(&hardware_type.as_ref() as &str);
4061                                            out.push('"');
4062                                            out
4063                                        }));
4064                                    }
4065                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4066                                        "Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.".to_string(),
4067                                    ));
4068                                }
4069                            }
4070                        }
4071                    }
4072                }
4073            }
4074        }
4075        #[allow(unused_variables)]
4076        if let Some(bucket) = bucket {
4077            #[allow(unused_variables)]
4078            if let Some(endpoint) = endpoint {
4079                if !(crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector).is_some()) {
4080                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
4081                        let mut out = String::new();
4082                        out.push_str("Custom endpoint `");
4083                        #[allow(clippy::needless_borrow)]
4084                        out.push_str(&endpoint.as_ref() as &str);
4085                        out.push_str("` was not a valid URI");
4086                        out
4087                    }));
4088                }
4089            }
4090            if (*force_path_style) == (false) {
4091                if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, false, _diagnostic_collector) {
4092                    #[allow(unused_variables)]
4093                    if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
4094                        if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, false, _diagnostic_collector) {
4095                            if (*accelerate) == (true) {
4096                                if (partition_result.name()) == ("aws-cn") {
4097                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
4098                                        "S3 Accelerate cannot be used in this region".to_string(),
4099                                    ));
4100                                }
4101                            }
4102                            if (*use_dual_stack) == (true) {
4103                                if (*use_fips) == (true) {
4104                                    if (*accelerate) == (false) {
4105                                        if !(endpoint.is_some()) {
4106                                            if (region.as_ref() as &str) == ("aws-global") {
4107                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4108                                                    .url({
4109                                                        let mut out = String::new();
4110                                                        out.push_str("https://");
4111                                                        #[allow(clippy::needless_borrow)]
4112                                                        out.push_str(&bucket.as_ref() as &str);
4113                                                        out.push_str(".s3-fips.dualstack.us-east-1.");
4114                                                        #[allow(clippy::needless_borrow)]
4115                                                        out.push_str(&partition_result.dns_suffix());
4116                                                        out
4117                                                    })
4118                                                    .property(
4119                                                        "authSchemes",
4120                                                        vec![::aws_smithy_types::Document::from({
4121                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4122                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4123                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4124                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4125                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4126                                                            out
4127                                                        })],
4128                                                    )
4129                                                    .build());
4130                                            }
4131                                        }
4132                                    }
4133                                }
4134                            }
4135                            if (*use_dual_stack) == (true) {
4136                                if (*use_fips) == (true) {
4137                                    if (*accelerate) == (false) {
4138                                        if !(endpoint.is_some()) {
4139                                            if !((region.as_ref() as &str) == ("aws-global")) {
4140                                                if (*use_global_endpoint) == (true) {
4141                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4142                                                        .url({
4143                                                            let mut out = String::new();
4144                                                            out.push_str("https://");
4145                                                            #[allow(clippy::needless_borrow)]
4146                                                            out.push_str(&bucket.as_ref() as &str);
4147                                                            out.push_str(".s3-fips.dualstack.");
4148                                                            #[allow(clippy::needless_borrow)]
4149                                                            out.push_str(&region.as_ref() as &str);
4150                                                            out.push('.');
4151                                                            #[allow(clippy::needless_borrow)]
4152                                                            out.push_str(&partition_result.dns_suffix());
4153                                                            out
4154                                                        })
4155                                                        .property(
4156                                                            "authSchemes",
4157                                                            vec![::aws_smithy_types::Document::from({
4158                                                                let mut out =
4159                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4160                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4161                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4162                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4163                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4164                                                                out
4165                                                            })],
4166                                                        )
4167                                                        .build());
4168                                                }
4169                                            }
4170                                        }
4171                                    }
4172                                }
4173                            }
4174                            if (*use_dual_stack) == (true) {
4175                                if (*use_fips) == (true) {
4176                                    if (*accelerate) == (false) {
4177                                        if !(endpoint.is_some()) {
4178                                            if !((region.as_ref() as &str) == ("aws-global")) {
4179                                                if (*use_global_endpoint) == (false) {
4180                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4181                                                        .url({
4182                                                            let mut out = String::new();
4183                                                            out.push_str("https://");
4184                                                            #[allow(clippy::needless_borrow)]
4185                                                            out.push_str(&bucket.as_ref() as &str);
4186                                                            out.push_str(".s3-fips.dualstack.");
4187                                                            #[allow(clippy::needless_borrow)]
4188                                                            out.push_str(&region.as_ref() as &str);
4189                                                            out.push('.');
4190                                                            #[allow(clippy::needless_borrow)]
4191                                                            out.push_str(&partition_result.dns_suffix());
4192                                                            out
4193                                                        })
4194                                                        .property(
4195                                                            "authSchemes",
4196                                                            vec![::aws_smithy_types::Document::from({
4197                                                                let mut out =
4198                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4199                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4200                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4201                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4202                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4203                                                                out
4204                                                            })],
4205                                                        )
4206                                                        .build());
4207                                                }
4208                                            }
4209                                        }
4210                                    }
4211                                }
4212                            }
4213                            if (*use_dual_stack) == (false) {
4214                                if (*use_fips) == (true) {
4215                                    if (*accelerate) == (false) {
4216                                        if !(endpoint.is_some()) {
4217                                            if (region.as_ref() as &str) == ("aws-global") {
4218                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4219                                                    .url({
4220                                                        let mut out = String::new();
4221                                                        out.push_str("https://");
4222                                                        #[allow(clippy::needless_borrow)]
4223                                                        out.push_str(&bucket.as_ref() as &str);
4224                                                        out.push_str(".s3-fips.us-east-1.");
4225                                                        #[allow(clippy::needless_borrow)]
4226                                                        out.push_str(&partition_result.dns_suffix());
4227                                                        out
4228                                                    })
4229                                                    .property(
4230                                                        "authSchemes",
4231                                                        vec![::aws_smithy_types::Document::from({
4232                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4233                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4234                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4235                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4236                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4237                                                            out
4238                                                        })],
4239                                                    )
4240                                                    .build());
4241                                            }
4242                                        }
4243                                    }
4244                                }
4245                            }
4246                            if (*use_dual_stack) == (false) {
4247                                if (*use_fips) == (true) {
4248                                    if (*accelerate) == (false) {
4249                                        if !(endpoint.is_some()) {
4250                                            if !((region.as_ref() as &str) == ("aws-global")) {
4251                                                if (*use_global_endpoint) == (true) {
4252                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4253                                                        .url({
4254                                                            let mut out = String::new();
4255                                                            out.push_str("https://");
4256                                                            #[allow(clippy::needless_borrow)]
4257                                                            out.push_str(&bucket.as_ref() as &str);
4258                                                            out.push_str(".s3-fips.");
4259                                                            #[allow(clippy::needless_borrow)]
4260                                                            out.push_str(&region.as_ref() as &str);
4261                                                            out.push('.');
4262                                                            #[allow(clippy::needless_borrow)]
4263                                                            out.push_str(&partition_result.dns_suffix());
4264                                                            out
4265                                                        })
4266                                                        .property(
4267                                                            "authSchemes",
4268                                                            vec![::aws_smithy_types::Document::from({
4269                                                                let mut out =
4270                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4271                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4272                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4273                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4274                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4275                                                                out
4276                                                            })],
4277                                                        )
4278                                                        .build());
4279                                                }
4280                                            }
4281                                        }
4282                                    }
4283                                }
4284                            }
4285                            if (*use_dual_stack) == (false) {
4286                                if (*use_fips) == (true) {
4287                                    if (*accelerate) == (false) {
4288                                        if !(endpoint.is_some()) {
4289                                            if !((region.as_ref() as &str) == ("aws-global")) {
4290                                                if (*use_global_endpoint) == (false) {
4291                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4292                                                        .url({
4293                                                            let mut out = String::new();
4294                                                            out.push_str("https://");
4295                                                            #[allow(clippy::needless_borrow)]
4296                                                            out.push_str(&bucket.as_ref() as &str);
4297                                                            out.push_str(".s3-fips.");
4298                                                            #[allow(clippy::needless_borrow)]
4299                                                            out.push_str(&region.as_ref() as &str);
4300                                                            out.push('.');
4301                                                            #[allow(clippy::needless_borrow)]
4302                                                            out.push_str(&partition_result.dns_suffix());
4303                                                            out
4304                                                        })
4305                                                        .property(
4306                                                            "authSchemes",
4307                                                            vec![::aws_smithy_types::Document::from({
4308                                                                let mut out =
4309                                                                    ::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                            }
4324                            if (*use_dual_stack) == (true) {
4325                                if (*use_fips) == (false) {
4326                                    if (*accelerate) == (true) {
4327                                        if !(endpoint.is_some()) {
4328                                            if (region.as_ref() as &str) == ("aws-global") {
4329                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4330                                                    .url({
4331                                                        let mut out = String::new();
4332                                                        out.push_str("https://");
4333                                                        #[allow(clippy::needless_borrow)]
4334                                                        out.push_str(&bucket.as_ref() as &str);
4335                                                        out.push_str(".s3-accelerate.dualstack.us-east-1.");
4336                                                        #[allow(clippy::needless_borrow)]
4337                                                        out.push_str(&partition_result.dns_suffix());
4338                                                        out
4339                                                    })
4340                                                    .property(
4341                                                        "authSchemes",
4342                                                        vec![::aws_smithy_types::Document::from({
4343                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4344                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4345                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4346                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4347                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4348                                                            out
4349                                                        })],
4350                                                    )
4351                                                    .build());
4352                                            }
4353                                        }
4354                                    }
4355                                }
4356                            }
4357                            if (*use_dual_stack) == (true) {
4358                                if (*use_fips) == (false) {
4359                                    if (*accelerate) == (true) {
4360                                        if !(endpoint.is_some()) {
4361                                            if !((region.as_ref() as &str) == ("aws-global")) {
4362                                                if (*use_global_endpoint) == (true) {
4363                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4364                                                        .url({
4365                                                            let mut out = String::new();
4366                                                            out.push_str("https://");
4367                                                            #[allow(clippy::needless_borrow)]
4368                                                            out.push_str(&bucket.as_ref() as &str);
4369                                                            out.push_str(".s3-accelerate.dualstack.");
4370                                                            #[allow(clippy::needless_borrow)]
4371                                                            out.push_str(&partition_result.dns_suffix());
4372                                                            out
4373                                                        })
4374                                                        .property(
4375                                                            "authSchemes",
4376                                                            vec![::aws_smithy_types::Document::from({
4377                                                                let mut out =
4378                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4379                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4380                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4381                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4382                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4383                                                                out
4384                                                            })],
4385                                                        )
4386                                                        .build());
4387                                                }
4388                                            }
4389                                        }
4390                                    }
4391                                }
4392                            }
4393                            if (*use_dual_stack) == (true) {
4394                                if (*use_fips) == (false) {
4395                                    if (*accelerate) == (true) {
4396                                        if !(endpoint.is_some()) {
4397                                            if !((region.as_ref() as &str) == ("aws-global")) {
4398                                                if (*use_global_endpoint) == (false) {
4399                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4400                                                        .url({
4401                                                            let mut out = String::new();
4402                                                            out.push_str("https://");
4403                                                            #[allow(clippy::needless_borrow)]
4404                                                            out.push_str(&bucket.as_ref() as &str);
4405                                                            out.push_str(".s3-accelerate.dualstack.");
4406                                                            #[allow(clippy::needless_borrow)]
4407                                                            out.push_str(&partition_result.dns_suffix());
4408                                                            out
4409                                                        })
4410                                                        .property(
4411                                                            "authSchemes",
4412                                                            vec![::aws_smithy_types::Document::from({
4413                                                                let mut out =
4414                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4415                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4416                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4417                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4418                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4419                                                                out
4420                                                            })],
4421                                                        )
4422                                                        .build());
4423                                                }
4424                                            }
4425                                        }
4426                                    }
4427                                }
4428                            }
4429                            if (*use_dual_stack) == (true) {
4430                                if (*use_fips) == (false) {
4431                                    if (*accelerate) == (false) {
4432                                        if !(endpoint.is_some()) {
4433                                            if (region.as_ref() as &str) == ("aws-global") {
4434                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4435                                                    .url({
4436                                                        let mut out = String::new();
4437                                                        out.push_str("https://");
4438                                                        #[allow(clippy::needless_borrow)]
4439                                                        out.push_str(&bucket.as_ref() as &str);
4440                                                        out.push_str(".s3.dualstack.us-east-1.");
4441                                                        #[allow(clippy::needless_borrow)]
4442                                                        out.push_str(&partition_result.dns_suffix());
4443                                                        out
4444                                                    })
4445                                                    .property(
4446                                                        "authSchemes",
4447                                                        vec![::aws_smithy_types::Document::from({
4448                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4449                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4450                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4451                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4452                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4453                                                            out
4454                                                        })],
4455                                                    )
4456                                                    .build());
4457                                            }
4458                                        }
4459                                    }
4460                                }
4461                            }
4462                            if (*use_dual_stack) == (true) {
4463                                if (*use_fips) == (false) {
4464                                    if (*accelerate) == (false) {
4465                                        if !(endpoint.is_some()) {
4466                                            if !((region.as_ref() as &str) == ("aws-global")) {
4467                                                if (*use_global_endpoint) == (true) {
4468                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4469                                                        .url({
4470                                                            let mut out = String::new();
4471                                                            out.push_str("https://");
4472                                                            #[allow(clippy::needless_borrow)]
4473                                                            out.push_str(&bucket.as_ref() as &str);
4474                                                            out.push_str(".s3.dualstack.");
4475                                                            #[allow(clippy::needless_borrow)]
4476                                                            out.push_str(&region.as_ref() as &str);
4477                                                            out.push('.');
4478                                                            #[allow(clippy::needless_borrow)]
4479                                                            out.push_str(&partition_result.dns_suffix());
4480                                                            out
4481                                                        })
4482                                                        .property(
4483                                                            "authSchemes",
4484                                                            vec![::aws_smithy_types::Document::from({
4485                                                                let mut out =
4486                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4487                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4488                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4489                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4490                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4491                                                                out
4492                                                            })],
4493                                                        )
4494                                                        .build());
4495                                                }
4496                                            }
4497                                        }
4498                                    }
4499                                }
4500                            }
4501                            if (*use_dual_stack) == (true) {
4502                                if (*use_fips) == (false) {
4503                                    if (*accelerate) == (false) {
4504                                        if !(endpoint.is_some()) {
4505                                            if !((region.as_ref() as &str) == ("aws-global")) {
4506                                                if (*use_global_endpoint) == (false) {
4507                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4508                                                        .url({
4509                                                            let mut out = String::new();
4510                                                            out.push_str("https://");
4511                                                            #[allow(clippy::needless_borrow)]
4512                                                            out.push_str(&bucket.as_ref() as &str);
4513                                                            out.push_str(".s3.dualstack.");
4514                                                            #[allow(clippy::needless_borrow)]
4515                                                            out.push_str(&region.as_ref() as &str);
4516                                                            out.push('.');
4517                                                            #[allow(clippy::needless_borrow)]
4518                                                            out.push_str(&partition_result.dns_suffix());
4519                                                            out
4520                                                        })
4521                                                        .property(
4522                                                            "authSchemes",
4523                                                            vec![::aws_smithy_types::Document::from({
4524                                                                let mut out =
4525                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4526                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4527                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4528                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4529                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4530                                                                out
4531                                                            })],
4532                                                        )
4533                                                        .build());
4534                                                }
4535                                            }
4536                                        }
4537                                    }
4538                                }
4539                            }
4540                            if (*use_dual_stack) == (false) {
4541                                if (*use_fips) == (false) {
4542                                    if (*accelerate) == (false) {
4543                                        #[allow(unused_variables)]
4544                                        if let Some(endpoint) = endpoint {
4545                                            #[allow(unused_variables)]
4546                                            if let Some(url) =
4547                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
4548                                            {
4549                                                if (url.is_ip()) == (true) {
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.normalized_path());
4561                                                                #[allow(clippy::needless_borrow)]
4562                                                                out.push_str(&bucket.as_ref() as &str);
4563                                                                out
4564                                                            })
4565                                                            .property(
4566                                                                "authSchemes",
4567                                                                vec![::aws_smithy_types::Document::from({
4568                                                                    let mut out =
4569                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4570                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4571                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4572                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4573                                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4574                                                                    out
4575                                                                })],
4576                                                            )
4577                                                            .build());
4578                                                    }
4579                                                }
4580                                            }
4581                                        }
4582                                    }
4583                                }
4584                            }
4585                            if (*use_dual_stack) == (false) {
4586                                if (*use_fips) == (false) {
4587                                    if (*accelerate) == (false) {
4588                                        #[allow(unused_variables)]
4589                                        if let Some(endpoint) = endpoint {
4590                                            #[allow(unused_variables)]
4591                                            if let Some(url) =
4592                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
4593                                            {
4594                                                if (url.is_ip()) == (false) {
4595                                                    if (region.as_ref() as &str) == ("aws-global") {
4596                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4597                                                            .url({
4598                                                                let mut out = String::new();
4599                                                                #[allow(clippy::needless_borrow)]
4600                                                                out.push_str(&url.scheme());
4601                                                                out.push_str("://");
4602                                                                #[allow(clippy::needless_borrow)]
4603                                                                out.push_str(&bucket.as_ref() as &str);
4604                                                                out.push('.');
4605                                                                #[allow(clippy::needless_borrow)]
4606                                                                out.push_str(&url.authority());
4607                                                                #[allow(clippy::needless_borrow)]
4608                                                                out.push_str(&url.path());
4609                                                                out
4610                                                            })
4611                                                            .property(
4612                                                                "authSchemes",
4613                                                                vec![::aws_smithy_types::Document::from({
4614                                                                    let mut out =
4615                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4616                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4617                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4618                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4619                                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4620                                                                    out
4621                                                                })],
4622                                                            )
4623                                                            .build());
4624                                                    }
4625                                                }
4626                                            }
4627                                        }
4628                                    }
4629                                }
4630                            }
4631                            if (*use_dual_stack) == (false) {
4632                                if (*use_fips) == (false) {
4633                                    if (*accelerate) == (false) {
4634                                        #[allow(unused_variables)]
4635                                        if let Some(endpoint) = endpoint {
4636                                            #[allow(unused_variables)]
4637                                            if let Some(url) =
4638                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
4639                                            {
4640                                                if (url.is_ip()) == (true) {
4641                                                    if !((region.as_ref() as &str) == ("aws-global")) {
4642                                                        if (*use_global_endpoint) == (true) {
4643                                                            if (region.as_ref() as &str) == ("us-east-1") {
4644                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4645                                                                    .url({
4646                                                                        let mut out = String::new();
4647                                                                        #[allow(clippy::needless_borrow)]
4648                                                                        out.push_str(&url.scheme());
4649                                                                        out.push_str("://");
4650                                                                        #[allow(clippy::needless_borrow)]
4651                                                                        out.push_str(&url.authority());
4652                                                                        #[allow(clippy::needless_borrow)]
4653                                                                        out.push_str(&url.normalized_path());
4654                                                                        #[allow(clippy::needless_borrow)]
4655                                                                        out.push_str(&bucket.as_ref() as &str);
4656                                                                        out
4657                                                                    })
4658                                                                    .property(
4659                                                                        "authSchemes",
4660                                                                        vec![::aws_smithy_types::Document::from({
4661                                                                            let mut out = ::std::collections::HashMap::<
4662                                                                                String,
4663                                                                                ::aws_smithy_types::Document,
4664                                                                            >::new(
4665                                                                            );
4666                                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4667                                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4668                                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4669                                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
4670                                                                            out
4671                                                                        })],
4672                                                                    )
4673                                                                    .build());
4674                                                            }
4675                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4676                                                                .url({
4677                                                                    let mut out = String::new();
4678                                                                    #[allow(clippy::needless_borrow)]
4679                                                                    out.push_str(&url.scheme());
4680                                                                    out.push_str("://");
4681                                                                    #[allow(clippy::needless_borrow)]
4682                                                                    out.push_str(&url.authority());
4683                                                                    #[allow(clippy::needless_borrow)]
4684                                                                    out.push_str(&url.normalized_path());
4685                                                                    #[allow(clippy::needless_borrow)]
4686                                                                    out.push_str(&bucket.as_ref() as &str);
4687                                                                    out
4688                                                                })
4689                                                                .property(
4690                                                                    "authSchemes",
4691                                                                    vec![::aws_smithy_types::Document::from({
4692                                                                        let mut out =
4693                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
4694                                                                            );
4695                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4696                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4697                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4698                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4699                                                                        out
4700                                                                    })],
4701                                                                )
4702                                                                .build());
4703                                                        }
4704                                                    }
4705                                                }
4706                                            }
4707                                        }
4708                                    }
4709                                }
4710                            }
4711                            if (*use_dual_stack) == (false) {
4712                                if (*use_fips) == (false) {
4713                                    if (*accelerate) == (false) {
4714                                        #[allow(unused_variables)]
4715                                        if let Some(endpoint) = endpoint {
4716                                            #[allow(unused_variables)]
4717                                            if let Some(url) =
4718                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
4719                                            {
4720                                                if (url.is_ip()) == (false) {
4721                                                    if !((region.as_ref() as &str) == ("aws-global")) {
4722                                                        if (*use_global_endpoint) == (true) {
4723                                                            if (region.as_ref() as &str) == ("us-east-1") {
4724                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4725                                                                    .url({
4726                                                                        let mut out = String::new();
4727                                                                        #[allow(clippy::needless_borrow)]
4728                                                                        out.push_str(&url.scheme());
4729                                                                        out.push_str("://");
4730                                                                        #[allow(clippy::needless_borrow)]
4731                                                                        out.push_str(&bucket.as_ref() as &str);
4732                                                                        out.push('.');
4733                                                                        #[allow(clippy::needless_borrow)]
4734                                                                        out.push_str(&url.authority());
4735                                                                        #[allow(clippy::needless_borrow)]
4736                                                                        out.push_str(&url.path());
4737                                                                        out
4738                                                                    })
4739                                                                    .property(
4740                                                                        "authSchemes",
4741                                                                        vec![::aws_smithy_types::Document::from({
4742                                                                            let mut out = ::std::collections::HashMap::<
4743                                                                                String,
4744                                                                                ::aws_smithy_types::Document,
4745                                                                            >::new(
4746                                                                            );
4747                                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4748                                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4749                                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4750                                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
4751                                                                            out
4752                                                                        })],
4753                                                                    )
4754                                                                    .build());
4755                                                            }
4756                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4757                                                                .url({
4758                                                                    let mut out = String::new();
4759                                                                    #[allow(clippy::needless_borrow)]
4760                                                                    out.push_str(&url.scheme());
4761                                                                    out.push_str("://");
4762                                                                    #[allow(clippy::needless_borrow)]
4763                                                                    out.push_str(&bucket.as_ref() as &str);
4764                                                                    out.push('.');
4765                                                                    #[allow(clippy::needless_borrow)]
4766                                                                    out.push_str(&url.authority());
4767                                                                    #[allow(clippy::needless_borrow)]
4768                                                                    out.push_str(&url.path());
4769                                                                    out
4770                                                                })
4771                                                                .property(
4772                                                                    "authSchemes",
4773                                                                    vec![::aws_smithy_types::Document::from({
4774                                                                        let mut out =
4775                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
4776                                                                            );
4777                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4778                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4779                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4780                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4781                                                                        out
4782                                                                    })],
4783                                                                )
4784                                                                .build());
4785                                                        }
4786                                                    }
4787                                                }
4788                                            }
4789                                        }
4790                                    }
4791                                }
4792                            }
4793                            if (*use_dual_stack) == (false) {
4794                                if (*use_fips) == (false) {
4795                                    if (*accelerate) == (false) {
4796                                        #[allow(unused_variables)]
4797                                        if let Some(endpoint) = endpoint {
4798                                            #[allow(unused_variables)]
4799                                            if let Some(url) =
4800                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
4801                                            {
4802                                                if (url.is_ip()) == (true) {
4803                                                    if !((region.as_ref() as &str) == ("aws-global")) {
4804                                                        if (*use_global_endpoint) == (false) {
4805                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4806                                                                .url({
4807                                                                    let mut out = String::new();
4808                                                                    #[allow(clippy::needless_borrow)]
4809                                                                    out.push_str(&url.scheme());
4810                                                                    out.push_str("://");
4811                                                                    #[allow(clippy::needless_borrow)]
4812                                                                    out.push_str(&url.authority());
4813                                                                    #[allow(clippy::needless_borrow)]
4814                                                                    out.push_str(&url.normalized_path());
4815                                                                    #[allow(clippy::needless_borrow)]
4816                                                                    out.push_str(&bucket.as_ref() as &str);
4817                                                                    out
4818                                                                })
4819                                                                .property(
4820                                                                    "authSchemes",
4821                                                                    vec![::aws_smithy_types::Document::from({
4822                                                                        let mut out =
4823                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
4824                                                                            );
4825                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4826                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4827                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4828                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4829                                                                        out
4830                                                                    })],
4831                                                                )
4832                                                                .build());
4833                                                        }
4834                                                    }
4835                                                }
4836                                            }
4837                                        }
4838                                    }
4839                                }
4840                            }
4841                            if (*use_dual_stack) == (false) {
4842                                if (*use_fips) == (false) {
4843                                    if (*accelerate) == (false) {
4844                                        #[allow(unused_variables)]
4845                                        if let Some(endpoint) = endpoint {
4846                                            #[allow(unused_variables)]
4847                                            if let Some(url) =
4848                                                crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector)
4849                                            {
4850                                                if (url.is_ip()) == (false) {
4851                                                    if !((region.as_ref() as &str) == ("aws-global")) {
4852                                                        if (*use_global_endpoint) == (false) {
4853                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4854                                                                .url({
4855                                                                    let mut out = String::new();
4856                                                                    #[allow(clippy::needless_borrow)]
4857                                                                    out.push_str(&url.scheme());
4858                                                                    out.push_str("://");
4859                                                                    #[allow(clippy::needless_borrow)]
4860                                                                    out.push_str(&bucket.as_ref() as &str);
4861                                                                    out.push('.');
4862                                                                    #[allow(clippy::needless_borrow)]
4863                                                                    out.push_str(&url.authority());
4864                                                                    #[allow(clippy::needless_borrow)]
4865                                                                    out.push_str(&url.path());
4866                                                                    out
4867                                                                })
4868                                                                .property(
4869                                                                    "authSchemes",
4870                                                                    vec![::aws_smithy_types::Document::from({
4871                                                                        let mut out =
4872                                                                            ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new(
4873                                                                            );
4874                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
4875                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
4876                                                                        out.insert("signingName".to_string(), "s3".to_string().into());
4877                                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
4878                                                                        out
4879                                                                    })],
4880                                                                )
4881                                                                .build());
4882                                                        }
4883                                                    }
4884                                                }
4885                                            }
4886                                        }
4887                                    }
4888                                }
4889                            }
4890                            if (*use_dual_stack) == (false) {
4891                                if (*use_fips) == (false) {
4892                                    if (*accelerate) == (true) {
4893                                        if !(endpoint.is_some()) {
4894                                            if (region.as_ref() as &str) == ("aws-global") {
4895                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4896                                                    .url({
4897                                                        let mut out = String::new();
4898                                                        out.push_str("https://");
4899                                                        #[allow(clippy::needless_borrow)]
4900                                                        out.push_str(&bucket.as_ref() as &str);
4901                                                        out.push_str(".s3-accelerate.");
4902                                                        #[allow(clippy::needless_borrow)]
4903                                                        out.push_str(&partition_result.dns_suffix());
4904                                                        out
4905                                                    })
4906                                                    .property(
4907                                                        "authSchemes",
4908                                                        vec![::aws_smithy_types::Document::from({
4909                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4910                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
4911                                                            out.insert("name".to_string(), "sigv4".to_string().into());
4912                                                            out.insert("signingName".to_string(), "s3".to_string().into());
4913                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
4914                                                            out
4915                                                        })],
4916                                                    )
4917                                                    .build());
4918                                            }
4919                                        }
4920                                    }
4921                                }
4922                            }
4923                            if (*use_dual_stack) == (false) {
4924                                if (*use_fips) == (false) {
4925                                    if (*accelerate) == (true) {
4926                                        if !(endpoint.is_some()) {
4927                                            if !((region.as_ref() as &str) == ("aws-global")) {
4928                                                if (*use_global_endpoint) == (true) {
4929                                                    if (region.as_ref() as &str) == ("us-east-1") {
4930                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4931                                                            .url({
4932                                                                let mut out = String::new();
4933                                                                out.push_str("https://");
4934                                                                #[allow(clippy::needless_borrow)]
4935                                                                out.push_str(&bucket.as_ref() as &str);
4936                                                                out.push_str(".s3-accelerate.");
4937                                                                #[allow(clippy::needless_borrow)]
4938                                                                out.push_str(&partition_result.dns_suffix());
4939                                                                out
4940                                                            })
4941                                                            .property(
4942                                                                "authSchemes",
4943                                                                vec![::aws_smithy_types::Document::from({
4944                                                                    let mut out =
4945                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4946                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
4947                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
4948                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
4949                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
4950                                                                    out
4951                                                                })],
4952                                                            )
4953                                                            .build());
4954                                                    }
4955                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4956                                                        .url({
4957                                                            let mut out = String::new();
4958                                                            out.push_str("https://");
4959                                                            #[allow(clippy::needless_borrow)]
4960                                                            out.push_str(&bucket.as_ref() as &str);
4961                                                            out.push_str(".s3-accelerate.");
4962                                                            #[allow(clippy::needless_borrow)]
4963                                                            out.push_str(&partition_result.dns_suffix());
4964                                                            out
4965                                                        })
4966                                                        .property(
4967                                                            "authSchemes",
4968                                                            vec![::aws_smithy_types::Document::from({
4969                                                                let mut out =
4970                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
4971                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
4972                                                                out.insert("name".to_string(), "sigv4".to_string().into());
4973                                                                out.insert("signingName".to_string(), "s3".to_string().into());
4974                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
4975                                                                out
4976                                                            })],
4977                                                        )
4978                                                        .build());
4979                                                }
4980                                            }
4981                                        }
4982                                    }
4983                                }
4984                            }
4985                            if (*use_dual_stack) == (false) {
4986                                if (*use_fips) == (false) {
4987                                    if (*accelerate) == (true) {
4988                                        if !(endpoint.is_some()) {
4989                                            if !((region.as_ref() as &str) == ("aws-global")) {
4990                                                if (*use_global_endpoint) == (false) {
4991                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
4992                                                        .url({
4993                                                            let mut out = String::new();
4994                                                            out.push_str("https://");
4995                                                            #[allow(clippy::needless_borrow)]
4996                                                            out.push_str(&bucket.as_ref() as &str);
4997                                                            out.push_str(".s3-accelerate.");
4998                                                            #[allow(clippy::needless_borrow)]
4999                                                            out.push_str(&partition_result.dns_suffix());
5000                                                            out
5001                                                        })
5002                                                        .property(
5003                                                            "authSchemes",
5004                                                            vec![::aws_smithy_types::Document::from({
5005                                                                let mut out =
5006                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5007                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
5008                                                                out.insert("name".to_string(), "sigv4".to_string().into());
5009                                                                out.insert("signingName".to_string(), "s3".to_string().into());
5010                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
5011                                                                out
5012                                                            })],
5013                                                        )
5014                                                        .build());
5015                                                }
5016                                            }
5017                                        }
5018                                    }
5019                                }
5020                            }
5021                            if (*use_dual_stack) == (false) {
5022                                if (*use_fips) == (false) {
5023                                    if (*accelerate) == (false) {
5024                                        if !(endpoint.is_some()) {
5025                                            if (region.as_ref() as &str) == ("aws-global") {
5026                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5027                                                    .url({
5028                                                        let mut out = String::new();
5029                                                        out.push_str("https://");
5030                                                        #[allow(clippy::needless_borrow)]
5031                                                        out.push_str(&bucket.as_ref() as &str);
5032                                                        out.push_str(".s3.");
5033                                                        #[allow(clippy::needless_borrow)]
5034                                                        out.push_str(&partition_result.dns_suffix());
5035                                                        out
5036                                                    })
5037                                                    .property(
5038                                                        "authSchemes",
5039                                                        vec![::aws_smithy_types::Document::from({
5040                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5041                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
5042                                                            out.insert("name".to_string(), "sigv4".to_string().into());
5043                                                            out.insert("signingName".to_string(), "s3".to_string().into());
5044                                                            out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
5045                                                            out
5046                                                        })],
5047                                                    )
5048                                                    .build());
5049                                            }
5050                                        }
5051                                    }
5052                                }
5053                            }
5054                            if (*use_dual_stack) == (false) {
5055                                if (*use_fips) == (false) {
5056                                    if (*accelerate) == (false) {
5057                                        if !(endpoint.is_some()) {
5058                                            if !((region.as_ref() as &str) == ("aws-global")) {
5059                                                if (*use_global_endpoint) == (true) {
5060                                                    if (region.as_ref() as &str) == ("us-east-1") {
5061                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5062                                                            .url({
5063                                                                let mut out = String::new();
5064                                                                out.push_str("https://");
5065                                                                #[allow(clippy::needless_borrow)]
5066                                                                out.push_str(&bucket.as_ref() as &str);
5067                                                                out.push_str(".s3.");
5068                                                                #[allow(clippy::needless_borrow)]
5069                                                                out.push_str(&partition_result.dns_suffix());
5070                                                                out
5071                                                            })
5072                                                            .property(
5073                                                                "authSchemes",
5074                                                                vec![::aws_smithy_types::Document::from({
5075                                                                    let mut out =
5076                                                                        ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5077                                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
5078                                                                    out.insert("name".to_string(), "sigv4".to_string().into());
5079                                                                    out.insert("signingName".to_string(), "s3".to_string().into());
5080                                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
5081                                                                    out
5082                                                                })],
5083                                                            )
5084                                                            .build());
5085                                                    }
5086                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5087                                                        .url({
5088                                                            let mut out = String::new();
5089                                                            out.push_str("https://");
5090                                                            #[allow(clippy::needless_borrow)]
5091                                                            out.push_str(&bucket.as_ref() as &str);
5092                                                            out.push_str(".s3.");
5093                                                            #[allow(clippy::needless_borrow)]
5094                                                            out.push_str(&region.as_ref() as &str);
5095                                                            out.push('.');
5096                                                            #[allow(clippy::needless_borrow)]
5097                                                            out.push_str(&partition_result.dns_suffix());
5098                                                            out
5099                                                        })
5100                                                        .property(
5101                                                            "authSchemes",
5102                                                            vec![::aws_smithy_types::Document::from({
5103                                                                let mut out =
5104                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5105                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
5106                                                                out.insert("name".to_string(), "sigv4".to_string().into());
5107                                                                out.insert("signingName".to_string(), "s3".to_string().into());
5108                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
5109                                                                out
5110                                                            })],
5111                                                        )
5112                                                        .build());
5113                                                }
5114                                            }
5115                                        }
5116                                    }
5117                                }
5118                            }
5119                            if (*use_dual_stack) == (false) {
5120                                if (*use_fips) == (false) {
5121                                    if (*accelerate) == (false) {
5122                                        if !(endpoint.is_some()) {
5123                                            if !((region.as_ref() as &str) == ("aws-global")) {
5124                                                if (*use_global_endpoint) == (false) {
5125                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5126                                                        .url({
5127                                                            let mut out = String::new();
5128                                                            out.push_str("https://");
5129                                                            #[allow(clippy::needless_borrow)]
5130                                                            out.push_str(&bucket.as_ref() as &str);
5131                                                            out.push_str(".s3.");
5132                                                            #[allow(clippy::needless_borrow)]
5133                                                            out.push_str(&region.as_ref() as &str);
5134                                                            out.push('.');
5135                                                            #[allow(clippy::needless_borrow)]
5136                                                            out.push_str(&partition_result.dns_suffix());
5137                                                            out
5138                                                        })
5139                                                        .property(
5140                                                            "authSchemes",
5141                                                            vec![::aws_smithy_types::Document::from({
5142                                                                let mut out =
5143                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5144                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
5145                                                                out.insert("name".to_string(), "sigv4".to_string().into());
5146                                                                out.insert("signingName".to_string(), "s3".to_string().into());
5147                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
5148                                                                out
5149                                                            })],
5150                                                        )
5151                                                        .build());
5152                                                }
5153                                            }
5154                                        }
5155                                    }
5156                                }
5157                            }
5158                            #[allow(unreachable_code)]
5159                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5160                                "No rules matched these parameters. This is a bug. {_params:?}"
5161                            )));
5162                        }
5163                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5164                            "Invalid region: region was not a valid DNS name.".to_string(),
5165                        ));
5166                    }
5167                    #[allow(unreachable_code)]
5168                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5169                        "No rules matched these parameters. This is a bug. {_params:?}"
5170                    )));
5171                }
5172            }
5173            #[allow(unused_variables)]
5174            if let Some(endpoint) = endpoint {
5175                #[allow(unused_variables)]
5176                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
5177                    if (url.scheme()) == ("http") {
5178                        if crate::endpoint_lib::s3::is_virtual_hostable_s3_bucket(bucket.as_ref() as &str, true, _diagnostic_collector) {
5179                            if (*force_path_style) == (false) {
5180                                if (*use_fips) == (false) {
5181                                    if (*use_dual_stack) == (false) {
5182                                        if (*accelerate) == (false) {
5183                                            #[allow(unused_variables)]
5184                                            if let Some(partition_result) =
5185                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
5186                                            {
5187                                                if crate::endpoint_lib::host::is_valid_host_label(
5188                                                    region.as_ref() as &str,
5189                                                    false,
5190                                                    _diagnostic_collector,
5191                                                ) {
5192                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5193                                                        .url({
5194                                                            let mut out = String::new();
5195                                                            #[allow(clippy::needless_borrow)]
5196                                                            out.push_str(&url.scheme());
5197                                                            out.push_str("://");
5198                                                            #[allow(clippy::needless_borrow)]
5199                                                            out.push_str(&bucket.as_ref() as &str);
5200                                                            out.push('.');
5201                                                            #[allow(clippy::needless_borrow)]
5202                                                            out.push_str(&url.authority());
5203                                                            #[allow(clippy::needless_borrow)]
5204                                                            out.push_str(&url.path());
5205                                                            out
5206                                                        })
5207                                                        .property(
5208                                                            "authSchemes",
5209                                                            vec![::aws_smithy_types::Document::from({
5210                                                                let mut out =
5211                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5212                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
5213                                                                out.insert("name".to_string(), "sigv4".to_string().into());
5214                                                                out.insert("signingName".to_string(), "s3".to_string().into());
5215                                                                out.insert("signingRegion".to_string(), region.to_owned().into());
5216                                                                out
5217                                                            })],
5218                                                        )
5219                                                        .build());
5220                                                }
5221                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5222                                                    "Invalid region: region was not a valid DNS name.".to_string(),
5223                                                ));
5224                                            }
5225                                            #[allow(unreachable_code)]
5226                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5227                                                "No rules matched these parameters. This is a bug. {_params:?}"
5228                                            )));
5229                                        }
5230                                    }
5231                                }
5232                            }
5233                        }
5234                    }
5235                }
5236            }
5237            if (*force_path_style) == (false) {
5238                #[allow(unused_variables)]
5239                if let Some(bucket_arn) = crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector) {
5240                    #[allow(unused_variables)]
5241                    if let Some(arn_type) = bucket_arn.resource_id().first().cloned() {
5242                        if !((arn_type.as_ref() as &str) == ("")) {
5243                            if (bucket_arn.service()) == ("s3-object-lambda") {
5244                                if (arn_type.as_ref() as &str) == ("accesspoint") {
5245                                    #[allow(unused_variables)]
5246                                    if let Some(access_point_name) = bucket_arn.resource_id().get(1).cloned() {
5247                                        if !((access_point_name.as_ref() as &str) == ("")) {
5248                                            if (*use_dual_stack) == (true) {
5249                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5250                                                    "S3 Object Lambda does not support Dual-stack".to_string(),
5251                                                ));
5252                                            }
5253                                            if (*accelerate) == (true) {
5254                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5255                                                    "S3 Object Lambda does not support S3 Accelerate".to_string(),
5256                                                ));
5257                                            }
5258                                            if !((bucket_arn.region()) == ("")) {
5259                                                #[allow(unused_variables)]
5260                                                if let Some(disable_access_points) = disable_access_points {
5261                                                    if (*disable_access_points) == (true) {
5262                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5263                                                            "Access points are not supported for this operation".to_string(),
5264                                                        ));
5265                                                    }
5266                                                }
5267                                                if !(bucket_arn.resource_id().get(2).cloned().is_some()) {
5268                                                    #[allow(unused_variables)]
5269                                                    if let Some(use_arn_region) = use_arn_region {
5270                                                        if (*use_arn_region) == (false) {
5271                                                            if !((bucket_arn.region()) == (region.as_ref() as &str)) {
5272                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5273                                                                    let mut out = String::new();
5274                                                                    out.push_str("Invalid configuration: region from ARN `");
5275                                                                    #[allow(clippy::needless_borrow)]
5276                                                                    out.push_str(&bucket_arn.region());
5277                                                                    out.push_str("` does not match client region `");
5278                                                                    #[allow(clippy::needless_borrow)]
5279                                                                    out.push_str(&region.as_ref() as &str);
5280                                                                    out.push_str("` and UseArnRegion is `false`");
5281                                                                    out
5282                                                                }));
5283                                                            }
5284                                                        }
5285                                                    }
5286                                                    #[allow(unused_variables)]
5287                                                    if let Some(bucket_partition) =
5288                                                        partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
5289                                                    {
5290                                                        #[allow(unused_variables)]
5291                                                        if let Some(partition_result) =
5292                                                            partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
5293                                                        {
5294                                                            if (bucket_partition.name()) == (partition_result.name()) {
5295                                                                if crate::endpoint_lib::host::is_valid_host_label(
5296                                                                    bucket_arn.region(),
5297                                                                    true,
5298                                                                    _diagnostic_collector,
5299                                                                ) {
5300                                                                    if (bucket_arn.account_id()) == ("") {
5301                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5302                                                                            "Invalid ARN: Missing account id".to_string(),
5303                                                                        ));
5304                                                                    }
5305                                                                    if crate::endpoint_lib::host::is_valid_host_label(
5306                                                                        bucket_arn.account_id(),
5307                                                                        false,
5308                                                                        _diagnostic_collector,
5309                                                                    ) {
5310                                                                        if crate::endpoint_lib::host::is_valid_host_label(
5311                                                                            access_point_name.as_ref() as &str,
5312                                                                            false,
5313                                                                            _diagnostic_collector,
5314                                                                        ) {
5315                                                                            #[allow(unused_variables)]
5316                                                                            if let Some(endpoint) = endpoint {
5317                                                                                #[allow(unused_variables)]
5318                                                                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
5319                                                                                    endpoint.as_ref() as &str,
5320                                                                                    _diagnostic_collector,
5321                                                                                ) {
5322                                                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5323                                                                                        .url({
5324                                                                                            let mut out = String::new();
5325                                                                                            #[allow(clippy::needless_borrow)]
5326                                                                                            out.push_str(&url.scheme());
5327                                                                                            out.push_str("://");
5328                                                                                            #[allow(clippy::needless_borrow)]
5329                                                                                            out.push_str(&access_point_name.as_ref() as &str);
5330                                                                                            out.push('-');
5331                                                                                            #[allow(clippy::needless_borrow)]
5332                                                                                            out.push_str(&bucket_arn.account_id());
5333                                                                                            out.push('.');
5334                                                                                            #[allow(clippy::needless_borrow)]
5335                                                                                            out.push_str(&url.authority());
5336                                                                                            #[allow(clippy::needless_borrow)]
5337                                                                                            out.push_str(&url.path());
5338                                                                                            out
5339                                                                                        })
5340                                                                                        .property(
5341                                                                                            "authSchemes",
5342                                                                                            vec![::aws_smithy_types::Document::from({
5343                                                                                                let mut out = ::std::collections::HashMap::<
5344                                                                                                    String,
5345                                                                                                    ::aws_smithy_types::Document,
5346                                                                                                >::new(
5347                                                                                                );
5348                                                                                                out.insert(
5349                                                                                                    "disableDoubleEncoding".to_string(),
5350                                                                                                    true.into(),
5351                                                                                                );
5352                                                                                                out.insert(
5353                                                                                                    "name".to_string(),
5354                                                                                                    "sigv4".to_string().into(),
5355                                                                                                );
5356                                                                                                out.insert(
5357                                                                                                    "signingName".to_string(),
5358                                                                                                    "s3-object-lambda".to_string().into(),
5359                                                                                                );
5360                                                                                                out.insert(
5361                                                                                                    "signingRegion".to_string(),
5362                                                                                                    bucket_arn.region().to_owned().into(),
5363                                                                                                );
5364                                                                                                out
5365                                                                                            })],
5366                                                                                        )
5367                                                                                        .build());
5368                                                                                }
5369                                                                            }
5370                                                                            if (*use_fips) == (true) {
5371                                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5372                                                                                    .url({
5373                                                                                        let mut out = String::new();
5374                                                                                        out.push_str("https://");
5375                                                                                        #[allow(clippy::needless_borrow)]
5376                                                                                        out.push_str(&access_point_name.as_ref() as &str);
5377                                                                                        out.push('-');
5378                                                                                        #[allow(clippy::needless_borrow)]
5379                                                                                        out.push_str(&bucket_arn.account_id());
5380                                                                                        out.push_str(".s3-object-lambda-fips.");
5381                                                                                        #[allow(clippy::needless_borrow)]
5382                                                                                        out.push_str(&bucket_arn.region());
5383                                                                                        out.push('.');
5384                                                                                        #[allow(clippy::needless_borrow)]
5385                                                                                        out.push_str(&bucket_partition.dns_suffix());
5386                                                                                        out
5387                                                                                    })
5388                                                                                    .property(
5389                                                                                        "authSchemes",
5390                                                                                        vec![::aws_smithy_types::Document::from({
5391                                                                                            let mut out = ::std::collections::HashMap::<
5392                                                                                                String,
5393                                                                                                ::aws_smithy_types::Document,
5394                                                                                            >::new(
5395                                                                                            );
5396                                                                                            out.insert(
5397                                                                                                "disableDoubleEncoding".to_string(),
5398                                                                                                true.into(),
5399                                                                                            );
5400                                                                                            out.insert(
5401                                                                                                "name".to_string(),
5402                                                                                                "sigv4".to_string().into(),
5403                                                                                            );
5404                                                                                            out.insert(
5405                                                                                                "signingName".to_string(),
5406                                                                                                "s3-object-lambda".to_string().into(),
5407                                                                                            );
5408                                                                                            out.insert(
5409                                                                                                "signingRegion".to_string(),
5410                                                                                                bucket_arn.region().to_owned().into(),
5411                                                                                            );
5412                                                                                            out
5413                                                                                        })],
5414                                                                                    )
5415                                                                                    .build());
5416                                                                            }
5417                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5418                                                                                .url({
5419                                                                                    let mut out = String::new();
5420                                                                                    out.push_str("https://");
5421                                                                                    #[allow(clippy::needless_borrow)]
5422                                                                                    out.push_str(&access_point_name.as_ref() as &str);
5423                                                                                    out.push('-');
5424                                                                                    #[allow(clippy::needless_borrow)]
5425                                                                                    out.push_str(&bucket_arn.account_id());
5426                                                                                    out.push_str(".s3-object-lambda.");
5427                                                                                    #[allow(clippy::needless_borrow)]
5428                                                                                    out.push_str(&bucket_arn.region());
5429                                                                                    out.push('.');
5430                                                                                    #[allow(clippy::needless_borrow)]
5431                                                                                    out.push_str(&bucket_partition.dns_suffix());
5432                                                                                    out
5433                                                                                })
5434                                                                                .property(
5435                                                                                    "authSchemes",
5436                                                                                    vec![::aws_smithy_types::Document::from({
5437                                                                                        let mut out = ::std::collections::HashMap::<
5438                                                                                            String,
5439                                                                                            ::aws_smithy_types::Document,
5440                                                                                        >::new(
5441                                                                                        );
5442                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
5443                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
5444                                                                                        out.insert(
5445                                                                                            "signingName".to_string(),
5446                                                                                            "s3-object-lambda".to_string().into(),
5447                                                                                        );
5448                                                                                        out.insert(
5449                                                                                            "signingRegion".to_string(),
5450                                                                                            bucket_arn.region().to_owned().into(),
5451                                                                                        );
5452                                                                                        out
5453                                                                                    })],
5454                                                                                )
5455                                                                                .build());
5456                                                                        }
5457                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5458                                                                            let mut out = String::new();
5459                                                                            out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
5460                                                                            #[allow(clippy::needless_borrow)]
5461                                                                            out.push_str(&access_point_name.as_ref() as &str);
5462                                                                            out.push('`');
5463                                                                            out
5464                                                                        }));
5465                                                                    }
5466                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5467                                                                        let mut out = String::new();
5468                                                                        out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
5469                                                                        #[allow(clippy::needless_borrow)]
5470                                                                        out.push_str(&bucket_arn.account_id());
5471                                                                        out.push('`');
5472                                                                        out
5473                                                                    }));
5474                                                                }
5475                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5476                                                                    let mut out = String::new();
5477                                                                    out.push_str("Invalid region in ARN: `");
5478                                                                    #[allow(clippy::needless_borrow)]
5479                                                                    out.push_str(&bucket_arn.region());
5480                                                                    out.push_str("` (invalid DNS name)");
5481                                                                    out
5482                                                                }));
5483                                                            }
5484                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5485                                                                let mut out = String::new();
5486                                                                out.push_str("Client was configured for partition `");
5487                                                                #[allow(clippy::needless_borrow)]
5488                                                                out.push_str(&partition_result.name());
5489                                                                out.push_str("` but ARN (`");
5490                                                                #[allow(clippy::needless_borrow)]
5491                                                                out.push_str(&bucket.as_ref() as &str);
5492                                                                out.push_str("`) has `");
5493                                                                #[allow(clippy::needless_borrow)]
5494                                                                out.push_str(&bucket_partition.name());
5495                                                                out.push('`');
5496                                                                out
5497                                                            }));
5498                                                        }
5499                                                        #[allow(unreachable_code)]
5500                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5501                                                            "No rules matched these parameters. This is a bug. {_params:?}"
5502                                                        )));
5503                                                    }
5504                                                    #[allow(unreachable_code)]
5505                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5506                                                        "No rules matched these parameters. This is a bug. {_params:?}"
5507                                                    )));
5508                                                }
5509                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5510                                                    "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
5511                                                        .to_string(),
5512                                                ));
5513                                            }
5514                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5515                                                "Invalid ARN: bucket ARN is missing a region".to_string(),
5516                                            ));
5517                                        }
5518                                    }
5519                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5520                                        "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"
5521                                            .to_string(),
5522                                    ));
5523                                }
5524                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5525                                    let mut out = String::new();
5526                                    out.push_str("Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `");
5527                                    #[allow(clippy::needless_borrow)]
5528                                    out.push_str(&arn_type.as_ref() as &str);
5529                                    out.push('`');
5530                                    out
5531                                }));
5532                            }
5533                            if (arn_type.as_ref() as &str) == ("accesspoint") {
5534                                #[allow(unused_variables)]
5535                                if let Some(access_point_name) = bucket_arn.resource_id().get(1).cloned() {
5536                                    if !((access_point_name.as_ref() as &str) == ("")) {
5537                                        if !((bucket_arn.region()) == ("")) {
5538                                            if (arn_type.as_ref() as &str) == ("accesspoint") {
5539                                                if !((bucket_arn.region()) == ("")) {
5540                                                    #[allow(unused_variables)]
5541                                                    if let Some(disable_access_points) = disable_access_points {
5542                                                        if (*disable_access_points) == (true) {
5543                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5544                                                                "Access points are not supported for this operation".to_string(),
5545                                                            ));
5546                                                        }
5547                                                    }
5548                                                    if !(bucket_arn.resource_id().get(2).cloned().is_some()) {
5549                                                        #[allow(unused_variables)]
5550                                                        if let Some(use_arn_region) = use_arn_region {
5551                                                            if (*use_arn_region) == (false) {
5552                                                                if !((bucket_arn.region()) == (region.as_ref() as &str)) {
5553                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5554                                                                        let mut out = String::new();
5555                                                                        out.push_str("Invalid configuration: region from ARN `");
5556                                                                        #[allow(clippy::needless_borrow)]
5557                                                                        out.push_str(&bucket_arn.region());
5558                                                                        out.push_str("` does not match client region `");
5559                                                                        #[allow(clippy::needless_borrow)]
5560                                                                        out.push_str(&region.as_ref() as &str);
5561                                                                        out.push_str("` and UseArnRegion is `false`");
5562                                                                        out
5563                                                                    }));
5564                                                                }
5565                                                            }
5566                                                        }
5567                                                        #[allow(unused_variables)]
5568                                                        if let Some(bucket_partition) =
5569                                                            partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
5570                                                        {
5571                                                            #[allow(unused_variables)]
5572                                                            if let Some(partition_result) =
5573                                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
5574                                                            {
5575                                                                if (bucket_partition.name()) == (partition_result.name()) {
5576                                                                    if crate::endpoint_lib::host::is_valid_host_label(
5577                                                                        bucket_arn.region(),
5578                                                                        true,
5579                                                                        _diagnostic_collector,
5580                                                                    ) {
5581                                                                        if (bucket_arn.service()) == ("s3") {
5582                                                                            if crate::endpoint_lib::host::is_valid_host_label(
5583                                                                                bucket_arn.account_id(),
5584                                                                                false,
5585                                                                                _diagnostic_collector,
5586                                                                            ) {
5587                                                                                if crate::endpoint_lib::host::is_valid_host_label(
5588                                                                                    access_point_name.as_ref() as &str,
5589                                                                                    false,
5590                                                                                    _diagnostic_collector,
5591                                                                                ) {
5592                                                                                    if (*accelerate) == (true) {
5593                                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message("Access Points do not support S3 Accelerate"
5594.to_string()));
5595                                                                                    }
5596                                                                                    if (*use_fips) == (true) {
5597                                                                                        if (*use_dual_stack) == (true) {
5598                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
5599out.push_str("https://");
5600#[allow(clippy::needless_borrow)]
5601out.push_str(&access_point_name.as_ref() as &str);
5602out.push('-');
5603#[allow(clippy::needless_borrow)]
5604out.push_str(&bucket_arn.account_id());
5605out.push_str(".s3-accesspoint-fips.dualstack.");
5606#[allow(clippy::needless_borrow)]
5607out.push_str(&bucket_arn.region());
5608out.push('.');
5609#[allow(clippy::needless_borrow)]
5610out.push_str(&bucket_partition.dns_suffix());
5611out })
5612.property("authSchemes", vec![::aws_smithy_types::Document::from( {
5613    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5614    out.insert("disableDoubleEncoding".to_string(), true.into());
5615    out.insert("name".to_string(), "sigv4"
5616    .to_string().into());
5617    out.insert("signingName".to_string(), "s3"
5618    .to_string().into());
5619    out.insert("signingRegion".to_string(), bucket_arn.region()
5620    .to_owned().into());
5621    out
5622}),])
5623.build());
5624                                                                                        }
5625                                                                                    }
5626                                                                                    if (*use_fips) == (true) {
5627                                                                                        if (*use_dual_stack) == (false) {
5628                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
5629out.push_str("https://");
5630#[allow(clippy::needless_borrow)]
5631out.push_str(&access_point_name.as_ref() as &str);
5632out.push('-');
5633#[allow(clippy::needless_borrow)]
5634out.push_str(&bucket_arn.account_id());
5635out.push_str(".s3-accesspoint-fips.");
5636#[allow(clippy::needless_borrow)]
5637out.push_str(&bucket_arn.region());
5638out.push('.');
5639#[allow(clippy::needless_borrow)]
5640out.push_str(&bucket_partition.dns_suffix());
5641out })
5642.property("authSchemes", vec![::aws_smithy_types::Document::from( {
5643    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5644    out.insert("disableDoubleEncoding".to_string(), true.into());
5645    out.insert("name".to_string(), "sigv4"
5646    .to_string().into());
5647    out.insert("signingName".to_string(), "s3"
5648    .to_string().into());
5649    out.insert("signingRegion".to_string(), bucket_arn.region()
5650    .to_owned().into());
5651    out
5652}),])
5653.build());
5654                                                                                        }
5655                                                                                    }
5656                                                                                    if (*use_fips) == (false) {
5657                                                                                        if (*use_dual_stack) == (true) {
5658                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
5659out.push_str("https://");
5660#[allow(clippy::needless_borrow)]
5661out.push_str(&access_point_name.as_ref() as &str);
5662out.push('-');
5663#[allow(clippy::needless_borrow)]
5664out.push_str(&bucket_arn.account_id());
5665out.push_str(".s3-accesspoint.dualstack.");
5666#[allow(clippy::needless_borrow)]
5667out.push_str(&bucket_arn.region());
5668out.push('.');
5669#[allow(clippy::needless_borrow)]
5670out.push_str(&bucket_partition.dns_suffix());
5671out })
5672.property("authSchemes", vec![::aws_smithy_types::Document::from( {
5673    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5674    out.insert("disableDoubleEncoding".to_string(), true.into());
5675    out.insert("name".to_string(), "sigv4"
5676    .to_string().into());
5677    out.insert("signingName".to_string(), "s3"
5678    .to_string().into());
5679    out.insert("signingRegion".to_string(), bucket_arn.region()
5680    .to_owned().into());
5681    out
5682}),])
5683.build());
5684                                                                                        }
5685                                                                                    }
5686                                                                                    if (*use_fips) == (false) {
5687                                                                                        if (*use_dual_stack) == (false) {
5688                                                                                            #[allow(unused_variables)]
5689                                                                                            if let Some(endpoint) = endpoint {
5690                                                                                                #[allow(unused_variables)]
5691                                                                                                if let Some(url) =
5692                                                                                                    crate::endpoint_lib::parse_url::parse_url(
5693                                                                                                        endpoint.as_ref() as &str,
5694                                                                                                        _diagnostic_collector,
5695                                                                                                    )
5696                                                                                                {
5697                                                                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
5698#[allow(clippy::needless_borrow)]
5699out.push_str(&url.scheme());
5700out.push_str("://");
5701#[allow(clippy::needless_borrow)]
5702out.push_str(&access_point_name.as_ref() as &str);
5703out.push('-');
5704#[allow(clippy::needless_borrow)]
5705out.push_str(&bucket_arn.account_id());
5706out.push('.');
5707#[allow(clippy::needless_borrow)]
5708out.push_str(&url.authority());
5709#[allow(clippy::needless_borrow)]
5710out.push_str(&url.path());
5711out })
5712.property("authSchemes", vec![::aws_smithy_types::Document::from( {
5713    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5714    out.insert("disableDoubleEncoding".to_string(), true.into());
5715    out.insert("name".to_string(), "sigv4"
5716    .to_string().into());
5717    out.insert("signingName".to_string(), "s3"
5718    .to_string().into());
5719    out.insert("signingRegion".to_string(), bucket_arn.region()
5720    .to_owned().into());
5721    out
5722}),])
5723.build());
5724                                                                                                }
5725                                                                                            }
5726                                                                                        }
5727                                                                                    }
5728                                                                                    if (*use_fips) == (false) {
5729                                                                                        if (*use_dual_stack) == (false) {
5730                                                                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder().url({ let mut out = String::new();
5731out.push_str("https://");
5732#[allow(clippy::needless_borrow)]
5733out.push_str(&access_point_name.as_ref() as &str);
5734out.push('-');
5735#[allow(clippy::needless_borrow)]
5736out.push_str(&bucket_arn.account_id());
5737out.push_str(".s3-accesspoint.");
5738#[allow(clippy::needless_borrow)]
5739out.push_str(&bucket_arn.region());
5740out.push('.');
5741#[allow(clippy::needless_borrow)]
5742out.push_str(&bucket_partition.dns_suffix());
5743out })
5744.property("authSchemes", vec![::aws_smithy_types::Document::from( {
5745    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5746    out.insert("disableDoubleEncoding".to_string(), true.into());
5747    out.insert("name".to_string(), "sigv4"
5748    .to_string().into());
5749    out.insert("signingName".to_string(), "s3"
5750    .to_string().into());
5751    out.insert("signingRegion".to_string(), bucket_arn.region()
5752    .to_owned().into());
5753    out
5754}),])
5755.build());
5756                                                                                        }
5757                                                                                    }
5758                                                                                    #[allow(unreachable_code)]
5759return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!("No rules matched these parameters. This is a bug. {_params:?}")));
5760                                                                                }
5761                                                                                return Err(
5762                                                                                    ::aws_smithy_http::endpoint::ResolveEndpointError::message({
5763                                                                                        let mut out = String::new();
5764                                                                                        out.push_str("Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `");
5765                                                                                        #[allow(clippy::needless_borrow)]
5766                                                                                        out.push_str(&access_point_name.as_ref() as &str);
5767                                                                                        out.push('`');
5768                                                                                        out
5769                                                                                    }),
5770                                                                                );
5771                                                                            }
5772                                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5773                                                                                {
5774                                                                                    let mut out = String::new();
5775                                                                                    out.push_str("Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
5776                                                                                    #[allow(clippy::needless_borrow)]
5777                                                                                    out.push_str(&bucket_arn.account_id());
5778                                                                                    out.push('`');
5779                                                                                    out
5780                                                                                },
5781                                                                            ));
5782                                                                        }
5783                                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5784                                                                            let mut out = String::new();
5785                                                                            out.push_str("Invalid ARN: The ARN was not for the S3 service, found: ");
5786                                                                            #[allow(clippy::needless_borrow)]
5787                                                                            out.push_str(&bucket_arn.service());
5788                                                                            out
5789                                                                        }));
5790                                                                    }
5791                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5792                                                                        let mut out = String::new();
5793                                                                        out.push_str("Invalid region in ARN: `");
5794                                                                        #[allow(clippy::needless_borrow)]
5795                                                                        out.push_str(&bucket_arn.region());
5796                                                                        out.push_str("` (invalid DNS name)");
5797                                                                        out
5798                                                                    }));
5799                                                                }
5800                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5801                                                                    let mut out = String::new();
5802                                                                    out.push_str("Client was configured for partition `");
5803                                                                    #[allow(clippy::needless_borrow)]
5804                                                                    out.push_str(&partition_result.name());
5805                                                                    out.push_str("` but ARN (`");
5806                                                                    #[allow(clippy::needless_borrow)]
5807                                                                    out.push_str(&bucket.as_ref() as &str);
5808                                                                    out.push_str("`) has `");
5809                                                                    #[allow(clippy::needless_borrow)]
5810                                                                    out.push_str(&bucket_partition.name());
5811                                                                    out.push('`');
5812                                                                    out
5813                                                                }));
5814                                                            }
5815                                                            #[allow(unreachable_code)]
5816                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5817                                                                "No rules matched these parameters. This is a bug. {_params:?}"
5818                                                            )));
5819                                                        }
5820                                                        #[allow(unreachable_code)]
5821                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5822                                                            "No rules matched these parameters. This is a bug. {_params:?}"
5823                                                        )));
5824                                                    }
5825                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5826                                                        "Invalid ARN: The ARN may only contain a single resource component after `accesspoint`."
5827                                                            .to_string(),
5828                                                    ));
5829                                                }
5830                                                #[allow(unreachable_code)]
5831                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5832                                                    "No rules matched these parameters. This is a bug. {_params:?}"
5833                                                )));
5834                                            }
5835                                            #[allow(unreachable_code)]
5836                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5837                                                "No rules matched these parameters. This is a bug. {_params:?}"
5838                                            )));
5839                                        }
5840                                        if crate::endpoint_lib::host::is_valid_host_label(
5841                                            access_point_name.as_ref() as &str,
5842                                            true,
5843                                            _diagnostic_collector,
5844                                        ) {
5845                                            if (*use_dual_stack) == (true) {
5846                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5847                                                    "S3 MRAP does not support dual-stack".to_string(),
5848                                                ));
5849                                            }
5850                                            if (*use_fips) == (true) {
5851                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5852                                                    "S3 MRAP does not support FIPS".to_string(),
5853                                                ));
5854                                            }
5855                                            if (*accelerate) == (true) {
5856                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5857                                                    "S3 MRAP does not support S3 Accelerate".to_string(),
5858                                                ));
5859                                            }
5860                                            if (*disable_multi_region_access_points) == (true) {
5861                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5862                                                    "Invalid configuration: Multi-Region Access Point ARNs are disabled.".to_string(),
5863                                                ));
5864                                            }
5865                                            #[allow(unused_variables)]
5866                                            if let Some(mrap_partition) =
5867                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
5868                                            {
5869                                                if (mrap_partition.name()) == (bucket_arn.partition()) {
5870                                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
5871                                                        .url({
5872                                                            let mut out = String::new();
5873                                                            out.push_str("https://");
5874                                                            #[allow(clippy::needless_borrow)]
5875                                                            out.push_str(&access_point_name.as_ref() as &str);
5876                                                            out.push_str(".accesspoint.s3-global.");
5877                                                            #[allow(clippy::needless_borrow)]
5878                                                            out.push_str(&mrap_partition.dns_suffix());
5879                                                            out
5880                                                        })
5881                                                        .property(
5882                                                            "authSchemes",
5883                                                            vec![::aws_smithy_types::Document::from({
5884                                                                let mut out =
5885                                                                    ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
5886                                                                out.insert("disableDoubleEncoding".to_string(), true.into());
5887                                                                out.insert("name".to_string(), "sigv4a".to_string().into());
5888                                                                out.insert("signingName".to_string(), "s3".to_string().into());
5889                                                                out.insert(
5890                                                                    "signingRegionSet".to_string(),
5891                                                                    vec![::aws_smithy_types::Document::from("*".to_string())].into(),
5892                                                                );
5893                                                                out
5894                                                            })],
5895                                                        )
5896                                                        .build());
5897                                                }
5898                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5899                                                    let mut out = String::new();
5900                                                    out.push_str("Client was configured for partition `");
5901                                                    #[allow(clippy::needless_borrow)]
5902                                                    out.push_str(&mrap_partition.name());
5903                                                    out.push_str("` but bucket referred to partition `");
5904                                                    #[allow(clippy::needless_borrow)]
5905                                                    out.push_str(&bucket_arn.partition());
5906                                                    out.push('`');
5907                                                    out
5908                                                }));
5909                                            }
5910                                            #[allow(unreachable_code)]
5911                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
5912                                                "No rules matched these parameters. This is a bug. {_params:?}"
5913                                            )));
5914                                        }
5915                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5916                                            "Invalid Access Point Name".to_string(),
5917                                        ));
5918                                    }
5919                                }
5920                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5921                                    "Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided"
5922                                        .to_string(),
5923                                ));
5924                            }
5925                            if (bucket_arn.service()) == ("s3-outposts") {
5926                                if (*use_dual_stack) == (true) {
5927                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5928                                        "S3 Outposts does not support Dual-stack".to_string(),
5929                                    ));
5930                                }
5931                                if (*use_fips) == (true) {
5932                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5933                                        "S3 Outposts does not support FIPS".to_string(),
5934                                    ));
5935                                }
5936                                if (*accelerate) == (true) {
5937                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5938                                        "S3 Outposts does not support S3 Accelerate".to_string(),
5939                                    ));
5940                                }
5941                                #[allow(unused_variables)]
5942                                if let Some(_) = bucket_arn.resource_id().get(4).cloned() {
5943                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
5944                                        "Invalid Arn: Outpost Access Point ARN contains sub resources".to_string(),
5945                                    ));
5946                                }
5947                                #[allow(unused_variables)]
5948                                if let Some(outpost_id) = bucket_arn.resource_id().get(1).cloned() {
5949                                    if crate::endpoint_lib::host::is_valid_host_label(outpost_id.as_ref() as &str, false, _diagnostic_collector) {
5950                                        #[allow(unused_variables)]
5951                                        if let Some(use_arn_region) = use_arn_region {
5952                                            if (*use_arn_region) == (false) {
5953                                                if !((bucket_arn.region()) == (region.as_ref() as &str)) {
5954                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
5955                                                        let mut out = String::new();
5956                                                        out.push_str("Invalid configuration: region from ARN `");
5957                                                        #[allow(clippy::needless_borrow)]
5958                                                        out.push_str(&bucket_arn.region());
5959                                                        out.push_str("` does not match client region `");
5960                                                        #[allow(clippy::needless_borrow)]
5961                                                        out.push_str(&region.as_ref() as &str);
5962                                                        out.push_str("` and UseArnRegion is `false`");
5963                                                        out
5964                                                    }));
5965                                                }
5966                                            }
5967                                        }
5968                                        #[allow(unused_variables)]
5969                                        if let Some(bucket_partition) =
5970                                            partition_resolver.resolve_partition(bucket_arn.region(), _diagnostic_collector)
5971                                        {
5972                                            #[allow(unused_variables)]
5973                                            if let Some(partition_result) =
5974                                                partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector)
5975                                            {
5976                                                if (bucket_partition.name()) == (partition_result.name()) {
5977                                                    if crate::endpoint_lib::host::is_valid_host_label(
5978                                                        bucket_arn.region(),
5979                                                        true,
5980                                                        _diagnostic_collector,
5981                                                    ) {
5982                                                        if crate::endpoint_lib::host::is_valid_host_label(
5983                                                            bucket_arn.account_id(),
5984                                                            false,
5985                                                            _diagnostic_collector,
5986                                                        ) {
5987                                                            #[allow(unused_variables)]
5988                                                            if let Some(outpost_type) = bucket_arn.resource_id().get(2).cloned() {
5989                                                                #[allow(unused_variables)]
5990                                                                if let Some(access_point_name) = bucket_arn.resource_id().get(3).cloned() {
5991                                                                    if (outpost_type.as_ref() as &str) == ("accesspoint") {
5992                                                                        #[allow(unused_variables)]
5993                                                                        if let Some(endpoint) = endpoint {
5994                                                                            #[allow(unused_variables)]
5995                                                                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
5996                                                                                endpoint.as_ref() as &str,
5997                                                                                _diagnostic_collector,
5998                                                                            ) {
5999                                                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6000                                                                                    .url({
6001                                                                                        let mut out = String::new();
6002                                                                                        out.push_str("https://");
6003                                                                                        #[allow(clippy::needless_borrow)]
6004                                                                                        out.push_str(&access_point_name.as_ref() as &str);
6005                                                                                        out.push('-');
6006                                                                                        #[allow(clippy::needless_borrow)]
6007                                                                                        out.push_str(&bucket_arn.account_id());
6008                                                                                        out.push('.');
6009                                                                                        #[allow(clippy::needless_borrow)]
6010                                                                                        out.push_str(&outpost_id.as_ref() as &str);
6011                                                                                        out.push('.');
6012                                                                                        #[allow(clippy::needless_borrow)]
6013                                                                                        out.push_str(&url.authority());
6014                                                                                        out
6015                                                                                    })
6016                                                                                    .property(
6017                                                                                        "authSchemes",
6018                                                                                        vec![
6019                                                                                            ::aws_smithy_types::Document::from({
6020                                                                                                let mut out = ::std::collections::HashMap::<
6021                                                                                                    String,
6022                                                                                                    ::aws_smithy_types::Document,
6023                                                                                                >::new(
6024                                                                                                );
6025                                                                                                out.insert(
6026                                                                                                    "disableDoubleEncoding".to_string(),
6027                                                                                                    true.into(),
6028                                                                                                );
6029                                                                                                out.insert(
6030                                                                                                    "name".to_string(),
6031                                                                                                    "sigv4a".to_string().into(),
6032                                                                                                );
6033                                                                                                out.insert(
6034                                                                                                    "signingName".to_string(),
6035                                                                                                    "s3-outposts".to_string().into(),
6036                                                                                                );
6037                                                                                                out.insert(
6038                                                                                                    "signingRegionSet".to_string(),
6039                                                                                                    vec![::aws_smithy_types::Document::from(
6040                                                                                                        "*".to_string(),
6041                                                                                                    )]
6042                                                                                                    .into(),
6043                                                                                                );
6044                                                                                                out
6045                                                                                            }),
6046                                                                                            ::aws_smithy_types::Document::from({
6047                                                                                                let mut out = ::std::collections::HashMap::<
6048                                                                                                    String,
6049                                                                                                    ::aws_smithy_types::Document,
6050                                                                                                >::new(
6051                                                                                                );
6052                                                                                                out.insert(
6053                                                                                                    "disableDoubleEncoding".to_string(),
6054                                                                                                    true.into(),
6055                                                                                                );
6056                                                                                                out.insert(
6057                                                                                                    "name".to_string(),
6058                                                                                                    "sigv4".to_string().into(),
6059                                                                                                );
6060                                                                                                out.insert(
6061                                                                                                    "signingName".to_string(),
6062                                                                                                    "s3-outposts".to_string().into(),
6063                                                                                                );
6064                                                                                                out.insert(
6065                                                                                                    "signingRegion".to_string(),
6066                                                                                                    bucket_arn.region().to_owned().into(),
6067                                                                                                );
6068                                                                                                out
6069                                                                                            }),
6070                                                                                        ],
6071                                                                                    )
6072                                                                                    .build());
6073                                                                            }
6074                                                                        }
6075                                                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6076                                                                            .url({
6077                                                                                let mut out = String::new();
6078                                                                                out.push_str("https://");
6079                                                                                #[allow(clippy::needless_borrow)]
6080                                                                                out.push_str(&access_point_name.as_ref() as &str);
6081                                                                                out.push('-');
6082                                                                                #[allow(clippy::needless_borrow)]
6083                                                                                out.push_str(&bucket_arn.account_id());
6084                                                                                out.push('.');
6085                                                                                #[allow(clippy::needless_borrow)]
6086                                                                                out.push_str(&outpost_id.as_ref() as &str);
6087                                                                                out.push_str(".s3-outposts.");
6088                                                                                #[allow(clippy::needless_borrow)]
6089                                                                                out.push_str(&bucket_arn.region());
6090                                                                                out.push('.');
6091                                                                                #[allow(clippy::needless_borrow)]
6092                                                                                out.push_str(&bucket_partition.dns_suffix());
6093                                                                                out
6094                                                                            })
6095                                                                            .property(
6096                                                                                "authSchemes",
6097                                                                                vec![
6098                                                                                    ::aws_smithy_types::Document::from({
6099                                                                                        let mut out = ::std::collections::HashMap::<
6100                                                                                            String,
6101                                                                                            ::aws_smithy_types::Document,
6102                                                                                        >::new(
6103                                                                                        );
6104                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
6105                                                                                        out.insert("name".to_string(), "sigv4a".to_string().into());
6106                                                                                        out.insert(
6107                                                                                            "signingName".to_string(),
6108                                                                                            "s3-outposts".to_string().into(),
6109                                                                                        );
6110                                                                                        out.insert(
6111                                                                                            "signingRegionSet".to_string(),
6112                                                                                            vec![::aws_smithy_types::Document::from("*".to_string())]
6113                                                                                                .into(),
6114                                                                                        );
6115                                                                                        out
6116                                                                                    }),
6117                                                                                    ::aws_smithy_types::Document::from({
6118                                                                                        let mut out = ::std::collections::HashMap::<
6119                                                                                            String,
6120                                                                                            ::aws_smithy_types::Document,
6121                                                                                        >::new(
6122                                                                                        );
6123                                                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
6124                                                                                        out.insert("name".to_string(), "sigv4".to_string().into());
6125                                                                                        out.insert(
6126                                                                                            "signingName".to_string(),
6127                                                                                            "s3-outposts".to_string().into(),
6128                                                                                        );
6129                                                                                        out.insert(
6130                                                                                            "signingRegion".to_string(),
6131                                                                                            bucket_arn.region().to_owned().into(),
6132                                                                                        );
6133                                                                                        out
6134                                                                                    }),
6135                                                                                ],
6136                                                                            )
6137                                                                            .build());
6138                                                                    }
6139                                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
6140                                                                        let mut out = String::new();
6141                                                                        out.push_str("Expected an outpost type `accesspoint`, found ");
6142                                                                        #[allow(clippy::needless_borrow)]
6143                                                                        out.push_str(&outpost_type.as_ref() as &str);
6144                                                                        out
6145                                                                    }));
6146                                                                }
6147                                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6148                                                                    "Invalid ARN: expected an access point name".to_string(),
6149                                                                ));
6150                                                            }
6151                                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6152                                                                "Invalid ARN: Expected a 4-component resource".to_string(),
6153                                                            ));
6154                                                        }
6155                                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
6156                                                            let mut out = String::new();
6157                                                            out.push_str(
6158                                                                "Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `",
6159                                                            );
6160                                                            #[allow(clippy::needless_borrow)]
6161                                                            out.push_str(&bucket_arn.account_id());
6162                                                            out.push('`');
6163                                                            out
6164                                                        }));
6165                                                    }
6166                                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
6167                                                        let mut out = String::new();
6168                                                        out.push_str("Invalid region in ARN: `");
6169                                                        #[allow(clippy::needless_borrow)]
6170                                                        out.push_str(&bucket_arn.region());
6171                                                        out.push_str("` (invalid DNS name)");
6172                                                        out
6173                                                    }));
6174                                                }
6175                                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
6176                                                    let mut out = String::new();
6177                                                    out.push_str("Client was configured for partition `");
6178                                                    #[allow(clippy::needless_borrow)]
6179                                                    out.push_str(&partition_result.name());
6180                                                    out.push_str("` but ARN (`");
6181                                                    #[allow(clippy::needless_borrow)]
6182                                                    out.push_str(&bucket.as_ref() as &str);
6183                                                    out.push_str("`) has `");
6184                                                    #[allow(clippy::needless_borrow)]
6185                                                    out.push_str(&bucket_partition.name());
6186                                                    out.push('`');
6187                                                    out
6188                                                }));
6189                                            }
6190                                            #[allow(unreachable_code)]
6191                                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
6192                                                "No rules matched these parameters. This is a bug. {_params:?}"
6193                                            )));
6194                                        }
6195                                        #[allow(unreachable_code)]
6196                                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
6197                                            "No rules matched these parameters. This is a bug. {_params:?}"
6198                                        )));
6199                                    }
6200                                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
6201                                        let mut out = String::new();
6202                                        out.push_str("Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `");
6203                                        #[allow(clippy::needless_borrow)]
6204                                        out.push_str(&outpost_id.as_ref() as &str);
6205                                        out.push('`');
6206                                        out
6207                                    }));
6208                                }
6209                                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6210                                    "Invalid ARN: The Outpost Id was not set".to_string(),
6211                                ));
6212                            }
6213                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
6214                                let mut out = String::new();
6215                                out.push_str("Invalid ARN: Unrecognized format: ");
6216                                #[allow(clippy::needless_borrow)]
6217                                out.push_str(&bucket.as_ref() as &str);
6218                                out.push_str(" (type: ");
6219                                #[allow(clippy::needless_borrow)]
6220                                out.push_str(&arn_type.as_ref() as &str);
6221                                out.push(')');
6222                                out
6223                            }));
6224                        }
6225                    }
6226                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6227                        "Invalid ARN: No ARN type specified".to_string(),
6228                    ));
6229                }
6230            }
6231            #[allow(unused_variables)]
6232            if let Some(arn_prefix) = crate::endpoint_lib::substring::substring(bucket.as_ref() as &str, 0, 4, false, _diagnostic_collector) {
6233                if (arn_prefix.as_ref() as &str) == ("arn:") {
6234                    if !(crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector).is_some()) {
6235                        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message({
6236                            let mut out = String::new();
6237                            out.push_str("Invalid ARN: `");
6238                            #[allow(clippy::needless_borrow)]
6239                            out.push_str(&bucket.as_ref() as &str);
6240                            out.push_str("` was not a valid ARN");
6241                            out
6242                        }));
6243                    }
6244                }
6245            }
6246            if (*force_path_style) == (true) {
6247                #[allow(unused_variables)]
6248                if let Some(_) = crate::endpoint_lib::arn::parse_arn(bucket.as_ref() as &str, _diagnostic_collector) {
6249                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6250                        "Path-style addressing cannot be used with ARN buckets".to_string(),
6251                    ));
6252                }
6253            }
6254            let uri_encoded_bucket = crate::endpoint_lib::uri_encode::uri_encode(bucket.as_ref() as &str, _diagnostic_collector);
6255            #[allow(unused_variables)]
6256            if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
6257                if (*accelerate) == (false) {
6258                    if (*use_dual_stack) == (true) {
6259                        if !(endpoint.is_some()) {
6260                            if (*use_fips) == (true) {
6261                                if (region.as_ref() as &str) == ("aws-global") {
6262                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6263                                        .url({
6264                                            let mut out = String::new();
6265                                            out.push_str("https://s3-fips.dualstack.us-east-1.");
6266                                            #[allow(clippy::needless_borrow)]
6267                                            out.push_str(&partition_result.dns_suffix());
6268                                            out.push('/');
6269                                            #[allow(clippy::needless_borrow)]
6270                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
6271                                            out
6272                                        })
6273                                        .property(
6274                                            "authSchemes",
6275                                            vec![::aws_smithy_types::Document::from({
6276                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6277                                                out.insert("disableDoubleEncoding".to_string(), true.into());
6278                                                out.insert("name".to_string(), "sigv4".to_string().into());
6279                                                out.insert("signingName".to_string(), "s3".to_string().into());
6280                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
6281                                                out
6282                                            })],
6283                                        )
6284                                        .build());
6285                                }
6286                            }
6287                        }
6288                    }
6289                    if (*use_dual_stack) == (true) {
6290                        if !(endpoint.is_some()) {
6291                            if (*use_fips) == (true) {
6292                                if !((region.as_ref() as &str) == ("aws-global")) {
6293                                    if (*use_global_endpoint) == (true) {
6294                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6295                                            .url({
6296                                                let mut out = String::new();
6297                                                out.push_str("https://s3-fips.dualstack.");
6298                                                #[allow(clippy::needless_borrow)]
6299                                                out.push_str(&region.as_ref() as &str);
6300                                                out.push('.');
6301                                                #[allow(clippy::needless_borrow)]
6302                                                out.push_str(&partition_result.dns_suffix());
6303                                                out.push('/');
6304                                                #[allow(clippy::needless_borrow)]
6305                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6306                                                out
6307                                            })
6308                                            .property(
6309                                                "authSchemes",
6310                                                vec![::aws_smithy_types::Document::from({
6311                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6312                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6313                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6314                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6315                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6316                                                    out
6317                                                })],
6318                                            )
6319                                            .build());
6320                                    }
6321                                }
6322                            }
6323                        }
6324                    }
6325                    if (*use_dual_stack) == (true) {
6326                        if !(endpoint.is_some()) {
6327                            if (*use_fips) == (true) {
6328                                if !((region.as_ref() as &str) == ("aws-global")) {
6329                                    if (*use_global_endpoint) == (false) {
6330                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6331                                            .url({
6332                                                let mut out = String::new();
6333                                                out.push_str("https://s3-fips.dualstack.");
6334                                                #[allow(clippy::needless_borrow)]
6335                                                out.push_str(&region.as_ref() as &str);
6336                                                out.push('.');
6337                                                #[allow(clippy::needless_borrow)]
6338                                                out.push_str(&partition_result.dns_suffix());
6339                                                out.push('/');
6340                                                #[allow(clippy::needless_borrow)]
6341                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6342                                                out
6343                                            })
6344                                            .property(
6345                                                "authSchemes",
6346                                                vec![::aws_smithy_types::Document::from({
6347                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6348                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6349                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6350                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6351                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6352                                                    out
6353                                                })],
6354                                            )
6355                                            .build());
6356                                    }
6357                                }
6358                            }
6359                        }
6360                    }
6361                    if (*use_dual_stack) == (false) {
6362                        if !(endpoint.is_some()) {
6363                            if (*use_fips) == (true) {
6364                                if (region.as_ref() as &str) == ("aws-global") {
6365                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6366                                        .url({
6367                                            let mut out = String::new();
6368                                            out.push_str("https://s3-fips.us-east-1.");
6369                                            #[allow(clippy::needless_borrow)]
6370                                            out.push_str(&partition_result.dns_suffix());
6371                                            out.push('/');
6372                                            #[allow(clippy::needless_borrow)]
6373                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
6374                                            out
6375                                        })
6376                                        .property(
6377                                            "authSchemes",
6378                                            vec![::aws_smithy_types::Document::from({
6379                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6380                                                out.insert("disableDoubleEncoding".to_string(), true.into());
6381                                                out.insert("name".to_string(), "sigv4".to_string().into());
6382                                                out.insert("signingName".to_string(), "s3".to_string().into());
6383                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
6384                                                out
6385                                            })],
6386                                        )
6387                                        .build());
6388                                }
6389                            }
6390                        }
6391                    }
6392                    if (*use_dual_stack) == (false) {
6393                        if !(endpoint.is_some()) {
6394                            if (*use_fips) == (true) {
6395                                if !((region.as_ref() as &str) == ("aws-global")) {
6396                                    if (*use_global_endpoint) == (true) {
6397                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6398                                            .url({
6399                                                let mut out = String::new();
6400                                                out.push_str("https://s3-fips.");
6401                                                #[allow(clippy::needless_borrow)]
6402                                                out.push_str(&region.as_ref() as &str);
6403                                                out.push('.');
6404                                                #[allow(clippy::needless_borrow)]
6405                                                out.push_str(&partition_result.dns_suffix());
6406                                                out.push('/');
6407                                                #[allow(clippy::needless_borrow)]
6408                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6409                                                out
6410                                            })
6411                                            .property(
6412                                                "authSchemes",
6413                                                vec![::aws_smithy_types::Document::from({
6414                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6415                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6416                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6417                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6418                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6419                                                    out
6420                                                })],
6421                                            )
6422                                            .build());
6423                                    }
6424                                }
6425                            }
6426                        }
6427                    }
6428                    if (*use_dual_stack) == (false) {
6429                        if !(endpoint.is_some()) {
6430                            if (*use_fips) == (true) {
6431                                if !((region.as_ref() as &str) == ("aws-global")) {
6432                                    if (*use_global_endpoint) == (false) {
6433                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6434                                            .url({
6435                                                let mut out = String::new();
6436                                                out.push_str("https://s3-fips.");
6437                                                #[allow(clippy::needless_borrow)]
6438                                                out.push_str(&region.as_ref() as &str);
6439                                                out.push('.');
6440                                                #[allow(clippy::needless_borrow)]
6441                                                out.push_str(&partition_result.dns_suffix());
6442                                                out.push('/');
6443                                                #[allow(clippy::needless_borrow)]
6444                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6445                                                out
6446                                            })
6447                                            .property(
6448                                                "authSchemes",
6449                                                vec![::aws_smithy_types::Document::from({
6450                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6451                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6452                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6453                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6454                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6455                                                    out
6456                                                })],
6457                                            )
6458                                            .build());
6459                                    }
6460                                }
6461                            }
6462                        }
6463                    }
6464                    if (*use_dual_stack) == (true) {
6465                        if !(endpoint.is_some()) {
6466                            if (*use_fips) == (false) {
6467                                if (region.as_ref() as &str) == ("aws-global") {
6468                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6469                                        .url({
6470                                            let mut out = String::new();
6471                                            out.push_str("https://s3.dualstack.us-east-1.");
6472                                            #[allow(clippy::needless_borrow)]
6473                                            out.push_str(&partition_result.dns_suffix());
6474                                            out.push('/');
6475                                            #[allow(clippy::needless_borrow)]
6476                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
6477                                            out
6478                                        })
6479                                        .property(
6480                                            "authSchemes",
6481                                            vec![::aws_smithy_types::Document::from({
6482                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6483                                                out.insert("disableDoubleEncoding".to_string(), true.into());
6484                                                out.insert("name".to_string(), "sigv4".to_string().into());
6485                                                out.insert("signingName".to_string(), "s3".to_string().into());
6486                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
6487                                                out
6488                                            })],
6489                                        )
6490                                        .build());
6491                                }
6492                            }
6493                        }
6494                    }
6495                    if (*use_dual_stack) == (true) {
6496                        if !(endpoint.is_some()) {
6497                            if (*use_fips) == (false) {
6498                                if !((region.as_ref() as &str) == ("aws-global")) {
6499                                    if (*use_global_endpoint) == (true) {
6500                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6501                                            .url({
6502                                                let mut out = String::new();
6503                                                out.push_str("https://s3.dualstack.");
6504                                                #[allow(clippy::needless_borrow)]
6505                                                out.push_str(&region.as_ref() as &str);
6506                                                out.push('.');
6507                                                #[allow(clippy::needless_borrow)]
6508                                                out.push_str(&partition_result.dns_suffix());
6509                                                out.push('/');
6510                                                #[allow(clippy::needless_borrow)]
6511                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6512                                                out
6513                                            })
6514                                            .property(
6515                                                "authSchemes",
6516                                                vec![::aws_smithy_types::Document::from({
6517                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6518                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6519                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6520                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6521                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6522                                                    out
6523                                                })],
6524                                            )
6525                                            .build());
6526                                    }
6527                                }
6528                            }
6529                        }
6530                    }
6531                    if (*use_dual_stack) == (true) {
6532                        if !(endpoint.is_some()) {
6533                            if (*use_fips) == (false) {
6534                                if !((region.as_ref() as &str) == ("aws-global")) {
6535                                    if (*use_global_endpoint) == (false) {
6536                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6537                                            .url({
6538                                                let mut out = String::new();
6539                                                out.push_str("https://s3.dualstack.");
6540                                                #[allow(clippy::needless_borrow)]
6541                                                out.push_str(&region.as_ref() as &str);
6542                                                out.push('.');
6543                                                #[allow(clippy::needless_borrow)]
6544                                                out.push_str(&partition_result.dns_suffix());
6545                                                out.push('/');
6546                                                #[allow(clippy::needless_borrow)]
6547                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6548                                                out
6549                                            })
6550                                            .property(
6551                                                "authSchemes",
6552                                                vec![::aws_smithy_types::Document::from({
6553                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6554                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6555                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6556                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6557                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6558                                                    out
6559                                                })],
6560                                            )
6561                                            .build());
6562                                    }
6563                                }
6564                            }
6565                        }
6566                    }
6567                    if (*use_dual_stack) == (false) {
6568                        #[allow(unused_variables)]
6569                        if let Some(endpoint) = endpoint {
6570                            #[allow(unused_variables)]
6571                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
6572                                if (*use_fips) == (false) {
6573                                    if (region.as_ref() as &str) == ("aws-global") {
6574                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6575                                            .url({
6576                                                let mut out = String::new();
6577                                                #[allow(clippy::needless_borrow)]
6578                                                out.push_str(&url.scheme());
6579                                                out.push_str("://");
6580                                                #[allow(clippy::needless_borrow)]
6581                                                out.push_str(&url.authority());
6582                                                #[allow(clippy::needless_borrow)]
6583                                                out.push_str(&url.normalized_path());
6584                                                #[allow(clippy::needless_borrow)]
6585                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6586                                                out
6587                                            })
6588                                            .property(
6589                                                "authSchemes",
6590                                                vec![::aws_smithy_types::Document::from({
6591                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6592                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6593                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6594                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6595                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
6596                                                    out
6597                                                })],
6598                                            )
6599                                            .build());
6600                                    }
6601                                }
6602                            }
6603                        }
6604                    }
6605                    if (*use_dual_stack) == (false) {
6606                        #[allow(unused_variables)]
6607                        if let Some(endpoint) = endpoint {
6608                            #[allow(unused_variables)]
6609                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
6610                                if (*use_fips) == (false) {
6611                                    if !((region.as_ref() as &str) == ("aws-global")) {
6612                                        if (*use_global_endpoint) == (true) {
6613                                            if (region.as_ref() as &str) == ("us-east-1") {
6614                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6615                                                    .url({
6616                                                        let mut out = String::new();
6617                                                        #[allow(clippy::needless_borrow)]
6618                                                        out.push_str(&url.scheme());
6619                                                        out.push_str("://");
6620                                                        #[allow(clippy::needless_borrow)]
6621                                                        out.push_str(&url.authority());
6622                                                        #[allow(clippy::needless_borrow)]
6623                                                        out.push_str(&url.normalized_path());
6624                                                        #[allow(clippy::needless_borrow)]
6625                                                        out.push_str(&uri_encoded_bucket.as_ref() as &str);
6626                                                        out
6627                                                    })
6628                                                    .property(
6629                                                        "authSchemes",
6630                                                        vec![::aws_smithy_types::Document::from({
6631                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6632                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
6633                                                            out.insert("name".to_string(), "sigv4".to_string().into());
6634                                                            out.insert("signingName".to_string(), "s3".to_string().into());
6635                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
6636                                                            out
6637                                                        })],
6638                                                    )
6639                                                    .build());
6640                                            }
6641                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6642                                                .url({
6643                                                    let mut out = String::new();
6644                                                    #[allow(clippy::needless_borrow)]
6645                                                    out.push_str(&url.scheme());
6646                                                    out.push_str("://");
6647                                                    #[allow(clippy::needless_borrow)]
6648                                                    out.push_str(&url.authority());
6649                                                    #[allow(clippy::needless_borrow)]
6650                                                    out.push_str(&url.normalized_path());
6651                                                    #[allow(clippy::needless_borrow)]
6652                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
6653                                                    out
6654                                                })
6655                                                .property(
6656                                                    "authSchemes",
6657                                                    vec![::aws_smithy_types::Document::from({
6658                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6659                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
6660                                                        out.insert("name".to_string(), "sigv4".to_string().into());
6661                                                        out.insert("signingName".to_string(), "s3".to_string().into());
6662                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
6663                                                        out
6664                                                    })],
6665                                                )
6666                                                .build());
6667                                        }
6668                                    }
6669                                }
6670                            }
6671                        }
6672                    }
6673                    if (*use_dual_stack) == (false) {
6674                        #[allow(unused_variables)]
6675                        if let Some(endpoint) = endpoint {
6676                            #[allow(unused_variables)]
6677                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
6678                                if (*use_fips) == (false) {
6679                                    if !((region.as_ref() as &str) == ("aws-global")) {
6680                                        if (*use_global_endpoint) == (false) {
6681                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6682                                                .url({
6683                                                    let mut out = String::new();
6684                                                    #[allow(clippy::needless_borrow)]
6685                                                    out.push_str(&url.scheme());
6686                                                    out.push_str("://");
6687                                                    #[allow(clippy::needless_borrow)]
6688                                                    out.push_str(&url.authority());
6689                                                    #[allow(clippy::needless_borrow)]
6690                                                    out.push_str(&url.normalized_path());
6691                                                    #[allow(clippy::needless_borrow)]
6692                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
6693                                                    out
6694                                                })
6695                                                .property(
6696                                                    "authSchemes",
6697                                                    vec![::aws_smithy_types::Document::from({
6698                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6699                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
6700                                                        out.insert("name".to_string(), "sigv4".to_string().into());
6701                                                        out.insert("signingName".to_string(), "s3".to_string().into());
6702                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
6703                                                        out
6704                                                    })],
6705                                                )
6706                                                .build());
6707                                        }
6708                                    }
6709                                }
6710                            }
6711                        }
6712                    }
6713                    if (*use_dual_stack) == (false) {
6714                        if !(endpoint.is_some()) {
6715                            if (*use_fips) == (false) {
6716                                if (region.as_ref() as &str) == ("aws-global") {
6717                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6718                                        .url({
6719                                            let mut out = String::new();
6720                                            out.push_str("https://s3.");
6721                                            #[allow(clippy::needless_borrow)]
6722                                            out.push_str(&partition_result.dns_suffix());
6723                                            out.push('/');
6724                                            #[allow(clippy::needless_borrow)]
6725                                            out.push_str(&uri_encoded_bucket.as_ref() as &str);
6726                                            out
6727                                        })
6728                                        .property(
6729                                            "authSchemes",
6730                                            vec![::aws_smithy_types::Document::from({
6731                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6732                                                out.insert("disableDoubleEncoding".to_string(), true.into());
6733                                                out.insert("name".to_string(), "sigv4".to_string().into());
6734                                                out.insert("signingName".to_string(), "s3".to_string().into());
6735                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
6736                                                out
6737                                            })],
6738                                        )
6739                                        .build());
6740                                }
6741                            }
6742                        }
6743                    }
6744                    if (*use_dual_stack) == (false) {
6745                        if !(endpoint.is_some()) {
6746                            if (*use_fips) == (false) {
6747                                if !((region.as_ref() as &str) == ("aws-global")) {
6748                                    if (*use_global_endpoint) == (true) {
6749                                        if (region.as_ref() as &str) == ("us-east-1") {
6750                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6751                                                .url({
6752                                                    let mut out = String::new();
6753                                                    out.push_str("https://s3.");
6754                                                    #[allow(clippy::needless_borrow)]
6755                                                    out.push_str(&partition_result.dns_suffix());
6756                                                    out.push('/');
6757                                                    #[allow(clippy::needless_borrow)]
6758                                                    out.push_str(&uri_encoded_bucket.as_ref() as &str);
6759                                                    out
6760                                                })
6761                                                .property(
6762                                                    "authSchemes",
6763                                                    vec![::aws_smithy_types::Document::from({
6764                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6765                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
6766                                                        out.insert("name".to_string(), "sigv4".to_string().into());
6767                                                        out.insert("signingName".to_string(), "s3".to_string().into());
6768                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
6769                                                        out
6770                                                    })],
6771                                                )
6772                                                .build());
6773                                        }
6774                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6775                                            .url({
6776                                                let mut out = String::new();
6777                                                out.push_str("https://s3.");
6778                                                #[allow(clippy::needless_borrow)]
6779                                                out.push_str(&region.as_ref() as &str);
6780                                                out.push('.');
6781                                                #[allow(clippy::needless_borrow)]
6782                                                out.push_str(&partition_result.dns_suffix());
6783                                                out.push('/');
6784                                                #[allow(clippy::needless_borrow)]
6785                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6786                                                out
6787                                            })
6788                                            .property(
6789                                                "authSchemes",
6790                                                vec![::aws_smithy_types::Document::from({
6791                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6792                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6793                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6794                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6795                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6796                                                    out
6797                                                })],
6798                                            )
6799                                            .build());
6800                                    }
6801                                }
6802                            }
6803                        }
6804                    }
6805                    if (*use_dual_stack) == (false) {
6806                        if !(endpoint.is_some()) {
6807                            if (*use_fips) == (false) {
6808                                if !((region.as_ref() as &str) == ("aws-global")) {
6809                                    if (*use_global_endpoint) == (false) {
6810                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6811                                            .url({
6812                                                let mut out = String::new();
6813                                                out.push_str("https://s3.");
6814                                                #[allow(clippy::needless_borrow)]
6815                                                out.push_str(&region.as_ref() as &str);
6816                                                out.push('.');
6817                                                #[allow(clippy::needless_borrow)]
6818                                                out.push_str(&partition_result.dns_suffix());
6819                                                out.push('/');
6820                                                #[allow(clippy::needless_borrow)]
6821                                                out.push_str(&uri_encoded_bucket.as_ref() as &str);
6822                                                out
6823                                            })
6824                                            .property(
6825                                                "authSchemes",
6826                                                vec![::aws_smithy_types::Document::from({
6827                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6828                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6829                                                    out.insert("name".to_string(), "sigv4".to_string().into());
6830                                                    out.insert("signingName".to_string(), "s3".to_string().into());
6831                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6832                                                    out
6833                                                })],
6834                                            )
6835                                            .build());
6836                                    }
6837                                }
6838                            }
6839                        }
6840                    }
6841                    #[allow(unreachable_code)]
6842                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
6843                        "No rules matched these parameters. This is a bug. {_params:?}"
6844                    )));
6845                }
6846                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6847                    "Path-style addressing cannot be used with S3 Accelerate".to_string(),
6848                ));
6849            }
6850            #[allow(unreachable_code)]
6851            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
6852                "No rules matched these parameters. This is a bug. {_params:?}"
6853            )));
6854        }
6855        #[allow(unused_variables)]
6856        if let Some(use_object_lambda_endpoint) = use_object_lambda_endpoint {
6857            if (*use_object_lambda_endpoint) == (true) {
6858                #[allow(unused_variables)]
6859                if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
6860                    if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
6861                        if (*use_dual_stack) == (true) {
6862                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6863                                "S3 Object Lambda does not support Dual-stack".to_string(),
6864                            ));
6865                        }
6866                        if (*accelerate) == (true) {
6867                            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6868                                "S3 Object Lambda does not support S3 Accelerate".to_string(),
6869                            ));
6870                        }
6871                        #[allow(unused_variables)]
6872                        if let Some(endpoint) = endpoint {
6873                            #[allow(unused_variables)]
6874                            if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
6875                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6876                                    .url({
6877                                        let mut out = String::new();
6878                                        #[allow(clippy::needless_borrow)]
6879                                        out.push_str(&url.scheme());
6880                                        out.push_str("://");
6881                                        #[allow(clippy::needless_borrow)]
6882                                        out.push_str(&url.authority());
6883                                        #[allow(clippy::needless_borrow)]
6884                                        out.push_str(&url.path());
6885                                        out
6886                                    })
6887                                    .property(
6888                                        "authSchemes",
6889                                        vec![::aws_smithy_types::Document::from({
6890                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6891                                            out.insert("disableDoubleEncoding".to_string(), true.into());
6892                                            out.insert("name".to_string(), "sigv4".to_string().into());
6893                                            out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
6894                                            out.insert("signingRegion".to_string(), region.to_owned().into());
6895                                            out
6896                                        })],
6897                                    )
6898                                    .build());
6899                            }
6900                        }
6901                        if (*use_fips) == (true) {
6902                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6903                                .url({
6904                                    let mut out = String::new();
6905                                    out.push_str("https://s3-object-lambda-fips.");
6906                                    #[allow(clippy::needless_borrow)]
6907                                    out.push_str(&region.as_ref() as &str);
6908                                    out.push('.');
6909                                    #[allow(clippy::needless_borrow)]
6910                                    out.push_str(&partition_result.dns_suffix());
6911                                    out
6912                                })
6913                                .property(
6914                                    "authSchemes",
6915                                    vec![::aws_smithy_types::Document::from({
6916                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6917                                        out.insert("disableDoubleEncoding".to_string(), true.into());
6918                                        out.insert("name".to_string(), "sigv4".to_string().into());
6919                                        out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
6920                                        out.insert("signingRegion".to_string(), region.to_owned().into());
6921                                        out
6922                                    })],
6923                                )
6924                                .build());
6925                        }
6926                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6927                            .url({
6928                                let mut out = String::new();
6929                                out.push_str("https://s3-object-lambda.");
6930                                #[allow(clippy::needless_borrow)]
6931                                out.push_str(&region.as_ref() as &str);
6932                                out.push('.');
6933                                #[allow(clippy::needless_borrow)]
6934                                out.push_str(&partition_result.dns_suffix());
6935                                out
6936                            })
6937                            .property(
6938                                "authSchemes",
6939                                vec![::aws_smithy_types::Document::from({
6940                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6941                                    out.insert("disableDoubleEncoding".to_string(), true.into());
6942                                    out.insert("name".to_string(), "sigv4".to_string().into());
6943                                    out.insert("signingName".to_string(), "s3-object-lambda".to_string().into());
6944                                    out.insert("signingRegion".to_string(), region.to_owned().into());
6945                                    out
6946                                })],
6947                            )
6948                            .build());
6949                    }
6950                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
6951                        "Invalid region: region was not a valid DNS name.".to_string(),
6952                    ));
6953                }
6954                #[allow(unreachable_code)]
6955                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
6956                    "No rules matched these parameters. This is a bug. {_params:?}"
6957                )));
6958            }
6959        }
6960        if !(bucket.is_some()) {
6961            #[allow(unused_variables)]
6962            if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
6963                if crate::endpoint_lib::host::is_valid_host_label(region.as_ref() as &str, true, _diagnostic_collector) {
6964                    if (*use_fips) == (true) {
6965                        if (*use_dual_stack) == (true) {
6966                            if !(endpoint.is_some()) {
6967                                if (region.as_ref() as &str) == ("aws-global") {
6968                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6969                                        .url({
6970                                            let mut out = String::new();
6971                                            out.push_str("https://s3-fips.dualstack.us-east-1.");
6972                                            #[allow(clippy::needless_borrow)]
6973                                            out.push_str(&partition_result.dns_suffix());
6974                                            out
6975                                        })
6976                                        .property(
6977                                            "authSchemes",
6978                                            vec![::aws_smithy_types::Document::from({
6979                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
6980                                                out.insert("disableDoubleEncoding".to_string(), true.into());
6981                                                out.insert("name".to_string(), "sigv4".to_string().into());
6982                                                out.insert("signingName".to_string(), "s3".to_string().into());
6983                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
6984                                                out
6985                                            })],
6986                                        )
6987                                        .build());
6988                                }
6989                            }
6990                        }
6991                    }
6992                    if (*use_fips) == (true) {
6993                        if (*use_dual_stack) == (true) {
6994                            if !(endpoint.is_some()) {
6995                                if !((region.as_ref() as &str) == ("aws-global")) {
6996                                    if (*use_global_endpoint) == (true) {
6997                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
6998                                            .url({
6999                                                let mut out = String::new();
7000                                                out.push_str("https://s3-fips.dualstack.");
7001                                                #[allow(clippy::needless_borrow)]
7002                                                out.push_str(&region.as_ref() as &str);
7003                                                out.push('.');
7004                                                #[allow(clippy::needless_borrow)]
7005                                                out.push_str(&partition_result.dns_suffix());
7006                                                out
7007                                            })
7008                                            .property(
7009                                                "authSchemes",
7010                                                vec![::aws_smithy_types::Document::from({
7011                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7012                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7013                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7014                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7015                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7016                                                    out
7017                                                })],
7018                                            )
7019                                            .build());
7020                                    }
7021                                }
7022                            }
7023                        }
7024                    }
7025                    if (*use_fips) == (true) {
7026                        if (*use_dual_stack) == (true) {
7027                            if !(endpoint.is_some()) {
7028                                if !((region.as_ref() as &str) == ("aws-global")) {
7029                                    if (*use_global_endpoint) == (false) {
7030                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7031                                            .url({
7032                                                let mut out = String::new();
7033                                                out.push_str("https://s3-fips.dualstack.");
7034                                                #[allow(clippy::needless_borrow)]
7035                                                out.push_str(&region.as_ref() as &str);
7036                                                out.push('.');
7037                                                #[allow(clippy::needless_borrow)]
7038                                                out.push_str(&partition_result.dns_suffix());
7039                                                out
7040                                            })
7041                                            .property(
7042                                                "authSchemes",
7043                                                vec![::aws_smithy_types::Document::from({
7044                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7045                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7046                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7047                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7048                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7049                                                    out
7050                                                })],
7051                                            )
7052                                            .build());
7053                                    }
7054                                }
7055                            }
7056                        }
7057                    }
7058                    if (*use_fips) == (true) {
7059                        if (*use_dual_stack) == (false) {
7060                            if !(endpoint.is_some()) {
7061                                if (region.as_ref() as &str) == ("aws-global") {
7062                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7063                                        .url({
7064                                            let mut out = String::new();
7065                                            out.push_str("https://s3-fips.us-east-1.");
7066                                            #[allow(clippy::needless_borrow)]
7067                                            out.push_str(&partition_result.dns_suffix());
7068                                            out
7069                                        })
7070                                        .property(
7071                                            "authSchemes",
7072                                            vec![::aws_smithy_types::Document::from({
7073                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7074                                                out.insert("disableDoubleEncoding".to_string(), true.into());
7075                                                out.insert("name".to_string(), "sigv4".to_string().into());
7076                                                out.insert("signingName".to_string(), "s3".to_string().into());
7077                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
7078                                                out
7079                                            })],
7080                                        )
7081                                        .build());
7082                                }
7083                            }
7084                        }
7085                    }
7086                    if (*use_fips) == (true) {
7087                        if (*use_dual_stack) == (false) {
7088                            if !(endpoint.is_some()) {
7089                                if !((region.as_ref() as &str) == ("aws-global")) {
7090                                    if (*use_global_endpoint) == (true) {
7091                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7092                                            .url({
7093                                                let mut out = String::new();
7094                                                out.push_str("https://s3-fips.");
7095                                                #[allow(clippy::needless_borrow)]
7096                                                out.push_str(&region.as_ref() as &str);
7097                                                out.push('.');
7098                                                #[allow(clippy::needless_borrow)]
7099                                                out.push_str(&partition_result.dns_suffix());
7100                                                out
7101                                            })
7102                                            .property(
7103                                                "authSchemes",
7104                                                vec![::aws_smithy_types::Document::from({
7105                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7106                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7107                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7108                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7109                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7110                                                    out
7111                                                })],
7112                                            )
7113                                            .build());
7114                                    }
7115                                }
7116                            }
7117                        }
7118                    }
7119                    if (*use_fips) == (true) {
7120                        if (*use_dual_stack) == (false) {
7121                            if !(endpoint.is_some()) {
7122                                if !((region.as_ref() as &str) == ("aws-global")) {
7123                                    if (*use_global_endpoint) == (false) {
7124                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7125                                            .url({
7126                                                let mut out = String::new();
7127                                                out.push_str("https://s3-fips.");
7128                                                #[allow(clippy::needless_borrow)]
7129                                                out.push_str(&region.as_ref() as &str);
7130                                                out.push('.');
7131                                                #[allow(clippy::needless_borrow)]
7132                                                out.push_str(&partition_result.dns_suffix());
7133                                                out
7134                                            })
7135                                            .property(
7136                                                "authSchemes",
7137                                                vec![::aws_smithy_types::Document::from({
7138                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7139                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7140                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7141                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7142                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7143                                                    out
7144                                                })],
7145                                            )
7146                                            .build());
7147                                    }
7148                                }
7149                            }
7150                        }
7151                    }
7152                    if (*use_fips) == (false) {
7153                        if (*use_dual_stack) == (true) {
7154                            if !(endpoint.is_some()) {
7155                                if (region.as_ref() as &str) == ("aws-global") {
7156                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7157                                        .url({
7158                                            let mut out = String::new();
7159                                            out.push_str("https://s3.dualstack.us-east-1.");
7160                                            #[allow(clippy::needless_borrow)]
7161                                            out.push_str(&partition_result.dns_suffix());
7162                                            out
7163                                        })
7164                                        .property(
7165                                            "authSchemes",
7166                                            vec![::aws_smithy_types::Document::from({
7167                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7168                                                out.insert("disableDoubleEncoding".to_string(), true.into());
7169                                                out.insert("name".to_string(), "sigv4".to_string().into());
7170                                                out.insert("signingName".to_string(), "s3".to_string().into());
7171                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
7172                                                out
7173                                            })],
7174                                        )
7175                                        .build());
7176                                }
7177                            }
7178                        }
7179                    }
7180                    if (*use_fips) == (false) {
7181                        if (*use_dual_stack) == (true) {
7182                            if !(endpoint.is_some()) {
7183                                if !((region.as_ref() as &str) == ("aws-global")) {
7184                                    if (*use_global_endpoint) == (true) {
7185                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7186                                            .url({
7187                                                let mut out = String::new();
7188                                                out.push_str("https://s3.dualstack.");
7189                                                #[allow(clippy::needless_borrow)]
7190                                                out.push_str(&region.as_ref() as &str);
7191                                                out.push('.');
7192                                                #[allow(clippy::needless_borrow)]
7193                                                out.push_str(&partition_result.dns_suffix());
7194                                                out
7195                                            })
7196                                            .property(
7197                                                "authSchemes",
7198                                                vec![::aws_smithy_types::Document::from({
7199                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7200                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7201                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7202                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7203                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7204                                                    out
7205                                                })],
7206                                            )
7207                                            .build());
7208                                    }
7209                                }
7210                            }
7211                        }
7212                    }
7213                    if (*use_fips) == (false) {
7214                        if (*use_dual_stack) == (true) {
7215                            if !(endpoint.is_some()) {
7216                                if !((region.as_ref() as &str) == ("aws-global")) {
7217                                    if (*use_global_endpoint) == (false) {
7218                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7219                                            .url({
7220                                                let mut out = String::new();
7221                                                out.push_str("https://s3.dualstack.");
7222                                                #[allow(clippy::needless_borrow)]
7223                                                out.push_str(&region.as_ref() as &str);
7224                                                out.push('.');
7225                                                #[allow(clippy::needless_borrow)]
7226                                                out.push_str(&partition_result.dns_suffix());
7227                                                out
7228                                            })
7229                                            .property(
7230                                                "authSchemes",
7231                                                vec![::aws_smithy_types::Document::from({
7232                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7233                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7234                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7235                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7236                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7237                                                    out
7238                                                })],
7239                                            )
7240                                            .build());
7241                                    }
7242                                }
7243                            }
7244                        }
7245                    }
7246                    if (*use_fips) == (false) {
7247                        if (*use_dual_stack) == (false) {
7248                            #[allow(unused_variables)]
7249                            if let Some(endpoint) = endpoint {
7250                                #[allow(unused_variables)]
7251                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
7252                                    if (region.as_ref() as &str) == ("aws-global") {
7253                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7254                                            .url({
7255                                                let mut out = String::new();
7256                                                #[allow(clippy::needless_borrow)]
7257                                                out.push_str(&url.scheme());
7258                                                out.push_str("://");
7259                                                #[allow(clippy::needless_borrow)]
7260                                                out.push_str(&url.authority());
7261                                                #[allow(clippy::needless_borrow)]
7262                                                out.push_str(&url.path());
7263                                                out
7264                                            })
7265                                            .property(
7266                                                "authSchemes",
7267                                                vec![::aws_smithy_types::Document::from({
7268                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7269                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7270                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7271                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7272                                                    out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
7273                                                    out
7274                                                })],
7275                                            )
7276                                            .build());
7277                                    }
7278                                }
7279                            }
7280                        }
7281                    }
7282                    if (*use_fips) == (false) {
7283                        if (*use_dual_stack) == (false) {
7284                            #[allow(unused_variables)]
7285                            if let Some(endpoint) = endpoint {
7286                                #[allow(unused_variables)]
7287                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
7288                                    if !((region.as_ref() as &str) == ("aws-global")) {
7289                                        if (*use_global_endpoint) == (true) {
7290                                            if (region.as_ref() as &str) == ("us-east-1") {
7291                                                return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7292                                                    .url({
7293                                                        let mut out = String::new();
7294                                                        #[allow(clippy::needless_borrow)]
7295                                                        out.push_str(&url.scheme());
7296                                                        out.push_str("://");
7297                                                        #[allow(clippy::needless_borrow)]
7298                                                        out.push_str(&url.authority());
7299                                                        #[allow(clippy::needless_borrow)]
7300                                                        out.push_str(&url.path());
7301                                                        out
7302                                                    })
7303                                                    .property(
7304                                                        "authSchemes",
7305                                                        vec![::aws_smithy_types::Document::from({
7306                                                            let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7307                                                            out.insert("disableDoubleEncoding".to_string(), true.into());
7308                                                            out.insert("name".to_string(), "sigv4".to_string().into());
7309                                                            out.insert("signingName".to_string(), "s3".to_string().into());
7310                                                            out.insert("signingRegion".to_string(), region.to_owned().into());
7311                                                            out
7312                                                        })],
7313                                                    )
7314                                                    .build());
7315                                            }
7316                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7317                                                .url({
7318                                                    let mut out = String::new();
7319                                                    #[allow(clippy::needless_borrow)]
7320                                                    out.push_str(&url.scheme());
7321                                                    out.push_str("://");
7322                                                    #[allow(clippy::needless_borrow)]
7323                                                    out.push_str(&url.authority());
7324                                                    #[allow(clippy::needless_borrow)]
7325                                                    out.push_str(&url.path());
7326                                                    out
7327                                                })
7328                                                .property(
7329                                                    "authSchemes",
7330                                                    vec![::aws_smithy_types::Document::from({
7331                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7332                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
7333                                                        out.insert("name".to_string(), "sigv4".to_string().into());
7334                                                        out.insert("signingName".to_string(), "s3".to_string().into());
7335                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
7336                                                        out
7337                                                    })],
7338                                                )
7339                                                .build());
7340                                        }
7341                                    }
7342                                }
7343                            }
7344                        }
7345                    }
7346                    if (*use_fips) == (false) {
7347                        if (*use_dual_stack) == (false) {
7348                            #[allow(unused_variables)]
7349                            if let Some(endpoint) = endpoint {
7350                                #[allow(unused_variables)]
7351                                if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
7352                                    if !((region.as_ref() as &str) == ("aws-global")) {
7353                                        if (*use_global_endpoint) == (false) {
7354                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7355                                                .url({
7356                                                    let mut out = String::new();
7357                                                    #[allow(clippy::needless_borrow)]
7358                                                    out.push_str(&url.scheme());
7359                                                    out.push_str("://");
7360                                                    #[allow(clippy::needless_borrow)]
7361                                                    out.push_str(&url.authority());
7362                                                    #[allow(clippy::needless_borrow)]
7363                                                    out.push_str(&url.path());
7364                                                    out
7365                                                })
7366                                                .property(
7367                                                    "authSchemes",
7368                                                    vec![::aws_smithy_types::Document::from({
7369                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7370                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
7371                                                        out.insert("name".to_string(), "sigv4".to_string().into());
7372                                                        out.insert("signingName".to_string(), "s3".to_string().into());
7373                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
7374                                                        out
7375                                                    })],
7376                                                )
7377                                                .build());
7378                                        }
7379                                    }
7380                                }
7381                            }
7382                        }
7383                    }
7384                    if (*use_fips) == (false) {
7385                        if (*use_dual_stack) == (false) {
7386                            if !(endpoint.is_some()) {
7387                                if (region.as_ref() as &str) == ("aws-global") {
7388                                    return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7389                                        .url({
7390                                            let mut out = String::new();
7391                                            out.push_str("https://s3.");
7392                                            #[allow(clippy::needless_borrow)]
7393                                            out.push_str(&partition_result.dns_suffix());
7394                                            out
7395                                        })
7396                                        .property(
7397                                            "authSchemes",
7398                                            vec![::aws_smithy_types::Document::from({
7399                                                let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7400                                                out.insert("disableDoubleEncoding".to_string(), true.into());
7401                                                out.insert("name".to_string(), "sigv4".to_string().into());
7402                                                out.insert("signingName".to_string(), "s3".to_string().into());
7403                                                out.insert("signingRegion".to_string(), "us-east-1".to_string().into());
7404                                                out
7405                                            })],
7406                                        )
7407                                        .build());
7408                                }
7409                            }
7410                        }
7411                    }
7412                    if (*use_fips) == (false) {
7413                        if (*use_dual_stack) == (false) {
7414                            if !(endpoint.is_some()) {
7415                                if !((region.as_ref() as &str) == ("aws-global")) {
7416                                    if (*use_global_endpoint) == (true) {
7417                                        if (region.as_ref() as &str) == ("us-east-1") {
7418                                            return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7419                                                .url({
7420                                                    let mut out = String::new();
7421                                                    out.push_str("https://s3.");
7422                                                    #[allow(clippy::needless_borrow)]
7423                                                    out.push_str(&partition_result.dns_suffix());
7424                                                    out
7425                                                })
7426                                                .property(
7427                                                    "authSchemes",
7428                                                    vec![::aws_smithy_types::Document::from({
7429                                                        let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7430                                                        out.insert("disableDoubleEncoding".to_string(), true.into());
7431                                                        out.insert("name".to_string(), "sigv4".to_string().into());
7432                                                        out.insert("signingName".to_string(), "s3".to_string().into());
7433                                                        out.insert("signingRegion".to_string(), region.to_owned().into());
7434                                                        out
7435                                                    })],
7436                                                )
7437                                                .build());
7438                                        }
7439                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7440                                            .url({
7441                                                let mut out = String::new();
7442                                                out.push_str("https://s3.");
7443                                                #[allow(clippy::needless_borrow)]
7444                                                out.push_str(&region.as_ref() as &str);
7445                                                out.push('.');
7446                                                #[allow(clippy::needless_borrow)]
7447                                                out.push_str(&partition_result.dns_suffix());
7448                                                out
7449                                            })
7450                                            .property(
7451                                                "authSchemes",
7452                                                vec![::aws_smithy_types::Document::from({
7453                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7454                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7455                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7456                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7457                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7458                                                    out
7459                                                })],
7460                                            )
7461                                            .build());
7462                                    }
7463                                }
7464                            }
7465                        }
7466                    }
7467                    if (*use_fips) == (false) {
7468                        if (*use_dual_stack) == (false) {
7469                            if !(endpoint.is_some()) {
7470                                if !((region.as_ref() as &str) == ("aws-global")) {
7471                                    if (*use_global_endpoint) == (false) {
7472                                        return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
7473                                            .url({
7474                                                let mut out = String::new();
7475                                                out.push_str("https://s3.");
7476                                                #[allow(clippy::needless_borrow)]
7477                                                out.push_str(&region.as_ref() as &str);
7478                                                out.push('.');
7479                                                #[allow(clippy::needless_borrow)]
7480                                                out.push_str(&partition_result.dns_suffix());
7481                                                out
7482                                            })
7483                                            .property(
7484                                                "authSchemes",
7485                                                vec![::aws_smithy_types::Document::from({
7486                                                    let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
7487                                                    out.insert("disableDoubleEncoding".to_string(), true.into());
7488                                                    out.insert("name".to_string(), "sigv4".to_string().into());
7489                                                    out.insert("signingName".to_string(), "s3".to_string().into());
7490                                                    out.insert("signingRegion".to_string(), region.to_owned().into());
7491                                                    out
7492                                                })],
7493                                            )
7494                                            .build());
7495                                    }
7496                                }
7497                            }
7498                        }
7499                    }
7500                    #[allow(unreachable_code)]
7501                    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
7502                        "No rules matched these parameters. This is a bug. {_params:?}"
7503                    )));
7504                }
7505                return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
7506                    "Invalid region: region was not a valid DNS name.".to_string(),
7507                ));
7508            }
7509            #[allow(unreachable_code)]
7510            return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
7511                "No rules matched these parameters. This is a bug. {_params:?}"
7512            )));
7513        }
7514        #[allow(unreachable_code)]
7515        return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
7516            "No rules matched these parameters. This is a bug. {_params:?}"
7517        )));
7518    }
7519    return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
7520        "A region must be set when sending requests to S3.".to_string(),
7521    ));
7522}