From fbad6e2326f8bbfbb0d3d4619da8d22da9e2f0ff Mon Sep 17 00:00:00 2001 From: sbiscigl Date: Wed, 2 Nov 2022 12:30:09 -0400 Subject: [PATCH] Fixes codegen for multiple account ids --- private/model/api/endpoint_arn.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/private/model/api/endpoint_arn.go b/private/model/api/endpoint_arn.go index d1c2bd76bb..5ca961a229 100644 --- a/private/model/api/endpoint_arn.go +++ b/private/model/api/endpoint_arn.go @@ -76,11 +76,15 @@ const accountIDWithARNShapeTmplDef = ` {{ range $_, $name := $.MemberNames -}} {{ $elem := index $.MemberRefs $name -}} {{ if $elem.AccountIDMemberWithARN -}} - // updateAccountID returns a pointer to a modified copy of input, + {{ $FunctionName := $name }} + {{ if eq $name "AccountId" }} + {{ $FunctionName = "AccountID" }} + {{ end }} + // update{{ $FunctionName }} returns a pointer to a modified copy of input, // if account id is not provided, we update the account id in modified input // if account id is provided, but doesn't match with the one in ARN, we throw an error // if account id is not updated, we return nil. Note that original input is not modified. - func (s {{ $.ShapeName }}) updateAccountID(accountId string) (interface{}, error) { + func (s {{ $.ShapeName }}) update{{ $FunctionName }}(accountId string) (interface{}, error) { if s.{{ $name }} == nil { s.{{ $name }} = aws.String(accountId) return &s, nil