Skip to content

Commit

Permalink
fix(sam): Go Generate for awslabs#406
Browse files Browse the repository at this point in the history
Go generate for awslabs#406

awslabs#404
  • Loading branch information
Jayesh Lalwani committed Oct 5, 2021
1 parent a866583 commit 2303c6b
Show file tree
Hide file tree
Showing 5 changed files with 77 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ type Function_DestinationConfig struct {
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#destination-config-object
OnFailure *Function_Destination `json:"OnFailure,omitempty"`

// OnSuccess AWS CloudFormation Property
// Required: true
// See: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#destination-config-object
OnSuccess *Function_Destination `json:"OnSuccess,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ type Function_EventInvokeConfig struct {
// DestinationConfig AWS CloudFormation Property
// Required: false
// See: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#event-invoke-config-object
DestinationConfig *Function_DestinationConfig `json:"DestinationConfig,omitempty"`
DestinationConfig *Function_EventInvokeDestinationConfig `json:"DestinationConfig,omitempty"`

// MaximumEventAgeInSeconds AWS CloudFormation Property
// Required: false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
package serverless

import (
"github.com/awslabs/goformation/v5/cloudformation/policies"
)

// Function_EventInvokeDestinationConfig AWS CloudFormation Resource (AWS::Serverless::Function.EventInvokeDestinationConfig)
// See: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#event-invoke-destination-config-object
type Function_EventInvokeDestinationConfig struct {

// OnFailure AWS CloudFormation Property
// Required: true
// See: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#event-invoke-destination-config-object
OnFailure *Function_Destination `json:"OnFailure,omitempty"`

// OnSuccess AWS CloudFormation Property
// Required: true
// See: https://github.com/aws/serverless-application-model/blob/master/versions/2016-10-31.md#event-invoke-destination-config-object
OnSuccess *Function_Destination `json:"OnSuccess,omitempty"`

// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy
AWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:"-"`

// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy
AWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:"-"`

// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource
AWSCloudFormationDependsOn []string `json:"-"`

// AWSCloudFormationMetadata stores structured data associated with this resource
AWSCloudFormationMetadata map[string]interface{} `json:"-"`

// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created
AWSCloudFormationCondition string `json:"-"`
}

// AWSCloudFormationType returns the AWS CloudFormation resource type
func (r *Function_EventInvokeDestinationConfig) AWSCloudFormationType() string {
return "AWS::Serverless::Function.EventInvokeDestinationConfig"
}
24 changes: 18 additions & 6 deletions schema/sam.go
Original file line number Diff line number Diff line change
Expand Up @@ -107324,14 +107324,10 @@ var SamSchema = `{
"properties": {
"OnFailure": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
},
"OnSuccess": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
}
},
"required": [
"OnFailure",
"OnSuccess"
"OnFailure"
],
"type": "object"
},
Expand Down Expand Up @@ -107417,7 +107413,7 @@ var SamSchema = `{
"additionalProperties": false,
"properties": {
"DestinationConfig": {
"$ref": "#/definitions/AWS::Serverless::Function.DestinationConfig"
"$ref": "#/definitions/AWS::Serverless::Function.EventInvokeDestinationConfig"
},
"MaximumEventAgeInSeconds": {
"type": "number"
Expand All @@ -107428,6 +107424,22 @@ var SamSchema = `{
},
"type": "object"
},
"AWS::Serverless::Function.EventInvokeDestinationConfig": {
"additionalProperties": false,
"properties": {
"OnFailure": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
},
"OnSuccess": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
}
},
"required": [
"OnFailure",
"OnSuccess"
],
"type": "object"
},
"AWS::Serverless::Function.EventSource": {
"additionalProperties": false,
"properties": {
Expand Down
24 changes: 18 additions & 6 deletions schema/sam.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -107321,14 +107321,10 @@
"properties": {
"OnFailure": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
},
"OnSuccess": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
}
},
"required": [
"OnFailure",
"OnSuccess"
"OnFailure"
],
"type": "object"
},
Expand Down Expand Up @@ -107414,7 +107410,7 @@
"additionalProperties": false,
"properties": {
"DestinationConfig": {
"$ref": "#/definitions/AWS::Serverless::Function.DestinationConfig"
"$ref": "#/definitions/AWS::Serverless::Function.EventInvokeDestinationConfig"
},
"MaximumEventAgeInSeconds": {
"type": "number"
Expand All @@ -107425,6 +107421,22 @@
},
"type": "object"
},
"AWS::Serverless::Function.EventInvokeDestinationConfig": {
"additionalProperties": false,
"properties": {
"OnFailure": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
},
"OnSuccess": {
"$ref": "#/definitions/AWS::Serverless::Function.Destination"
}
},
"required": [
"OnFailure",
"OnSuccess"
],
"type": "object"
},
"AWS::Serverless::Function.EventSource": {
"additionalProperties": false,
"properties": {
Expand Down

0 comments on commit 2303c6b

Please sign in to comment.