github.com/cloudwan/edgelq-sdk@v1.15.4/meta/client/v1alpha2/service/service_service.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/meta/proto/v1alpha2/service_service.proto 3 // DO NOT EDIT!!! 4 5 package service_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 service "github.com/cloudwan/edgelq-sdk/meta/resources/v1alpha2/service" 24 view "github.com/cloudwan/goten-sdk/types/view" 25 watch_type "github.com/cloudwan/goten-sdk/types/watch_type" 26 fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" 27 timestamppb "google.golang.org/protobuf/types/known/timestamppb" 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 _ = &service.Service{} 46 _ = &fieldmaskpb.FieldMask{} 47 _ = ×tamppb.Timestamp{} 48 _ = view.View(0) 49 _ = watch_type.WatchType(0) 50 ) 51 52 func (obj *GetServiceRequest) GotenValidate() error { 53 if obj == nil { 54 return nil 55 } 56 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 57 return cvobj.GotenCustomValidate() 58 } 59 return nil 60 } 61 func (obj *BatchGetServicesRequest) GotenValidate() error { 62 if obj == nil { 63 return nil 64 } 65 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 66 return cvobj.GotenCustomValidate() 67 } 68 return nil 69 } 70 func (obj *BatchGetServicesResponse) GotenValidate() error { 71 if obj == nil { 72 return nil 73 } 74 for idx, elem := range obj.Services { 75 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 76 if err := subobj.GotenValidate(); err != nil { 77 return gotenvalidate.NewValidationError("BatchGetServicesResponse", "services", obj.Services[idx], "nested object validation failed", err) 78 } 79 } 80 } 81 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 82 return cvobj.GotenCustomValidate() 83 } 84 return nil 85 } 86 func (obj *ListServicesRequest) GotenValidate() error { 87 if obj == nil { 88 return nil 89 } 90 if !(obj.PageSize >= 0) { 91 return gotenvalidate.NewValidationError("ListServicesRequest", "pageSize", obj.PageSize, "field must be greater or equal to 0", nil) 92 } 93 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 94 return cvobj.GotenCustomValidate() 95 } 96 return nil 97 } 98 func (obj *ListServicesResponse) GotenValidate() error { 99 if obj == nil { 100 return nil 101 } 102 for idx, elem := range obj.Services { 103 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 104 if err := subobj.GotenValidate(); err != nil { 105 return gotenvalidate.NewValidationError("ListServicesResponse", "services", obj.Services[idx], "nested object validation failed", err) 106 } 107 } 108 } 109 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 110 return cvobj.GotenCustomValidate() 111 } 112 return nil 113 } 114 func (obj *WatchServiceRequest) GotenValidate() error { 115 if obj == nil { 116 return nil 117 } 118 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 119 return cvobj.GotenCustomValidate() 120 } 121 return nil 122 } 123 func (obj *WatchServiceResponse) GotenValidate() error { 124 if obj == nil { 125 return nil 126 } 127 if subobj, ok := interface{}(obj.Change).(gotenvalidate.Validator); ok { 128 if err := subobj.GotenValidate(); err != nil { 129 return gotenvalidate.NewValidationError("WatchServiceResponse", "change", obj.Change, "nested object validation failed", err) 130 } 131 } 132 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 133 return cvobj.GotenCustomValidate() 134 } 135 return nil 136 } 137 func (obj *WatchServicesRequest) GotenValidate() error { 138 if obj == nil { 139 return nil 140 } 141 if !(obj.PageSize >= 0) { 142 return gotenvalidate.NewValidationError("WatchServicesRequest", "pageSize", obj.PageSize, "field must be greater or equal to 0", nil) 143 } 144 if !(obj.MaxChunkSize >= 0 && obj.MaxChunkSize <= 100) { 145 return gotenvalidate.NewValidationError("WatchServicesRequest", "maxChunkSize", obj.MaxChunkSize, "field must be in range [0, 100]", nil) 146 } 147 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 148 return cvobj.GotenCustomValidate() 149 } 150 return nil 151 } 152 func (obj *WatchServicesResponse) GotenValidate() error { 153 if obj == nil { 154 return nil 155 } 156 for idx, elem := range obj.ServiceChanges { 157 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 158 if err := subobj.GotenValidate(); err != nil { 159 return gotenvalidate.NewValidationError("WatchServicesResponse", "serviceChanges", obj.ServiceChanges[idx], "nested object validation failed", err) 160 } 161 } 162 } 163 if subobj, ok := interface{}(obj.PageTokenChange).(gotenvalidate.Validator); ok { 164 if err := subobj.GotenValidate(); err != nil { 165 return gotenvalidate.NewValidationError("WatchServicesResponse", "pageTokenChange", obj.PageTokenChange, "nested object validation failed", err) 166 } 167 } 168 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 169 return cvobj.GotenCustomValidate() 170 } 171 return nil 172 } 173 func (obj *WatchServicesResponse_PageTokenChange) GotenValidate() error { 174 if obj == nil { 175 return nil 176 } 177 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 178 return cvobj.GotenCustomValidate() 179 } 180 return nil 181 }