forked from KablamoOSS/kombustion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DeliveryStream_ElasticsearchDestinationConfiguration.go
77 lines (52 loc) · 2.18 KB
/
DeliveryStream_ElasticsearchDestinationConfiguration.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package properties
import "fmt"
type DeliveryStream_ElasticsearchDestinationConfiguration struct {
DomainARN interface{} `yaml:"DomainARN"`
IndexName interface{} `yaml:"IndexName"`
IndexRotationPeriod interface{} `yaml:"IndexRotationPeriod"`
RoleARN interface{} `yaml:"RoleARN"`
S3BackupMode interface{} `yaml:"S3BackupMode"`
TypeName interface{} `yaml:"TypeName"`
S3Configuration *DeliveryStream_S3DestinationConfiguration `yaml:"S3Configuration"`
ProcessingConfiguration *DeliveryStream_ProcessingConfiguration `yaml:"ProcessingConfiguration,omitempty"`
RetryOptions *DeliveryStream_ElasticsearchRetryOptions `yaml:"RetryOptions"`
BufferingHints *DeliveryStream_ElasticsearchBufferingHints `yaml:"BufferingHints"`
CloudWatchLoggingOptions *DeliveryStream_CloudWatchLoggingOptions `yaml:"CloudWatchLoggingOptions,omitempty"`
}
func (resource DeliveryStream_ElasticsearchDestinationConfiguration) Validate() []error {
errs := []error{}
if resource.DomainARN == nil {
errs = append(errs, fmt.Errorf("Missing required field 'DomainARN'"))
}
if resource.IndexName == nil {
errs = append(errs, fmt.Errorf("Missing required field 'IndexName'"))
}
if resource.IndexRotationPeriod == nil {
errs = append(errs, fmt.Errorf("Missing required field 'IndexRotationPeriod'"))
}
if resource.RoleARN == nil {
errs = append(errs, fmt.Errorf("Missing required field 'RoleARN'"))
}
if resource.S3BackupMode == nil {
errs = append(errs, fmt.Errorf("Missing required field 'S3BackupMode'"))
}
if resource.TypeName == nil {
errs = append(errs, fmt.Errorf("Missing required field 'TypeName'"))
}
if resource.S3Configuration == nil {
errs = append(errs, fmt.Errorf("Missing required field 'S3Configuration'"))
} else {
errs = append(errs, resource.S3Configuration.Validate()...)
}
if resource.RetryOptions == nil {
errs = append(errs, fmt.Errorf("Missing required field 'RetryOptions'"))
} else {
errs = append(errs, resource.RetryOptions.Validate()...)
}
if resource.BufferingHints == nil {
errs = append(errs, fmt.Errorf("Missing required field 'BufferingHints'"))
} else {
errs = append(errs, resource.BufferingHints.Validate()...)
}
return errs
}