github.com/cloudwan/edgelq-sdk@v1.15.4/limits/resources/v1alpha2/limit/limit.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/limits/proto/v1alpha2/limit.proto 3 // DO NOT EDIT!!! 4 5 package limit 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 iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/project" 24 limit_pool "github.com/cloudwan/edgelq-sdk/limits/resources/v1alpha2/limit_pool" 25 meta_resource "github.com/cloudwan/edgelq-sdk/meta/resources/v1alpha2/resource" 26 meta_service "github.com/cloudwan/edgelq-sdk/meta/resources/v1alpha2/service" 27 meta "github.com/cloudwan/goten-sdk/types/meta" 28 ) 29 30 var ( 31 _ = bytes.Equal 32 _ = errors.New 33 _ = fmt.Errorf 34 _ = net.ParseIP 35 _ = regexp.Match 36 _ = strings.Split 37 _ = time.Now 38 _ = utf8.RuneCountInString 39 _ = url.Parse 40 _ = gotenvalidate.NewValidationError 41 ) 42 43 // make sure we're using proto imports 44 var ( 45 _ = &iam_project.Project{} 46 _ = &limit_pool.LimitPool{} 47 _ = &meta_resource.Resource{} 48 _ = &meta_service.Service{} 49 _ = &meta.Meta{} 50 ) 51 52 func (obj *Limit) GotenValidate() error { 53 if obj == nil { 54 return nil 55 } 56 if subobj, ok := interface{}(obj.Metadata).(gotenvalidate.Validator); ok { 57 if err := subobj.GotenValidate(); err != nil { 58 return gotenvalidate.NewValidationError("Limit", "metadata", obj.Metadata, "nested object validation failed", err) 59 } 60 } 61 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 62 return cvobj.GotenCustomValidate() 63 } 64 return nil 65 }