github.com/cloudwan/edgelq-sdk@v1.15.4/monitoring/client/v4/alert/alert_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/monitoring/proto/v4/alert_custom.proto 3 // DO NOT EDIT!!! 4 5 package alert_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 alert "github.com/cloudwan/edgelq-sdk/monitoring/resources/v4/alert" 24 fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" 25 ) 26 27 var ( 28 _ = bytes.Equal 29 _ = errors.New 30 _ = fmt.Errorf 31 _ = net.ParseIP 32 _ = regexp.Match 33 _ = strings.Split 34 _ = time.Now 35 _ = utf8.RuneCountInString 36 _ = url.Parse 37 _ = gotenvalidate.NewValidationError 38 ) 39 40 // make sure we're using proto imports 41 var ( 42 _ = &alert.Alert{} 43 _ = &fieldmaskpb.FieldMask{} 44 ) 45 46 func (obj *BulkCreateAlertsRequest) GotenValidate() error { 47 if obj == nil { 48 return nil 49 } 50 for idx, elem := range obj.Alerts { 51 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 52 if err := subobj.GotenValidate(); err != nil { 53 return gotenvalidate.NewValidationError("BulkCreateAlertsRequest", "alerts", obj.Alerts[idx], "nested object validation failed", err) 54 } 55 } 56 } 57 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 58 return cvobj.GotenCustomValidate() 59 } 60 return nil 61 } 62 func (obj *BulkCreateAlertsResponse) GotenValidate() error { 63 if obj == nil { 64 return nil 65 } 66 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 67 return cvobj.GotenCustomValidate() 68 } 69 return nil 70 } 71 func (obj *BulkUpdateAlertsRequest) GotenValidate() error { 72 if obj == nil { 73 return nil 74 } 75 for idx, elem := range obj.Alerts { 76 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 77 if err := subobj.GotenValidate(); err != nil { 78 return gotenvalidate.NewValidationError("BulkUpdateAlertsRequest", "alerts", obj.Alerts[idx], "nested object validation failed", err) 79 } 80 } 81 } 82 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 83 return cvobj.GotenCustomValidate() 84 } 85 return nil 86 } 87 func (obj *BulkUpdateAlertsResponse) GotenValidate() error { 88 if obj == nil { 89 return nil 90 } 91 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 92 return cvobj.GotenCustomValidate() 93 } 94 return nil 95 }