github.com/cloudwan/edgelq-sdk@v1.15.4/cellular-api/client/v1/sim_card_stock/sim_card_stock_custom.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/cellular-api/proto/v1/sim_card_stock_custom.proto 3 // DO NOT EDIT!!! 4 5 package sim_card_stock_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 carrier "github.com/cloudwan/edgelq-sdk/cellular-api/carrier" 24 sim_card "github.com/cloudwan/edgelq-sdk/cellular-api/resources/v1/sim_card" 25 sim_card_stock "github.com/cloudwan/edgelq-sdk/cellular-api/resources/v1/sim_card_stock" 26 iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1/project" 27 ) 28 29 var ( 30 _ = bytes.Equal 31 _ = errors.New 32 _ = fmt.Errorf 33 _ = net.ParseIP 34 _ = regexp.Match 35 _ = strings.Split 36 _ = time.Now 37 _ = utf8.RuneCountInString 38 _ = url.Parse 39 _ = gotenvalidate.NewValidationError 40 ) 41 42 // make sure we're using proto imports 43 var ( 44 _ = &carrier.TransatelAccount{} 45 _ = &sim_card.SimCard{} 46 _ = &sim_card_stock.SimCardStock{} 47 _ = &iam_project.Project{} 48 ) 49 50 func (obj *AllocateRequest) GotenValidate() error { 51 if obj == nil { 52 return nil 53 } 54 if obj.RegionId == "" { 55 return gotenvalidate.NewValidationError("AllocateRequest", "regionId", obj.RegionId, "field is required", nil) 56 } 57 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 58 return cvobj.GotenCustomValidate() 59 } 60 return nil 61 } 62 func (obj *DeallocateRequest) 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 }