github.com/cloudwan/edgelq-sdk@v1.15.4/secrets/client/v1/crypto_key/crypto_key_service.pb.validate.go (about) 1 // Code generated by protoc-gen-goten-validate 2 // File: edgelq/secrets/proto/v1/crypto_key_service.proto 3 // DO NOT EDIT!!! 4 5 package crypto_key_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 crypto_key "github.com/cloudwan/edgelq-sdk/secrets/resources/v1/crypto_key" 24 project "github.com/cloudwan/edgelq-sdk/secrets/resources/v1/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 _ = &crypto_key.CryptoKey{} 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 *GetCryptoKeyRequest) 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 *BatchGetCryptoKeysRequest) 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 *BatchGetCryptoKeysResponse) GotenValidate() error { 75 if obj == nil { 76 return nil 77 } 78 for idx, elem := range obj.CryptoKeys { 79 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 80 if err := subobj.GotenValidate(); err != nil { 81 return gotenvalidate.NewValidationError("BatchGetCryptoKeysResponse", "cryptoKeys", obj.CryptoKeys[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 *ListCryptoKeysRequest) GotenValidate() error { 91 if obj == nil { 92 return nil 93 } 94 if !(obj.PageSize >= 0) { 95 return gotenvalidate.NewValidationError("ListCryptoKeysRequest", "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 *ListCryptoKeysResponse) GotenValidate() error { 103 if obj == nil { 104 return nil 105 } 106 for idx, elem := range obj.CryptoKeys { 107 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 108 if err := subobj.GotenValidate(); err != nil { 109 return gotenvalidate.NewValidationError("ListCryptoKeysResponse", "cryptoKeys", obj.CryptoKeys[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 *WatchCryptoKeyRequest) 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 *WatchCryptoKeyResponse) 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("WatchCryptoKeyResponse", "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 *WatchCryptoKeysRequest) GotenValidate() error { 142 if obj == nil { 143 return nil 144 } 145 if !(obj.PageSize >= 0) { 146 return gotenvalidate.NewValidationError("WatchCryptoKeysRequest", "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("WatchCryptoKeysRequest", "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 *WatchCryptoKeysResponse) GotenValidate() error { 157 if obj == nil { 158 return nil 159 } 160 for idx, elem := range obj.CryptoKeyChanges { 161 if subobj, ok := interface{}(elem).(gotenvalidate.Validator); ok { 162 if err := subobj.GotenValidate(); err != nil { 163 return gotenvalidate.NewValidationError("WatchCryptoKeysResponse", "cryptoKeyChanges", obj.CryptoKeyChanges[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("WatchCryptoKeysResponse", "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 *WatchCryptoKeysResponse_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 *DeleteCryptoKeyRequest) GotenValidate() error { 187 if obj == nil { 188 return nil 189 } 190 if cvobj, ok := interface{}(obj).(gotenvalidate.CustomValidator); ok { 191 return cvobj.GotenCustomValidate() 192 } 193 return nil 194 }