@@ -72,12 +72,6 @@ public class AwsHttpPresignURLClientGenerator implements GoIntegration {
7272 private static final Symbol presignerInterfaceSymbol = SymbolUtils .createPointableSymbolBuilder (
7373 "HTTPPresignerV4"
7474 ).build ();
75-
76- private static final Symbol presignerV4aInterfaceSymbol = SymbolUtils .createPointableSymbolBuilder (
77- "httpPresignerV4a"
78- ).build ();
79-
80-
8175 private static final Symbol v4NewPresignerSymbol = SymbolUtils .createPointableSymbolBuilder (
8276 "NewSigner" , AwsGoDependency .AWS_SIGNER_V4
8377 ).build ();
@@ -182,9 +176,6 @@ public void writeAdditionalFiles(
182176 // generate presigner interface
183177 writePresignInterface (writer , model , symbolProvider , serviceShape );
184178
185- // generate s3 sigv4a presigner interface
186- writePresignV4aInterface (writer , model , symbolProvider , serviceShape );
187-
188179 // generate presign options and helpers per service
189180 writePresignOptionType (writer , model , symbolProvider , serviceShape );
190181
@@ -380,37 +371,6 @@ private void writeConvertToPresignMiddleware(
380371
381372 // s3 service needs expires and sets unsignedPayload if input is stream
382373 if (isS3ServiceShape (model , serviceShape )) {
383-
384- writer .write ("" );
385- writer .write ("// add multi-region access point presigner" );
386-
387- // ==== multi-region access point support
388- Symbol PresignConstructor = SymbolUtils .createValueSymbolBuilder (
389- "NewPresignHTTPRequestMiddleware" , AwsCustomGoDependency .S3_CUSTOMIZATION
390- ).build ();
391-
392- Symbol PresignOptions = SymbolUtils .createValueSymbolBuilder (
393- "PresignHTTPRequestMiddlewareOptions" , AwsCustomGoDependency .S3_CUSTOMIZATION
394- ).build ();
395-
396- Symbol RegisterPresigningMiddleware = SymbolUtils .createValueSymbolBuilder (
397- "RegisterPreSigningMiddleware" , AwsCustomGoDependency .S3_CUSTOMIZATION
398- ).build ();
399-
400- writer .openBlock ("signermv := $T($T{" , "})" ,
401- PresignConstructor ,PresignOptions , () -> {
402- writer .write ("CredentialsProvider : options.Credentials," );
403- writer .write ("V4Presigner : c.Presigner," );
404- writer .write ("V4aPresigner : c.presignerV4a," );
405- writer .write ("LogSigning : options.ClientLogMode.IsSigning()," );
406- });
407-
408- writer .write ("err = $T(stack, signermv)" , RegisterPresigningMiddleware );
409- writer .write ("if err != nil { return err }" );
410- writer .write ("" );
411-
412- // =======
413-
414374 writer .openBlock ("if c.Expires < 0 {" , "}" , () -> {
415375 writer .addUseImports (SmithyGoDependency .FMT );
416376 writer .write (
@@ -477,13 +437,6 @@ private void writePresignClientType(
477437 });
478438 writer .write ("" );
479439
480- if (isS3ServiceShape (model , serviceShape )) {
481- writer .openBlock ("if options.presignerV4a == nil {" , "}" , () -> {
482- writer .write ("options.presignerV4a = $L(c.options)" , AwsSignatureVersion4 .NEW_SIGNER_V4A_FUNC_NAME );
483- });
484- writer .write ("" );
485- }
486-
487440 writer .openBlock ("return &$L{" , "}" , presignClientSymbol , () -> {
488441 writer .write ("client: c," );
489442 writer .write ("options: options," );
@@ -541,38 +494,6 @@ public void writePresignInterface(
541494 writer .write ("" );
542495 }
543496
544-
545- /**
546- * Writes the presigner sigv4a interface used by the presign url client
547- */
548- public void writePresignV4aInterface (
549- GoWriter writer ,
550- Model model ,
551- SymbolProvider symbolProvider ,
552- ServiceShape serviceShape
553- ) {
554- if (!isS3ServiceShape (model , serviceShape )) {
555- return ;
556- }
557-
558- Symbol signerOptionsSymbol = SymbolUtils .createPointableSymbolBuilder (
559- "SignerOptions" , AwsCustomGoDependency .S3_SIGV4A_CUSTOMIZATION ).build ();
560-
561- writer .writeDocs (
562- String .format ("%s represents sigv4a presigner interface used by presign url client" ,
563- presignerV4aInterfaceSymbol .getName ())
564- );
565- writer .openBlock ("type $T interface {" , "}" , presignerV4aInterfaceSymbol , () -> {
566- writer .write ("PresignHTTP(" );
567- writer .write ("ctx context.Context, credentials v4a.Credentials, r *http.Request," );
568- writer .write ("payloadHash string, service string, regionSet []string, signingTime time.Time," );
569- writer .write ("optFns ...func($P)," , signerOptionsSymbol );
570- writer .write (") (url string, signedHeader http.Header, err error)" );
571- });
572-
573- writer .write ("" );
574- }
575-
576497 /**
577498 * Writes the Presign client's type and methods.
578499 *
@@ -609,13 +530,8 @@ public void writePresignOptionType(
609530 )
610531 );
611532 writer .write ("Expires time.Duration" );
612- writer .write ("" );
613-
614- writer .writeDocs ("presignerV4a is the presigner used by the presign url client" );
615- writer .write ("presignerV4a $T" , presignerV4aInterfaceSymbol );
616533 }
617534 });
618-
619535 writer .openBlock ("func (o $T) copy() $T {" , "}" , presignOptionsSymbol , presignOptionsSymbol , () -> {
620536 writer .write ("clientOptions := make([]func(*Options), len(o.ClientOptions))" );
621537 writer .write ("copy(clientOptions, o.ClientOptions)" );
@@ -632,15 +548,15 @@ public void writePresignOptionType(
632548 writer .openBlock ("func $L(optFns ...func(*Options)) func($P) {" , "}" ,
633549 PRESIGN_OPTIONS_FROM_CLIENT_OPTIONS , presignOptionsSymbol , () -> {
634550 writer .write ("return $L(optFns).options" , presignOptionsFromClientOptionsInternal .getName ());
635- });
551+ });
636552
637553 writer .insertTrailingNewline ();
638554
639555 writer .write ("type $L []func(*Options)" , presignOptionsFromClientOptionsInternal .getName ());
640556 writer .openBlock ("func (w $L) options (o $P) {" , "}" ,
641557 presignOptionsFromClientOptionsInternal .getName (), presignOptionsSymbol , () -> {
642558 writer .write ("o.ClientOptions = append(o.ClientOptions, w...)" );
643- }).insertTrailingNewline ();
559+ }).insertTrailingNewline ();
644560
645561
646562 // s3 specific helpers
@@ -653,15 +569,15 @@ public void writePresignOptionType(
653569 writer .openBlock ("func $L(dur time.Duration) func($P) {" , "}" ,
654570 PRESIGN_OPTIONS_FROM_EXPIRES , presignOptionsSymbol , () -> {
655571 writer .write ("return $L(dur).options" , presignOptionsFromExpiresInternal .getName ());
656- });
572+ });
657573
658574 writer .insertTrailingNewline ();
659575
660576 writer .write ("type $L time.Duration" , presignOptionsFromExpiresInternal .getName ());
661577 writer .openBlock ("func (w $L) options (o $P) {" , "}" ,
662578 presignOptionsFromExpiresInternal .getName (), presignOptionsSymbol , () -> {
663579 writer .write ("o.Expires = time.Duration(w)" );
664- }).insertTrailingNewline ();
580+ }).insertTrailingNewline ();
665581 }
666582 }
667583
0 commit comments