-
Notifications
You must be signed in to change notification settings - Fork 35
/
bmc.validator.pb.go
145 lines (141 loc) · 5.17 KB
/
bmc.validator.pb.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: api/v1/bmc.proto
package v1
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "github.com/mwitkow/go-proto-validators"
github_com_mwitkow_go_proto_validators "github.com/mwitkow/go-proto-validators"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
func (this *NetworkSourceRequest) Validate() error {
if this.Authn != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Authn", err)
}
}
if this.Vendor != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err)
}
}
if _, ok := NetworkSource_name[int32(this.NetworkSource)]; !ok {
return github_com_mwitkow_go_proto_validators.FieldError("NetworkSource", fmt.Errorf(`value '%v' must be a valid NetworkSource field`, this.NetworkSource))
}
return nil
}
func (this *NetworkSourceResponse) Validate() error {
return nil
}
func (this *ResetRequest) Validate() error {
if this.Authn != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Authn", err)
}
}
if this.Vendor != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err)
}
}
if _, ok := ResetKind_name[int32(this.ResetKind)]; !ok {
return github_com_mwitkow_go_proto_validators.FieldError("ResetKind", fmt.Errorf(`value '%v' must be a valid ResetKind field`, this.ResetKind))
}
return nil
}
func (this *ResetResponse) Validate() error {
return nil
}
func (this *UserCreds) Validate() error {
if this.Username == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Username", fmt.Errorf(`value '%v' must not be an empty string`, this.Username))
}
if this.Password == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Password", fmt.Errorf(`value '%v' must not be an empty string`, this.Password))
}
if _, ok := UserRole_name[int32(this.UserRole)]; !ok {
return github_com_mwitkow_go_proto_validators.FieldError("UserRole", fmt.Errorf(`value '%v' must be a valid UserRole field`, this.UserRole))
}
return nil
}
func (this *CreateUserRequest) Validate() error {
if this.Authn != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Authn", err)
}
}
if this.Vendor != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err)
}
}
if this.UserCreds != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserCreds); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("UserCreds", err)
}
}
return nil
}
func (this *CreateUserResponse) Validate() error {
return nil
}
func (this *DeleteUserRequest) Validate() error {
if this.Authn != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Authn", err)
}
}
if this.Vendor != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err)
}
}
if this.Username == "" {
return github_com_mwitkow_go_proto_validators.FieldError("Username", fmt.Errorf(`value '%v' must not be an empty string`, this.Username))
}
return nil
}
func (this *DeleteUserResponse) Validate() error {
return nil
}
func (this *UpdateUserRequest) Validate() error {
if this.Authn != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Authn", err)
}
}
if this.Vendor != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err)
}
}
if this.UserCreds != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.UserCreds); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("UserCreds", err)
}
}
return nil
}
func (this *UpdateUserResponse) Validate() error {
return nil
}
func (this *DeactivateSOLRequest) Validate() error {
if this.Authn != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Authn); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Authn", err)
}
}
if this.Vendor != nil {
if err := github_com_mwitkow_go_proto_validators.CallValidatorIfExists(this.Vendor); err != nil {
return github_com_mwitkow_go_proto_validators.FieldError("Vendor", err)
}
}
return nil
}
func (this *DeactivateSOLResponse) Validate() error {
return nil
}