@@ -607,6 +607,7 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint,
607
607
svc.Handlers.Build.PushBackNamed({{ .ProtocolPackage }}.BuildHandler)
608
608
svc.Handlers.Unmarshal.PushBackNamed({{ .ProtocolPackage }}.UnmarshalHandler)
609
609
svc.Handlers.UnmarshalMeta.PushBackNamed({{ .ProtocolPackage }}.UnmarshalMetaHandler)
610
+
610
611
{{- if and $.WithGeneratedTypedErrors (gt (len $.ShapeListErrors) 0) }}
611
612
{{- $_ := $.AddSDKImport "private/protocol" }}
612
613
svc.Handlers.UnmarshalError.PushBackNamed(
@@ -615,16 +616,20 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint,
615
616
{{- else }}
616
617
svc.Handlers.UnmarshalError.PushBackNamed({{ .ProtocolPackage }}.UnmarshalErrorHandler)
617
618
{{- end }}
618
- {{ if .HasEventStream }}
619
- svc.Handlers.BuildStream.PushBackNamed({{ .ProtocolPackage }}.BuildHandler)
620
- svc.Handlers.UnmarshalStream.PushBackNamed({{ .ProtocolPackage }}.UnmarshalHandler)
621
- {{ end }}
622
619
623
- {{ if .UseInitMethods }}// Run custom client initialization if present
624
- if initClient != nil {
625
- initClient(svc.Client)
626
- }
627
- {{ end }}
620
+ {{- if .HasEventStream }}
621
+
622
+ svc.Handlers.BuildStream.PushBackNamed({{ .ProtocolPackage }}.BuildHandler)
623
+ svc.Handlers.UnmarshalStream.PushBackNamed({{ .ProtocolPackage }}.UnmarshalHandler)
624
+ {{- end }}
625
+
626
+ {{- if .UseInitMethods }}
627
+
628
+ // Run custom client initialization if present
629
+ if initClient != nil {
630
+ initClient(svc.Client)
631
+ }
632
+ {{- end }}
628
633
629
634
return svc
630
635
}
@@ -634,11 +639,13 @@ func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint,
634
639
func (c *{{ .StructName }}) newRequest(op *request.Operation, params, data interface{}) *request.Request {
635
640
req := c.NewRequest(op, params, data)
636
641
637
- {{ if .UseInitMethods }}// Run custom request initialization if present
638
- if initRequest != nil {
639
- initRequest(req)
640
- }
641
- {{ end }}
642
+ {{- if .UseInitMethods }}
643
+
644
+ // Run custom request initialization if present
645
+ if initRequest != nil {
646
+ initRequest(req)
647
+ }
648
+ {{- end }}
642
649
643
650
return req
644
651
}
0 commit comments