/
c_i_m_c_boot_image_boot_image_list.go
84 lines (67 loc) · 2.35 KB
/
c_i_m_c_boot_image_boot_image_list.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
78
79
80
81
82
83
84
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"encoding/json"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/errors"
"github.com/go-openapi/validate"
)
// CIMCBootImageBootImageList c i m c boot image boot image list
// swagger:model CIMC.BootImage_BootImageList
type CIMCBootImageBootImageList struct {
// os name
OsName string `json:"osName,omitempty"`
}
// Validate validates this c i m c boot image boot image list
func (m *CIMCBootImageBootImageList) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateOsName(formats); err != nil {
// prop
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var cIMCBootImageBootImageListTypeOsNamePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["CentOS","CentOS+KVM","ESXi","RHEL","RHEL+KVM"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
cIMCBootImageBootImageListTypeOsNamePropEnum = append(cIMCBootImageBootImageListTypeOsNamePropEnum, v)
}
}
const (
// CIMCBootImageBootImageListOsNameCentOS captures enum value "CentOS"
CIMCBootImageBootImageListOsNameCentOS string = "CentOS"
// CIMCBootImageBootImageListOsNameCentOSKVM captures enum value "CentOS+KVM"
CIMCBootImageBootImageListOsNameCentOSKVM string = "CentOS+KVM"
// CIMCBootImageBootImageListOsNameESXi captures enum value "ESXi"
CIMCBootImageBootImageListOsNameESXi string = "ESXi"
// CIMCBootImageBootImageListOsNameRHEL captures enum value "RHEL"
CIMCBootImageBootImageListOsNameRHEL string = "RHEL"
// CIMCBootImageBootImageListOsNameRHELKVM captures enum value "RHEL+KVM"
CIMCBootImageBootImageListOsNameRHELKVM string = "RHEL+KVM"
)
// prop value enum
func (m *CIMCBootImageBootImageList) validateOsNameEnum(path, location string, value string) error {
if err := validate.Enum(path, location, value, cIMCBootImageBootImageListTypeOsNamePropEnum); err != nil {
return err
}
return nil
}
func (m *CIMCBootImageBootImageList) validateOsName(formats strfmt.Registry) error {
if swag.IsZero(m.OsName) { // not required
return nil
}
// value enum
if err := m.validateOsNameEnum("osName", "body", m.OsName); err != nil {
return err
}
return nil
}