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