This repository has been archived by the owner on Jan 14, 2020. It is now read-only.
/
ComputeEnvironmentComputeResources.go
51 lines (46 loc) · 1.99 KB
/
ComputeEnvironmentComputeResources.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
package properties
// Code generated by go generate; DO NOT EDIT.
// It's generated by "github.com/KablamoOSS/kombustion/generate"
import "fmt"
// ComputeEnvironmentComputeResources Documentation: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-batch-computeenvironment-computeresources.html
type ComputeEnvironmentComputeResources struct {
BidPercentage interface{} `yaml:"BidPercentage,omitempty"`
DesiredvCpus interface{} `yaml:"DesiredvCpus,omitempty"`
Ec2KeyPair interface{} `yaml:"Ec2KeyPair,omitempty"`
ImageId interface{} `yaml:"ImageId,omitempty"`
InstanceRole interface{} `yaml:"InstanceRole"`
MaxvCpus interface{} `yaml:"MaxvCpus"`
MinvCpus interface{} `yaml:"MinvCpus"`
SpotIamFleetRole interface{} `yaml:"SpotIamFleetRole,omitempty"`
Tags interface{} `yaml:"Tags,omitempty"`
Type interface{} `yaml:"Type"`
InstanceTypes interface{} `yaml:"InstanceTypes"`
SecurityGroupIds interface{} `yaml:"SecurityGroupIds"`
Subnets interface{} `yaml:"Subnets"`
}
// ComputeEnvironmentComputeResources validation
func (resource ComputeEnvironmentComputeResources) Validate() []error {
errors := []error{}
if resource.InstanceRole == nil {
errors = append(errors, fmt.Errorf("Missing required field 'InstanceRole'"))
}
if resource.MaxvCpus == nil {
errors = append(errors, fmt.Errorf("Missing required field 'MaxvCpus'"))
}
if resource.MinvCpus == nil {
errors = append(errors, fmt.Errorf("Missing required field 'MinvCpus'"))
}
if resource.Type == nil {
errors = append(errors, fmt.Errorf("Missing required field 'Type'"))
}
if resource.InstanceTypes == nil {
errors = append(errors, fmt.Errorf("Missing required field 'InstanceTypes'"))
}
if resource.SecurityGroupIds == nil {
errors = append(errors, fmt.Errorf("Missing required field 'SecurityGroupIds'"))
}
if resource.Subnets == nil {
errors = append(errors, fmt.Errorf("Missing required field 'Subnets'"))
}
return errors
}