github.com/cloudwan/edgelq-sdk@v1.15.4/devices/client/v1alpha2/device/device_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/devices/proto/v1alpha2/device_custom.proto 3 // DO NOT EDIT!!! 4 5 package device_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 api "github.com/cloudwan/edgelq-sdk/common/api" 24 device "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha2/device" 25 project "github.com/cloudwan/edgelq-sdk/devices/resources/v1alpha2/project" 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 _ = &api.Account{} 44 _ = &device.Device{} 45 _ = &project.Project{} 46 ) 47 48 func (obj *ProvisionServiceAccountToDeviceRequest) GotenValidate() error { 49 if obj == nil { 50 return nil 51 } 52 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 53 return cvobj.GotenCustomValidate() 54 } 55 return nil 56 } 57 func (obj *ProvisionServiceAccountToDeviceResponse) GotenValidate() error { 58 if obj == nil { 59 return nil 60 } 61 if subobj, ok := interface{}(obj.ServiceAccount).(gotenvalidate.Validator); ok { 62 if err := subobj.GotenValidate(); err != nil { 63 return gotenvalidate.NewValidationError("ProvisionServiceAccountToDeviceResponse", "serviceAccount", obj.ServiceAccount, "nested object validation failed", err) 64 } 65 } 66 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 67 return cvobj.GotenCustomValidate() 68 } 69 return nil 70 } 71 func (obj *RemoveServiceAccountFromDeviceRequest) GotenValidate() error { 72 if obj == nil { 73 return nil 74 } 75 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 76 return cvobj.GotenCustomValidate() 77 } 78 return nil 79 } 80 func (obj *RemoveServiceAccountFromDeviceResponse) GotenValidate() error { 81 if obj == nil { 82 return nil 83 } 84 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 85 return cvobj.GotenCustomValidate() 86 } 87 return nil 88 }