This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
/
DistributionDefaultCacheBehavior.go
41 lines (36 loc) · 2.09 KB
/
DistributionDefaultCacheBehavior.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package properties
// Code generated by go generate; DO NOT EDIT.
// It's generated by "github.com/KablamoOSS/kombustion/generate"
import "fmt"
// DistributionDefaultCacheBehavior Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudfront-distribution-defaultcachebehavior.html
type DistributionDefaultCacheBehavior struct {
Compress interface{} `yaml:"Compress,omitempty"`
DefaultTTL interface{} `yaml:"DefaultTTL,omitempty"`
FieldLevelEncryptionId interface{} `yaml:"FieldLevelEncryptionId,omitempty"`
MaxTTL interface{} `yaml:"MaxTTL,omitempty"`
MinTTL interface{} `yaml:"MinTTL,omitempty"`
SmoothStreaming interface{} `yaml:"SmoothStreaming,omitempty"`
TargetOriginId interface{} `yaml:"TargetOriginId"`
ViewerProtocolPolicy interface{} `yaml:"ViewerProtocolPolicy"`
AllowedMethods interface{} `yaml:"AllowedMethods,omitempty"`
CachedMethods interface{} `yaml:"CachedMethods,omitempty"`
LambdaFunctionAssociations interface{} `yaml:"LambdaFunctionAssociations,omitempty"`
TrustedSigners interface{} `yaml:"TrustedSigners,omitempty"`
ForwardedValues *DistributionForwardedValues `yaml:"ForwardedValues"`
}
// DistributionDefaultCacheBehavior validation
func (resource DistributionDefaultCacheBehavior) Validate() []error {
errors := []error{}
if resource.TargetOriginId == nil {
errors = append(errors, fmt.Errorf("Missing required field 'TargetOriginId'"))
}
if resource.ViewerProtocolPolicy == nil {
errors = append(errors, fmt.Errorf("Missing required field 'ViewerProtocolPolicy'"))
}
if resource.ForwardedValues == nil {
errors = append(errors, fmt.Errorf("Missing required field 'ForwardedValues'"))
} else {
errors = append(errors, resource.ForwardedValues.Validate()...)
}
return errors
}