github.com/cloudwan/edgelq-sdk@v1.15.4/limits/client/v1/plan_assignment/plan_assignment_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/limits/proto/v1/plan_assignment_custom.proto 3 // DO NOT EDIT!!! 4 5 package plan_assignment_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 plan_assignment "github.com/cloudwan/edgelq-sdk/limits/resources/v1/plan_assignment" 24 ) 25 26 var ( 27 _ = bytes.Equal 28 _ = errors.New 29 _ = fmt.Errorf 30 _ = net.ParseIP 31 _ = regexp.Match 32 _ = strings.Split 33 _ = time.Now 34 _ = utf8.RuneCountInString 35 _ = url.Parse 36 _ = gotenvalidate.NewValidationError 37 ) 38 39 // make sure we're using proto imports 40 var ( 41 _ = &plan_assignment.PlanAssignment{} 42 ) 43 44 func (obj *MigratePlanAssignmentRequest) GotenValidate() error { 45 if obj == nil { 46 return nil 47 } 48 if obj.PlanAssignment == nil { 49 return gotenvalidate.NewValidationError("MigratePlanAssignmentRequest", "planAssignment", obj.PlanAssignment, "field is required", nil) 50 } 51 if subobj, ok := interface{}(obj.PlanAssignment).(gotenvalidate.Validator); ok { 52 if err := subobj.GotenValidate(); err != nil { 53 return gotenvalidate.NewValidationError("MigratePlanAssignmentRequest", "planAssignment", obj.PlanAssignment, "nested object validation failed", err) 54 } 55 } 56 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 57 return cvobj.GotenCustomValidate() 58 } 59 return nil 60 }