github.com/cloudwan/edgelq-sdk@v1.15.4/audit/client/v1/activity_log/activity_log_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/audit/proto/v1/activity_log_custom.proto 3 // DO NOT EDIT!!! 4 5 package activity_log_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 activity_log "github.com/cloudwan/edgelq-sdk/audit/resources/v1/activity_log" 24 common "github.com/cloudwan/edgelq-sdk/audit/resources/v1/common" 25 rpc "github.com/cloudwan/edgelq-sdk/common/rpc" 26 iam_organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1/organization" 27 iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1/project" 28 meta_service "github.com/cloudwan/goten-sdk/meta-service/resources/v1/service" 29 ) 30 31 var ( 32 _ = bytes.Equal 33 _ = errors.New 34 _ = fmt.Errorf 35 _ = net.ParseIP 36 _ = regexp.Match 37 _ = strings.Split 38 _ = time.Now 39 _ = utf8.RuneCountInString 40 _ = url.Parse 41 _ = gotenvalidate.NewValidationError 42 ) 43 44 // make sure we're using proto imports 45 var ( 46 _ = &activity_log.ActivityLog{} 47 _ = &common.Authentication{} 48 _ = &rpc.Status{} 49 _ = &iam_organization.Organization{} 50 _ = &iam_project.Project{} 51 _ = &meta_service.Service{} 52 ) 53 54 func (obj *ListActivityLogsRequest) GotenValidate() error { 55 if obj == nil { 56 return nil 57 } 58 if obj.Interval == nil { 59 return gotenvalidate.NewValidationError("ListActivityLogsRequest", "interval", obj.Interval, "field is required", nil) 60 } 61 if subobj, ok := interface{}(obj.Interval).(gotenvalidate.Validator); ok { 62 if err := subobj.GotenValidate(); err != nil { 63 return gotenvalidate.NewValidationError("ListActivityLogsRequest", "interval", obj.Interval, "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 *ListActivityLogsResponse) GotenValidate() error { 72 if obj == nil { 73 return nil 74 } 75 for idx, elem := range obj.ActivityLogs { 76 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 77 if err := subobj.GotenValidate(); err != nil { 78 return gotenvalidate.NewValidationError("ListActivityLogsResponse", "activityLogs", obj.ActivityLogs[idx], "nested object validation failed", err) 79 } 80 } 81 } 82 for idx, elem := range obj.ExecutionErrors { 83 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 84 if err := subobj.GotenValidate(); err != nil { 85 return gotenvalidate.NewValidationError("ListActivityLogsResponse", "executionErrors", obj.ExecutionErrors[idx], "nested object validation failed", err) 86 } 87 } 88 } 89 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 90 return cvobj.GotenCustomValidate() 91 } 92 return nil 93 } 94 func (obj *ListActivityLogsResponse_ErrorDetails) GotenValidate() error { 95 if obj == nil { 96 return nil 97 } 98 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 99 return cvobj.GotenCustomValidate() 100 } 101 return nil 102 } 103 func (obj *CreateActivityLogsRequest) GotenValidate() error { 104 if obj == nil { 105 return nil 106 } 107 for idx, elem := range obj.ActivityLogs { 108 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 109 if err := subobj.GotenValidate(); err != nil { 110 return gotenvalidate.NewValidationError("CreateActivityLogsRequest", "activityLogs", obj.ActivityLogs[idx], "nested object validation failed", err) 111 } 112 } 113 } 114 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 115 return cvobj.GotenCustomValidate() 116 } 117 return nil 118 } 119 func (obj *CreateActivityLogsResponse) GotenValidate() error { 120 if obj == nil { 121 return nil 122 } 123 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 124 return cvobj.GotenCustomValidate() 125 } 126 return nil 127 }