96 96 | out.push_str("://");
|
97 97 | #[allow(clippy::needless_borrow)]
|
98 98 | out.push_str(&url.authority());
|
99 99 | #[allow(clippy::needless_borrow)]
|
100 100 | out.push_str(&url.path());
|
101 101 | out
|
102 102 | })
|
103 103 | .property(
|
104 104 | "authSchemes",
|
105 105 | vec![::aws_smithy_types::Document::from({
|
106 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
106 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
107 107 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
108 108 | out.insert("name".to_string(), "sigv4".to_string().into());
|
109 109 | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
110 110 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
111 111 | out
|
112 112 | })],
|
113 113 | )
|
114 114 | .build());
|
115 115 | }
|
116 116 | }
|
117 117 | if (*use_fips) == (true) {
|
118 118 | if (*use_dual_stack) == (true) {
|
119 119 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
120 120 | .url({
|
121 121 | let mut out = String::new();
|
122 122 | out.push_str("https://s3-outposts-fips.");
|
123 123 | #[allow(clippy::needless_borrow)]
|
124 124 | out.push_str(®ion.as_ref() as &str);
|
125 125 | out.push('.');
|
126 126 | #[allow(clippy::needless_borrow)]
|
127 127 | out.push_str(&partition_result.dual_stack_dns_suffix());
|
128 128 | out
|
129 129 | })
|
130 130 | .property(
|
131 131 | "authSchemes",
|
132 132 | vec![::aws_smithy_types::Document::from({
|
133 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
133 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
134 134 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
135 135 | out.insert("name".to_string(), "sigv4".to_string().into());
|
136 136 | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
137 137 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
138 138 | out
|
139 139 | })],
|
140 140 | )
|
141 141 | .build());
|
142 142 | }
|
143 143 | }
|
144 144 | if (*use_fips) == (true) {
|
145 145 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
146 146 | .url({
|
147 147 | let mut out = String::new();
|
148 148 | out.push_str("https://s3-outposts-fips.");
|
149 149 | #[allow(clippy::needless_borrow)]
|
150 150 | out.push_str(®ion.as_ref() as &str);
|
151 151 | out.push('.');
|
152 152 | #[allow(clippy::needless_borrow)]
|
153 153 | out.push_str(&partition_result.dns_suffix());
|
154 154 | out
|
155 155 | })
|
156 156 | .property(
|
157 157 | "authSchemes",
|
158 158 | vec![::aws_smithy_types::Document::from({
|
159 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
159 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
160 160 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
161 161 | out.insert("name".to_string(), "sigv4".to_string().into());
|
162 162 | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
163 163 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
164 164 | out
|
165 165 | })],
|
166 166 | )
|
167 167 | .build());
|
168 168 | }
|
169 169 | if (*use_dual_stack) == (true) {
|
170 170 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
171 171 | .url({
|
172 172 | let mut out = String::new();
|
173 173 | out.push_str("https://s3-outposts.");
|
174 174 | #[allow(clippy::needless_borrow)]
|
175 175 | out.push_str(®ion.as_ref() as &str);
|
176 176 | out.push('.');
|
177 177 | #[allow(clippy::needless_borrow)]
|
178 178 | out.push_str(&partition_result.dual_stack_dns_suffix());
|
179 179 | out
|
180 180 | })
|
181 181 | .property(
|
182 182 | "authSchemes",
|
183 183 | vec![::aws_smithy_types::Document::from({
|
184 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
184 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
185 185 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
186 186 | out.insert("name".to_string(), "sigv4".to_string().into());
|
187 187 | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
188 188 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
189 189 | out
|
190 190 | })],
|
191 191 | )
|
192 192 | .build());
|
193 193 | }
|
194 194 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
195 195 | .url({
|
196 196 | let mut out = String::new();
|
197 197 | out.push_str("https://s3-outposts.");
|
198 198 | #[allow(clippy::needless_borrow)]
|
199 199 | out.push_str(®ion.as_ref() as &str);
|
200 200 | out.push('.');
|
201 201 | #[allow(clippy::needless_borrow)]
|
202 202 | out.push_str(&partition_result.dns_suffix());
|
203 203 | out
|
204 204 | })
|
205 205 | .property(
|
206 206 | "authSchemes",
|
207 207 | vec![::aws_smithy_types::Document::from({
|
208 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
208 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
209 209 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
210 210 | out.insert("name".to_string(), "sigv4".to_string().into());
|
211 211 | out.insert("signingName".to_string(), "s3-outposts".to_string().into());
|
212 212 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
213 213 | out
|
214 214 | })],
|
215 215 | )
|
216 216 | .build());
|
217 217 | }
|
218 218 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
398 399 | #[allow(clippy::needless_borrow)]
|
399 400 | out.push_str(&url.scheme());
|
400 401 | out.push_str("://");
|
401 402 | #[allow(clippy::needless_borrow)]
|
402 403 | out.push_str(&url.authority());
|
403 404 | out
|
404 405 | })
|
405 406 | .property(
|
406 407 | "authSchemes",
|
407 408 | vec![::aws_smithy_types::Document::from({
|
408 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
409 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
409 410 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
410 411 | out.insert("name".to_string(), "sigv4".to_string().into());
|
411 412 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
412 413 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
413 414 | out
|
414 415 | })],
|
415 416 | )
|
416 417 | .build());
|
417 418 | }
|
418 419 | }
|
419 420 | #[allow(unused_variables)]
|
420 421 | if let Some(s3express_availability_zone_id) =
|
421 422 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 15, true, _diagnostic_collector)
|
422 423 | {
|
423 424 | #[allow(unused_variables)]
|
424 425 | if let Some(s3express_availability_zone_delim) =
|
425 426 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 15, 17, true, _diagnostic_collector)
|
426 427 | {
|
427 428 | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
428 429 | if (*use_fips) == (true) {
|
429 430 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
430 431 | .url({
|
431 432 | let mut out = String::new();
|
432 433 | out.push_str("https://s3express-control-fips.");
|
433 434 | #[allow(clippy::needless_borrow)]
|
434 435 | out.push_str(®ion.as_ref() as &str);
|
435 436 | out.push('.');
|
436 437 | #[allow(clippy::needless_borrow)]
|
437 438 | out.push_str(&partition_result.dns_suffix());
|
438 439 | out
|
439 440 | })
|
440 441 | .property(
|
441 442 | "authSchemes",
|
442 443 | vec![::aws_smithy_types::Document::from({
|
443 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
444 + | let mut out =
|
445 + | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
444 446 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
445 447 | out.insert("name".to_string(), "sigv4".to_string().into());
|
446 448 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
447 449 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
448 450 | out
|
449 451 | })],
|
450 452 | )
|
451 453 | .build());
|
452 454 | }
|
453 455 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
454 456 | .url({
|
455 457 | let mut out = String::new();
|
456 458 | out.push_str("https://s3express-control.");
|
457 459 | #[allow(clippy::needless_borrow)]
|
458 460 | out.push_str(®ion.as_ref() as &str);
|
459 461 | out.push('.');
|
460 462 | #[allow(clippy::needless_borrow)]
|
461 463 | out.push_str(&partition_result.dns_suffix());
|
462 464 | out
|
463 465 | })
|
464 466 | .property(
|
465 467 | "authSchemes",
|
466 468 | vec![::aws_smithy_types::Document::from({
|
467 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
469 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
468 470 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
469 471 | out.insert("name".to_string(), "sigv4".to_string().into());
|
470 472 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
471 473 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
472 474 | out
|
473 475 | })],
|
474 476 | )
|
475 477 | .build());
|
476 478 | }
|
477 479 | }
|
478 480 | }
|
479 481 | #[allow(unused_variables)]
|
480 482 | if let Some(s3express_availability_zone_id) =
|
481 483 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 16, true, _diagnostic_collector)
|
482 484 | {
|
483 485 | #[allow(unused_variables)]
|
484 486 | if let Some(s3express_availability_zone_delim) =
|
485 487 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 16, 18, true, _diagnostic_collector)
|
486 488 | {
|
487 489 | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
488 490 | if (*use_fips) == (true) {
|
489 491 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
490 492 | .url({
|
491 493 | let mut out = String::new();
|
492 494 | out.push_str("https://s3express-control-fips.");
|
493 495 | #[allow(clippy::needless_borrow)]
|
494 496 | out.push_str(®ion.as_ref() as &str);
|
495 497 | out.push('.');
|
496 498 | #[allow(clippy::needless_borrow)]
|
497 499 | out.push_str(&partition_result.dns_suffix());
|
498 500 | out
|
499 501 | })
|
500 502 | .property(
|
501 503 | "authSchemes",
|
502 504 | vec![::aws_smithy_types::Document::from({
|
503 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
505 + | let mut out =
|
506 + | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
504 507 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
505 508 | out.insert("name".to_string(), "sigv4".to_string().into());
|
506 509 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
507 510 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
508 511 | out
|
509 512 | })],
|
510 513 | )
|
511 514 | .build());
|
512 515 | }
|
513 516 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
514 517 | .url({
|
515 518 | let mut out = String::new();
|
516 519 | out.push_str("https://s3express-control.");
|
517 520 | #[allow(clippy::needless_borrow)]
|
518 521 | out.push_str(®ion.as_ref() as &str);
|
519 522 | out.push('.');
|
520 523 | #[allow(clippy::needless_borrow)]
|
521 524 | out.push_str(&partition_result.dns_suffix());
|
522 525 | out
|
523 526 | })
|
524 527 | .property(
|
525 528 | "authSchemes",
|
526 529 | vec![::aws_smithy_types::Document::from({
|
527 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
530 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
528 531 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
529 532 | out.insert("name".to_string(), "sigv4".to_string().into());
|
530 533 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
531 534 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
532 535 | out
|
533 536 | })],
|
534 537 | )
|
535 538 | .build());
|
536 539 | }
|
537 540 | }
|
538 541 | }
|
539 542 | #[allow(unused_variables)]
|
540 543 | if let Some(s3express_availability_zone_id) =
|
541 544 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 20, true, _diagnostic_collector)
|
542 545 | {
|
543 546 | #[allow(unused_variables)]
|
544 547 | if let Some(s3express_availability_zone_delim) =
|
545 548 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 20, 22, true, _diagnostic_collector)
|
546 549 | {
|
547 550 | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
548 551 | if (*use_fips) == (true) {
|
549 552 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
550 553 | .url({
|
551 554 | let mut out = String::new();
|
552 555 | out.push_str("https://s3express-control-fips.");
|
553 556 | #[allow(clippy::needless_borrow)]
|
554 557 | out.push_str(®ion.as_ref() as &str);
|
555 558 | out.push('.');
|
556 559 | #[allow(clippy::needless_borrow)]
|
557 560 | out.push_str(&partition_result.dns_suffix());
|
558 561 | out
|
559 562 | })
|
560 563 | .property(
|
561 564 | "authSchemes",
|
562 565 | vec![::aws_smithy_types::Document::from({
|
563 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
566 + | let mut out =
|
567 + | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
564 568 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
565 569 | out.insert("name".to_string(), "sigv4".to_string().into());
|
566 570 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
567 571 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
568 572 | out
|
569 573 | })],
|
570 574 | )
|
571 575 | .build());
|
572 576 | }
|
573 577 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
574 578 | .url({
|
575 579 | let mut out = String::new();
|
576 580 | out.push_str("https://s3express-control.");
|
577 581 | #[allow(clippy::needless_borrow)]
|
578 582 | out.push_str(®ion.as_ref() as &str);
|
579 583 | out.push('.');
|
580 584 | #[allow(clippy::needless_borrow)]
|
581 585 | out.push_str(&partition_result.dns_suffix());
|
582 586 | out
|
583 587 | })
|
584 588 | .property(
|
585 589 | "authSchemes",
|
586 590 | vec![::aws_smithy_types::Document::from({
|
587 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
591 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
588 592 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
589 593 | out.insert("name".to_string(), "sigv4".to_string().into());
|
590 594 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
591 595 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
592 596 | out
|
593 597 | })],
|
594 598 | )
|
595 599 | .build());
|
596 600 | }
|
597 601 | }
|
598 602 | }
|
599 603 | #[allow(unused_variables)]
|
600 604 | if let Some(s3express_availability_zone_id) =
|
601 605 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 21, true, _diagnostic_collector)
|
602 606 | {
|
603 607 | #[allow(unused_variables)]
|
604 608 | if let Some(s3express_availability_zone_delim) =
|
605 609 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 21, 23, true, _diagnostic_collector)
|
606 610 | {
|
607 611 | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
608 612 | if (*use_fips) == (true) {
|
609 613 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
610 614 | .url({
|
611 615 | let mut out = String::new();
|
612 616 | out.push_str("https://s3express-control-fips.");
|
613 617 | #[allow(clippy::needless_borrow)]
|
614 618 | out.push_str(®ion.as_ref() as &str);
|
615 619 | out.push('.');
|
616 620 | #[allow(clippy::needless_borrow)]
|
617 621 | out.push_str(&partition_result.dns_suffix());
|
618 622 | out
|
619 623 | })
|
620 624 | .property(
|
621 625 | "authSchemes",
|
622 626 | vec![::aws_smithy_types::Document::from({
|
623 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
627 + | let mut out =
|
628 + | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
624 629 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
625 630 | out.insert("name".to_string(), "sigv4".to_string().into());
|
626 631 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
627 632 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
628 633 | out
|
629 634 | })],
|
630 635 | )
|
631 636 | .build());
|
632 637 | }
|
633 638 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
634 639 | .url({
|
635 640 | let mut out = String::new();
|
636 641 | out.push_str("https://s3express-control.");
|
637 642 | #[allow(clippy::needless_borrow)]
|
638 643 | out.push_str(®ion.as_ref() as &str);
|
639 644 | out.push('.');
|
640 645 | #[allow(clippy::needless_borrow)]
|
641 646 | out.push_str(&partition_result.dns_suffix());
|
642 647 | out
|
643 648 | })
|
644 649 | .property(
|
645 650 | "authSchemes",
|
646 651 | vec![::aws_smithy_types::Document::from({
|
647 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
652 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
648 653 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
649 654 | out.insert("name".to_string(), "sigv4".to_string().into());
|
650 655 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
651 656 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
652 657 | out
|
653 658 | })],
|
654 659 | )
|
655 660 | .build());
|
656 661 | }
|
657 662 | }
|
658 663 | }
|
659 664 | #[allow(unused_variables)]
|
660 665 | if let Some(s3express_availability_zone_id) =
|
661 666 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 7, 27, true, _diagnostic_collector)
|
662 667 | {
|
663 668 | #[allow(unused_variables)]
|
664 669 | if let Some(s3express_availability_zone_delim) =
|
665 670 | crate::endpoint_lib::substring::substring(access_point_name.as_ref() as &str, 27, 29, true, _diagnostic_collector)
|
666 671 | {
|
667 672 | if (s3express_availability_zone_delim.as_ref() as &str) == ("--") {
|
668 673 | if (*use_fips) == (true) {
|
669 674 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
670 675 | .url({
|
671 676 | let mut out = String::new();
|
672 677 | out.push_str("https://s3express-control-fips.");
|
673 678 | #[allow(clippy::needless_borrow)]
|
674 679 | out.push_str(®ion.as_ref() as &str);
|
675 680 | out.push('.');
|
676 681 | #[allow(clippy::needless_borrow)]
|
677 682 | out.push_str(&partition_result.dns_suffix());
|
678 683 | out
|
679 684 | })
|
680 685 | .property(
|
681 686 | "authSchemes",
|
682 687 | vec![::aws_smithy_types::Document::from({
|
683 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
688 + | let mut out =
|
689 + | ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
684 690 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
685 691 | out.insert("name".to_string(), "sigv4".to_string().into());
|
686 692 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
687 693 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
688 694 | out
|
689 695 | })],
|
690 696 | )
|
691 697 | .build());
|
692 698 | }
|
693 699 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
694 700 | .url({
|
695 701 | let mut out = String::new();
|
696 702 | out.push_str("https://s3express-control.");
|
697 703 | #[allow(clippy::needless_borrow)]
|
698 704 | out.push_str(®ion.as_ref() as &str);
|
699 705 | out.push('.');
|
700 706 | #[allow(clippy::needless_borrow)]
|
701 707 | out.push_str(&partition_result.dns_suffix());
|
702 708 | out
|
703 709 | })
|
704 710 | .property(
|
705 711 | "authSchemes",
|
706 712 | vec![::aws_smithy_types::Document::from({
|
707 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
713 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
708 714 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
709 715 | out.insert("name".to_string(), "sigv4".to_string().into());
|
710 716 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
711 717 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
712 718 | out
|
713 719 | })],
|
714 720 | )
|
715 721 | .build());
|
716 722 | }
|
717 723 | }
|
718 724 | }
|
719 725 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
720 726 | "Unrecognized S3Express Access Point name format.".to_string(),
|
721 727 | ));
|
722 728 | }
|
723 729 | #[allow(unreachable_code)]
|
724 730 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
725 731 | "No rules matched these parameters. This is a bug. {_params:?}"
|
726 732 | )));
|
727 733 | }
|
728 734 | }
|
729 735 | }
|
730 736 | #[allow(unused_variables)]
|
731 737 | if let Some(use_s3_express_control_endpoint) = use_s3_express_control_endpoint {
|
732 738 | if (*use_s3_express_control_endpoint) == (true) {
|
733 739 | #[allow(unused_variables)]
|
734 740 | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
735 741 | #[allow(unused_variables)]
|
736 742 | if let Some(endpoint) = endpoint {
|
737 743 | if (*use_dual_stack) == (true) {
|
738 744 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
739 745 | "Invalid Configuration: DualStack and custom endpoint are not supported".to_string(),
|
740 746 | ));
|
741 747 | }
|
742 748 | }
|
743 749 | if (*use_dual_stack) == (true) {
|
744 750 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
745 751 | "S3Express does not support Dual-stack.".to_string(),
|
746 752 | ));
|
747 753 | }
|
748 754 | #[allow(unused_variables)]
|
749 755 | if let Some(endpoint) = endpoint {
|
750 756 | #[allow(unused_variables)]
|
751 757 | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
752 758 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
753 759 | .url({
|
754 760 | let mut out = String::new();
|
755 761 | #[allow(clippy::needless_borrow)]
|
756 762 | out.push_str(&url.scheme());
|
757 763 | out.push_str("://");
|
758 764 | #[allow(clippy::needless_borrow)]
|
759 765 | out.push_str(&url.authority());
|
760 766 | out
|
761 767 | })
|
762 768 | .property(
|
763 769 | "authSchemes",
|
764 770 | vec![::aws_smithy_types::Document::from({
|
765 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
771 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
766 772 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
767 773 | out.insert("name".to_string(), "sigv4".to_string().into());
|
768 774 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
769 775 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
770 776 | out
|
771 777 | })],
|
772 778 | )
|
773 779 | .build());
|
774 780 | }
|
775 781 | }
|
776 782 | if (*use_fips) == (true) {
|
777 783 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
778 784 | .url({
|
779 785 | let mut out = String::new();
|
780 786 | out.push_str("https://s3express-control-fips.");
|
781 787 | #[allow(clippy::needless_borrow)]
|
782 788 | out.push_str(®ion.as_ref() as &str);
|
783 789 | out.push('.');
|
784 790 | #[allow(clippy::needless_borrow)]
|
785 791 | out.push_str(&partition_result.dns_suffix());
|
786 792 | out
|
787 793 | })
|
788 794 | .property(
|
789 795 | "authSchemes",
|
790 796 | vec![::aws_smithy_types::Document::from({
|
791 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
797 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
792 798 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
793 799 | out.insert("name".to_string(), "sigv4".to_string().into());
|
794 800 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
795 801 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
796 802 | out
|
797 803 | })],
|
798 804 | )
|
799 805 | .build());
|
800 806 | }
|
801 807 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
802 808 | .url({
|
803 809 | let mut out = String::new();
|
804 810 | out.push_str("https://s3express-control.");
|
805 811 | #[allow(clippy::needless_borrow)]
|
806 812 | out.push_str(®ion.as_ref() as &str);
|
807 813 | out.push('.');
|
808 814 | #[allow(clippy::needless_borrow)]
|
809 815 | out.push_str(&partition_result.dns_suffix());
|
810 816 | out
|
811 817 | })
|
812 818 | .property(
|
813 819 | "authSchemes",
|
814 820 | vec![::aws_smithy_types::Document::from({
|
815 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
821 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
816 822 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
817 823 | out.insert("name".to_string(), "sigv4".to_string().into());
|
818 824 | out.insert("signingName".to_string(), "s3express".to_string().into());
|
819 825 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
820 826 | out
|
821 827 | })],
|
822 828 | )
|
823 829 | .build());
|
824 830 | }
|
825 831 | #[allow(unreachable_code)]
|
826 832 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(format!(
|
827 833 | "No rules matched these parameters. This is a bug. {_params:?}"
|
828 834 | )));
|
829 835 | }
|
830 836 | }
|
831 837 | if (region.as_ref() as &str) == ("snow") {
|
832 838 | #[allow(unused_variables)]
|
833 839 | if let Some(endpoint) = endpoint {
|
834 840 | #[allow(unused_variables)]
|
835 841 | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(endpoint.as_ref() as &str, _diagnostic_collector) {
|
836 842 | #[allow(unused_variables)]
|
837 843 | if let Some(partition_result) = partition_resolver.resolve_partition(region.as_ref() as &str, _diagnostic_collector) {
|
838 844 | if (*use_dual_stack) == (true) {
|
839 845 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
840 846 | "S3 Snow does not support DualStack".to_string(),
|
841 847 | ));
|
842 848 | }
|
843 849 | if (*use_fips) == (true) {
|
844 850 | return Err(::aws_smithy_http::endpoint::ResolveEndpointError::message(
|
845 851 | "S3 Snow does not support FIPS".to_string(),
|
846 852 | ));
|
847 853 | }
|
848 854 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
849 855 | .url({
|
850 856 | let mut out = String::new();
|
851 857 | #[allow(clippy::needless_borrow)]
|
852 858 | out.push_str(&url.scheme());
|
853 859 | out.push_str("://");
|
854 860 | #[allow(clippy::needless_borrow)]
|
855 861 | out.push_str(&url.authority());
|
856 862 | out
|
857 863 | })
|
858 864 | .property(
|
859 865 | "authSchemes",
|
860 866 | vec![::aws_smithy_types::Document::from({
|
861 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
867 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
862 868 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
863 869 | out.insert("name".to_string(), "sigv4".to_string().into());
|
864 870 | out.insert("signingName".to_string(), "s3".to_string().into());
|
865 871 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
866 872 | out
|
867 873 | })],
|
868 874 | )
|
869 875 | .build());
|
870 876 | }
|
871 877 | #[allow(unreachable_code)]
|
970 976 | "x-amz-account-id",
|
971 977 | access_point_arn.account_id().to_owned(),
|
972 978 | )
|
973 979 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
974 980 | .property(
|
975 981 | "authSchemes",
|
976 982 | vec![::aws_smithy_types::Document::from({
|
977 983 | let mut out = ::std::collections::HashMap::<
|
978 984 | String,
|
979 985 | ::aws_smithy_types::Document,
|
980 - | >::new(
|
986 + | >::with_capacity(
|
987 + | 4
|
981 988 | );
|
982 989 | out.insert(
|
983 990 | "disableDoubleEncoding".to_string(),
|
984 991 | true.into(),
|
985 992 | );
|
986 993 | out.insert(
|
987 994 | "name".to_string(),
|
988 995 | "sigv4".to_string().into(),
|
989 996 | );
|
990 997 | out.insert(
|
991 998 | "signingName".to_string(),
|
992 999 | "s3-outposts".to_string().into(),
|
993 1000 | );
|
994 1001 | out.insert(
|
995 1002 | "signingRegion".to_string(),
|
996 1003 | access_point_arn.region().to_owned().into(),
|
997 1004 | );
|
998 1005 | out
|
999 1006 | })],
|
1000 1007 | )
|
1001 1008 | .build());
|
1002 1009 | }
|
1003 1010 | }
|
1004 1011 | if (*use_fips) == (true) {
|
1005 1012 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1006 1013 | .url({
|
1007 1014 | let mut out = String::new();
|
1008 1015 | out.push_str("https://s3-outposts-fips.");
|
1009 1016 | #[allow(clippy::needless_borrow)]
|
1010 1017 | out.push_str(&access_point_arn.region());
|
1011 1018 | out.push('.');
|
1012 1019 | #[allow(clippy::needless_borrow)]
|
1013 1020 | out.push_str(&arn_partition.dns_suffix());
|
1014 1021 | out
|
1015 1022 | })
|
1016 1023 | .header("x-amz-account-id", access_point_arn.account_id().to_owned())
|
1017 1024 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1018 1025 | .property(
|
1019 1026 | "authSchemes",
|
1020 1027 | vec![::aws_smithy_types::Document::from({
|
1021 1028 | let mut out = ::std::collections::HashMap::<
|
1022 1029 | String,
|
1023 1030 | ::aws_smithy_types::Document,
|
1024 - | >::new(
|
1031 + | >::with_capacity(
|
1032 + | 4
|
1025 1033 | );
|
1026 1034 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1027 1035 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1028 1036 | out.insert(
|
1029 1037 | "signingName".to_string(),
|
1030 1038 | "s3-outposts".to_string().into(),
|
1031 1039 | );
|
1032 1040 | out.insert(
|
1033 1041 | "signingRegion".to_string(),
|
1034 1042 | access_point_arn.region().to_owned().into(),
|
1035 1043 | );
|
1036 1044 | out
|
1037 1045 | })],
|
1038 1046 | )
|
1039 1047 | .build());
|
1040 1048 | }
|
1041 1049 | if (*use_dual_stack) == (true) {
|
1042 1050 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1043 1051 | .url({
|
1044 1052 | let mut out = String::new();
|
1045 1053 | out.push_str("https://s3-outposts.");
|
1046 1054 | #[allow(clippy::needless_borrow)]
|
1047 1055 | out.push_str(&access_point_arn.region());
|
1048 1056 | out.push('.');
|
1049 1057 | #[allow(clippy::needless_borrow)]
|
1050 1058 | out.push_str(&arn_partition.dual_stack_dns_suffix());
|
1051 1059 | out
|
1052 1060 | })
|
1053 1061 | .header("x-amz-account-id", access_point_arn.account_id().to_owned())
|
1054 1062 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1055 1063 | .property(
|
1056 1064 | "authSchemes",
|
1057 1065 | vec![::aws_smithy_types::Document::from({
|
1058 1066 | let mut out = ::std::collections::HashMap::<
|
1059 1067 | String,
|
1060 1068 | ::aws_smithy_types::Document,
|
1061 - | >::new(
|
1069 + | >::with_capacity(
|
1070 + | 4
|
1062 1071 | );
|
1063 1072 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1064 1073 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1065 1074 | out.insert(
|
1066 1075 | "signingName".to_string(),
|
1067 1076 | "s3-outposts".to_string().into(),
|
1068 1077 | );
|
1069 1078 | out.insert(
|
1070 1079 | "signingRegion".to_string(),
|
1071 1080 | access_point_arn.region().to_owned().into(),
|
1072 1081 | );
|
1073 1082 | out
|
1074 1083 | })],
|
1075 1084 | )
|
1076 1085 | .build());
|
1077 1086 | }
|
1078 1087 | #[allow(unused_variables)]
|
1079 1088 | if let Some(endpoint) = endpoint {
|
1080 1089 | #[allow(unused_variables)]
|
1081 1090 | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
|
1082 1091 | endpoint.as_ref() as &str,
|
1083 1092 | _diagnostic_collector,
|
1084 1093 | ) {
|
1085 1094 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1086 1095 | .url({
|
1087 1096 | let mut out = String::new();
|
1088 1097 | #[allow(clippy::needless_borrow)]
|
1089 1098 | out.push_str(&url.scheme());
|
1090 1099 | out.push_str("://");
|
1091 1100 | #[allow(clippy::needless_borrow)]
|
1092 1101 | out.push_str(&url.authority());
|
1093 1102 | #[allow(clippy::needless_borrow)]
|
1094 1103 | out.push_str(&url.path());
|
1095 1104 | out
|
1096 1105 | })
|
1097 1106 | .header(
|
1098 1107 | "x-amz-account-id",
|
1099 1108 | access_point_arn.account_id().to_owned(),
|
1100 1109 | )
|
1101 1110 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1102 1111 | .property(
|
1103 1112 | "authSchemes",
|
1104 1113 | vec![::aws_smithy_types::Document::from({
|
1105 1114 | let mut out = ::std::collections::HashMap::<
|
1106 1115 | String,
|
1107 1116 | ::aws_smithy_types::Document,
|
1108 - | >::new(
|
1117 + | >::with_capacity(
|
1118 + | 4
|
1109 1119 | );
|
1110 1120 | out.insert(
|
1111 1121 | "disableDoubleEncoding".to_string(),
|
1112 1122 | true.into(),
|
1113 1123 | );
|
1114 1124 | out.insert(
|
1115 1125 | "name".to_string(),
|
1116 1126 | "sigv4".to_string().into(),
|
1117 1127 | );
|
1118 1128 | out.insert(
|
1119 1129 | "signingName".to_string(),
|
1120 1130 | "s3-outposts".to_string().into(),
|
1121 1131 | );
|
1122 1132 | out.insert(
|
1123 1133 | "signingRegion".to_string(),
|
1124 1134 | access_point_arn.region().to_owned().into(),
|
1125 1135 | );
|
1126 1136 | out
|
1127 1137 | })],
|
1128 1138 | )
|
1129 1139 | .build());
|
1130 1140 | }
|
1131 1141 | }
|
1132 1142 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1133 1143 | .url({
|
1134 1144 | let mut out = String::new();
|
1135 1145 | out.push_str("https://s3-outposts.");
|
1136 1146 | #[allow(clippy::needless_borrow)]
|
1137 1147 | out.push_str(&access_point_arn.region());
|
1138 1148 | out.push('.');
|
1139 1149 | #[allow(clippy::needless_borrow)]
|
1140 1150 | out.push_str(&arn_partition.dns_suffix());
|
1141 1151 | out
|
1142 1152 | })
|
1143 1153 | .header("x-amz-account-id", access_point_arn.account_id().to_owned())
|
1144 1154 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1145 1155 | .property(
|
1146 1156 | "authSchemes",
|
1147 1157 | vec![::aws_smithy_types::Document::from({
|
1148 1158 | let mut out = ::std::collections::HashMap::<
|
1149 1159 | String,
|
1150 1160 | ::aws_smithy_types::Document,
|
1151 - | >::new(
|
1161 + | >::with_capacity(
|
1162 + | 4
|
1152 1163 | );
|
1153 1164 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1154 1165 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1155 1166 | out.insert(
|
1156 1167 | "signingName".to_string(),
|
1157 1168 | "s3-outposts".to_string().into(),
|
1158 1169 | );
|
1159 1170 | out.insert(
|
1160 1171 | "signingRegion".to_string(),
|
1161 1172 | access_point_arn.region().to_owned().into(),
|
1338 1349 | out
|
1339 1350 | })
|
1340 1351 | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1341 1352 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1342 1353 | .property(
|
1343 1354 | "authSchemes",
|
1344 1355 | vec![::aws_smithy_types::Document::from({
|
1345 1356 | let mut out = ::std::collections::HashMap::<
|
1346 1357 | String,
|
1347 1358 | ::aws_smithy_types::Document,
|
1348 - | >::new(
|
1359 + | >::with_capacity(
|
1360 + | 4
|
1349 1361 | );
|
1350 1362 | out.insert(
|
1351 1363 | "disableDoubleEncoding".to_string(),
|
1352 1364 | true.into(),
|
1353 1365 | );
|
1354 1366 | out.insert(
|
1355 1367 | "name".to_string(),
|
1356 1368 | "sigv4".to_string().into(),
|
1357 1369 | );
|
1358 1370 | out.insert(
|
1359 1371 | "signingName".to_string(),
|
1360 1372 | "s3-outposts".to_string().into(),
|
1361 1373 | );
|
1362 1374 | out.insert(
|
1363 1375 | "signingRegion".to_string(),
|
1364 1376 | bucket_arn.region().to_owned().into(),
|
1365 1377 | );
|
1366 1378 | out
|
1367 1379 | })],
|
1368 1380 | )
|
1369 1381 | .build());
|
1370 1382 | }
|
1371 1383 | }
|
1372 1384 | if (*use_fips) == (true) {
|
1373 1385 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1374 1386 | .url({
|
1375 1387 | let mut out = String::new();
|
1376 1388 | out.push_str("https://s3-outposts-fips.");
|
1377 1389 | #[allow(clippy::needless_borrow)]
|
1378 1390 | out.push_str(&bucket_arn.region());
|
1379 1391 | out.push('.');
|
1380 1392 | #[allow(clippy::needless_borrow)]
|
1381 1393 | out.push_str(&arn_partition.dns_suffix());
|
1382 1394 | out
|
1383 1395 | })
|
1384 1396 | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1385 1397 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1386 1398 | .property(
|
1387 1399 | "authSchemes",
|
1388 1400 | vec![::aws_smithy_types::Document::from({
|
1389 1401 | let mut out = ::std::collections::HashMap::<
|
1390 1402 | String,
|
1391 1403 | ::aws_smithy_types::Document,
|
1392 - | >::new(
|
1404 + | >::with_capacity(
|
1405 + | 4
|
1393 1406 | );
|
1394 1407 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1395 1408 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1396 1409 | out.insert(
|
1397 1410 | "signingName".to_string(),
|
1398 1411 | "s3-outposts".to_string().into(),
|
1399 1412 | );
|
1400 1413 | out.insert(
|
1401 1414 | "signingRegion".to_string(),
|
1402 1415 | bucket_arn.region().to_owned().into(),
|
1403 1416 | );
|
1404 1417 | out
|
1405 1418 | })],
|
1406 1419 | )
|
1407 1420 | .build());
|
1408 1421 | }
|
1409 1422 | if (*use_dual_stack) == (true) {
|
1410 1423 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1411 1424 | .url({
|
1412 1425 | let mut out = String::new();
|
1413 1426 | out.push_str("https://s3-outposts.");
|
1414 1427 | #[allow(clippy::needless_borrow)]
|
1415 1428 | out.push_str(&bucket_arn.region());
|
1416 1429 | out.push('.');
|
1417 1430 | #[allow(clippy::needless_borrow)]
|
1418 1431 | out.push_str(&arn_partition.dual_stack_dns_suffix());
|
1419 1432 | out
|
1420 1433 | })
|
1421 1434 | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1422 1435 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1423 1436 | .property(
|
1424 1437 | "authSchemes",
|
1425 1438 | vec![::aws_smithy_types::Document::from({
|
1426 1439 | let mut out = ::std::collections::HashMap::<
|
1427 1440 | String,
|
1428 1441 | ::aws_smithy_types::Document,
|
1429 - | >::new(
|
1442 + | >::with_capacity(
|
1443 + | 4
|
1430 1444 | );
|
1431 1445 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1432 1446 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1433 1447 | out.insert(
|
1434 1448 | "signingName".to_string(),
|
1435 1449 | "s3-outposts".to_string().into(),
|
1436 1450 | );
|
1437 1451 | out.insert(
|
1438 1452 | "signingRegion".to_string(),
|
1439 1453 | bucket_arn.region().to_owned().into(),
|
1440 1454 | );
|
1441 1455 | out
|
1442 1456 | })],
|
1443 1457 | )
|
1444 1458 | .build());
|
1445 1459 | }
|
1446 1460 | #[allow(unused_variables)]
|
1447 1461 | if let Some(endpoint) = endpoint {
|
1448 1462 | #[allow(unused_variables)]
|
1449 1463 | if let Some(url) = crate::endpoint_lib::parse_url::parse_url(
|
1450 1464 | endpoint.as_ref() as &str,
|
1451 1465 | _diagnostic_collector,
|
1452 1466 | ) {
|
1453 1467 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1454 1468 | .url({
|
1455 1469 | let mut out = String::new();
|
1456 1470 | #[allow(clippy::needless_borrow)]
|
1457 1471 | out.push_str(&url.scheme());
|
1458 1472 | out.push_str("://");
|
1459 1473 | #[allow(clippy::needless_borrow)]
|
1460 1474 | out.push_str(&url.authority());
|
1461 1475 | #[allow(clippy::needless_borrow)]
|
1462 1476 | out.push_str(&url.path());
|
1463 1477 | out
|
1464 1478 | })
|
1465 1479 | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1466 1480 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1467 1481 | .property(
|
1468 1482 | "authSchemes",
|
1469 1483 | vec![::aws_smithy_types::Document::from({
|
1470 1484 | let mut out = ::std::collections::HashMap::<
|
1471 1485 | String,
|
1472 1486 | ::aws_smithy_types::Document,
|
1473 - | >::new(
|
1487 + | >::with_capacity(
|
1488 + | 4
|
1474 1489 | );
|
1475 1490 | out.insert(
|
1476 1491 | "disableDoubleEncoding".to_string(),
|
1477 1492 | true.into(),
|
1478 1493 | );
|
1479 1494 | out.insert(
|
1480 1495 | "name".to_string(),
|
1481 1496 | "sigv4".to_string().into(),
|
1482 1497 | );
|
1483 1498 | out.insert(
|
1484 1499 | "signingName".to_string(),
|
1485 1500 | "s3-outposts".to_string().into(),
|
1486 1501 | );
|
1487 1502 | out.insert(
|
1488 1503 | "signingRegion".to_string(),
|
1489 1504 | bucket_arn.region().to_owned().into(),
|
1490 1505 | );
|
1491 1506 | out
|
1492 1507 | })],
|
1493 1508 | )
|
1494 1509 | .build());
|
1495 1510 | }
|
1496 1511 | }
|
1497 1512 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1498 1513 | .url({
|
1499 1514 | let mut out = String::new();
|
1500 1515 | out.push_str("https://s3-outposts.");
|
1501 1516 | #[allow(clippy::needless_borrow)]
|
1502 1517 | out.push_str(&bucket_arn.region());
|
1503 1518 | out.push('.');
|
1504 1519 | #[allow(clippy::needless_borrow)]
|
1505 1520 | out.push_str(&arn_partition.dns_suffix());
|
1506 1521 | out
|
1507 1522 | })
|
1508 1523 | .header("x-amz-account-id", bucket_arn.account_id().to_owned())
|
1509 1524 | .header("x-amz-outpost-id", outpost_id.to_owned())
|
1510 1525 | .property(
|
1511 1526 | "authSchemes",
|
1512 1527 | vec![::aws_smithy_types::Document::from({
|
1513 1528 | let mut out = ::std::collections::HashMap::<
|
1514 1529 | String,
|
1515 1530 | ::aws_smithy_types::Document,
|
1516 - | >::new(
|
1531 + | >::with_capacity(
|
1532 + | 4
|
1517 1533 | );
|
1518 1534 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1519 1535 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1520 1536 | out.insert(
|
1521 1537 | "signingName".to_string(),
|
1522 1538 | "s3-outposts".to_string().into(),
|
1523 1539 | );
|
1524 1540 | out.insert(
|
1525 1541 | "signingRegion".to_string(),
|
1526 1542 | bucket_arn.region().to_owned().into(),
|
1663 1679 | out.push('.');
|
1664 1680 | #[allow(clippy::needless_borrow)]
|
1665 1681 | out.push_str(&url.authority());
|
1666 1682 | #[allow(clippy::needless_borrow)]
|
1667 1683 | out.push_str(&url.path());
|
1668 1684 | out
|
1669 1685 | })
|
1670 1686 | .property(
|
1671 1687 | "authSchemes",
|
1672 1688 | vec![::aws_smithy_types::Document::from({
|
1673 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1689 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1674 1690 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1675 1691 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1676 1692 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1677 1693 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1678 1694 | out
|
1679 1695 | })],
|
1680 1696 | )
|
1681 1697 | .build());
|
1682 1698 | }
|
1683 1699 | }
|
1684 1700 | }
|
1685 1701 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1686 1702 | .url({
|
1687 1703 | let mut out = String::new();
|
1688 1704 | #[allow(clippy::needless_borrow)]
|
1689 1705 | out.push_str(&url.scheme());
|
1690 1706 | out.push_str("://");
|
1691 1707 | #[allow(clippy::needless_borrow)]
|
1692 1708 | out.push_str(&url.authority());
|
1693 1709 | #[allow(clippy::needless_borrow)]
|
1694 1710 | out.push_str(&url.path());
|
1695 1711 | out
|
1696 1712 | })
|
1697 1713 | .property(
|
1698 1714 | "authSchemes",
|
1699 1715 | vec![::aws_smithy_types::Document::from({
|
1700 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1716 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1701 1717 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1702 1718 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1703 1719 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1704 1720 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1705 1721 | out
|
1706 1722 | })],
|
1707 1723 | )
|
1708 1724 | .build());
|
1709 1725 | }
|
1710 1726 | }
|
1711 1727 | if (*use_fips) == (true) {
|
1712 1728 | if (*use_dual_stack) == (true) {
|
1713 1729 | #[allow(unused_variables)]
|
1714 1730 | if let Some(requires_account_id) = requires_account_id {
|
1715 1731 | if (*requires_account_id) == (true) {
|
1716 1732 | #[allow(unused_variables)]
|
1717 1733 | if let Some(account_id) = account_id {
|
1718 1734 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1719 1735 | .url({
|
1720 1736 | let mut out = String::new();
|
1721 1737 | out.push_str("https://");
|
1722 1738 | #[allow(clippy::needless_borrow)]
|
1723 1739 | out.push_str(&account_id.as_ref() as &str);
|
1724 1740 | out.push_str(".s3-control-fips.dualstack.");
|
1725 1741 | #[allow(clippy::needless_borrow)]
|
1726 1742 | out.push_str(®ion.as_ref() as &str);
|
1727 1743 | out.push('.');
|
1728 1744 | #[allow(clippy::needless_borrow)]
|
1729 1745 | out.push_str(&partition_result.dns_suffix());
|
1730 1746 | out
|
1731 1747 | })
|
1732 1748 | .property(
|
1733 1749 | "authSchemes",
|
1734 1750 | vec![::aws_smithy_types::Document::from({
|
1735 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1751 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1736 1752 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1737 1753 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1738 1754 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1739 1755 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1740 1756 | out
|
1741 1757 | })],
|
1742 1758 | )
|
1743 1759 | .build());
|
1744 1760 | }
|
1745 1761 | }
|
1746 1762 | }
|
1747 1763 | }
|
1748 1764 | }
|
1749 1765 | if (*use_fips) == (true) {
|
1750 1766 | if (*use_dual_stack) == (true) {
|
1751 1767 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1752 1768 | .url({
|
1753 1769 | let mut out = String::new();
|
1754 1770 | out.push_str("https://s3-control-fips.dualstack.");
|
1755 1771 | #[allow(clippy::needless_borrow)]
|
1756 1772 | out.push_str(®ion.as_ref() as &str);
|
1757 1773 | out.push('.');
|
1758 1774 | #[allow(clippy::needless_borrow)]
|
1759 1775 | out.push_str(&partition_result.dns_suffix());
|
1760 1776 | out
|
1761 1777 | })
|
1762 1778 | .property(
|
1763 1779 | "authSchemes",
|
1764 1780 | vec![::aws_smithy_types::Document::from({
|
1765 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1781 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1766 1782 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1767 1783 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1768 1784 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1769 1785 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1770 1786 | out
|
1771 1787 | })],
|
1772 1788 | )
|
1773 1789 | .build());
|
1774 1790 | }
|
1775 1791 | }
|
1776 1792 | if (*use_fips) == (true) {
|
1777 1793 | if (*use_dual_stack) == (false) {
|
1778 1794 | #[allow(unused_variables)]
|
1779 1795 | if let Some(requires_account_id) = requires_account_id {
|
1780 1796 | if (*requires_account_id) == (true) {
|
1781 1797 | #[allow(unused_variables)]
|
1782 1798 | if let Some(account_id) = account_id {
|
1783 1799 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1784 1800 | .url({
|
1785 1801 | let mut out = String::new();
|
1786 1802 | out.push_str("https://");
|
1787 1803 | #[allow(clippy::needless_borrow)]
|
1788 1804 | out.push_str(&account_id.as_ref() as &str);
|
1789 1805 | out.push_str(".s3-control-fips.");
|
1790 1806 | #[allow(clippy::needless_borrow)]
|
1791 1807 | out.push_str(®ion.as_ref() as &str);
|
1792 1808 | out.push('.');
|
1793 1809 | #[allow(clippy::needless_borrow)]
|
1794 1810 | out.push_str(&partition_result.dns_suffix());
|
1795 1811 | out
|
1796 1812 | })
|
1797 1813 | .property(
|
1798 1814 | "authSchemes",
|
1799 1815 | vec![::aws_smithy_types::Document::from({
|
1800 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1816 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1801 1817 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1802 1818 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1803 1819 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1804 1820 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1805 1821 | out
|
1806 1822 | })],
|
1807 1823 | )
|
1808 1824 | .build());
|
1809 1825 | }
|
1810 1826 | }
|
1811 1827 | }
|
1812 1828 | }
|
1813 1829 | }
|
1814 1830 | if (*use_fips) == (true) {
|
1815 1831 | if (*use_dual_stack) == (false) {
|
1816 1832 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1817 1833 | .url({
|
1818 1834 | let mut out = String::new();
|
1819 1835 | out.push_str("https://s3-control-fips.");
|
1820 1836 | #[allow(clippy::needless_borrow)]
|
1821 1837 | out.push_str(®ion.as_ref() as &str);
|
1822 1838 | out.push('.');
|
1823 1839 | #[allow(clippy::needless_borrow)]
|
1824 1840 | out.push_str(&partition_result.dns_suffix());
|
1825 1841 | out
|
1826 1842 | })
|
1827 1843 | .property(
|
1828 1844 | "authSchemes",
|
1829 1845 | vec![::aws_smithy_types::Document::from({
|
1830 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1846 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1831 1847 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1832 1848 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1833 1849 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1834 1850 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1835 1851 | out
|
1836 1852 | })],
|
1837 1853 | )
|
1838 1854 | .build());
|
1839 1855 | }
|
1840 1856 | }
|
1841 1857 | if (*use_fips) == (false) {
|
1842 1858 | if (*use_dual_stack) == (true) {
|
1843 1859 | #[allow(unused_variables)]
|
1844 1860 | if let Some(requires_account_id) = requires_account_id {
|
1845 1861 | if (*requires_account_id) == (true) {
|
1846 1862 | #[allow(unused_variables)]
|
1847 1863 | if let Some(account_id) = account_id {
|
1848 1864 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1849 1865 | .url({
|
1850 1866 | let mut out = String::new();
|
1851 1867 | out.push_str("https://");
|
1852 1868 | #[allow(clippy::needless_borrow)]
|
1853 1869 | out.push_str(&account_id.as_ref() as &str);
|
1854 1870 | out.push_str(".s3-control.dualstack.");
|
1855 1871 | #[allow(clippy::needless_borrow)]
|
1856 1872 | out.push_str(®ion.as_ref() as &str);
|
1857 1873 | out.push('.');
|
1858 1874 | #[allow(clippy::needless_borrow)]
|
1859 1875 | out.push_str(&partition_result.dns_suffix());
|
1860 1876 | out
|
1861 1877 | })
|
1862 1878 | .property(
|
1863 1879 | "authSchemes",
|
1864 1880 | vec![::aws_smithy_types::Document::from({
|
1865 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1881 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1866 1882 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1867 1883 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1868 1884 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1869 1885 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1870 1886 | out
|
1871 1887 | })],
|
1872 1888 | )
|
1873 1889 | .build());
|
1874 1890 | }
|
1875 1891 | }
|
1876 1892 | }
|
1877 1893 | }
|
1878 1894 | }
|
1879 1895 | if (*use_fips) == (false) {
|
1880 1896 | if (*use_dual_stack) == (true) {
|
1881 1897 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1882 1898 | .url({
|
1883 1899 | let mut out = String::new();
|
1884 1900 | out.push_str("https://s3-control.dualstack.");
|
1885 1901 | #[allow(clippy::needless_borrow)]
|
1886 1902 | out.push_str(®ion.as_ref() as &str);
|
1887 1903 | out.push('.');
|
1888 1904 | #[allow(clippy::needless_borrow)]
|
1889 1905 | out.push_str(&partition_result.dns_suffix());
|
1890 1906 | out
|
1891 1907 | })
|
1892 1908 | .property(
|
1893 1909 | "authSchemes",
|
1894 1910 | vec![::aws_smithy_types::Document::from({
|
1895 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1911 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1896 1912 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1897 1913 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1898 1914 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1899 1915 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1900 1916 | out
|
1901 1917 | })],
|
1902 1918 | )
|
1903 1919 | .build());
|
1904 1920 | }
|
1905 1921 | }
|
1906 1922 | if (*use_fips) == (false) {
|
1907 1923 | if (*use_dual_stack) == (false) {
|
1908 1924 | #[allow(unused_variables)]
|
1909 1925 | if let Some(requires_account_id) = requires_account_id {
|
1910 1926 | if (*requires_account_id) == (true) {
|
1911 1927 | #[allow(unused_variables)]
|
1912 1928 | if let Some(account_id) = account_id {
|
1913 1929 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1914 1930 | .url({
|
1915 1931 | let mut out = String::new();
|
1916 1932 | out.push_str("https://");
|
1917 1933 | #[allow(clippy::needless_borrow)]
|
1918 1934 | out.push_str(&account_id.as_ref() as &str);
|
1919 1935 | out.push_str(".s3-control.");
|
1920 1936 | #[allow(clippy::needless_borrow)]
|
1921 1937 | out.push_str(®ion.as_ref() as &str);
|
1922 1938 | out.push('.');
|
1923 1939 | #[allow(clippy::needless_borrow)]
|
1924 1940 | out.push_str(&partition_result.dns_suffix());
|
1925 1941 | out
|
1926 1942 | })
|
1927 1943 | .property(
|
1928 1944 | "authSchemes",
|
1929 1945 | vec![::aws_smithy_types::Document::from({
|
1930 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1946 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1931 1947 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1932 1948 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1933 1949 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1934 1950 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1935 1951 | out
|
1936 1952 | })],
|
1937 1953 | )
|
1938 1954 | .build());
|
1939 1955 | }
|
1940 1956 | }
|
1941 1957 | }
|
1942 1958 | }
|
1943 1959 | }
|
1944 1960 | if (*use_fips) == (false) {
|
1945 1961 | if (*use_dual_stack) == (false) {
|
1946 1962 | return Ok(::aws_smithy_types::endpoint::Endpoint::builder()
|
1947 1963 | .url({
|
1948 1964 | let mut out = String::new();
|
1949 1965 | out.push_str("https://s3-control.");
|
1950 1966 | #[allow(clippy::needless_borrow)]
|
1951 1967 | out.push_str(®ion.as_ref() as &str);
|
1952 1968 | out.push('.');
|
1953 1969 | #[allow(clippy::needless_borrow)]
|
1954 1970 | out.push_str(&partition_result.dns_suffix());
|
1955 1971 | out
|
1956 1972 | })
|
1957 1973 | .property(
|
1958 1974 | "authSchemes",
|
1959 1975 | vec![::aws_smithy_types::Document::from({
|
1960 - | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::new();
|
1976 + | let mut out = ::std::collections::HashMap::<String, ::aws_smithy_types::Document>::with_capacity(4);
|
1961 1977 | out.insert("disableDoubleEncoding".to_string(), true.into());
|
1962 1978 | out.insert("name".to_string(), "sigv4".to_string().into());
|
1963 1979 | out.insert("signingName".to_string(), "s3".to_string().into());
|
1964 1980 | out.insert("signingRegion".to_string(), region.to_owned().into());
|
1965 1981 | out
|
1966 1982 | })],
|
1967 1983 | )
|
1968 1984 | .build());
|
1969 1985 | }
|
1970 1986 | }
|