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