/
model_region.go
49 lines (40 loc) · 1.15 KB
/
model_region.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
/*
* Instaclustr API Documentation
*
*
*
* API version: Current
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
package openapi
// Region - List of provisioning options related to data centres
type Region struct {
// Name of region
Name string `json:"name,omitempty"`
// Display name of region
DisplayName string `json:"displayName,omitempty"`
// List of available applications
MainApplicationVersion []MainApplicationVersions `json:"mainApplicationVersion,omitempty"`
// List of racks
Racks []string `json:"racks,omitempty"`
// List of available node sizes
NodeSizes []NodeSize `json:"nodeSizes,omitempty"`
}
// AssertRegionRequired checks if the required fields are not zero-ed
func AssertRegionRequired(obj Region) error {
for _, el := range obj.MainApplicationVersion {
if err := AssertMainApplicationVersionsRequired(el); err != nil {
return err
}
}
for _, el := range obj.NodeSizes {
if err := AssertNodeSizeRequired(el); err != nil {
return err
}
}
return nil
}
// AssertRegionConstraints checks if the values respects the defined constraints
func AssertRegionConstraints(obj Region) error {
return nil
}