Skip to content

Commit

Permalink
feat(schema): regenerated resources to apply SAM schema fixes from pr…
Browse files Browse the repository at this point in the history
…evious PR
  • Loading branch information
PaulMaddox committed Mar 10, 2019
1 parent 4561b44 commit b30c019
Show file tree
Hide file tree
Showing 5 changed files with 220 additions and 201 deletions.
11 changes: 10 additions & 1 deletion cloudformation/resources/awsserverlessapplication_location.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,19 @@ import (
"github.com/mitchellh/mapstructure"
)

// AWSServerlessApplication_Location is a helper struct that can hold either a ApplicationLocation value
// AWSServerlessApplication_Location is a helper struct that can hold either a String or ApplicationLocation value
type AWSServerlessApplication_Location struct {
String *string

ApplicationLocation *AWSServerlessApplication_ApplicationLocation
}

func (r AWSServerlessApplication_Location) value() interface{} {

if r.String != nil {
return r.String
}

if r.ApplicationLocation != nil && !reflect.DeepEqual(r.ApplicationLocation, &AWSServerlessApplication_ApplicationLocation{}) {
return r.ApplicationLocation
}
Expand Down Expand Up @@ -42,6 +48,9 @@ func (r *AWSServerlessApplication_Location) UnmarshalJSON(b []byte) error {

switch val := typecheck.(type) {

case string:
r.String = &val

case map[string]interface{}:

mapstructure.Decode(val, &r.ApplicationLocation)
Expand Down
Loading

0 comments on commit b30c019

Please sign in to comment.