github.com/cloudwan/edgelq-sdk@v1.15.4/devices/client/v1/public/public_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/devices/proto/v1/public_custom.proto 3 // DO NOT EDIT!!! 4 5 package public_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/v1/device" 24 view "github.com/cloudwan/goten-sdk/types/view" 25 fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" 26 ) 27 28 var ( 29 _ = bytes.Equal 30 _ = errors.New 31 _ = fmt.Errorf 32 _ = net.ParseIP 33 _ = regexp.Match 34 _ = strings.Split 35 _ = time.Now 36 _ = utf8.RuneCountInString 37 _ = url.Parse 38 _ = gotenvalidate.NewValidationError 39 ) 40 41 // make sure we're using proto imports 42 var ( 43 _ = &device.Device{} 44 _ = &fieldmaskpb.FieldMask{} 45 _ = view.View(0) 46 ) 47 48 func (obj *ListPublicDevicesRequest) GotenValidate() error { 49 if obj == nil { 50 return nil 51 } 52 if !(obj.PageSize >= 0) { 53 return gotenvalidate.NewValidationError("ListPublicDevicesRequest", "pageSize", obj.PageSize, "field must be greater or equal to 0", nil) 54 } 55 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 56 return cvobj.GotenCustomValidate() 57 } 58 return nil 59 } 60 func (obj *ListPublicDevicesResponse) GotenValidate() error { 61 if obj == nil { 62 return nil 63 } 64 for idx, elem := range obj.Devices { 65 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 66 if err := subobj.GotenValidate(); err != nil { 67 return gotenvalidate.NewValidationError("ListPublicDevicesResponse", "devices", obj.Devices[idx], "nested object validation failed", err) 68 } 69 } 70 } 71 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 72 return cvobj.GotenCustomValidate() 73 } 74 return nil 75 }