Skip to content

Commit

Permalink
private/model/api: Generate enum shape functions to retrieve all values
Browse files Browse the repository at this point in the history
Reference: aws#3441
  • Loading branch information
bflad committed Jul 29, 2020
1 parent e5d9526 commit b26f08b
Show file tree
Hide file tree
Showing 215 changed files with 34,100 additions and 2 deletions.
9 changes: 9 additions & 0 deletions private/model/api/shape.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,15 @@ const (
{{ end }}
)
// {{ $.ShapeName }}EnumValues returns all elements of the {{ $.ShapeName }} enum
func {{ $.ShapeName }}EnumValues() []string {
return []string{
{{ range $index, $elem := $.Enum -}}
{{ index $.EnumConsts $index }},
{{ end }}
}
}
`))

// GoCode returns the rendered Go code for the Shape.
Expand Down
8 changes: 8 additions & 0 deletions private/protocol/ec2query/build_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions private/protocol/ec2query/unmarshal_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions private/protocol/jsonrpc/build_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions private/protocol/jsonrpc/unmarshal_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions private/protocol/query/build_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions private/protocol/query/unmarshal_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions private/protocol/restjson/build_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions private/protocol/restjson/unmarshal_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions private/protocol/restxml/build_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions private/protocol/restxml/unmarshal_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

84 changes: 84 additions & 0 deletions service/accessanalyzer/api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b26f08b

Please sign in to comment.