github.com/cloudwan/edgelq-sdk@v1.15.4/devices/client/v1alpha2/broker/broker_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/devices/proto/v1alpha2/broker_custom.proto 3 // DO NOT EDIT!!! 4 5 package broker_client 6 7 import ( 8 "bytes" 9 "errors" 10 "fmt" 11 "net" 12 "net/url" 13 "regexp" 14 "strings" 15 "time" 16 "unicode/utf8" 17 18 gotenvalidate "github.com/cloudwan/goten-sdk/runtime/validate" 19 ) 20 21 // proto imports 22 import ( 23 device "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha2/device" 24 project "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha2/project" 25 ) 26 27 var ( 28 _ = bytes.Equal 29 _ = errors.New 30 _ = fmt.Errorf 31 _ = net.ParseIP 32 _ = regexp.Match 33 _ = strings.Split 34 _ = time.Now 35 _ = utf8.RuneCountInString 36 _ = url.Parse 37 _ = gotenvalidate.NewValidationError 38 ) 39 40 // make sure we're using proto imports 41 var ( 42 _ = &device.Device{} 43 _ = &project.Project{} 44 ) 45 46 func (obj *ListenForConnectionsRequest) GotenValidate() error { 47 if obj == nil { 48 return nil 49 } 50 switch opt := obj.Msg.(type) { 51 case *ListenForConnectionsRequest_RegisterListener_: 52 if subobj, ok := interface{}(opt.RegisterListener).(gotenvalidate.Validator); ok { 53 if err := subobj.GotenValidate(); err != nil { 54 return gotenvalidate.NewValidationError("ListenForConnectionsRequest", "registerListener", opt.RegisterListener, "nested object validation failed", err) 55 } 56 } 57 case *ListenForConnectionsRequest_ChannelOpenError_: 58 if subobj, ok := interface{}(opt.ChannelOpenError).(gotenvalidate.Validator); ok { 59 if err := subobj.GotenValidate(); err != nil { 60 return gotenvalidate.NewValidationError("ListenForConnectionsRequest", "channelOpenError", opt.ChannelOpenError, "nested object validation failed", err) 61 } 62 } 63 case *ListenForConnectionsRequest_KeepAlive_: 64 if subobj, ok := interface{}(opt.KeepAlive).(gotenvalidate.Validator); ok { 65 if err := subobj.GotenValidate(); err != nil { 66 return gotenvalidate.NewValidationError("ListenForConnectionsRequest", "keepAlive", opt.KeepAlive, "nested object validation failed", err) 67 } 68 } 69 default: 70 _ = opt 71 } 72 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 73 return cvobj.GotenCustomValidate() 74 } 75 return nil 76 } 77 func (obj *ListenForConnectionsRequest_RegisterListener) GotenValidate() error { 78 if obj == nil { 79 return nil 80 } 81 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 82 return cvobj.GotenCustomValidate() 83 } 84 return nil 85 } 86 func (obj *ListenForConnectionsRequest_ChannelOpenError) GotenValidate() error { 87 if obj == nil { 88 return nil 89 } 90 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 91 return cvobj.GotenCustomValidate() 92 } 93 return nil 94 } 95 func (obj *ListenForConnectionsRequest_KeepAlive) GotenValidate() error { 96 if obj == nil { 97 return nil 98 } 99 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 100 return cvobj.GotenCustomValidate() 101 } 102 return nil 103 } 104 func (obj *ListenForConnectionsResponse) GotenValidate() error { 105 if obj == nil { 106 return nil 107 } 108 switch opt := obj.Msg.(type) { 109 case *ListenForConnectionsResponse_ChannelRequested_: 110 if subobj, ok := interface{}(opt.ChannelRequested).(gotenvalidate.Validator); ok { 111 if err := subobj.GotenValidate(); err != nil { 112 return gotenvalidate.NewValidationError("ListenForConnectionsResponse", "channelRequested", opt.ChannelRequested, "nested object validation failed", err) 113 } 114 } 115 case *ListenForConnectionsResponse_KeepAlive_: 116 if subobj, ok := interface{}(opt.KeepAlive).(gotenvalidate.Validator); ok { 117 if err := subobj.GotenValidate(); err != nil { 118 return gotenvalidate.NewValidationError("ListenForConnectionsResponse", "keepAlive", opt.KeepAlive, "nested object validation failed", err) 119 } 120 } 121 default: 122 _ = opt 123 } 124 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 125 return cvobj.GotenCustomValidate() 126 } 127 return nil 128 } 129 func (obj *ListenForConnectionsResponse_ChannelRequested) GotenValidate() error { 130 if obj == nil { 131 return nil 132 } 133 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 134 return cvobj.GotenCustomValidate() 135 } 136 return nil 137 } 138 func (obj *ListenForConnectionsResponse_KeepAlive) GotenValidate() error { 139 if obj == nil { 140 return nil 141 } 142 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 143 return cvobj.GotenCustomValidate() 144 } 145 return nil 146 } 147 func (obj *OpenConnectionChannelSocketRequest) GotenValidate() error { 148 if obj == nil { 149 return nil 150 } 151 switch opt := obj.Msg.(type) { 152 case *OpenConnectionChannelSocketRequest_RegisterSocket_: 153 if subobj, ok := interface{}(opt.RegisterSocket).(gotenvalidate.Validator); ok { 154 if err := subobj.GotenValidate(); err != nil { 155 return gotenvalidate.NewValidationError("OpenConnectionChannelSocketRequest", "registerSocket", opt.RegisterSocket, "nested object validation failed", err) 156 } 157 } 158 case *OpenConnectionChannelSocketRequest_Data: 159 case *OpenConnectionChannelSocketRequest_Error: 160 case *OpenConnectionChannelSocketRequest_Ack: 161 if subobj, ok := interface{}(opt.Ack).(gotenvalidate.Validator); ok { 162 if err := subobj.GotenValidate(); err != nil { 163 return gotenvalidate.NewValidationError("OpenConnectionChannelSocketRequest", "ack", opt.Ack, "nested object validation failed", err) 164 } 165 } 166 default: 167 _ = opt 168 } 169 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 170 return cvobj.GotenCustomValidate() 171 } 172 return nil 173 } 174 func (obj *OpenConnectionChannelSocketRequest_RegisterSocket) GotenValidate() error { 175 if obj == nil { 176 return nil 177 } 178 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 179 return cvobj.GotenCustomValidate() 180 } 181 return nil 182 } 183 func (obj *OpenConnectionChannelSocketResponse) GotenValidate() error { 184 if obj == nil { 185 return nil 186 } 187 switch opt := obj.Msg.(type) { 188 case *OpenConnectionChannelSocketResponse_Data: 189 case *OpenConnectionChannelSocketResponse_Ack: 190 if subobj, ok := interface{}(opt.Ack).(gotenvalidate.Validator); ok { 191 if err := subobj.GotenValidate(); err != nil { 192 return gotenvalidate.NewValidationError("OpenConnectionChannelSocketResponse", "ack", opt.Ack, "nested object validation failed", err) 193 } 194 } 195 default: 196 _ = opt 197 } 198 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 199 return cvobj.GotenCustomValidate() 200 } 201 return nil 202 } 203 func (obj *ConnectToDeviceRequest) GotenValidate() error { 204 if obj == nil { 205 return nil 206 } 207 switch opt := obj.Msg.(type) { 208 case *ConnectToDeviceRequest_OpenRequest_: 209 if subobj, ok := interface{}(opt.OpenRequest).(gotenvalidate.Validator); ok { 210 if err := subobj.GotenValidate(); err != nil { 211 return gotenvalidate.NewValidationError("ConnectToDeviceRequest", "openRequest", opt.OpenRequest, "nested object validation failed", err) 212 } 213 } 214 case *ConnectToDeviceRequest_Data: 215 case *ConnectToDeviceRequest_Ack: 216 if subobj, ok := interface{}(opt.Ack).(gotenvalidate.Validator); ok { 217 if err := subobj.GotenValidate(); err != nil { 218 return gotenvalidate.NewValidationError("ConnectToDeviceRequest", "ack", opt.Ack, "nested object validation failed", err) 219 } 220 } 221 case *ConnectToDeviceRequest_KeepAlive_: 222 if subobj, ok := interface{}(opt.KeepAlive).(gotenvalidate.Validator); ok { 223 if err := subobj.GotenValidate(); err != nil { 224 return gotenvalidate.NewValidationError("ConnectToDeviceRequest", "keepAlive", opt.KeepAlive, "nested object validation failed", err) 225 } 226 } 227 default: 228 _ = opt 229 } 230 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 231 return cvobj.GotenCustomValidate() 232 } 233 return nil 234 } 235 func (obj *ConnectToDeviceRequest_OpenRequest) GotenValidate() error { 236 if obj == nil { 237 return nil 238 } 239 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 240 return cvobj.GotenCustomValidate() 241 } 242 return nil 243 } 244 func (obj *ConnectToDeviceRequest_KeepAlive) GotenValidate() error { 245 if obj == nil { 246 return nil 247 } 248 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 249 return cvobj.GotenCustomValidate() 250 } 251 return nil 252 } 253 func (obj *ConnectToDeviceResponse) GotenValidate() error { 254 if obj == nil { 255 return nil 256 } 257 switch opt := obj.Msg.(type) { 258 case *ConnectToDeviceResponse_OpenResponse_: 259 if subobj, ok := interface{}(opt.OpenResponse).(gotenvalidate.Validator); ok { 260 if err := subobj.GotenValidate(); err != nil { 261 return gotenvalidate.NewValidationError("ConnectToDeviceResponse", "openResponse", opt.OpenResponse, "nested object validation failed", err) 262 } 263 } 264 case *ConnectToDeviceResponse_Data: 265 case *ConnectToDeviceResponse_Error: 266 case *ConnectToDeviceResponse_Ack: 267 if subobj, ok := interface{}(opt.Ack).(gotenvalidate.Validator); ok { 268 if err := subobj.GotenValidate(); err != nil { 269 return gotenvalidate.NewValidationError("ConnectToDeviceResponse", "ack", opt.Ack, "nested object validation failed", err) 270 } 271 } 272 default: 273 _ = opt 274 } 275 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 276 return cvobj.GotenCustomValidate() 277 } 278 return nil 279 } 280 func (obj *ConnectToDeviceResponse_OpenResponse) GotenValidate() error { 281 if obj == nil { 282 return nil 283 } 284 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 285 return cvobj.GotenCustomValidate() 286 } 287 return nil 288 } 289 func (obj *Ack) GotenValidate() error { 290 if obj == nil { 291 return nil 292 } 293 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 294 return cvobj.GotenCustomValidate() 295 } 296 return nil 297 } 298 func (obj *SSHService) GotenValidate() error { 299 if obj == nil { 300 return nil 301 } 302 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 303 return cvobj.GotenCustomValidate() 304 } 305 return nil 306 } 307 func (obj *SSHService_Hello) GotenValidate() error { 308 if obj == nil { 309 return nil 310 } 311 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 312 return cvobj.GotenCustomValidate() 313 } 314 return nil 315 } 316 func (obj *SSHService_TerminalSize) GotenValidate() error { 317 if obj == nil { 318 return nil 319 } 320 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 321 return cvobj.GotenCustomValidate() 322 } 323 return nil 324 } 325 func (obj *SSHService_ClientOut) GotenValidate() error { 326 if obj == nil { 327 return nil 328 } 329 switch opt := obj.Msg.(type) { 330 case *SSHService_ClientOut_Data: 331 case *SSHService_ClientOut_SshHello: 332 if subobj, ok := interface{}(opt.SshHello).(gotenvalidate.Validator); ok { 333 if err := subobj.GotenValidate(); err != nil { 334 return gotenvalidate.NewValidationError("ClientOut", "sshHello", opt.SshHello, "nested object validation failed", err) 335 } 336 } 337 case *SSHService_ClientOut_SshResizeTerminal: 338 if subobj, ok := interface{}(opt.SshResizeTerminal).(gotenvalidate.Validator); ok { 339 if err := subobj.GotenValidate(); err != nil { 340 return gotenvalidate.NewValidationError("ClientOut", "sshResizeTerminal", opt.SshResizeTerminal, "nested object validation failed", err) 341 } 342 } 343 default: 344 _ = opt 345 } 346 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 347 return cvobj.GotenCustomValidate() 348 } 349 return nil 350 } 351 func (obj *SSHService_ClientIn) GotenValidate() error { 352 if obj == nil { 353 return nil 354 } 355 switch opt := obj.Msg.(type) { 356 case *SSHService_ClientIn_Data: 357 default: 358 _ = opt 359 } 360 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 361 return cvobj.GotenCustomValidate() 362 } 363 return nil 364 } 365 func (obj *SCPService) GotenValidate() error { 366 if obj == nil { 367 return nil 368 } 369 switch opt := obj.Msg.(type) { 370 case *SCPService_Dir: 371 if subobj, ok := interface{}(opt.Dir).(gotenvalidate.Validator); ok { 372 if err := subobj.GotenValidate(); err != nil { 373 return gotenvalidate.NewValidationError("SCPService", "dir", opt.Dir, "nested object validation failed", err) 374 } 375 } 376 case *SCPService_File: 377 if subobj, ok := interface{}(opt.File).(gotenvalidate.Validator); ok { 378 if err := subobj.GotenValidate(); err != nil { 379 return gotenvalidate.NewValidationError("SCPService", "file", opt.File, "nested object validation failed", err) 380 } 381 } 382 case *SCPService_Eot: 383 case *SCPService_Config: 384 if subobj, ok := interface{}(opt.Config).(gotenvalidate.Validator); ok { 385 if err := subobj.GotenValidate(); err != nil { 386 return gotenvalidate.NewValidationError("SCPService", "config", opt.Config, "nested object validation failed", err) 387 } 388 } 389 default: 390 _ = opt 391 } 392 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 393 return cvobj.GotenCustomValidate() 394 } 395 return nil 396 } 397 func (obj *SCPService_Configure) GotenValidate() error { 398 if obj == nil { 399 return nil 400 } 401 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 402 return cvobj.GotenCustomValidate() 403 } 404 return nil 405 } 406 func (obj *SCPService_CreateDirectory) GotenValidate() error { 407 if obj == nil { 408 return nil 409 } 410 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 411 return cvobj.GotenCustomValidate() 412 } 413 return nil 414 } 415 func (obj *SCPService_CreateFile) GotenValidate() error { 416 if obj == nil { 417 return nil 418 } 419 switch opt := obj.Msg.(type) { 420 case *SCPService_CreateFile_Init: 421 if subobj, ok := interface{}(opt.Init).(gotenvalidate.Validator); ok { 422 if err := subobj.GotenValidate(); err != nil { 423 return gotenvalidate.NewValidationError("CreateFile", "init", opt.Init, "nested object validation failed", err) 424 } 425 } 426 case *SCPService_CreateFile_Data: 427 case *SCPService_CreateFile_Eof: 428 default: 429 _ = opt 430 } 431 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 432 return cvobj.GotenCustomValidate() 433 } 434 return nil 435 } 436 func (obj *SCPService_CreateFile_Initialize) GotenValidate() error { 437 if obj == nil { 438 return nil 439 } 440 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 441 return cvobj.GotenCustomValidate() 442 } 443 return nil 444 } 445 func (obj *LogsService) GotenValidate() error { 446 if obj == nil { 447 return nil 448 } 449 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 450 return cvobj.GotenCustomValidate() 451 } 452 return nil 453 } 454 func (obj *LogsService_ToDevice) GotenValidate() error { 455 if obj == nil { 456 return nil 457 } 458 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 459 return cvobj.GotenCustomValidate() 460 } 461 return nil 462 } 463 func (obj *LogsService_ToClient) GotenValidate() error { 464 if obj == nil { 465 return nil 466 } 467 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 468 return cvobj.GotenCustomValidate() 469 } 470 return nil 471 } 472 func (obj *PodManagementService) GotenValidate() error { 473 if obj == nil { 474 return nil 475 } 476 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 477 return cvobj.GotenCustomValidate() 478 } 479 return nil 480 } 481 func (obj *SystemStateService) GotenValidate() error { 482 if obj == nil { 483 return nil 484 } 485 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 486 return cvobj.GotenCustomValidate() 487 } 488 return nil 489 }