github.com/cloudwan/edgelq-sdk@v1.15.4/logging/client/v1alpha2/log_descriptor/log_descriptor_service.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/logging/proto/v1alpha2/log_descriptor_service.proto 3 // DO NOT EDIT!!! 4 5 package log_descriptor_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 iam_organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/organization" 24 iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1alpha2/project" 25 log_descriptor "github.com/cloudwan/edgelq-sdk/logging/resources/v1alpha2/log_descriptor" 26 view "github.com/cloudwan/goten-sdk/types/view" 27 watch_type "github.com/cloudwan/goten-sdk/types/watch_type" 28 emptypb "google.golang.org/protobuf/types/known/emptypb" 29 fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" 30 timestamppb "google.golang.org/protobuf/types/known/timestamppb" 31 ) 32 33 var ( 34 _ = bytes.Equal 35 _ = errors.New 36 _ = fmt.Errorf 37 _ = net.ParseIP 38 _ = regexp.Match 39 _ = strings.Split 40 _ = time.Now 41 _ = utf8.RuneCountInString 42 _ = url.Parse 43 _ = gotenvalidate.NewValidationError 44 ) 45 46 // make sure we're using proto imports 47 var ( 48 _ = &iam_organization.Organization{} 49 _ = &iam_project.Project{} 50 _ = &log_descriptor.LogDescriptor{} 51 _ = &emptypb.Empty{} 52 _ = &fieldmaskpb.FieldMask{} 53 _ = ×tamppb.Timestamp{} 54 _ = view.View(0) 55 _ = watch_type.WatchType(0) 56 ) 57 58 func (obj *GetLogDescriptorRequest) GotenValidate() error { 59 if obj == nil { 60 return nil 61 } 62 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 63 return cvobj.GotenCustomValidate() 64 } 65 return nil 66 } 67 func (obj *BatchGetLogDescriptorsRequest) GotenValidate() error { 68 if obj == nil { 69 return nil 70 } 71 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 72 return cvobj.GotenCustomValidate() 73 } 74 return nil 75 } 76 func (obj *BatchGetLogDescriptorsResponse) GotenValidate() error { 77 if obj == nil { 78 return nil 79 } 80 for idx, elem := range obj.LogDescriptors { 81 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 82 if err := subobj.GotenValidate(); err != nil { 83 return gotenvalidate.NewValidationError("BatchGetLogDescriptorsResponse", "logDescriptors", obj.LogDescriptors[idx], "nested object validation failed", err) 84 } 85 } 86 } 87 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 88 return cvobj.GotenCustomValidate() 89 } 90 return nil 91 } 92 func (obj *ListLogDescriptorsRequest) GotenValidate() error { 93 if obj == nil { 94 return nil 95 } 96 if !(obj.PageSize >= 0) { 97 return gotenvalidate.NewValidationError("ListLogDescriptorsRequest", "pageSize", obj.PageSize, "field must be greater or equal to 0", nil) 98 } 99 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 100 return cvobj.GotenCustomValidate() 101 } 102 return nil 103 } 104 func (obj *ListLogDescriptorsResponse) GotenValidate() error { 105 if obj == nil { 106 return nil 107 } 108 for idx, elem := range obj.LogDescriptors { 109 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 110 if err := subobj.GotenValidate(); err != nil { 111 return gotenvalidate.NewValidationError("ListLogDescriptorsResponse", "logDescriptors", obj.LogDescriptors[idx], "nested object validation failed", err) 112 } 113 } 114 } 115 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 116 return cvobj.GotenCustomValidate() 117 } 118 return nil 119 } 120 func (obj *WatchLogDescriptorRequest) GotenValidate() error { 121 if obj == nil { 122 return nil 123 } 124 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 125 return cvobj.GotenCustomValidate() 126 } 127 return nil 128 } 129 func (obj *WatchLogDescriptorResponse) GotenValidate() error { 130 if obj == nil { 131 return nil 132 } 133 if subobj, ok := interface{}(obj.Change).(gotenvalidate.Validator); ok { 134 if err := subobj.GotenValidate(); err != nil { 135 return gotenvalidate.NewValidationError("WatchLogDescriptorResponse", "change", obj.Change, "nested object validation failed", err) 136 } 137 } 138 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 139 return cvobj.GotenCustomValidate() 140 } 141 return nil 142 } 143 func (obj *WatchLogDescriptorsRequest) GotenValidate() error { 144 if obj == nil { 145 return nil 146 } 147 if !(obj.PageSize >= 0) { 148 return gotenvalidate.NewValidationError("WatchLogDescriptorsRequest", "pageSize", obj.PageSize, "field must be greater or equal to 0", nil) 149 } 150 if !(obj.MaxChunkSize >= 0 && obj.MaxChunkSize <= 100) { 151 return gotenvalidate.NewValidationError("WatchLogDescriptorsRequest", "maxChunkSize", obj.MaxChunkSize, "field must be in range [0, 100]", nil) 152 } 153 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 154 return cvobj.GotenCustomValidate() 155 } 156 return nil 157 } 158 func (obj *WatchLogDescriptorsResponse) GotenValidate() error { 159 if obj == nil { 160 return nil 161 } 162 for idx, elem := range obj.LogDescriptorChanges { 163 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 164 if err := subobj.GotenValidate(); err != nil { 165 return gotenvalidate.NewValidationError("WatchLogDescriptorsResponse", "logDescriptorChanges", obj.LogDescriptorChanges[idx], "nested object validation failed", err) 166 } 167 } 168 } 169 if subobj, ok := interface{}(obj.PageTokenChange).(gotenvalidate.Validator); ok { 170 if err := subobj.GotenValidate(); err != nil { 171 return gotenvalidate.NewValidationError("WatchLogDescriptorsResponse", "pageTokenChange", obj.PageTokenChange, "nested object validation failed", err) 172 } 173 } 174 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 175 return cvobj.GotenCustomValidate() 176 } 177 return nil 178 } 179 func (obj *WatchLogDescriptorsResponse_PageTokenChange) GotenValidate() error { 180 if obj == nil { 181 return nil 182 } 183 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 184 return cvobj.GotenCustomValidate() 185 } 186 return nil 187 } 188 func (obj *CreateLogDescriptorRequest) GotenValidate() error { 189 if obj == nil { 190 return nil 191 } 192 if obj.LogDescriptor == nil { 193 return gotenvalidate.NewValidationError("CreateLogDescriptorRequest", "logDescriptor", obj.LogDescriptor, "field is required", nil) 194 } 195 if subobj, ok := interface{}(obj.LogDescriptor).(gotenvalidate.Validator); ok { 196 if err := subobj.GotenValidate(); err != nil { 197 return gotenvalidate.NewValidationError("CreateLogDescriptorRequest", "logDescriptor", obj.LogDescriptor, "nested object validation failed", err) 198 } 199 } 200 if subobj, ok := interface{}(obj.ResponseMask).(gotenvalidate.Validator); ok { 201 if err := subobj.GotenValidate(); err != nil { 202 return gotenvalidate.NewValidationError("CreateLogDescriptorRequest", "responseMask", obj.ResponseMask, "nested object validation failed", err) 203 } 204 } 205 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 206 return cvobj.GotenCustomValidate() 207 } 208 return nil 209 } 210 func (obj *CreateLogDescriptorRequest_ResponseMask) GotenValidate() error { 211 if obj == nil { 212 return nil 213 } 214 switch opt := obj.Masking.(type) { 215 case *CreateLogDescriptorRequest_ResponseMask_SkipEntireResponseBody: 216 case *CreateLogDescriptorRequest_ResponseMask_BodyMask: 217 default: 218 _ = opt 219 } 220 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 221 return cvobj.GotenCustomValidate() 222 } 223 return nil 224 } 225 func (obj *UpdateLogDescriptorRequest) GotenValidate() error { 226 if obj == nil { 227 return nil 228 } 229 if obj.LogDescriptor == nil { 230 return gotenvalidate.NewValidationError("UpdateLogDescriptorRequest", "logDescriptor", obj.LogDescriptor, "field is required", nil) 231 } 232 if subobj, ok := interface{}(obj.LogDescriptor).(gotenvalidate.Validator); ok { 233 if err := subobj.GotenValidate(); err != nil { 234 return gotenvalidate.NewValidationError("UpdateLogDescriptorRequest", "logDescriptor", obj.LogDescriptor, "nested object validation failed", err) 235 } 236 } 237 if subobj, ok := interface{}(obj.Cas).(gotenvalidate.Validator); ok { 238 if err := subobj.GotenValidate(); err != nil { 239 return gotenvalidate.NewValidationError("UpdateLogDescriptorRequest", "cas", obj.Cas, "nested object validation failed", err) 240 } 241 } 242 if subobj, ok := interface{}(obj.ResponseMask).(gotenvalidate.Validator); ok { 243 if err := subobj.GotenValidate(); err != nil { 244 return gotenvalidate.NewValidationError("UpdateLogDescriptorRequest", "responseMask", obj.ResponseMask, "nested object validation failed", err) 245 } 246 } 247 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 248 return cvobj.GotenCustomValidate() 249 } 250 return nil 251 } 252 func (obj *UpdateLogDescriptorRequest_CAS) GotenValidate() error { 253 if obj == nil { 254 return nil 255 } 256 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 257 return cvobj.GotenCustomValidate() 258 } 259 return nil 260 } 261 func (obj *UpdateLogDescriptorRequest_ResponseMask) GotenValidate() error { 262 if obj == nil { 263 return nil 264 } 265 switch opt := obj.Masking.(type) { 266 case *UpdateLogDescriptorRequest_ResponseMask_SkipEntireResponseBody: 267 case *UpdateLogDescriptorRequest_ResponseMask_UpdatedFieldsOnly: 268 case *UpdateLogDescriptorRequest_ResponseMask_BodyMask: 269 default: 270 _ = opt 271 } 272 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 273 return cvobj.GotenCustomValidate() 274 } 275 return nil 276 } 277 func (obj *DeleteLogDescriptorRequest) GotenValidate() error { 278 if obj == nil { 279 return nil 280 } 281 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 282 return cvobj.GotenCustomValidate() 283 } 284 return nil 285 }