diff --git a/go.mod b/go.mod index 86eedf644..b8e0f7beb 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( github.com/stretchr/testify v1.8.1 github.com/withfig/autocomplete-tools/integrations/cobra v1.2.1 golang.org/x/mod v0.7.0 - google.golang.org/grpc v1.52.3 + google.golang.org/grpc v1.53.0 google.golang.org/protobuf v1.28.1 ) @@ -52,7 +52,7 @@ require ( github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emirpasic/gods v1.18.1 // indirect - github.com/envoyproxy/protoc-gen-validate v0.1.0 // indirect + github.com/envoyproxy/protoc-gen-validate v0.9.1 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect @@ -90,7 +90,7 @@ require ( golang.org/x/term v0.5.0 // indirect golang.org/x/text v0.7.0 // indirect google.golang.org/appengine v1.6.7 // indirect - google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef // indirect + google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index 82487b3fe..c5b58e0fa 100644 --- a/go.sum +++ b/go.sum @@ -299,8 +299,9 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= +github.com/envoyproxy/protoc-gen-validate v0.9.1 h1:PS7VIOgmSVhWUEeZwTe7z7zouA22Cr590PzXKbZHOVY= +github.com/envoyproxy/protoc-gen-validate v0.9.1/go.mod h1:OKNgG7TCp5pF4d6XftA0++PMirau2/yoOwVac3AbF2w= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.14.1 h1:qfhVLaG5s+nCROl1zJsZRxFeYrHLqWroPOQ8BWiNb4w= @@ -1172,8 +1173,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef h1:uQ2vjV/sHTsWSqdKeLqmwitzgvjMl7o4IdtHwUDXSJY= -google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f h1:BWUVssLB0HVOSY78gIdvk1dTVYtT1y8SBWtPYuTJ/6w= +google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -1197,8 +1198,8 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= -google.golang.org/grpc v1.52.3 h1:pf7sOysg4LdgBqduXveGKrcEwbStiK2rtfghdzlUYDQ= -google.golang.org/grpc v1.52.3/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY= +google.golang.org/grpc v1.53.0 h1:LAv2ds7cmFV/XTS3XG1NneeENYrXGmorPxsBbptIjNc= +google.golang.org/grpc v1.53.0/go.mod h1:OnIrk0ipVdj4N5d9IUoFUx72/VlD7+jUsHwZgwSMQpw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD index 8a3d063d6..a9d38c51b 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/BUILD @@ -1,12 +1,18 @@ -# gazelle:exclude validate.pb.go - -load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") load("@com_google_protobuf//:protobuf.bzl", "py_proto_library") +load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library") +load("@rules_cc//cc:defs.bzl", "cc_library", "cc_proto_library") +load("@rules_java//java:defs.bzl", "java_proto_library") +load("@rules_proto//proto:defs.bzl", "proto_library") +load("@io_bazel_rules_go//go:def.bzl", "go_library") + +package( + default_visibility = + ["//visibility:public"], +) proto_library( name = "validate_proto", srcs = ["validate.proto"], - visibility = ["//visibility:public"], deps = [ "@com_google_protobuf//:descriptor_proto", "@com_google_protobuf//:duration_proto", @@ -17,33 +23,52 @@ proto_library( cc_proto_library( name = "validate_cc", deps = [":validate_proto"], - visibility = ["//visibility:public"], ) py_proto_library( name = "validate_py", srcs = ["validate.proto"], - protoc = "@com_google_protobuf//:protoc", - default_runtime = "@com_google_protobuf//:protobuf_python", deps = ["@com_google_protobuf//:protobuf_python"], - visibility = ["//visibility:public"], ) go_proto_library( - name = "go_default_library", + name = "validate_go_proto", importpath = "github.com/envoyproxy/protoc-gen-validate/validate", proto = ":validate_proto", - visibility = ["//visibility:public"], ) cc_library( name = "cc_validate", hdrs = ["validate.h"], - visibility = ["//visibility:public"], +) + +go_library( + name = "validate_go", + embed = [":validate_go_proto"], + importpath = "github.com/envoyproxy/protoc-gen-validate/validate", ) java_proto_library( name = "validate_java", deps = [":validate_proto"], - visibility=["//visibility:public"], +) + +filegroup( + name = "validate_src", + srcs = ["validate.proto"], +) + +alias( + name = "go_default_library", + actual = ":validate", + deprecation = "Use :validate instead of :go_default_library. Details about the new naming convention: https://github.com/bazelbuild/bazel-gazelle/pull/863", + visibility = ["//visibility:public"], +) + +# this alias allows build files generated with Gazelle in other repositories +# to find validate as an external dependency +alias( + name = "validate", + actual = ":validate_go", + visibility = ["//visibility:public"], ) diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h index b309c2ef3..190272e37 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.h @@ -5,85 +5,116 @@ #include #include #include -#include #include +#include #include #if !defined(_WIN32) #include #else -#include +#include #include + +// uses macros to #define a ton of symbols, +// many of which interfere with our code here and down +// the line in various extensions. +#undef DELETE +#undef ERROR +#undef GetMessage +#undef interface +#undef TRUE +#undef min + #endif +#include "google/protobuf/message.h" +#include "google/protobuf/stubs/strutil.h" // for UTF8Len + namespace pgv { using std::string; class UnimplementedException : public std::runtime_error { public: UnimplementedException() : std::runtime_error("not yet implemented") {} + UnimplementedException(const std::string& message) : std::runtime_error(message) {} // Thrown by C++ validation code that is not yet implemented. }; using ValidationMsg = std::string; class BaseValidator { +public: + /** + * Validate/check a generic message object with a registered validator for the concrete message + * type. + * @param m supplies the message to check. + * @param err supplies the place to return error information. + * @return true if the validation passes OR there is no registered validator for the concrete + * message type. false is returned if validation explicitly fails. + */ + static bool AbstractCheckMessage(const google::protobuf::Message& m, ValidationMsg* err) { + // Polymorphic lookup is used to see if there is a matching concrete validator. If so, call it. + // Otherwise return success. + auto it = abstractValidators().find(std::type_index(typeid(m))); + if (it == abstractValidators().end()) { + return true; + } + return it->second(m, err); + } + protected: - static std::unordered_map& validators() { - static auto* validator_map = new std::unordered_map(); + // Used to implement AbstractCheckMessage() above. Every message that is linked into the binary + // will register itself by type_index, allowing for polymorphic lookup later. + static std::unordered_map>& + abstractValidators() { + static auto* validator_map = new std::unordered_map< + std::type_index, std::function>(); return *validator_map; } }; -template -class Validator : public BaseValidator { +template class Validator : public BaseValidator { public: - Validator(std::function check) : check_(check) - { - validators()[std::type_index(typeid(T))] = this; - } - - static bool CheckMessage(const T& m, ValidationMsg* err) - { - auto val = static_cast*>(validators()[std::type_index(typeid(T))]); - if (val) { - return val->check_(m, err); - } - return true; + Validator(std::function check) : check_(check) { + abstractValidators()[std::type_index(typeid(T))] = [this](const google::protobuf::Message& m, + ValidationMsg* err) -> bool { + return check_(dynamic_cast(m), err); + }; } private: std::function check_; }; -static inline std::string String(const ValidationMsg& msg) -{ - return std::string(msg); -} +static inline std::string String(const ValidationMsg& msg) { return std::string(msg); } -static inline bool IsPrefix(const string& maybe_prefix, const string& search_in) -{ +static inline bool IsPrefix(const string& maybe_prefix, const string& search_in) { return search_in.compare(0, maybe_prefix.size(), maybe_prefix) == 0; } -static inline bool IsSuffix(const string& maybe_suffix, const string& search_in) -{ - return maybe_suffix.size() <= search_in.size() && search_in.compare(search_in.size() - maybe_suffix.size(), maybe_suffix.size(), maybe_suffix) == 0; +static inline bool IsSuffix(const string& maybe_suffix, const string& search_in) { + return maybe_suffix.size() <= search_in.size() && + search_in.compare(search_in.size() - maybe_suffix.size(), maybe_suffix.size(), + maybe_suffix) == 0; } -static inline bool Contains(const string& search_in, const string& to_find) -{ +static inline bool Contains(const string& search_in, const string& to_find) { return search_in.find(to_find) != string::npos; } +static inline bool NotContains(const string& search_in, const string& to_find) { + return !Contains(search_in, to_find); +} + static inline bool IsIpv4(const string& to_validate) { - struct sockaddr_in sa; - return !(inet_pton(AF_INET, to_validate.c_str(), &sa.sin_addr) < 1); + struct sockaddr_in sa; + return !(inet_pton(AF_INET, to_validate.c_str(), &sa.sin_addr) < 1); } static inline bool IsIpv6(const string& to_validate) { struct sockaddr_in6 sa_six; - return !(inet_pton(AF_INET6, to_validate.c_str(), &sa_six.sin6_addr) < 1); + return !(inet_pton(AF_INET6, to_validate.c_str(), &sa_six.sin6_addr) < 1); } static inline bool IsIp(const string& to_validate) { @@ -99,7 +130,7 @@ static inline bool IsHostname(const string& to_validate) { const auto iter_end = std::sregex_token_iterator(); auto iter = std::sregex_token_iterator(to_validate.begin(), to_validate.end(), dot_regex, -1); for (; iter != iter_end; ++iter) { - const std::string &part = *iter; + const std::string& part = *iter; if (part.empty() || part.length() > 63) { return false; } @@ -109,8 +140,9 @@ static inline bool IsHostname(const string& to_validate) { if (part.at(part.length() - 1) == '-') { return false; } - for (const auto &character : part) { - if ((character < 'A' || character > 'Z') && (character < 'a' || character > 'z') && (character < '0' || character > '9') && character != '-') { + for (const auto& character : part) { + if ((character < 'A' || character > 'Z') && (character < 'a' || character > 'z') && + (character < '0' || character > '9') && character != '-') { return false; } } @@ -119,6 +151,20 @@ static inline bool IsHostname(const string& to_validate) { return true; } +static inline size_t Utf8Len(const string& narrow_string) { + const char* str_char = narrow_string.c_str(); + ptrdiff_t byte_len = narrow_string.length(); + size_t unicode_len = 0; + int char_len = 1; + while (byte_len > 0 && char_len > 0) { + char_len = google::protobuf::UTF8FirstLetterNumBytes(str_char, byte_len); + str_char += char_len; + byte_len -= char_len; + ++unicode_len; + } + return unicode_len; +} + } // namespace pgv #endif // _VALIDATE_H diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go index 255dc5ec0..825774fe4 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.pb.go @@ -1,30 +1,100 @@ // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.28.1 +// protoc v3.21.9 // source: validate/validate.proto -package validate // import "github.com/envoyproxy/protoc-gen-validate/validate" +package validate -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" -import descriptor "github.com/golang/protobuf/protoc-gen-go/descriptor" -import duration "github.com/golang/protobuf/ptypes/duration" -import timestamp "github.com/golang/protobuf/ptypes/timestamp" +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + descriptorpb "google.golang.org/protobuf/types/descriptorpb" + durationpb "google.golang.org/protobuf/types/known/durationpb" + timestamppb "google.golang.org/protobuf/types/known/timestamppb" + reflect "reflect" + sync "sync" +) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package +// WellKnownRegex contain some well-known patterns. +type KnownRegex int32 + +const ( + KnownRegex_UNKNOWN KnownRegex = 0 + // HTTP header name as defined by RFC 7230. + KnownRegex_HTTP_HEADER_NAME KnownRegex = 1 + // HTTP header value as defined by RFC 7230. + KnownRegex_HTTP_HEADER_VALUE KnownRegex = 2 +) + +// Enum value maps for KnownRegex. +var ( + KnownRegex_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HTTP_HEADER_NAME", + 2: "HTTP_HEADER_VALUE", + } + KnownRegex_value = map[string]int32{ + "UNKNOWN": 0, + "HTTP_HEADER_NAME": 1, + "HTTP_HEADER_VALUE": 2, + } +) + +func (x KnownRegex) Enum() *KnownRegex { + p := new(KnownRegex) + *p = x + return p +} + +func (x KnownRegex) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KnownRegex) Descriptor() protoreflect.EnumDescriptor { + return file_validate_validate_proto_enumTypes[0].Descriptor() +} + +func (KnownRegex) Type() protoreflect.EnumType { + return &file_validate_validate_proto_enumTypes[0] +} + +func (x KnownRegex) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Do not use. +func (x *KnownRegex) UnmarshalJSON(b []byte) error { + num, err := protoimpl.X.UnmarshalJSONEnum(x.Descriptor(), b) + if err != nil { + return err + } + *x = KnownRegex(num) + return nil +} + +// Deprecated: Use KnownRegex.Descriptor instead. +func (KnownRegex) EnumDescriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{0} +} // FieldRules encapsulates the rules for each type of field. Depending on the // field, the correct set should be used to ensure proper validations. type FieldRules struct { - // Types that are valid to be assigned to Type: + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Message *MessageRules `protobuf:"bytes,17,opt,name=message" json:"message,omitempty"` + // Types that are assignable to Type: + // // *FieldRules_Float // *FieldRules_Double // *FieldRules_Int32 @@ -41,47 +111,213 @@ type FieldRules struct { // *FieldRules_String_ // *FieldRules_Bytes // *FieldRules_Enum - // *FieldRules_Message // *FieldRules_Repeated // *FieldRules_Map // *FieldRules_Any // *FieldRules_Duration // *FieldRules_Timestamp - Type isFieldRules_Type `protobuf_oneof:"type"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Type isFieldRules_Type `protobuf_oneof:"type"` } -func (m *FieldRules) Reset() { *m = FieldRules{} } -func (m *FieldRules) String() string { return proto.CompactTextString(m) } -func (*FieldRules) ProtoMessage() {} +func (x *FieldRules) Reset() { + *x = FieldRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FieldRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FieldRules) ProtoMessage() {} + +func (x *FieldRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FieldRules.ProtoReflect.Descriptor instead. func (*FieldRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{0} + return file_validate_validate_proto_rawDescGZIP(), []int{0} } -func (m *FieldRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FieldRules.Unmarshal(m, b) + +func (x *FieldRules) GetMessage() *MessageRules { + if x != nil { + return x.Message + } + return nil } -func (m *FieldRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FieldRules.Marshal(b, m, deterministic) + +func (m *FieldRules) GetType() isFieldRules_Type { + if m != nil { + return m.Type + } + return nil } -func (dst *FieldRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_FieldRules.Merge(dst, src) + +func (x *FieldRules) GetFloat() *FloatRules { + if x, ok := x.GetType().(*FieldRules_Float); ok { + return x.Float + } + return nil } -func (m *FieldRules) XXX_Size() int { - return xxx_messageInfo_FieldRules.Size(m) + +func (x *FieldRules) GetDouble() *DoubleRules { + if x, ok := x.GetType().(*FieldRules_Double); ok { + return x.Double + } + return nil } -func (m *FieldRules) XXX_DiscardUnknown() { - xxx_messageInfo_FieldRules.DiscardUnknown(m) + +func (x *FieldRules) GetInt32() *Int32Rules { + if x, ok := x.GetType().(*FieldRules_Int32); ok { + return x.Int32 + } + return nil } -var xxx_messageInfo_FieldRules proto.InternalMessageInfo +func (x *FieldRules) GetInt64() *Int64Rules { + if x, ok := x.GetType().(*FieldRules_Int64); ok { + return x.Int64 + } + return nil +} + +func (x *FieldRules) GetUint32() *UInt32Rules { + if x, ok := x.GetType().(*FieldRules_Uint32); ok { + return x.Uint32 + } + return nil +} + +func (x *FieldRules) GetUint64() *UInt64Rules { + if x, ok := x.GetType().(*FieldRules_Uint64); ok { + return x.Uint64 + } + return nil +} + +func (x *FieldRules) GetSint32() *SInt32Rules { + if x, ok := x.GetType().(*FieldRules_Sint32); ok { + return x.Sint32 + } + return nil +} + +func (x *FieldRules) GetSint64() *SInt64Rules { + if x, ok := x.GetType().(*FieldRules_Sint64); ok { + return x.Sint64 + } + return nil +} + +func (x *FieldRules) GetFixed32() *Fixed32Rules { + if x, ok := x.GetType().(*FieldRules_Fixed32); ok { + return x.Fixed32 + } + return nil +} + +func (x *FieldRules) GetFixed64() *Fixed64Rules { + if x, ok := x.GetType().(*FieldRules_Fixed64); ok { + return x.Fixed64 + } + return nil +} + +func (x *FieldRules) GetSfixed32() *SFixed32Rules { + if x, ok := x.GetType().(*FieldRules_Sfixed32); ok { + return x.Sfixed32 + } + return nil +} + +func (x *FieldRules) GetSfixed64() *SFixed64Rules { + if x, ok := x.GetType().(*FieldRules_Sfixed64); ok { + return x.Sfixed64 + } + return nil +} + +func (x *FieldRules) GetBool() *BoolRules { + if x, ok := x.GetType().(*FieldRules_Bool); ok { + return x.Bool + } + return nil +} + +func (x *FieldRules) GetString_() *StringRules { + if x, ok := x.GetType().(*FieldRules_String_); ok { + return x.String_ + } + return nil +} + +func (x *FieldRules) GetBytes() *BytesRules { + if x, ok := x.GetType().(*FieldRules_Bytes); ok { + return x.Bytes + } + return nil +} + +func (x *FieldRules) GetEnum() *EnumRules { + if x, ok := x.GetType().(*FieldRules_Enum); ok { + return x.Enum + } + return nil +} + +func (x *FieldRules) GetRepeated() *RepeatedRules { + if x, ok := x.GetType().(*FieldRules_Repeated); ok { + return x.Repeated + } + return nil +} + +func (x *FieldRules) GetMap() *MapRules { + if x, ok := x.GetType().(*FieldRules_Map); ok { + return x.Map + } + return nil +} + +func (x *FieldRules) GetAny() *AnyRules { + if x, ok := x.GetType().(*FieldRules_Any); ok { + return x.Any + } + return nil +} + +func (x *FieldRules) GetDuration() *DurationRules { + if x, ok := x.GetType().(*FieldRules_Duration); ok { + return x.Duration + } + return nil +} + +func (x *FieldRules) GetTimestamp() *TimestampRules { + if x, ok := x.GetType().(*FieldRules_Timestamp); ok { + return x.Timestamp + } + return nil +} type isFieldRules_Type interface { isFieldRules_Type() } type FieldRules_Float struct { + // Scalar Field Types Float *FloatRules `protobuf:"bytes,1,opt,name=float,oneof"` } @@ -142,13 +378,10 @@ type FieldRules_Bytes struct { } type FieldRules_Enum struct { + // Complex Field Types Enum *EnumRules `protobuf:"bytes,16,opt,name=enum,oneof"` } -type FieldRules_Message struct { - Message *MessageRules `protobuf:"bytes,17,opt,name=message,oneof"` -} - type FieldRules_Repeated struct { Repeated *RepeatedRules `protobuf:"bytes,18,opt,name=repeated,oneof"` } @@ -158,6 +391,7 @@ type FieldRules_Map struct { } type FieldRules_Any struct { + // Well-Known Field Types Any *AnyRules `protobuf:"bytes,20,opt,name=any,oneof"` } @@ -201,8 +435,6 @@ func (*FieldRules_Bytes) isFieldRules_Type() {} func (*FieldRules_Enum) isFieldRules_Type() {} -func (*FieldRules_Message) isFieldRules_Type() {} - func (*FieldRules_Repeated) isFieldRules_Type() {} func (*FieldRules_Map) isFieldRules_Type() {} @@ -213,623 +445,12 @@ func (*FieldRules_Duration) isFieldRules_Type() {} func (*FieldRules_Timestamp) isFieldRules_Type() {} -func (m *FieldRules) GetType() isFieldRules_Type { - if m != nil { - return m.Type - } - return nil -} - -func (m *FieldRules) GetFloat() *FloatRules { - if x, ok := m.GetType().(*FieldRules_Float); ok { - return x.Float - } - return nil -} - -func (m *FieldRules) GetDouble() *DoubleRules { - if x, ok := m.GetType().(*FieldRules_Double); ok { - return x.Double - } - return nil -} - -func (m *FieldRules) GetInt32() *Int32Rules { - if x, ok := m.GetType().(*FieldRules_Int32); ok { - return x.Int32 - } - return nil -} - -func (m *FieldRules) GetInt64() *Int64Rules { - if x, ok := m.GetType().(*FieldRules_Int64); ok { - return x.Int64 - } - return nil -} - -func (m *FieldRules) GetUint32() *UInt32Rules { - if x, ok := m.GetType().(*FieldRules_Uint32); ok { - return x.Uint32 - } - return nil -} - -func (m *FieldRules) GetUint64() *UInt64Rules { - if x, ok := m.GetType().(*FieldRules_Uint64); ok { - return x.Uint64 - } - return nil -} - -func (m *FieldRules) GetSint32() *SInt32Rules { - if x, ok := m.GetType().(*FieldRules_Sint32); ok { - return x.Sint32 - } - return nil -} - -func (m *FieldRules) GetSint64() *SInt64Rules { - if x, ok := m.GetType().(*FieldRules_Sint64); ok { - return x.Sint64 - } - return nil -} - -func (m *FieldRules) GetFixed32() *Fixed32Rules { - if x, ok := m.GetType().(*FieldRules_Fixed32); ok { - return x.Fixed32 - } - return nil -} - -func (m *FieldRules) GetFixed64() *Fixed64Rules { - if x, ok := m.GetType().(*FieldRules_Fixed64); ok { - return x.Fixed64 - } - return nil -} - -func (m *FieldRules) GetSfixed32() *SFixed32Rules { - if x, ok := m.GetType().(*FieldRules_Sfixed32); ok { - return x.Sfixed32 - } - return nil -} - -func (m *FieldRules) GetSfixed64() *SFixed64Rules { - if x, ok := m.GetType().(*FieldRules_Sfixed64); ok { - return x.Sfixed64 - } - return nil -} - -func (m *FieldRules) GetBool() *BoolRules { - if x, ok := m.GetType().(*FieldRules_Bool); ok { - return x.Bool - } - return nil -} - -func (m *FieldRules) GetString_() *StringRules { - if x, ok := m.GetType().(*FieldRules_String_); ok { - return x.String_ - } - return nil -} - -func (m *FieldRules) GetBytes() *BytesRules { - if x, ok := m.GetType().(*FieldRules_Bytes); ok { - return x.Bytes - } - return nil -} - -func (m *FieldRules) GetEnum() *EnumRules { - if x, ok := m.GetType().(*FieldRules_Enum); ok { - return x.Enum - } - return nil -} - -func (m *FieldRules) GetMessage() *MessageRules { - if x, ok := m.GetType().(*FieldRules_Message); ok { - return x.Message - } - return nil -} - -func (m *FieldRules) GetRepeated() *RepeatedRules { - if x, ok := m.GetType().(*FieldRules_Repeated); ok { - return x.Repeated - } - return nil -} - -func (m *FieldRules) GetMap() *MapRules { - if x, ok := m.GetType().(*FieldRules_Map); ok { - return x.Map - } - return nil -} - -func (m *FieldRules) GetAny() *AnyRules { - if x, ok := m.GetType().(*FieldRules_Any); ok { - return x.Any - } - return nil -} - -func (m *FieldRules) GetDuration() *DurationRules { - if x, ok := m.GetType().(*FieldRules_Duration); ok { - return x.Duration - } - return nil -} - -func (m *FieldRules) GetTimestamp() *TimestampRules { - if x, ok := m.GetType().(*FieldRules_Timestamp); ok { - return x.Timestamp - } - return nil -} - -// XXX_OneofFuncs is for the internal use of the proto package. -func (*FieldRules) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _FieldRules_OneofMarshaler, _FieldRules_OneofUnmarshaler, _FieldRules_OneofSizer, []interface{}{ - (*FieldRules_Float)(nil), - (*FieldRules_Double)(nil), - (*FieldRules_Int32)(nil), - (*FieldRules_Int64)(nil), - (*FieldRules_Uint32)(nil), - (*FieldRules_Uint64)(nil), - (*FieldRules_Sint32)(nil), - (*FieldRules_Sint64)(nil), - (*FieldRules_Fixed32)(nil), - (*FieldRules_Fixed64)(nil), - (*FieldRules_Sfixed32)(nil), - (*FieldRules_Sfixed64)(nil), - (*FieldRules_Bool)(nil), - (*FieldRules_String_)(nil), - (*FieldRules_Bytes)(nil), - (*FieldRules_Enum)(nil), - (*FieldRules_Message)(nil), - (*FieldRules_Repeated)(nil), - (*FieldRules_Map)(nil), - (*FieldRules_Any)(nil), - (*FieldRules_Duration)(nil), - (*FieldRules_Timestamp)(nil), - } -} - -func _FieldRules_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*FieldRules) - // type - switch x := m.Type.(type) { - case *FieldRules_Float: - b.EncodeVarint(1<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Float); err != nil { - return err - } - case *FieldRules_Double: - b.EncodeVarint(2<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Double); err != nil { - return err - } - case *FieldRules_Int32: - b.EncodeVarint(3<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Int32); err != nil { - return err - } - case *FieldRules_Int64: - b.EncodeVarint(4<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Int64); err != nil { - return err - } - case *FieldRules_Uint32: - b.EncodeVarint(5<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Uint32); err != nil { - return err - } - case *FieldRules_Uint64: - b.EncodeVarint(6<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Uint64); err != nil { - return err - } - case *FieldRules_Sint32: - b.EncodeVarint(7<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Sint32); err != nil { - return err - } - case *FieldRules_Sint64: - b.EncodeVarint(8<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Sint64); err != nil { - return err - } - case *FieldRules_Fixed32: - b.EncodeVarint(9<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Fixed32); err != nil { - return err - } - case *FieldRules_Fixed64: - b.EncodeVarint(10<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Fixed64); err != nil { - return err - } - case *FieldRules_Sfixed32: - b.EncodeVarint(11<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Sfixed32); err != nil { - return err - } - case *FieldRules_Sfixed64: - b.EncodeVarint(12<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Sfixed64); err != nil { - return err - } - case *FieldRules_Bool: - b.EncodeVarint(13<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Bool); err != nil { - return err - } - case *FieldRules_String_: - b.EncodeVarint(14<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.String_); err != nil { - return err - } - case *FieldRules_Bytes: - b.EncodeVarint(15<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Bytes); err != nil { - return err - } - case *FieldRules_Enum: - b.EncodeVarint(16<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Enum); err != nil { - return err - } - case *FieldRules_Message: - b.EncodeVarint(17<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Message); err != nil { - return err - } - case *FieldRules_Repeated: - b.EncodeVarint(18<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Repeated); err != nil { - return err - } - case *FieldRules_Map: - b.EncodeVarint(19<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Map); err != nil { - return err - } - case *FieldRules_Any: - b.EncodeVarint(20<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Any); err != nil { - return err - } - case *FieldRules_Duration: - b.EncodeVarint(21<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Duration); err != nil { - return err - } - case *FieldRules_Timestamp: - b.EncodeVarint(22<<3 | proto.WireBytes) - if err := b.EncodeMessage(x.Timestamp); err != nil { - return err - } - case nil: - default: - return fmt.Errorf("FieldRules.Type has unexpected type %T", x) - } - return nil -} - -func _FieldRules_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*FieldRules) - switch tag { - case 1: // type.float - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(FloatRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Float{msg} - return true, err - case 2: // type.double - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(DoubleRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Double{msg} - return true, err - case 3: // type.int32 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Int32Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Int32{msg} - return true, err - case 4: // type.int64 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Int64Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Int64{msg} - return true, err - case 5: // type.uint32 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(UInt32Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Uint32{msg} - return true, err - case 6: // type.uint64 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(UInt64Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Uint64{msg} - return true, err - case 7: // type.sint32 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SInt32Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Sint32{msg} - return true, err - case 8: // type.sint64 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SInt64Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Sint64{msg} - return true, err - case 9: // type.fixed32 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Fixed32Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Fixed32{msg} - return true, err - case 10: // type.fixed64 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(Fixed64Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Fixed64{msg} - return true, err - case 11: // type.sfixed32 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SFixed32Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Sfixed32{msg} - return true, err - case 12: // type.sfixed64 - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(SFixed64Rules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Sfixed64{msg} - return true, err - case 13: // type.bool - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(BoolRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Bool{msg} - return true, err - case 14: // type.string - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(StringRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_String_{msg} - return true, err - case 15: // type.bytes - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(BytesRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Bytes{msg} - return true, err - case 16: // type.enum - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(EnumRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Enum{msg} - return true, err - case 17: // type.message - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MessageRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Message{msg} - return true, err - case 18: // type.repeated - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(RepeatedRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Repeated{msg} - return true, err - case 19: // type.map - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(MapRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Map{msg} - return true, err - case 20: // type.any - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(AnyRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Any{msg} - return true, err - case 21: // type.duration - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(DurationRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Duration{msg} - return true, err - case 22: // type.timestamp - if wire != proto.WireBytes { - return true, proto.ErrInternalBadWireType - } - msg := new(TimestampRules) - err := b.DecodeMessage(msg) - m.Type = &FieldRules_Timestamp{msg} - return true, err - default: - return false, nil - } -} - -func _FieldRules_OneofSizer(msg proto.Message) (n int) { - m := msg.(*FieldRules) - // type - switch x := m.Type.(type) { - case *FieldRules_Float: - s := proto.Size(x.Float) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Double: - s := proto.Size(x.Double) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Int32: - s := proto.Size(x.Int32) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Int64: - s := proto.Size(x.Int64) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Uint32: - s := proto.Size(x.Uint32) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Uint64: - s := proto.Size(x.Uint64) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Sint32: - s := proto.Size(x.Sint32) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Sint64: - s := proto.Size(x.Sint64) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Fixed32: - s := proto.Size(x.Fixed32) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Fixed64: - s := proto.Size(x.Fixed64) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Sfixed32: - s := proto.Size(x.Sfixed32) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Sfixed64: - s := proto.Size(x.Sfixed64) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Bool: - s := proto.Size(x.Bool) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_String_: - s := proto.Size(x.String_) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Bytes: - s := proto.Size(x.Bytes) - n += 1 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Enum: - s := proto.Size(x.Enum) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Message: - s := proto.Size(x.Message) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Repeated: - s := proto.Size(x.Repeated) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Map: - s := proto.Size(x.Map) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Any: - s := proto.Size(x.Any) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Duration: - s := proto.Size(x.Duration) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case *FieldRules_Timestamp: - s := proto.Size(x.Timestamp) - n += 2 // tag and wire - n += proto.SizeVarint(uint64(s)) - n += s - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n -} - // FloatRules describes the constraints applied to `float` values type FloatRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *float32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -851,87 +472,106 @@ type FloatRules struct { In []float32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []float32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *FloatRules) Reset() { *m = FloatRules{} } -func (m *FloatRules) String() string { return proto.CompactTextString(m) } -func (*FloatRules) ProtoMessage() {} -func (*FloatRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{1} -} -func (m *FloatRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_FloatRules.Unmarshal(m, b) -} -func (m *FloatRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_FloatRules.Marshal(b, m, deterministic) -} -func (dst *FloatRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_FloatRules.Merge(dst, src) +func (x *FloatRules) Reset() { + *x = FloatRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *FloatRules) XXX_Size() int { - return xxx_messageInfo_FloatRules.Size(m) + +func (x *FloatRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *FloatRules) XXX_DiscardUnknown() { - xxx_messageInfo_FloatRules.DiscardUnknown(m) + +func (*FloatRules) ProtoMessage() {} + +func (x *FloatRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_FloatRules proto.InternalMessageInfo +// Deprecated: Use FloatRules.ProtoReflect.Descriptor instead. +func (*FloatRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{1} +} -func (m *FloatRules) GetConst() float32 { - if m != nil && m.Const != nil { - return *m.Const +func (x *FloatRules) GetConst() float32 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *FloatRules) GetLt() float32 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *FloatRules) GetLt() float32 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *FloatRules) GetLte() float32 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *FloatRules) GetLte() float32 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *FloatRules) GetGt() float32 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *FloatRules) GetGt() float32 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *FloatRules) GetGte() float32 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *FloatRules) GetGte() float32 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *FloatRules) GetIn() []float32 { - if m != nil { - return m.In +func (x *FloatRules) GetIn() []float32 { + if x != nil { + return x.In } return nil } -func (m *FloatRules) GetNotIn() []float32 { - if m != nil { - return m.NotIn +func (x *FloatRules) GetNotIn() []float32 { + if x != nil { + return x.NotIn } return nil } +func (x *FloatRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // DoubleRules describes the constraints applied to `double` values type DoubleRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *float64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -953,87 +593,106 @@ type DoubleRules struct { In []float64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []float64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *DoubleRules) Reset() { *m = DoubleRules{} } -func (m *DoubleRules) String() string { return proto.CompactTextString(m) } -func (*DoubleRules) ProtoMessage() {} -func (*DoubleRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{2} -} -func (m *DoubleRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DoubleRules.Unmarshal(m, b) -} -func (m *DoubleRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DoubleRules.Marshal(b, m, deterministic) -} -func (dst *DoubleRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_DoubleRules.Merge(dst, src) +func (x *DoubleRules) Reset() { + *x = DoubleRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DoubleRules) XXX_Size() int { - return xxx_messageInfo_DoubleRules.Size(m) + +func (x *DoubleRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DoubleRules) XXX_DiscardUnknown() { - xxx_messageInfo_DoubleRules.DiscardUnknown(m) + +func (*DoubleRules) ProtoMessage() {} + +func (x *DoubleRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DoubleRules proto.InternalMessageInfo +// Deprecated: Use DoubleRules.ProtoReflect.Descriptor instead. +func (*DoubleRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{2} +} -func (m *DoubleRules) GetConst() float64 { - if m != nil && m.Const != nil { - return *m.Const +func (x *DoubleRules) GetConst() float64 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *DoubleRules) GetLt() float64 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *DoubleRules) GetLt() float64 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *DoubleRules) GetLte() float64 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *DoubleRules) GetLte() float64 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *DoubleRules) GetGt() float64 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *DoubleRules) GetGt() float64 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *DoubleRules) GetGte() float64 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *DoubleRules) GetGte() float64 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *DoubleRules) GetIn() []float64 { - if m != nil { - return m.In +func (x *DoubleRules) GetIn() []float64 { + if x != nil { + return x.In } return nil } -func (m *DoubleRules) GetNotIn() []float64 { - if m != nil { - return m.NotIn +func (x *DoubleRules) GetNotIn() []float64 { + if x != nil { + return x.NotIn } return nil } +func (x *DoubleRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // Int32Rules describes the constraints applied to `int32` values type Int32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1055,87 +714,106 @@ type Int32Rules struct { In []int32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []int32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *Int32Rules) Reset() { *m = Int32Rules{} } -func (m *Int32Rules) String() string { return proto.CompactTextString(m) } -func (*Int32Rules) ProtoMessage() {} -func (*Int32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{3} -} -func (m *Int32Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Int32Rules.Unmarshal(m, b) -} -func (m *Int32Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Int32Rules.Marshal(b, m, deterministic) -} -func (dst *Int32Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int32Rules.Merge(dst, src) +func (x *Int32Rules) Reset() { + *x = Int32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Int32Rules) XXX_Size() int { - return xxx_messageInfo_Int32Rules.Size(m) + +func (x *Int32Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Int32Rules) XXX_DiscardUnknown() { - xxx_messageInfo_Int32Rules.DiscardUnknown(m) + +func (*Int32Rules) ProtoMessage() {} + +func (x *Int32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Int32Rules proto.InternalMessageInfo +// Deprecated: Use Int32Rules.ProtoReflect.Descriptor instead. +func (*Int32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{3} +} -func (m *Int32Rules) GetConst() int32 { - if m != nil && m.Const != nil { - return *m.Const +func (x *Int32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *Int32Rules) GetLt() int32 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *Int32Rules) GetLt() int32 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *Int32Rules) GetLte() int32 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *Int32Rules) GetLte() int32 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *Int32Rules) GetGt() int32 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *Int32Rules) GetGt() int32 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *Int32Rules) GetGte() int32 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *Int32Rules) GetGte() int32 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *Int32Rules) GetIn() []int32 { - if m != nil { - return m.In +func (x *Int32Rules) GetIn() []int32 { + if x != nil { + return x.In } return nil } -func (m *Int32Rules) GetNotIn() []int32 { - if m != nil { - return m.NotIn +func (x *Int32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn } return nil } +func (x *Int32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // Int64Rules describes the constraints applied to `int64` values type Int64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *int64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1157,87 +835,106 @@ type Int64Rules struct { In []int64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []int64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *Int64Rules) Reset() { *m = Int64Rules{} } -func (m *Int64Rules) String() string { return proto.CompactTextString(m) } -func (*Int64Rules) ProtoMessage() {} -func (*Int64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{4} -} -func (m *Int64Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Int64Rules.Unmarshal(m, b) -} -func (m *Int64Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Int64Rules.Marshal(b, m, deterministic) -} -func (dst *Int64Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_Int64Rules.Merge(dst, src) +func (x *Int64Rules) Reset() { + *x = Int64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Int64Rules) XXX_Size() int { - return xxx_messageInfo_Int64Rules.Size(m) + +func (x *Int64Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Int64Rules) XXX_DiscardUnknown() { - xxx_messageInfo_Int64Rules.DiscardUnknown(m) + +func (*Int64Rules) ProtoMessage() {} + +func (x *Int64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Int64Rules proto.InternalMessageInfo +// Deprecated: Use Int64Rules.ProtoReflect.Descriptor instead. +func (*Int64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{4} +} -func (m *Int64Rules) GetConst() int64 { - if m != nil && m.Const != nil { - return *m.Const +func (x *Int64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *Int64Rules) GetLt() int64 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *Int64Rules) GetLt() int64 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *Int64Rules) GetLte() int64 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *Int64Rules) GetLte() int64 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *Int64Rules) GetGt() int64 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *Int64Rules) GetGt() int64 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *Int64Rules) GetGte() int64 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *Int64Rules) GetGte() int64 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *Int64Rules) GetIn() []int64 { - if m != nil { - return m.In +func (x *Int64Rules) GetIn() []int64 { + if x != nil { + return x.In } return nil } -func (m *Int64Rules) GetNotIn() []int64 { - if m != nil { - return m.NotIn +func (x *Int64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn } return nil } +func (x *Int64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // UInt32Rules describes the constraints applied to `uint32` values type UInt32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *uint32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1259,87 +956,106 @@ type UInt32Rules struct { In []uint32 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []uint32 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *UInt32Rules) Reset() { *m = UInt32Rules{} } -func (m *UInt32Rules) String() string { return proto.CompactTextString(m) } -func (*UInt32Rules) ProtoMessage() {} -func (*UInt32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{5} -} -func (m *UInt32Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UInt32Rules.Unmarshal(m, b) -} -func (m *UInt32Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UInt32Rules.Marshal(b, m, deterministic) -} -func (dst *UInt32Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_UInt32Rules.Merge(dst, src) +func (x *UInt32Rules) Reset() { + *x = UInt32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *UInt32Rules) XXX_Size() int { - return xxx_messageInfo_UInt32Rules.Size(m) + +func (x *UInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UInt32Rules) XXX_DiscardUnknown() { - xxx_messageInfo_UInt32Rules.DiscardUnknown(m) + +func (*UInt32Rules) ProtoMessage() {} + +func (x *UInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_UInt32Rules proto.InternalMessageInfo +// Deprecated: Use UInt32Rules.ProtoReflect.Descriptor instead. +func (*UInt32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{5} +} -func (m *UInt32Rules) GetConst() uint32 { - if m != nil && m.Const != nil { - return *m.Const +func (x *UInt32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *UInt32Rules) GetLt() uint32 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *UInt32Rules) GetLt() uint32 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *UInt32Rules) GetLte() uint32 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *UInt32Rules) GetLte() uint32 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *UInt32Rules) GetGt() uint32 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *UInt32Rules) GetGt() uint32 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *UInt32Rules) GetGte() uint32 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *UInt32Rules) GetGte() uint32 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *UInt32Rules) GetIn() []uint32 { - if m != nil { - return m.In +func (x *UInt32Rules) GetIn() []uint32 { + if x != nil { + return x.In } return nil } -func (m *UInt32Rules) GetNotIn() []uint32 { - if m != nil { - return m.NotIn +func (x *UInt32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn } return nil } +func (x *UInt32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // UInt64Rules describes the constraints applied to `uint64` values type UInt64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *uint64 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1361,87 +1077,106 @@ type UInt64Rules struct { In []uint64 `protobuf:"varint,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []uint64 `protobuf:"varint,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *UInt64Rules) Reset() { *m = UInt64Rules{} } -func (m *UInt64Rules) String() string { return proto.CompactTextString(m) } -func (*UInt64Rules) ProtoMessage() {} -func (*UInt64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{6} -} -func (m *UInt64Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_UInt64Rules.Unmarshal(m, b) -} -func (m *UInt64Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_UInt64Rules.Marshal(b, m, deterministic) -} -func (dst *UInt64Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_UInt64Rules.Merge(dst, src) +func (x *UInt64Rules) Reset() { + *x = UInt64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *UInt64Rules) XXX_Size() int { - return xxx_messageInfo_UInt64Rules.Size(m) + +func (x *UInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *UInt64Rules) XXX_DiscardUnknown() { - xxx_messageInfo_UInt64Rules.DiscardUnknown(m) + +func (*UInt64Rules) ProtoMessage() {} + +func (x *UInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_UInt64Rules proto.InternalMessageInfo +// Deprecated: Use UInt64Rules.ProtoReflect.Descriptor instead. +func (*UInt64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{6} +} -func (m *UInt64Rules) GetConst() uint64 { - if m != nil && m.Const != nil { - return *m.Const +func (x *UInt64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *UInt64Rules) GetLt() uint64 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *UInt64Rules) GetLt() uint64 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *UInt64Rules) GetLte() uint64 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *UInt64Rules) GetLte() uint64 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *UInt64Rules) GetGt() uint64 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *UInt64Rules) GetGt() uint64 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *UInt64Rules) GetGte() uint64 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *UInt64Rules) GetGte() uint64 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *UInt64Rules) GetIn() []uint64 { - if m != nil { - return m.In +func (x *UInt64Rules) GetIn() []uint64 { + if x != nil { + return x.In } return nil } -func (m *UInt64Rules) GetNotIn() []uint64 { - if m != nil { - return m.NotIn +func (x *UInt64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn } return nil } +func (x *UInt64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // SInt32Rules describes the constraints applied to `sint32` values type SInt32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *int32 `protobuf:"zigzag32,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1463,87 +1198,106 @@ type SInt32Rules struct { In []int32 `protobuf:"zigzag32,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []int32 `protobuf:"zigzag32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *SInt32Rules) Reset() { *m = SInt32Rules{} } -func (m *SInt32Rules) String() string { return proto.CompactTextString(m) } -func (*SInt32Rules) ProtoMessage() {} -func (*SInt32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{7} -} -func (m *SInt32Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SInt32Rules.Unmarshal(m, b) -} -func (m *SInt32Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SInt32Rules.Marshal(b, m, deterministic) -} -func (dst *SInt32Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_SInt32Rules.Merge(dst, src) +func (x *SInt32Rules) Reset() { + *x = SInt32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SInt32Rules) XXX_Size() int { - return xxx_messageInfo_SInt32Rules.Size(m) + +func (x *SInt32Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SInt32Rules) XXX_DiscardUnknown() { - xxx_messageInfo_SInt32Rules.DiscardUnknown(m) + +func (*SInt32Rules) ProtoMessage() {} + +func (x *SInt32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SInt32Rules proto.InternalMessageInfo +// Deprecated: Use SInt32Rules.ProtoReflect.Descriptor instead. +func (*SInt32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{7} +} -func (m *SInt32Rules) GetConst() int32 { - if m != nil && m.Const != nil { - return *m.Const +func (x *SInt32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *SInt32Rules) GetLt() int32 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *SInt32Rules) GetLt() int32 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *SInt32Rules) GetLte() int32 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *SInt32Rules) GetLte() int32 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *SInt32Rules) GetGt() int32 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *SInt32Rules) GetGt() int32 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *SInt32Rules) GetGte() int32 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *SInt32Rules) GetGte() int32 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *SInt32Rules) GetIn() []int32 { - if m != nil { - return m.In +func (x *SInt32Rules) GetIn() []int32 { + if x != nil { + return x.In } return nil } -func (m *SInt32Rules) GetNotIn() []int32 { - if m != nil { - return m.NotIn +func (x *SInt32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn } return nil } +func (x *SInt32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // SInt64Rules describes the constraints applied to `sint64` values type SInt64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *int64 `protobuf:"zigzag64,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1565,87 +1319,106 @@ type SInt64Rules struct { In []int64 `protobuf:"zigzag64,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []int64 `protobuf:"zigzag64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *SInt64Rules) Reset() { *m = SInt64Rules{} } -func (m *SInt64Rules) String() string { return proto.CompactTextString(m) } -func (*SInt64Rules) ProtoMessage() {} -func (*SInt64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{8} -} -func (m *SInt64Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SInt64Rules.Unmarshal(m, b) -} -func (m *SInt64Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SInt64Rules.Marshal(b, m, deterministic) -} -func (dst *SInt64Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_SInt64Rules.Merge(dst, src) +func (x *SInt64Rules) Reset() { + *x = SInt64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SInt64Rules) XXX_Size() int { - return xxx_messageInfo_SInt64Rules.Size(m) + +func (x *SInt64Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SInt64Rules) XXX_DiscardUnknown() { - xxx_messageInfo_SInt64Rules.DiscardUnknown(m) + +func (*SInt64Rules) ProtoMessage() {} + +func (x *SInt64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SInt64Rules proto.InternalMessageInfo +// Deprecated: Use SInt64Rules.ProtoReflect.Descriptor instead. +func (*SInt64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{8} +} -func (m *SInt64Rules) GetConst() int64 { - if m != nil && m.Const != nil { - return *m.Const +func (x *SInt64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *SInt64Rules) GetLt() int64 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *SInt64Rules) GetLt() int64 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *SInt64Rules) GetLte() int64 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *SInt64Rules) GetLte() int64 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *SInt64Rules) GetGt() int64 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *SInt64Rules) GetGt() int64 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *SInt64Rules) GetGte() int64 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *SInt64Rules) GetGte() int64 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *SInt64Rules) GetIn() []int64 { - if m != nil { - return m.In +func (x *SInt64Rules) GetIn() []int64 { + if x != nil { + return x.In } return nil } -func (m *SInt64Rules) GetNotIn() []int64 { - if m != nil { - return m.NotIn +func (x *SInt64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn } return nil } +func (x *SInt64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // Fixed32Rules describes the constraints applied to `fixed32` values type Fixed32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *uint32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1667,87 +1440,106 @@ type Fixed32Rules struct { In []uint32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []uint32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *Fixed32Rules) Reset() { *m = Fixed32Rules{} } -func (m *Fixed32Rules) String() string { return proto.CompactTextString(m) } -func (*Fixed32Rules) ProtoMessage() {} -func (*Fixed32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{9} -} -func (m *Fixed32Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Fixed32Rules.Unmarshal(m, b) -} -func (m *Fixed32Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Fixed32Rules.Marshal(b, m, deterministic) -} -func (dst *Fixed32Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fixed32Rules.Merge(dst, src) +func (x *Fixed32Rules) Reset() { + *x = Fixed32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Fixed32Rules) XXX_Size() int { - return xxx_messageInfo_Fixed32Rules.Size(m) + +func (x *Fixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Fixed32Rules) XXX_DiscardUnknown() { - xxx_messageInfo_Fixed32Rules.DiscardUnknown(m) + +func (*Fixed32Rules) ProtoMessage() {} + +func (x *Fixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Fixed32Rules proto.InternalMessageInfo +// Deprecated: Use Fixed32Rules.ProtoReflect.Descriptor instead. +func (*Fixed32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{9} +} -func (m *Fixed32Rules) GetConst() uint32 { - if m != nil && m.Const != nil { - return *m.Const +func (x *Fixed32Rules) GetConst() uint32 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *Fixed32Rules) GetLt() uint32 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *Fixed32Rules) GetLt() uint32 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *Fixed32Rules) GetLte() uint32 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *Fixed32Rules) GetLte() uint32 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *Fixed32Rules) GetGt() uint32 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *Fixed32Rules) GetGt() uint32 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *Fixed32Rules) GetGte() uint32 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *Fixed32Rules) GetGte() uint32 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *Fixed32Rules) GetIn() []uint32 { - if m != nil { - return m.In +func (x *Fixed32Rules) GetIn() []uint32 { + if x != nil { + return x.In } return nil } -func (m *Fixed32Rules) GetNotIn() []uint32 { - if m != nil { - return m.NotIn +func (x *Fixed32Rules) GetNotIn() []uint32 { + if x != nil { + return x.NotIn } return nil } +func (x *Fixed32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // Fixed64Rules describes the constraints applied to `fixed64` values type Fixed64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *uint64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1769,87 +1561,106 @@ type Fixed64Rules struct { In []uint64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []uint64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *Fixed64Rules) Reset() { *m = Fixed64Rules{} } -func (m *Fixed64Rules) String() string { return proto.CompactTextString(m) } -func (*Fixed64Rules) ProtoMessage() {} -func (*Fixed64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{10} -} -func (m *Fixed64Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Fixed64Rules.Unmarshal(m, b) -} -func (m *Fixed64Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Fixed64Rules.Marshal(b, m, deterministic) -} -func (dst *Fixed64Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_Fixed64Rules.Merge(dst, src) +func (x *Fixed64Rules) Reset() { + *x = Fixed64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Fixed64Rules) XXX_Size() int { - return xxx_messageInfo_Fixed64Rules.Size(m) + +func (x *Fixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Fixed64Rules) XXX_DiscardUnknown() { - xxx_messageInfo_Fixed64Rules.DiscardUnknown(m) + +func (*Fixed64Rules) ProtoMessage() {} + +func (x *Fixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Fixed64Rules proto.InternalMessageInfo +// Deprecated: Use Fixed64Rules.ProtoReflect.Descriptor instead. +func (*Fixed64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{10} +} -func (m *Fixed64Rules) GetConst() uint64 { - if m != nil && m.Const != nil { - return *m.Const +func (x *Fixed64Rules) GetConst() uint64 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *Fixed64Rules) GetLt() uint64 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *Fixed64Rules) GetLt() uint64 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *Fixed64Rules) GetLte() uint64 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *Fixed64Rules) GetLte() uint64 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *Fixed64Rules) GetGt() uint64 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *Fixed64Rules) GetGt() uint64 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *Fixed64Rules) GetGte() uint64 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *Fixed64Rules) GetGte() uint64 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *Fixed64Rules) GetIn() []uint64 { - if m != nil { - return m.In +func (x *Fixed64Rules) GetIn() []uint64 { + if x != nil { + return x.In } return nil } -func (m *Fixed64Rules) GetNotIn() []uint64 { - if m != nil { - return m.NotIn +func (x *Fixed64Rules) GetNotIn() []uint64 { + if x != nil { + return x.NotIn } return nil } +func (x *Fixed64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // SFixed32Rules describes the constraints applied to `sfixed32` values type SFixed32Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *int32 `protobuf:"fixed32,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1871,87 +1682,106 @@ type SFixed32Rules struct { In []int32 `protobuf:"fixed32,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []int32 `protobuf:"fixed32,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *SFixed32Rules) Reset() { *m = SFixed32Rules{} } -func (m *SFixed32Rules) String() string { return proto.CompactTextString(m) } -func (*SFixed32Rules) ProtoMessage() {} -func (*SFixed32Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{11} -} -func (m *SFixed32Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SFixed32Rules.Unmarshal(m, b) -} -func (m *SFixed32Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SFixed32Rules.Marshal(b, m, deterministic) -} -func (dst *SFixed32Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_SFixed32Rules.Merge(dst, src) +func (x *SFixed32Rules) Reset() { + *x = SFixed32Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SFixed32Rules) XXX_Size() int { - return xxx_messageInfo_SFixed32Rules.Size(m) + +func (x *SFixed32Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SFixed32Rules) XXX_DiscardUnknown() { - xxx_messageInfo_SFixed32Rules.DiscardUnknown(m) + +func (*SFixed32Rules) ProtoMessage() {} + +func (x *SFixed32Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SFixed32Rules proto.InternalMessageInfo +// Deprecated: Use SFixed32Rules.ProtoReflect.Descriptor instead. +func (*SFixed32Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{11} +} -func (m *SFixed32Rules) GetConst() int32 { - if m != nil && m.Const != nil { - return *m.Const +func (x *SFixed32Rules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *SFixed32Rules) GetLt() int32 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *SFixed32Rules) GetLt() int32 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *SFixed32Rules) GetLte() int32 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *SFixed32Rules) GetLte() int32 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *SFixed32Rules) GetGt() int32 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *SFixed32Rules) GetGt() int32 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *SFixed32Rules) GetGte() int32 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *SFixed32Rules) GetGte() int32 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *SFixed32Rules) GetIn() []int32 { - if m != nil { - return m.In +func (x *SFixed32Rules) GetIn() []int32 { + if x != nil { + return x.In } return nil } -func (m *SFixed32Rules) GetNotIn() []int32 { - if m != nil { - return m.NotIn +func (x *SFixed32Rules) GetNotIn() []int32 { + if x != nil { + return x.NotIn } return nil } +func (x *SFixed32Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // SFixed64Rules describes the constraints applied to `sfixed64` values type SFixed64Rules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *int64 `protobuf:"fixed64,1,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, @@ -1973,127 +1803,155 @@ type SFixed64Rules struct { In []int64 `protobuf:"fixed64,6,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []int64 `protobuf:"fixed64,7,rep,name=not_in,json=notIn" json:"not_in,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,8,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *SFixed64Rules) Reset() { *m = SFixed64Rules{} } -func (m *SFixed64Rules) String() string { return proto.CompactTextString(m) } -func (*SFixed64Rules) ProtoMessage() {} -func (*SFixed64Rules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{12} -} -func (m *SFixed64Rules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SFixed64Rules.Unmarshal(m, b) -} -func (m *SFixed64Rules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SFixed64Rules.Marshal(b, m, deterministic) -} -func (dst *SFixed64Rules) XXX_Merge(src proto.Message) { - xxx_messageInfo_SFixed64Rules.Merge(dst, src) +func (x *SFixed64Rules) Reset() { + *x = SFixed64Rules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SFixed64Rules) XXX_Size() int { - return xxx_messageInfo_SFixed64Rules.Size(m) + +func (x *SFixed64Rules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SFixed64Rules) XXX_DiscardUnknown() { - xxx_messageInfo_SFixed64Rules.DiscardUnknown(m) + +func (*SFixed64Rules) ProtoMessage() {} + +func (x *SFixed64Rules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SFixed64Rules proto.InternalMessageInfo +// Deprecated: Use SFixed64Rules.ProtoReflect.Descriptor instead. +func (*SFixed64Rules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{12} +} -func (m *SFixed64Rules) GetConst() int64 { - if m != nil && m.Const != nil { - return *m.Const +func (x *SFixed64Rules) GetConst() int64 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *SFixed64Rules) GetLt() int64 { - if m != nil && m.Lt != nil { - return *m.Lt +func (x *SFixed64Rules) GetLt() int64 { + if x != nil && x.Lt != nil { + return *x.Lt } return 0 } -func (m *SFixed64Rules) GetLte() int64 { - if m != nil && m.Lte != nil { - return *m.Lte +func (x *SFixed64Rules) GetLte() int64 { + if x != nil && x.Lte != nil { + return *x.Lte } return 0 } -func (m *SFixed64Rules) GetGt() int64 { - if m != nil && m.Gt != nil { - return *m.Gt +func (x *SFixed64Rules) GetGt() int64 { + if x != nil && x.Gt != nil { + return *x.Gt } return 0 } -func (m *SFixed64Rules) GetGte() int64 { - if m != nil && m.Gte != nil { - return *m.Gte +func (x *SFixed64Rules) GetGte() int64 { + if x != nil && x.Gte != nil { + return *x.Gte } return 0 } -func (m *SFixed64Rules) GetIn() []int64 { - if m != nil { - return m.In +func (x *SFixed64Rules) GetIn() []int64 { + if x != nil { + return x.In } return nil } -func (m *SFixed64Rules) GetNotIn() []int64 { - if m != nil { - return m.NotIn +func (x *SFixed64Rules) GetNotIn() []int64 { + if x != nil { + return x.NotIn } return nil } +func (x *SFixed64Rules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // BoolRules describes the constraints applied to `bool` values type BoolRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value - Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Const *bool `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` } -func (m *BoolRules) Reset() { *m = BoolRules{} } -func (m *BoolRules) String() string { return proto.CompactTextString(m) } -func (*BoolRules) ProtoMessage() {} -func (*BoolRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{13} -} -func (m *BoolRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BoolRules.Unmarshal(m, b) -} -func (m *BoolRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BoolRules.Marshal(b, m, deterministic) -} -func (dst *BoolRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_BoolRules.Merge(dst, src) +func (x *BoolRules) Reset() { + *x = BoolRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BoolRules) XXX_Size() int { - return xxx_messageInfo_BoolRules.Size(m) + +func (x *BoolRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BoolRules) XXX_DiscardUnknown() { - xxx_messageInfo_BoolRules.DiscardUnknown(m) + +func (*BoolRules) ProtoMessage() {} + +func (x *BoolRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BoolRules proto.InternalMessageInfo +// Deprecated: Use BoolRules.ProtoReflect.Descriptor instead. +func (*BoolRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{13} +} -func (m *BoolRules) GetConst() bool { - if m != nil && m.Const != nil { - return *m.Const +func (x *BoolRules) GetConst() bool { + if x != nil && x.Const != nil { + return *x.Const } return false } // StringRules describe the constraints applied to `string` values type StringRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *string `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` // Len specifies that this field must be the specified number of @@ -2109,7 +1967,6 @@ type StringRules struct { // characters may differ from the number of bytes in the string. MaxLen *uint64 `protobuf:"varint,3,opt,name=max_len,json=maxLen" json:"max_len,omitempty"` // LenBytes specifies that this field must be the specified number of bytes - // at a minimum LenBytes *uint64 `protobuf:"varint,20,opt,name=len_bytes,json=lenBytes" json:"len_bytes,omitempty"` // MinBytes specifies that this field must be the specified number of bytes // at a minimum @@ -2130,6 +1987,9 @@ type StringRules struct { // Contains specifies that this field must have the specified substring // anywhere in the string. Contains *string `protobuf:"bytes,9,opt,name=contains" json:"contains,omitempty"` + // NotContains specifies that this field cannot have the specified substring + // anywhere in the string. + NotContains *string `protobuf:"bytes,23,opt,name=not_contains,json=notContains" json:"not_contains,omitempty"` // In specifies that this field must be equal to one of the specified // values In []string `protobuf:"bytes,10,rep,name=in" json:"in,omitempty"` @@ -2139,7 +1999,8 @@ type StringRules struct { // WellKnown rules provide advanced constraints against common string // patterns // - // Types that are valid to be assigned to WellKnown: + // Types that are assignable to WellKnown: + // // *StringRules_Email // *StringRules_Hostname // *StringRules_Ip @@ -2148,179 +2009,155 @@ type StringRules struct { // *StringRules_Uri // *StringRules_UriRef // *StringRules_Address - WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + // *StringRules_Uuid + // *StringRules_WellKnownRegex + WellKnown isStringRules_WellKnown `protobuf_oneof:"well_known"` + // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable + // strict header validation. + // By default, this is true, and HTTP header validations are RFC-compliant. + // Setting to false will enable a looser validations that only disallows + // \r\n\0 characters, which can be used to bypass header matching rules. + Strict *bool `protobuf:"varint,25,opt,name=strict,def=1" json:"strict,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,26,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` +} + +// Default values for StringRules fields. +const ( + Default_StringRules_Strict = bool(true) +) + +func (x *StringRules) Reset() { + *x = StringRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StringRules) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StringRules) ProtoMessage() {} + +func (x *StringRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -func (m *StringRules) Reset() { *m = StringRules{} } -func (m *StringRules) String() string { return proto.CompactTextString(m) } -func (*StringRules) ProtoMessage() {} +// Deprecated: Use StringRules.ProtoReflect.Descriptor instead. func (*StringRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{14} -} -func (m *StringRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StringRules.Unmarshal(m, b) -} -func (m *StringRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StringRules.Marshal(b, m, deterministic) -} -func (dst *StringRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_StringRules.Merge(dst, src) -} -func (m *StringRules) XXX_Size() int { - return xxx_messageInfo_StringRules.Size(m) -} -func (m *StringRules) XXX_DiscardUnknown() { - xxx_messageInfo_StringRules.DiscardUnknown(m) + return file_validate_validate_proto_rawDescGZIP(), []int{14} } -var xxx_messageInfo_StringRules proto.InternalMessageInfo - -func (m *StringRules) GetConst() string { - if m != nil && m.Const != nil { - return *m.Const +func (x *StringRules) GetConst() string { + if x != nil && x.Const != nil { + return *x.Const } return "" } -func (m *StringRules) GetLen() uint64 { - if m != nil && m.Len != nil { - return *m.Len +func (x *StringRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len } return 0 } -func (m *StringRules) GetMinLen() uint64 { - if m != nil && m.MinLen != nil { - return *m.MinLen +func (x *StringRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen } return 0 } -func (m *StringRules) GetMaxLen() uint64 { - if m != nil && m.MaxLen != nil { - return *m.MaxLen +func (x *StringRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen } return 0 } -func (m *StringRules) GetLenBytes() uint64 { - if m != nil && m.LenBytes != nil { - return *m.LenBytes +func (x *StringRules) GetLenBytes() uint64 { + if x != nil && x.LenBytes != nil { + return *x.LenBytes } return 0 } -func (m *StringRules) GetMinBytes() uint64 { - if m != nil && m.MinBytes != nil { - return *m.MinBytes +func (x *StringRules) GetMinBytes() uint64 { + if x != nil && x.MinBytes != nil { + return *x.MinBytes } return 0 } -func (m *StringRules) GetMaxBytes() uint64 { - if m != nil && m.MaxBytes != nil { - return *m.MaxBytes +func (x *StringRules) GetMaxBytes() uint64 { + if x != nil && x.MaxBytes != nil { + return *x.MaxBytes } return 0 } -func (m *StringRules) GetPattern() string { - if m != nil && m.Pattern != nil { - return *m.Pattern +func (x *StringRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern } return "" } -func (m *StringRules) GetPrefix() string { - if m != nil && m.Prefix != nil { - return *m.Prefix +func (x *StringRules) GetPrefix() string { + if x != nil && x.Prefix != nil { + return *x.Prefix } return "" } -func (m *StringRules) GetSuffix() string { - if m != nil && m.Suffix != nil { - return *m.Suffix +func (x *StringRules) GetSuffix() string { + if x != nil && x.Suffix != nil { + return *x.Suffix } return "" } -func (m *StringRules) GetContains() string { - if m != nil && m.Contains != nil { - return *m.Contains +func (x *StringRules) GetContains() string { + if x != nil && x.Contains != nil { + return *x.Contains } return "" } -func (m *StringRules) GetIn() []string { - if m != nil { - return m.In +func (x *StringRules) GetNotContains() string { + if x != nil && x.NotContains != nil { + return *x.NotContains } - return nil + return "" } -func (m *StringRules) GetNotIn() []string { - if m != nil { - return m.NotIn +func (x *StringRules) GetIn() []string { + if x != nil { + return x.In } return nil } -type isStringRules_WellKnown interface { - isStringRules_WellKnown() -} - -type StringRules_Email struct { - Email bool `protobuf:"varint,12,opt,name=email,oneof"` -} - -type StringRules_Hostname struct { - Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` -} - -type StringRules_Ip struct { - Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` -} - -type StringRules_Ipv4 struct { - Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` -} - -type StringRules_Ipv6 struct { - Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` -} - -type StringRules_Uri struct { - Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` -} - -type StringRules_UriRef struct { - UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` -} - -type StringRules_Address struct { - Address bool `protobuf:"varint,21,opt,name=address,oneof"` +func (x *StringRules) GetNotIn() []string { + if x != nil { + return x.NotIn + } + return nil } -func (*StringRules_Email) isStringRules_WellKnown() {} - -func (*StringRules_Hostname) isStringRules_WellKnown() {} - -func (*StringRules_Ip) isStringRules_WellKnown() {} - -func (*StringRules_Ipv4) isStringRules_WellKnown() {} - -func (*StringRules_Ipv6) isStringRules_WellKnown() {} - -func (*StringRules_Uri) isStringRules_WellKnown() {} - -func (*StringRules_UriRef) isStringRules_WellKnown() {} - -func (*StringRules_Address) isStringRules_WellKnown() {} - func (m *StringRules) GetWellKnown() isStringRules_WellKnown { if m != nil { return m.WellKnown @@ -2328,244 +2165,180 @@ func (m *StringRules) GetWellKnown() isStringRules_WellKnown { return nil } -func (m *StringRules) GetEmail() bool { - if x, ok := m.GetWellKnown().(*StringRules_Email); ok { +func (x *StringRules) GetEmail() bool { + if x, ok := x.GetWellKnown().(*StringRules_Email); ok { return x.Email } return false } -func (m *StringRules) GetHostname() bool { - if x, ok := m.GetWellKnown().(*StringRules_Hostname); ok { +func (x *StringRules) GetHostname() bool { + if x, ok := x.GetWellKnown().(*StringRules_Hostname); ok { return x.Hostname } return false } -func (m *StringRules) GetIp() bool { - if x, ok := m.GetWellKnown().(*StringRules_Ip); ok { +func (x *StringRules) GetIp() bool { + if x, ok := x.GetWellKnown().(*StringRules_Ip); ok { return x.Ip } return false } -func (m *StringRules) GetIpv4() bool { - if x, ok := m.GetWellKnown().(*StringRules_Ipv4); ok { +func (x *StringRules) GetIpv4() bool { + if x, ok := x.GetWellKnown().(*StringRules_Ipv4); ok { return x.Ipv4 } return false } -func (m *StringRules) GetIpv6() bool { - if x, ok := m.GetWellKnown().(*StringRules_Ipv6); ok { +func (x *StringRules) GetIpv6() bool { + if x, ok := x.GetWellKnown().(*StringRules_Ipv6); ok { return x.Ipv6 } return false } -func (m *StringRules) GetUri() bool { - if x, ok := m.GetWellKnown().(*StringRules_Uri); ok { +func (x *StringRules) GetUri() bool { + if x, ok := x.GetWellKnown().(*StringRules_Uri); ok { return x.Uri } return false } -func (m *StringRules) GetUriRef() bool { - if x, ok := m.GetWellKnown().(*StringRules_UriRef); ok { +func (x *StringRules) GetUriRef() bool { + if x, ok := x.GetWellKnown().(*StringRules_UriRef); ok { return x.UriRef } return false } -func (m *StringRules) GetAddress() bool { - if x, ok := m.GetWellKnown().(*StringRules_Address); ok { +func (x *StringRules) GetAddress() bool { + if x, ok := x.GetWellKnown().(*StringRules_Address); ok { return x.Address } return false } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*StringRules) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _StringRules_OneofMarshaler, _StringRules_OneofUnmarshaler, _StringRules_OneofSizer, []interface{}{ - (*StringRules_Email)(nil), - (*StringRules_Hostname)(nil), - (*StringRules_Ip)(nil), - (*StringRules_Ipv4)(nil), - (*StringRules_Ipv6)(nil), - (*StringRules_Uri)(nil), - (*StringRules_UriRef)(nil), - (*StringRules_Address)(nil), +func (x *StringRules) GetUuid() bool { + if x, ok := x.GetWellKnown().(*StringRules_Uuid); ok { + return x.Uuid } + return false } -func _StringRules_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*StringRules) - // well_known - switch x := m.WellKnown.(type) { - case *StringRules_Email: - t := uint64(0) - if x.Email { - t = 1 - } - b.EncodeVarint(12<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *StringRules_Hostname: - t := uint64(0) - if x.Hostname { - t = 1 - } - b.EncodeVarint(13<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *StringRules_Ip: - t := uint64(0) - if x.Ip { - t = 1 - } - b.EncodeVarint(14<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *StringRules_Ipv4: - t := uint64(0) - if x.Ipv4 { - t = 1 - } - b.EncodeVarint(15<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *StringRules_Ipv6: - t := uint64(0) - if x.Ipv6 { - t = 1 - } - b.EncodeVarint(16<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *StringRules_Uri: - t := uint64(0) - if x.Uri { - t = 1 - } - b.EncodeVarint(17<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *StringRules_UriRef: - t := uint64(0) - if x.UriRef { - t = 1 - } - b.EncodeVarint(18<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *StringRules_Address: - t := uint64(0) - if x.Address { - t = 1 - } - b.EncodeVarint(21<<3 | proto.WireVarint) - b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("StringRules.WellKnown has unexpected type %T", x) +func (x *StringRules) GetWellKnownRegex() KnownRegex { + if x, ok := x.GetWellKnown().(*StringRules_WellKnownRegex); ok { + return x.WellKnownRegex } - return nil + return KnownRegex_UNKNOWN } -func _StringRules_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*StringRules) - switch tag { - case 12: // well_known.email - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_Email{x != 0} - return true, err - case 13: // well_known.hostname - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_Hostname{x != 0} - return true, err - case 14: // well_known.ip - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_Ip{x != 0} - return true, err - case 15: // well_known.ipv4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_Ipv4{x != 0} - return true, err - case 16: // well_known.ipv6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_Ipv6{x != 0} - return true, err - case 17: // well_known.uri - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_Uri{x != 0} - return true, err - case 18: // well_known.uri_ref - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_UriRef{x != 0} - return true, err - case 21: // well_known.address - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &StringRules_Address{x != 0} - return true, err - default: - return false, nil - } -} - -func _StringRules_OneofSizer(msg proto.Message) (n int) { - m := msg.(*StringRules) - // well_known - switch x := m.WellKnown.(type) { - case *StringRules_Email: - n += 1 // tag and wire - n += 1 - case *StringRules_Hostname: - n += 1 // tag and wire - n += 1 - case *StringRules_Ip: - n += 1 // tag and wire - n += 1 - case *StringRules_Ipv4: - n += 1 // tag and wire - n += 1 - case *StringRules_Ipv6: - n += 2 // tag and wire - n += 1 - case *StringRules_Uri: - n += 2 // tag and wire - n += 1 - case *StringRules_UriRef: - n += 2 // tag and wire - n += 1 - case *StringRules_Address: - n += 2 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +func (x *StringRules) GetStrict() bool { + if x != nil && x.Strict != nil { + return *x.Strict + } + return Default_StringRules_Strict } +func (x *StringRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + +type isStringRules_WellKnown interface { + isStringRules_WellKnown() +} + +type StringRules_Email struct { + // Email specifies that the field must be a valid email address as + // defined by RFC 5322 + Email bool `protobuf:"varint,12,opt,name=email,oneof"` +} + +type StringRules_Hostname struct { + // Hostname specifies that the field must be a valid hostname as + // defined by RFC 1034. This constraint does not support + // internationalized domain names (IDNs). + Hostname bool `protobuf:"varint,13,opt,name=hostname,oneof"` +} + +type StringRules_Ip struct { + // Ip specifies that the field must be a valid IP (v4 or v6) address. + // Valid IPv6 addresses should not include surrounding square brackets. + Ip bool `protobuf:"varint,14,opt,name=ip,oneof"` +} + +type StringRules_Ipv4 struct { + // Ipv4 specifies that the field must be a valid IPv4 address. + Ipv4 bool `protobuf:"varint,15,opt,name=ipv4,oneof"` +} + +type StringRules_Ipv6 struct { + // Ipv6 specifies that the field must be a valid IPv6 address. Valid + // IPv6 addresses should not include surrounding square brackets. + Ipv6 bool `protobuf:"varint,16,opt,name=ipv6,oneof"` +} + +type StringRules_Uri struct { + // Uri specifies that the field must be a valid, absolute URI as defined + // by RFC 3986 + Uri bool `protobuf:"varint,17,opt,name=uri,oneof"` +} + +type StringRules_UriRef struct { + // UriRef specifies that the field must be a valid URI as defined by RFC + // 3986 and may be relative or absolute. + UriRef bool `protobuf:"varint,18,opt,name=uri_ref,json=uriRef,oneof"` +} + +type StringRules_Address struct { + // Address specifies that the field must be either a valid hostname as + // defined by RFC 1034 (which does not support internationalized domain + // names or IDNs), or it can be a valid IP (v4 or v6). + Address bool `protobuf:"varint,21,opt,name=address,oneof"` +} + +type StringRules_Uuid struct { + // Uuid specifies that the field must be a valid UUID as defined by + // RFC 4122 + Uuid bool `protobuf:"varint,22,opt,name=uuid,oneof"` +} + +type StringRules_WellKnownRegex struct { + // WellKnownRegex specifies a common well known pattern defined as a regex. + WellKnownRegex KnownRegex `protobuf:"varint,24,opt,name=well_known_regex,json=wellKnownRegex,enum=validate.KnownRegex,oneof"` +} + +func (*StringRules_Email) isStringRules_WellKnown() {} + +func (*StringRules_Hostname) isStringRules_WellKnown() {} + +func (*StringRules_Ip) isStringRules_WellKnown() {} + +func (*StringRules_Ipv4) isStringRules_WellKnown() {} + +func (*StringRules_Ipv6) isStringRules_WellKnown() {} + +func (*StringRules_Uri) isStringRules_WellKnown() {} + +func (*StringRules_UriRef) isStringRules_WellKnown() {} + +func (*StringRules_Address) isStringRules_WellKnown() {} + +func (*StringRules_Uuid) isStringRules_WellKnown() {} + +func (*StringRules_WellKnownRegex) isStringRules_WellKnown() {} + // BytesRules describe the constraints applied to `bytes` values type BytesRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const []byte `protobuf:"bytes,1,opt,name=const" json:"const,omitempty"` // Len specifies that this field must be the specified number of bytes @@ -2598,132 +2371,119 @@ type BytesRules struct { // WellKnown rules provide advanced constraints against common byte // patterns // - // Types that are valid to be assigned to WellKnown: + // Types that are assignable to WellKnown: + // // *BytesRules_Ip // *BytesRules_Ipv4 // *BytesRules_Ipv6 - WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + WellKnown isBytesRules_WellKnown `protobuf_oneof:"well_known"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,14,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *BytesRules) Reset() { *m = BytesRules{} } -func (m *BytesRules) String() string { return proto.CompactTextString(m) } -func (*BytesRules) ProtoMessage() {} -func (*BytesRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{15} -} -func (m *BytesRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_BytesRules.Unmarshal(m, b) -} -func (m *BytesRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_BytesRules.Marshal(b, m, deterministic) -} -func (dst *BytesRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_BytesRules.Merge(dst, src) +func (x *BytesRules) Reset() { + *x = BytesRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *BytesRules) XXX_Size() int { - return xxx_messageInfo_BytesRules.Size(m) + +func (x *BytesRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *BytesRules) XXX_DiscardUnknown() { - xxx_messageInfo_BytesRules.DiscardUnknown(m) + +func (*BytesRules) ProtoMessage() {} + +func (x *BytesRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_BytesRules proto.InternalMessageInfo +// Deprecated: Use BytesRules.ProtoReflect.Descriptor instead. +func (*BytesRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{15} +} -func (m *BytesRules) GetConst() []byte { - if m != nil { - return m.Const +func (x *BytesRules) GetConst() []byte { + if x != nil { + return x.Const } return nil } -func (m *BytesRules) GetLen() uint64 { - if m != nil && m.Len != nil { - return *m.Len +func (x *BytesRules) GetLen() uint64 { + if x != nil && x.Len != nil { + return *x.Len } return 0 } -func (m *BytesRules) GetMinLen() uint64 { - if m != nil && m.MinLen != nil { - return *m.MinLen +func (x *BytesRules) GetMinLen() uint64 { + if x != nil && x.MinLen != nil { + return *x.MinLen } return 0 } -func (m *BytesRules) GetMaxLen() uint64 { - if m != nil && m.MaxLen != nil { - return *m.MaxLen +func (x *BytesRules) GetMaxLen() uint64 { + if x != nil && x.MaxLen != nil { + return *x.MaxLen } return 0 } -func (m *BytesRules) GetPattern() string { - if m != nil && m.Pattern != nil { - return *m.Pattern +func (x *BytesRules) GetPattern() string { + if x != nil && x.Pattern != nil { + return *x.Pattern } return "" } -func (m *BytesRules) GetPrefix() []byte { - if m != nil { - return m.Prefix +func (x *BytesRules) GetPrefix() []byte { + if x != nil { + return x.Prefix } return nil } -func (m *BytesRules) GetSuffix() []byte { - if m != nil { - return m.Suffix +func (x *BytesRules) GetSuffix() []byte { + if x != nil { + return x.Suffix } return nil } -func (m *BytesRules) GetContains() []byte { - if m != nil { - return m.Contains +func (x *BytesRules) GetContains() []byte { + if x != nil { + return x.Contains } return nil } -func (m *BytesRules) GetIn() [][]byte { - if m != nil { - return m.In +func (x *BytesRules) GetIn() [][]byte { + if x != nil { + return x.In } return nil } -func (m *BytesRules) GetNotIn() [][]byte { - if m != nil { - return m.NotIn +func (x *BytesRules) GetNotIn() [][]byte { + if x != nil { + return x.NotIn } return nil } -type isBytesRules_WellKnown interface { - isBytesRules_WellKnown() -} - -type BytesRules_Ip struct { - Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` -} - -type BytesRules_Ipv4 struct { - Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` -} - -type BytesRules_Ipv6 struct { - Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` -} - -func (*BytesRules_Ip) isBytesRules_WellKnown() {} - -func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} - -func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} - func (m *BytesRules) GetWellKnown() isBytesRules_WellKnown { if m != nil { return m.WellKnown @@ -2731,119 +2491,68 @@ func (m *BytesRules) GetWellKnown() isBytesRules_WellKnown { return nil } -func (m *BytesRules) GetIp() bool { - if x, ok := m.GetWellKnown().(*BytesRules_Ip); ok { +func (x *BytesRules) GetIp() bool { + if x, ok := x.GetWellKnown().(*BytesRules_Ip); ok { return x.Ip } return false } -func (m *BytesRules) GetIpv4() bool { - if x, ok := m.GetWellKnown().(*BytesRules_Ipv4); ok { +func (x *BytesRules) GetIpv4() bool { + if x, ok := x.GetWellKnown().(*BytesRules_Ipv4); ok { return x.Ipv4 } return false } -func (m *BytesRules) GetIpv6() bool { - if x, ok := m.GetWellKnown().(*BytesRules_Ipv6); ok { +func (x *BytesRules) GetIpv6() bool { + if x, ok := x.GetWellKnown().(*BytesRules_Ipv6); ok { return x.Ipv6 } return false } -// XXX_OneofFuncs is for the internal use of the proto package. -func (*BytesRules) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) { - return _BytesRules_OneofMarshaler, _BytesRules_OneofUnmarshaler, _BytesRules_OneofSizer, []interface{}{ - (*BytesRules_Ip)(nil), - (*BytesRules_Ipv4)(nil), - (*BytesRules_Ipv6)(nil), +func (x *BytesRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty } + return false } -func _BytesRules_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { - m := msg.(*BytesRules) - // well_known - switch x := m.WellKnown.(type) { - case *BytesRules_Ip: - t := uint64(0) - if x.Ip { - t = 1 - } - b.EncodeVarint(10<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *BytesRules_Ipv4: - t := uint64(0) - if x.Ipv4 { - t = 1 - } - b.EncodeVarint(11<<3 | proto.WireVarint) - b.EncodeVarint(t) - case *BytesRules_Ipv6: - t := uint64(0) - if x.Ipv6 { - t = 1 - } - b.EncodeVarint(12<<3 | proto.WireVarint) - b.EncodeVarint(t) - case nil: - default: - return fmt.Errorf("BytesRules.WellKnown has unexpected type %T", x) - } - return nil +type isBytesRules_WellKnown interface { + isBytesRules_WellKnown() } -func _BytesRules_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) { - m := msg.(*BytesRules) - switch tag { - case 10: // well_known.ip - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &BytesRules_Ip{x != 0} - return true, err - case 11: // well_known.ipv4 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &BytesRules_Ipv4{x != 0} - return true, err - case 12: // well_known.ipv6 - if wire != proto.WireVarint { - return true, proto.ErrInternalBadWireType - } - x, err := b.DecodeVarint() - m.WellKnown = &BytesRules_Ipv6{x != 0} - return true, err - default: - return false, nil - } -} - -func _BytesRules_OneofSizer(msg proto.Message) (n int) { - m := msg.(*BytesRules) - // well_known - switch x := m.WellKnown.(type) { - case *BytesRules_Ip: - n += 1 // tag and wire - n += 1 - case *BytesRules_Ipv4: - n += 1 // tag and wire - n += 1 - case *BytesRules_Ipv6: - n += 1 // tag and wire - n += 1 - case nil: - default: - panic(fmt.Sprintf("proto: unexpected type %T in oneof", x)) - } - return n +type BytesRules_Ip struct { + // Ip specifies that the field must be a valid IP (v4 or v6) address in + // byte format + Ip bool `protobuf:"varint,10,opt,name=ip,oneof"` +} + +type BytesRules_Ipv4 struct { + // Ipv4 specifies that the field must be a valid IPv4 address in byte + // format + Ipv4 bool `protobuf:"varint,11,opt,name=ipv4,oneof"` +} + +type BytesRules_Ipv6 struct { + // Ipv6 specifies that the field must be a valid IPv6 address in byte + // format + Ipv6 bool `protobuf:"varint,12,opt,name=ipv6,oneof"` } +func (*BytesRules_Ip) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv4) isBytesRules_WellKnown() {} + +func (*BytesRules_Ipv6) isBytesRules_WellKnown() {} + // EnumRules describe the constraints applied to enum values type EnumRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Const specifies that this field must be exactly the specified value Const *int32 `protobuf:"varint,1,opt,name=const" json:"const,omitempty"` // DefinedOnly specifies that this field must be only one of the defined @@ -2854,60 +2563,65 @@ type EnumRules struct { In []int32 `protobuf:"varint,3,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []int32 `protobuf:"varint,4,rep,name=not_in,json=notIn" json:"not_in,omitempty"` } -func (m *EnumRules) Reset() { *m = EnumRules{} } -func (m *EnumRules) String() string { return proto.CompactTextString(m) } -func (*EnumRules) ProtoMessage() {} -func (*EnumRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{16} -} -func (m *EnumRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_EnumRules.Unmarshal(m, b) -} -func (m *EnumRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_EnumRules.Marshal(b, m, deterministic) -} -func (dst *EnumRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_EnumRules.Merge(dst, src) +func (x *EnumRules) Reset() { + *x = EnumRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *EnumRules) XXX_Size() int { - return xxx_messageInfo_EnumRules.Size(m) + +func (x *EnumRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *EnumRules) XXX_DiscardUnknown() { - xxx_messageInfo_EnumRules.DiscardUnknown(m) + +func (*EnumRules) ProtoMessage() {} + +func (x *EnumRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_EnumRules proto.InternalMessageInfo +// Deprecated: Use EnumRules.ProtoReflect.Descriptor instead. +func (*EnumRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{16} +} -func (m *EnumRules) GetConst() int32 { - if m != nil && m.Const != nil { - return *m.Const +func (x *EnumRules) GetConst() int32 { + if x != nil && x.Const != nil { + return *x.Const } return 0 } -func (m *EnumRules) GetDefinedOnly() bool { - if m != nil && m.DefinedOnly != nil { - return *m.DefinedOnly +func (x *EnumRules) GetDefinedOnly() bool { + if x != nil && x.DefinedOnly != nil { + return *x.DefinedOnly } return false } -func (m *EnumRules) GetIn() []int32 { - if m != nil { - return m.In +func (x *EnumRules) GetIn() []int32 { + if x != nil { + return x.In } return nil } -func (m *EnumRules) GetNotIn() []int32 { - if m != nil { - return m.NotIn +func (x *EnumRules) GetNotIn() []int32 { + if x != nil { + return x.NotIn } return nil } @@ -2915,56 +2629,69 @@ func (m *EnumRules) GetNotIn() []int32 { // MessageRules describe the constraints applied to embedded message values. // For message-type fields, validation is performed recursively. type MessageRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Skip specifies that the validation rules of this field should not be // evaluated Skip *bool `protobuf:"varint,1,opt,name=skip" json:"skip,omitempty"` // Required specifies that this field must be set - Required *bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Required *bool `protobuf:"varint,2,opt,name=required" json:"required,omitempty"` } -func (m *MessageRules) Reset() { *m = MessageRules{} } -func (m *MessageRules) String() string { return proto.CompactTextString(m) } -func (*MessageRules) ProtoMessage() {} -func (*MessageRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{17} -} -func (m *MessageRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MessageRules.Unmarshal(m, b) -} -func (m *MessageRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MessageRules.Marshal(b, m, deterministic) -} -func (dst *MessageRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_MessageRules.Merge(dst, src) +func (x *MessageRules) Reset() { + *x = MessageRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MessageRules) XXX_Size() int { - return xxx_messageInfo_MessageRules.Size(m) + +func (x *MessageRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *MessageRules) XXX_DiscardUnknown() { - xxx_messageInfo_MessageRules.DiscardUnknown(m) + +func (*MessageRules) ProtoMessage() {} + +func (x *MessageRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_MessageRules proto.InternalMessageInfo +// Deprecated: Use MessageRules.ProtoReflect.Descriptor instead. +func (*MessageRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{17} +} -func (m *MessageRules) GetSkip() bool { - if m != nil && m.Skip != nil { - return *m.Skip +func (x *MessageRules) GetSkip() bool { + if x != nil && x.Skip != nil { + return *x.Skip } return false } -func (m *MessageRules) GetRequired() bool { - if m != nil && m.Required != nil { - return *m.Required +func (x *MessageRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required } return false } // RepeatedRules describe the constraints applied to `repeated` values type RepeatedRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // MinItems specifies that this field must have the specified number of // items at a minimum MinItems *uint64 `protobuf:"varint,1,opt,name=min_items,json=minItems" json:"min_items,omitempty"` @@ -2978,66 +2705,85 @@ type RepeatedRules struct { // Items specifies the contraints to be applied to each item in the field. // Repeated message fields will still execute validation against each item // unless skip is specified here. - Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Items *FieldRules `protobuf:"bytes,4,opt,name=items" json:"items,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,5,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *RepeatedRules) Reset() { *m = RepeatedRules{} } -func (m *RepeatedRules) String() string { return proto.CompactTextString(m) } -func (*RepeatedRules) ProtoMessage() {} -func (*RepeatedRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{18} -} -func (m *RepeatedRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_RepeatedRules.Unmarshal(m, b) -} -func (m *RepeatedRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_RepeatedRules.Marshal(b, m, deterministic) -} -func (dst *RepeatedRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_RepeatedRules.Merge(dst, src) +func (x *RepeatedRules) Reset() { + *x = RepeatedRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *RepeatedRules) XXX_Size() int { - return xxx_messageInfo_RepeatedRules.Size(m) + +func (x *RepeatedRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *RepeatedRules) XXX_DiscardUnknown() { - xxx_messageInfo_RepeatedRules.DiscardUnknown(m) + +func (*RepeatedRules) ProtoMessage() {} + +func (x *RepeatedRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[18] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_RepeatedRules proto.InternalMessageInfo +// Deprecated: Use RepeatedRules.ProtoReflect.Descriptor instead. +func (*RepeatedRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{18} +} -func (m *RepeatedRules) GetMinItems() uint64 { - if m != nil && m.MinItems != nil { - return *m.MinItems +func (x *RepeatedRules) GetMinItems() uint64 { + if x != nil && x.MinItems != nil { + return *x.MinItems } return 0 } -func (m *RepeatedRules) GetMaxItems() uint64 { - if m != nil && m.MaxItems != nil { - return *m.MaxItems +func (x *RepeatedRules) GetMaxItems() uint64 { + if x != nil && x.MaxItems != nil { + return *x.MaxItems } return 0 } -func (m *RepeatedRules) GetUnique() bool { - if m != nil && m.Unique != nil { - return *m.Unique +func (x *RepeatedRules) GetUnique() bool { + if x != nil && x.Unique != nil { + return *x.Unique } return false } -func (m *RepeatedRules) GetItems() *FieldRules { - if m != nil { - return m.Items +func (x *RepeatedRules) GetItems() *FieldRules { + if x != nil { + return x.Items } return nil } +func (x *RepeatedRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // MapRules describe the constraints applied to `map` values type MapRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // MinPairs specifies that this field must have the specified number of // KVs at a minimum MinPairs *uint64 `protobuf:"varint,1,opt,name=min_pairs,json=minPairs" json:"min_pairs,omitempty"` @@ -3052,74 +2798,93 @@ type MapRules struct { // Values specifies the constraints to be applied to the value of each key // in the field. Message values will still have their validations evaluated // unless skip is specified here. - Values *FieldRules `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Values *FieldRules `protobuf:"bytes,5,opt,name=values" json:"values,omitempty"` + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + IgnoreEmpty *bool `protobuf:"varint,6,opt,name=ignore_empty,json=ignoreEmpty" json:"ignore_empty,omitempty"` } -func (m *MapRules) Reset() { *m = MapRules{} } -func (m *MapRules) String() string { return proto.CompactTextString(m) } -func (*MapRules) ProtoMessage() {} -func (*MapRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{19} -} -func (m *MapRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_MapRules.Unmarshal(m, b) -} -func (m *MapRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_MapRules.Marshal(b, m, deterministic) -} -func (dst *MapRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_MapRules.Merge(dst, src) +func (x *MapRules) Reset() { + *x = MapRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *MapRules) XXX_Size() int { - return xxx_messageInfo_MapRules.Size(m) + +func (x *MapRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *MapRules) XXX_DiscardUnknown() { - xxx_messageInfo_MapRules.DiscardUnknown(m) + +func (*MapRules) ProtoMessage() {} + +func (x *MapRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[19] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_MapRules proto.InternalMessageInfo +// Deprecated: Use MapRules.ProtoReflect.Descriptor instead. +func (*MapRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{19} +} -func (m *MapRules) GetMinPairs() uint64 { - if m != nil && m.MinPairs != nil { - return *m.MinPairs +func (x *MapRules) GetMinPairs() uint64 { + if x != nil && x.MinPairs != nil { + return *x.MinPairs } return 0 } -func (m *MapRules) GetMaxPairs() uint64 { - if m != nil && m.MaxPairs != nil { - return *m.MaxPairs +func (x *MapRules) GetMaxPairs() uint64 { + if x != nil && x.MaxPairs != nil { + return *x.MaxPairs } return 0 } -func (m *MapRules) GetNoSparse() bool { - if m != nil && m.NoSparse != nil { - return *m.NoSparse +func (x *MapRules) GetNoSparse() bool { + if x != nil && x.NoSparse != nil { + return *x.NoSparse } return false } -func (m *MapRules) GetKeys() *FieldRules { - if m != nil { - return m.Keys +func (x *MapRules) GetKeys() *FieldRules { + if x != nil { + return x.Keys } return nil } -func (m *MapRules) GetValues() *FieldRules { - if m != nil { - return m.Values +func (x *MapRules) GetValues() *FieldRules { + if x != nil { + return x.Values } return nil } +func (x *MapRules) GetIgnoreEmpty() bool { + if x != nil && x.IgnoreEmpty != nil { + return *x.IgnoreEmpty + } + return false +} + // AnyRules describe constraints applied exclusively to the // `google.protobuf.Any` well-known type type AnyRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Required specifies that this field must be set Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` // In specifies that this field's `type_url` must be equal to one of the @@ -3127,53 +2892,58 @@ type AnyRules struct { In []string `protobuf:"bytes,2,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field's `type_url` must not be equal to any of // the specified values. - NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []string `protobuf:"bytes,3,rep,name=not_in,json=notIn" json:"not_in,omitempty"` } -func (m *AnyRules) Reset() { *m = AnyRules{} } -func (m *AnyRules) String() string { return proto.CompactTextString(m) } -func (*AnyRules) ProtoMessage() {} -func (*AnyRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{20} -} -func (m *AnyRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AnyRules.Unmarshal(m, b) -} -func (m *AnyRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AnyRules.Marshal(b, m, deterministic) -} -func (dst *AnyRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_AnyRules.Merge(dst, src) +func (x *AnyRules) Reset() { + *x = AnyRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *AnyRules) XXX_Size() int { - return xxx_messageInfo_AnyRules.Size(m) + +func (x *AnyRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *AnyRules) XXX_DiscardUnknown() { - xxx_messageInfo_AnyRules.DiscardUnknown(m) + +func (*AnyRules) ProtoMessage() {} + +func (x *AnyRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_AnyRules proto.InternalMessageInfo +// Deprecated: Use AnyRules.ProtoReflect.Descriptor instead. +func (*AnyRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{20} +} -func (m *AnyRules) GetRequired() bool { - if m != nil && m.Required != nil { - return *m.Required +func (x *AnyRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required } return false } -func (m *AnyRules) GetIn() []string { - if m != nil { - return m.In +func (x *AnyRules) GetIn() []string { + if x != nil { + return x.In } return nil } -func (m *AnyRules) GetNotIn() []string { - if m != nil { - return m.NotIn +func (x *AnyRules) GetNotIn() []string { + if x != nil { + return x.NotIn } return nil } @@ -3181,109 +2951,118 @@ func (m *AnyRules) GetNotIn() []string { // DurationRules describe the constraints applied exclusively to the // `google.protobuf.Duration` well-known type type DurationRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Required specifies that this field must be set Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` // Const specifies that this field must be exactly the specified value - Const *duration.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + Const *durationpb.Duration `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, // exclusive - Lt *duration.Duration `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` + Lt *durationpb.Duration `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` // Lt specifies that this field must be less than the specified value, // inclusive - Lte *duration.Duration `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` + Lte *durationpb.Duration `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` // Gt specifies that this field must be greater than the specified value, // exclusive - Gt *duration.Duration `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` + Gt *durationpb.Duration `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` // Gte specifies that this field must be greater than the specified value, // inclusive - Gte *duration.Duration `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` + Gte *durationpb.Duration `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` // In specifies that this field must be equal to one of the specified // values - In []*duration.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` + In []*durationpb.Duration `protobuf:"bytes,7,rep,name=in" json:"in,omitempty"` // NotIn specifies that this field cannot be equal to one of the specified // values - NotIn []*duration.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + NotIn []*durationpb.Duration `protobuf:"bytes,8,rep,name=not_in,json=notIn" json:"not_in,omitempty"` } -func (m *DurationRules) Reset() { *m = DurationRules{} } -func (m *DurationRules) String() string { return proto.CompactTextString(m) } -func (*DurationRules) ProtoMessage() {} -func (*DurationRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{21} -} -func (m *DurationRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_DurationRules.Unmarshal(m, b) -} -func (m *DurationRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_DurationRules.Marshal(b, m, deterministic) -} -func (dst *DurationRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_DurationRules.Merge(dst, src) +func (x *DurationRules) Reset() { + *x = DurationRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *DurationRules) XXX_Size() int { - return xxx_messageInfo_DurationRules.Size(m) + +func (x *DurationRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *DurationRules) XXX_DiscardUnknown() { - xxx_messageInfo_DurationRules.DiscardUnknown(m) + +func (*DurationRules) ProtoMessage() {} + +func (x *DurationRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_DurationRules proto.InternalMessageInfo +// Deprecated: Use DurationRules.ProtoReflect.Descriptor instead. +func (*DurationRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{21} +} -func (m *DurationRules) GetRequired() bool { - if m != nil && m.Required != nil { - return *m.Required +func (x *DurationRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required } return false } -func (m *DurationRules) GetConst() *duration.Duration { - if m != nil { - return m.Const +func (x *DurationRules) GetConst() *durationpb.Duration { + if x != nil { + return x.Const } return nil } -func (m *DurationRules) GetLt() *duration.Duration { - if m != nil { - return m.Lt +func (x *DurationRules) GetLt() *durationpb.Duration { + if x != nil { + return x.Lt } return nil } -func (m *DurationRules) GetLte() *duration.Duration { - if m != nil { - return m.Lte +func (x *DurationRules) GetLte() *durationpb.Duration { + if x != nil { + return x.Lte } return nil } -func (m *DurationRules) GetGt() *duration.Duration { - if m != nil { - return m.Gt +func (x *DurationRules) GetGt() *durationpb.Duration { + if x != nil { + return x.Gt } return nil } -func (m *DurationRules) GetGte() *duration.Duration { - if m != nil { - return m.Gte +func (x *DurationRules) GetGte() *durationpb.Duration { + if x != nil { + return x.Gte } return nil } -func (m *DurationRules) GetIn() []*duration.Duration { - if m != nil { - return m.In +func (x *DurationRules) GetIn() []*durationpb.Duration { + if x != nil { + return x.In } return nil } -func (m *DurationRules) GetNotIn() []*duration.Duration { - if m != nil { - return m.NotIn +func (x *DurationRules) GetNotIn() []*durationpb.Duration { + if x != nil { + return x.NotIn } return nil } @@ -3291,22 +3070,26 @@ func (m *DurationRules) GetNotIn() []*duration.Duration { // TimestampRules describe the constraints applied exclusively to the // `google.protobuf.Timestamp` well-known type type TimestampRules struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // Required specifies that this field must be set Required *bool `protobuf:"varint,1,opt,name=required" json:"required,omitempty"` // Const specifies that this field must be exactly the specified value - Const *timestamp.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` + Const *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=const" json:"const,omitempty"` // Lt specifies that this field must be less than the specified value, // exclusive - Lt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` + Lt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=lt" json:"lt,omitempty"` // Lte specifies that this field must be less than the specified value, // inclusive - Lte *timestamp.Timestamp `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` + Lte *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=lte" json:"lte,omitempty"` // Gt specifies that this field must be greater than the specified value, // exclusive - Gt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` + Gt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=gt" json:"gt,omitempty"` // Gte specifies that this field must be greater than the specified value, // inclusive - Gte *timestamp.Timestamp `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` + Gte *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=gte" json:"gte,omitempty"` // LtNow specifies that this must be less than the current time. LtNow // can only be used with the Within rule. LtNow *bool `protobuf:"varint,7,opt,name=lt_now,json=ltNow" json:"lt_now,omitempty"` @@ -3316,260 +3099,1008 @@ type TimestampRules struct { // Within specifies that this field must be within this duration of the // current time. This constraint can be used alone or with the LtNow and // GtNow rules. - Within *duration.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Within *durationpb.Duration `protobuf:"bytes,9,opt,name=within" json:"within,omitempty"` } -func (m *TimestampRules) Reset() { *m = TimestampRules{} } -func (m *TimestampRules) String() string { return proto.CompactTextString(m) } -func (*TimestampRules) ProtoMessage() {} -func (*TimestampRules) Descriptor() ([]byte, []int) { - return fileDescriptor_validate_c8f5e113dd6422a8, []int{22} -} -func (m *TimestampRules) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_TimestampRules.Unmarshal(m, b) -} -func (m *TimestampRules) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_TimestampRules.Marshal(b, m, deterministic) -} -func (dst *TimestampRules) XXX_Merge(src proto.Message) { - xxx_messageInfo_TimestampRules.Merge(dst, src) +func (x *TimestampRules) Reset() { + *x = TimestampRules{} + if protoimpl.UnsafeEnabled { + mi := &file_validate_validate_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *TimestampRules) XXX_Size() int { - return xxx_messageInfo_TimestampRules.Size(m) + +func (x *TimestampRules) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *TimestampRules) XXX_DiscardUnknown() { - xxx_messageInfo_TimestampRules.DiscardUnknown(m) + +func (*TimestampRules) ProtoMessage() {} + +func (x *TimestampRules) ProtoReflect() protoreflect.Message { + mi := &file_validate_validate_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_TimestampRules proto.InternalMessageInfo +// Deprecated: Use TimestampRules.ProtoReflect.Descriptor instead. +func (*TimestampRules) Descriptor() ([]byte, []int) { + return file_validate_validate_proto_rawDescGZIP(), []int{22} +} -func (m *TimestampRules) GetRequired() bool { - if m != nil && m.Required != nil { - return *m.Required +func (x *TimestampRules) GetRequired() bool { + if x != nil && x.Required != nil { + return *x.Required } return false } -func (m *TimestampRules) GetConst() *timestamp.Timestamp { - if m != nil { - return m.Const +func (x *TimestampRules) GetConst() *timestamppb.Timestamp { + if x != nil { + return x.Const } return nil } -func (m *TimestampRules) GetLt() *timestamp.Timestamp { - if m != nil { - return m.Lt +func (x *TimestampRules) GetLt() *timestamppb.Timestamp { + if x != nil { + return x.Lt } return nil } -func (m *TimestampRules) GetLte() *timestamp.Timestamp { - if m != nil { - return m.Lte +func (x *TimestampRules) GetLte() *timestamppb.Timestamp { + if x != nil { + return x.Lte } return nil } -func (m *TimestampRules) GetGt() *timestamp.Timestamp { - if m != nil { - return m.Gt +func (x *TimestampRules) GetGt() *timestamppb.Timestamp { + if x != nil { + return x.Gt } return nil } -func (m *TimestampRules) GetGte() *timestamp.Timestamp { - if m != nil { - return m.Gte +func (x *TimestampRules) GetGte() *timestamppb.Timestamp { + if x != nil { + return x.Gte } return nil } -func (m *TimestampRules) GetLtNow() bool { - if m != nil && m.LtNow != nil { - return *m.LtNow +func (x *TimestampRules) GetLtNow() bool { + if x != nil && x.LtNow != nil { + return *x.LtNow } return false } -func (m *TimestampRules) GetGtNow() bool { - if m != nil && m.GtNow != nil { - return *m.GtNow +func (x *TimestampRules) GetGtNow() bool { + if x != nil && x.GtNow != nil { + return *x.GtNow } return false } -func (m *TimestampRules) GetWithin() *duration.Duration { - if m != nil { - return m.Within - } - return nil -} - -var E_Disabled = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.MessageOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 919191, - Name: "validate.disabled", - Tag: "varint,919191,opt,name=disabled", - Filename: "validate/validate.proto", -} - -var E_Required = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.OneofOptions)(nil), - ExtensionType: (*bool)(nil), - Field: 919191, - Name: "validate.required", - Tag: "varint,919191,opt,name=required", - Filename: "validate/validate.proto", -} - -var E_Rules = &proto.ExtensionDesc{ - ExtendedType: (*descriptor.FieldOptions)(nil), - ExtensionType: (*FieldRules)(nil), - Field: 919191, - Name: "validate.rules", - Tag: "bytes,919191,opt,name=rules", - Filename: "validate/validate.proto", -} - -func init() { - proto.RegisterType((*FieldRules)(nil), "validate.FieldRules") - proto.RegisterType((*FloatRules)(nil), "validate.FloatRules") - proto.RegisterType((*DoubleRules)(nil), "validate.DoubleRules") - proto.RegisterType((*Int32Rules)(nil), "validate.Int32Rules") - proto.RegisterType((*Int64Rules)(nil), "validate.Int64Rules") - proto.RegisterType((*UInt32Rules)(nil), "validate.UInt32Rules") - proto.RegisterType((*UInt64Rules)(nil), "validate.UInt64Rules") - proto.RegisterType((*SInt32Rules)(nil), "validate.SInt32Rules") - proto.RegisterType((*SInt64Rules)(nil), "validate.SInt64Rules") - proto.RegisterType((*Fixed32Rules)(nil), "validate.Fixed32Rules") - proto.RegisterType((*Fixed64Rules)(nil), "validate.Fixed64Rules") - proto.RegisterType((*SFixed32Rules)(nil), "validate.SFixed32Rules") - proto.RegisterType((*SFixed64Rules)(nil), "validate.SFixed64Rules") - proto.RegisterType((*BoolRules)(nil), "validate.BoolRules") - proto.RegisterType((*StringRules)(nil), "validate.StringRules") - proto.RegisterType((*BytesRules)(nil), "validate.BytesRules") - proto.RegisterType((*EnumRules)(nil), "validate.EnumRules") - proto.RegisterType((*MessageRules)(nil), "validate.MessageRules") - proto.RegisterType((*RepeatedRules)(nil), "validate.RepeatedRules") - proto.RegisterType((*MapRules)(nil), "validate.MapRules") - proto.RegisterType((*AnyRules)(nil), "validate.AnyRules") - proto.RegisterType((*DurationRules)(nil), "validate.DurationRules") - proto.RegisterType((*TimestampRules)(nil), "validate.TimestampRules") - proto.RegisterExtension(E_Disabled) - proto.RegisterExtension(E_Required) - proto.RegisterExtension(E_Rules) -} - -func init() { proto.RegisterFile("validate/validate.proto", fileDescriptor_validate_c8f5e113dd6422a8) } - -var fileDescriptor_validate_c8f5e113dd6422a8 = []byte{ - // 1640 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x98, 0xcd, 0x6e, 0xdb, 0xc6, - 0x16, 0xc7, 0xaf, 0xf8, 0x25, 0x6a, 0x2c, 0x45, 0xd2, 0xc4, 0x76, 0x18, 0xdf, 0x8f, 0x38, 0x5a, - 0x5c, 0x38, 0xb9, 0x89, 0x9d, 0xeb, 0xb8, 0x42, 0x90, 0xa2, 0x05, 0x6a, 0xa4, 0x41, 0x83, 0x36, - 0x4d, 0x40, 0x37, 0x9b, 0x6e, 0x04, 0xda, 0x1a, 0x29, 0x03, 0x53, 0x43, 0x86, 0xa4, 0x6c, 0xeb, - 0x21, 0xd2, 0x76, 0xd7, 0xbe, 0x4a, 0x57, 0xdd, 0xf7, 0x4d, 0xba, 0xee, 0x0b, 0x14, 0xf3, 0xc5, - 0x8f, 0x43, 0x5a, 0x5e, 0x74, 0xa7, 0x39, 0xe7, 0x7f, 0x66, 0x7e, 0xf8, 0x0f, 0x39, 0x73, 0x28, - 0x74, 0xe7, 0x22, 0x08, 0xe9, 0x34, 0xc8, 0xc8, 0x81, 0xfe, 0xb1, 0x1f, 0x27, 0x51, 0x16, 0x61, - 0x57, 0x8f, 0x77, 0x76, 0xe7, 0x51, 0x34, 0x0f, 0xc9, 0x81, 0x88, 0x9f, 0x2e, 0x67, 0x07, 0x53, - 0x92, 0x9e, 0x25, 0x34, 0xce, 0xa2, 0x44, 0x6a, 0x77, 0xfe, 0x53, 0x53, 0x2c, 0x93, 0x20, 0xa3, - 0x11, 0x53, 0xf9, 0x7b, 0x30, 0x9f, 0xd1, 0x05, 0x49, 0xb3, 0x60, 0x11, 0x4b, 0xc1, 0xe8, 0x77, - 0x17, 0xa1, 0x97, 0x94, 0x84, 0x53, 0x7f, 0x19, 0x92, 0x14, 0x3f, 0x42, 0xf6, 0x2c, 0x8c, 0x82, - 0xcc, 0x6b, 0xed, 0xb6, 0xf6, 0x36, 0x0e, 0x37, 0xf7, 0x73, 0xb6, 0x97, 0x3c, 0x2c, 0x44, 0x5f, - 0xfd, 0xc3, 0x97, 0x22, 0x7c, 0x80, 0x9c, 0x69, 0xb4, 0x3c, 0x0d, 0x89, 0x67, 0x08, 0xf9, 0x56, - 0x21, 0x7f, 0x21, 0xe2, 0x5a, 0xaf, 0x64, 0x7c, 0x7a, 0xca, 0xb2, 0xa7, 0x87, 0x9e, 0x09, 0xa7, - 0x7f, 0xc5, 0xc3, 0xf9, 0xf4, 0x42, 0xa4, 0xd4, 0xe3, 0x23, 0xcf, 0x6a, 0x50, 0x8f, 0x8f, 0xca, - 0xea, 0xf1, 0x11, 0x87, 0x59, 0xca, 0xc9, 0x6d, 0x08, 0xf3, 0xae, 0x32, 0xbb, 0x92, 0xe9, 0x82, - 0xf1, 0x91, 0xe7, 0x34, 0x15, 0x14, 0x0b, 0x28, 0x19, 0x2f, 0x48, 0xe5, 0x0a, 0x6d, 0x58, 0x70, - 0x52, 0x5d, 0x21, 0xcd, 0x57, 0x48, 0xe5, 0x0a, 0x6e, 0x53, 0x41, 0x69, 0x05, 0x29, 0xc3, 0x87, - 0xa8, 0x3d, 0xa3, 0x57, 0x64, 0xfa, 0xf4, 0xd0, 0xeb, 0x88, 0x8a, 0xed, 0xd2, 0x06, 0xc8, 0x84, - 0x2e, 0xd1, 0xc2, 0xbc, 0x66, 0x7c, 0xe4, 0xa1, 0xc6, 0x9a, 0x62, 0x19, 0x2d, 0xc4, 0x9f, 0x20, - 0x37, 0xd5, 0x0b, 0x6d, 0x88, 0xa2, 0x3b, 0x25, 0x34, 0xb0, 0x52, 0x2e, 0x2d, 0xca, 0xc6, 0x47, - 0x5e, 0xb7, 0xb9, 0xac, 0x58, 0x2c, 0x97, 0xe2, 0x07, 0xc8, 0x3a, 0x8d, 0xa2, 0xd0, 0xeb, 0x89, - 0x92, 0xdb, 0x45, 0xc9, 0x71, 0x14, 0x85, 0x5a, 0x2e, 0x24, 0xc2, 0xb1, 0x2c, 0xa1, 0x6c, 0xee, - 0xdd, 0xaa, 0x39, 0x26, 0xe2, 0x85, 0x63, 0x62, 0xc8, 0x9f, 0x91, 0xd3, 0x55, 0x46, 0x52, 0xaf, - 0x0f, 0x9f, 0x91, 0x63, 0x1e, 0xce, 0x9f, 0x11, 0x21, 0xe2, 0x24, 0x84, 0x2d, 0x17, 0xde, 0x00, - 0x92, 0x7c, 0xc9, 0x96, 0x8b, 0x9c, 0x84, 0x4b, 0xb8, 0xad, 0x0b, 0x92, 0xa6, 0xc1, 0x9c, 0x78, - 0x43, 0x68, 0xeb, 0x6b, 0x99, 0xc8, 0x6d, 0x55, 0x42, 0xee, 0x4f, 0x42, 0x62, 0x12, 0x64, 0x64, - 0xea, 0x61, 0xe8, 0x8f, 0xaf, 0x32, 0xb9, 0x3f, 0x5a, 0x8a, 0xff, 0x8b, 0xcc, 0x45, 0x10, 0x7b, - 0xb7, 0x45, 0x05, 0x2e, 0x2d, 0x13, 0xc4, 0x5a, 0xcc, 0x05, 0x5c, 0x17, 0xb0, 0x95, 0xb7, 0x09, - 0x75, 0x5f, 0xb0, 0x55, 0xae, 0x0b, 0xd8, 0x8a, 0x63, 0xe8, 0x63, 0xc0, 0xdb, 0x82, 0x18, 0x2f, - 0x54, 0x26, 0xc7, 0xd0, 0x52, 0xfc, 0x0c, 0x75, 0xf2, 0xd3, 0xc1, 0xdb, 0x16, 0x75, 0x5e, 0x51, - 0xf7, 0x9d, 0x4e, 0xe9, 0xc2, 0x42, 0x7c, 0xec, 0x20, 0x2b, 0x5b, 0xc5, 0x64, 0xf4, 0xb1, 0x85, - 0x50, 0x71, 0x4e, 0xe0, 0x4d, 0x64, 0x9f, 0x45, 0x2c, 0x95, 0x87, 0x89, 0xe1, 0xcb, 0x01, 0xbe, - 0x85, 0x8c, 0x30, 0x13, 0x07, 0x86, 0xe1, 0x1b, 0x61, 0x86, 0x07, 0xc8, 0x0c, 0x33, 0x22, 0x4e, - 0x04, 0xc3, 0xe7, 0x3f, 0xb9, 0x62, 0x9e, 0x89, 0x97, 0xde, 0xf0, 0x8d, 0xb9, 0x50, 0xcc, 0x33, - 0x22, 0x5e, 0x6b, 0xc3, 0xe7, 0x3f, 0xb9, 0x82, 0x32, 0xcf, 0xd9, 0x35, 0xb9, 0x82, 0x32, 0xbc, - 0x85, 0x1c, 0x16, 0x65, 0x13, 0xca, 0xbc, 0xb6, 0x88, 0xd9, 0x2c, 0xca, 0x5e, 0xb1, 0xd1, 0x0f, - 0x2d, 0xb4, 0x51, 0x3a, 0x88, 0xaa, 0x40, 0xad, 0x3a, 0x50, 0x0b, 0x02, 0xb5, 0x20, 0x50, 0x0b, - 0x02, 0xb5, 0x20, 0x50, 0xab, 0x01, 0xa8, 0xa5, 0x81, 0xb8, 0x41, 0xc5, 0x49, 0x51, 0xe5, 0xb1, - 0xeb, 0x3c, 0x36, 0xe4, 0xb1, 0x21, 0x8f, 0x0d, 0x79, 0x6c, 0xc8, 0x63, 0x37, 0xf0, 0xd8, 0x80, - 0x47, 0xbd, 0xb4, 0x55, 0x1e, 0xb3, 0xce, 0x63, 0x42, 0x1e, 0x13, 0xf2, 0x98, 0x90, 0xc7, 0x84, - 0x3c, 0x66, 0x03, 0x8f, 0x59, 0xde, 0xb0, 0x77, 0xd7, 0x19, 0xd4, 0xab, 0x03, 0xf5, 0x20, 0x50, - 0x0f, 0x02, 0xf5, 0x20, 0x50, 0x0f, 0x02, 0xf5, 0x1a, 0x80, 0x7a, 0x10, 0xa8, 0xd1, 0x21, 0xab, - 0x0e, 0x64, 0x41, 0x20, 0x0b, 0x02, 0x59, 0x10, 0xc8, 0x82, 0x40, 0x56, 0x03, 0x90, 0x55, 0x06, - 0x3a, 0xb9, 0xce, 0xa1, 0x61, 0x1d, 0x68, 0x08, 0x81, 0x86, 0x10, 0x68, 0x08, 0x81, 0x86, 0x10, - 0x68, 0xd8, 0x00, 0x34, 0x84, 0x40, 0x8d, 0x0e, 0xe1, 0x3a, 0x10, 0x86, 0x40, 0x18, 0x02, 0x61, - 0x08, 0x84, 0x21, 0x10, 0x6e, 0x00, 0xc2, 0x1a, 0xe8, 0xc7, 0x16, 0xea, 0x96, 0x6f, 0xb0, 0x2a, - 0x51, 0xbb, 0x4e, 0xd4, 0x86, 0x44, 0x6d, 0x48, 0xd4, 0x86, 0x44, 0x6d, 0x48, 0xd4, 0x6e, 0x20, - 0x6a, 0xd7, 0x88, 0x1a, 0x3d, 0x72, 0xea, 0x44, 0x0e, 0x24, 0x72, 0x20, 0x91, 0x03, 0x89, 0x1c, - 0x48, 0xe4, 0x34, 0x10, 0x39, 0x9a, 0xe8, 0xa7, 0x16, 0xea, 0x9d, 0x5c, 0x6f, 0x52, 0xbf, 0x8e, - 0xd4, 0x87, 0x48, 0x7d, 0x88, 0xd4, 0x87, 0x48, 0x7d, 0x88, 0xd4, 0x6f, 0x40, 0xea, 0xd7, 0x91, - 0x1a, 0x5d, 0x1a, 0xd4, 0x91, 0x06, 0x10, 0x69, 0x00, 0x91, 0x06, 0x10, 0x69, 0x00, 0x91, 0x06, - 0x0d, 0x48, 0x03, 0x8d, 0x74, 0x1f, 0x75, 0xf2, 0x0e, 0xa5, 0x4a, 0xe3, 0x2a, 0x9a, 0xd1, 0x2f, - 0x16, 0xda, 0x28, 0x35, 0x26, 0x55, 0x55, 0x47, 0x33, 0x73, 0x46, 0xc2, 0xc4, 0x05, 0xcf, 0xcf, - 0x03, 0xc2, 0xf0, 0x1d, 0xd4, 0x5e, 0x50, 0x36, 0xe1, 0x51, 0x79, 0x6c, 0x38, 0x0b, 0xca, 0xbe, - 0x51, 0x89, 0xe0, 0x4a, 0x24, 0x4c, 0x95, 0x08, 0xae, 0x78, 0xe2, 0x9f, 0xa8, 0x13, 0x12, 0x36, - 0x91, 0xcd, 0xce, 0xa6, 0x48, 0xb9, 0x21, 0x61, 0xa2, 0xcb, 0xe1, 0x49, 0x3e, 0x9d, 0x4c, 0xca, - 0x53, 0xc6, 0x5d, 0xd0, 0x52, 0x32, 0xb8, 0x52, 0x49, 0x5b, 0x25, 0x83, 0x2b, 0x99, 0xf4, 0x50, - 0x3b, 0x0e, 0xb2, 0x8c, 0x24, 0x4c, 0x74, 0xc1, 0x1d, 0x5f, 0x0f, 0xf1, 0x36, 0x72, 0xe2, 0x84, - 0xcc, 0xe8, 0x95, 0xe8, 0x76, 0x3b, 0xbe, 0x1a, 0xf1, 0x78, 0xba, 0x9c, 0xf1, 0xb8, 0x2b, 0xe3, - 0x72, 0x84, 0x77, 0x90, 0x7b, 0x16, 0xb1, 0x2c, 0xa0, 0x2c, 0x15, 0xcd, 0x6b, 0xc7, 0xcf, 0xc7, - 0xca, 0x70, 0xb4, 0x6b, 0xee, 0x75, 0x80, 0xe1, 0x1b, 0x22, 0x26, 0x0d, 0xc7, 0xdb, 0xc8, 0x26, - 0x8b, 0x80, 0x86, 0xa2, 0xb9, 0x74, 0x79, 0xdb, 0x26, 0x86, 0xf8, 0x5f, 0xc8, 0x7d, 0x1f, 0xa5, - 0x19, 0x0b, 0x16, 0x44, 0x34, 0x91, 0x3c, 0x95, 0x47, 0xf0, 0x00, 0x19, 0x34, 0x16, 0xfd, 0x22, - 0x8f, 0x1b, 0x34, 0xc6, 0x9b, 0xc8, 0xa2, 0xf1, 0xc5, 0x91, 0xe8, 0x09, 0x79, 0x4c, 0x8c, 0x54, - 0x74, 0x2c, 0x9a, 0x3f, 0x1d, 0x1d, 0x63, 0x8c, 0xcc, 0x65, 0x42, 0x45, 0x8f, 0xc7, 0x83, 0x7c, - 0x80, 0xef, 0xa2, 0xf6, 0x32, 0xa1, 0x93, 0x84, 0xcc, 0x44, 0x1b, 0xe7, 0x8a, 0x6f, 0x80, 0x84, - 0xfa, 0x64, 0x86, 0x77, 0x50, 0x3b, 0x98, 0x4e, 0x13, 0x92, 0xa6, 0xa2, 0xb5, 0xe2, 0x29, 0x1d, - 0x38, 0xee, 0x22, 0x74, 0x49, 0xc2, 0x70, 0x72, 0xce, 0xa2, 0x4b, 0x36, 0xfa, 0xcd, 0x40, 0xa8, - 0xe8, 0x41, 0xab, 0x4f, 0x46, 0x17, 0x3c, 0x19, 0xbd, 0xbf, 0xf3, 0x64, 0x94, 0xb6, 0xd0, 0xba, - 0x6e, 0x0b, 0x6d, 0xb1, 0x68, 0x7d, 0x0b, 0x1d, 0x19, 0x6f, 0xd8, 0xc2, 0xb6, 0xc8, 0xc0, 0x2d, - 0x74, 0x77, 0xcd, 0xbd, 0x2e, 0xd8, 0xc2, 0x8e, 0x88, 0xa9, 0x2d, 0x94, 0x9b, 0x81, 0x1a, 0x36, - 0x63, 0xa3, 0x71, 0x33, 0xba, 0xe5, 0xcd, 0x00, 0x0e, 0x9e, 0xa3, 0x4e, 0xde, 0x97, 0x5f, 0xd3, - 0x2b, 0xdd, 0x47, 0xdd, 0x29, 0x99, 0x51, 0x46, 0xa6, 0x93, 0x88, 0x85, 0x2b, 0x61, 0x99, 0xeb, - 0x6f, 0xa8, 0xd8, 0x1b, 0x16, 0xae, 0x14, 0xb8, 0xd9, 0xd0, 0x0a, 0x59, 0xe5, 0x56, 0xe8, 0x73, - 0xd4, 0x2d, 0xb7, 0xf5, 0x18, 0x23, 0x2b, 0x3d, 0xa7, 0xb1, 0x7a, 0xdd, 0xc5, 0x6f, 0xee, 0x4f, - 0x42, 0x3e, 0x2c, 0x69, 0x42, 0xa6, 0x6a, 0xa5, 0x7c, 0xcc, 0x5b, 0xa9, 0x5e, 0xa5, 0xc5, 0xd7, - 0x2f, 0x25, 0xcd, 0xc8, 0x22, 0x55, 0xfd, 0x02, 0x7f, 0x29, 0x5f, 0xf1, 0xb1, 0x7e, 0x29, 0x65, - 0xd2, 0xc8, 0x5f, 0x4a, 0x99, 0xdc, 0x46, 0xce, 0x92, 0xd1, 0x0f, 0x4b, 0x79, 0xac, 0xb9, 0xbe, - 0x1a, 0xe1, 0x87, 0xc8, 0x96, 0x05, 0xb5, 0x0f, 0xe2, 0xe2, 0x13, 0xde, 0x97, 0x92, 0xd1, 0xaf, - 0x2d, 0xe4, 0xea, 0x0f, 0x08, 0x8d, 0x12, 0x07, 0x34, 0x29, 0xa3, 0xbc, 0xe5, 0x63, 0x8d, 0x22, - 0x93, 0x05, 0x4a, 0x9e, 0x64, 0xd1, 0x24, 0x8d, 0x83, 0x24, 0xd5, 0x34, 0x2e, 0x8b, 0x4e, 0xc4, - 0x18, 0xef, 0x21, 0xeb, 0x9c, 0xac, 0xd6, 0xe3, 0x08, 0x05, 0x7e, 0x84, 0x9c, 0x8b, 0x20, 0x5c, - 0xaa, 0x03, 0xe8, 0x3a, 0xad, 0xd2, 0x8c, 0x5e, 0x23, 0x57, 0x7f, 0xd3, 0x54, 0x3c, 0x6f, 0x55, - 0x3d, 0x57, 0x5b, 0x6b, 0x34, 0x1c, 0x2b, 0x66, 0xe9, 0x58, 0x19, 0xfd, 0x61, 0xa0, 0x5e, 0xe5, - 0xb3, 0x67, 0xed, 0xa4, 0x07, 0xfa, 0x41, 0x93, 0xff, 0x69, 0xdc, 0xdd, 0x97, 0x7f, 0xa1, 0xec, - 0xeb, 0xbf, 0x50, 0x8a, 0x2f, 0x28, 0xf5, 0x0c, 0x3e, 0x10, 0x37, 0x92, 0x79, 0x93, 0x9a, 0x5f, - 0x56, 0xff, 0x93, 0x97, 0x95, 0x75, 0x93, 0x56, 0xdc, 0x63, 0x0f, 0xc4, 0x3d, 0x66, 0xdf, 0x38, - 0xef, 0x5c, 0xcc, 0xcb, 0xaf, 0x38, 0xe7, 0xc6, 0x79, 0xe7, 0x72, 0x5e, 0x75, 0xd3, 0xad, 0x9f, - 0x97, 0x32, 0xfc, 0x24, 0x37, 0xd4, 0xbd, 0x49, 0xae, 0xbc, 0xfe, 0xd3, 0x40, 0xb7, 0xaa, 0x9f, - 0x8a, 0x6b, 0xcd, 0x7e, 0x52, 0x35, 0x7b, 0xa7, 0x36, 0x7f, 0x31, 0x97, 0x72, 0xfb, 0x61, 0xc9, - 0xed, 0x75, 0x72, 0x6e, 0xf7, 0xa3, 0xb2, 0xdd, 0xeb, 0xc4, 0xc2, 0xef, 0x87, 0x25, 0xbf, 0xd7, - 0xce, 0x3c, 0x17, 0x33, 0x17, 0x86, 0xaf, 0x9d, 0x99, 0x3b, 0xbe, 0x85, 0x9c, 0x30, 0x9b, 0xb0, - 0xe8, 0x52, 0x9c, 0xaa, 0xae, 0x6f, 0x87, 0xd9, 0xb7, 0xd1, 0x25, 0x0f, 0xcf, 0x65, 0xd8, 0x95, - 0xe1, 0xb9, 0x08, 0xff, 0x1f, 0x39, 0x97, 0x34, 0x7b, 0x2f, 0x4e, 0xd6, 0x1b, 0xf6, 0x53, 0x09, - 0x9f, 0x7f, 0x86, 0xdc, 0x29, 0x4d, 0x83, 0xd3, 0x90, 0x4c, 0xf1, 0xbd, 0x9a, 0x5c, 0x9d, 0x6b, - 0x6f, 0x62, 0x5e, 0x93, 0x7a, 0x3f, 0x7f, 0x7c, 0x26, 0x77, 0x41, 0x97, 0x3c, 0xff, 0xb4, 0xd8, - 0x21, 0xfc, 0xef, 0x5a, 0xf9, 0x1b, 0x46, 0xa2, 0x59, 0xad, 0x58, 0x17, 0x3c, 0xff, 0x1a, 0xd9, - 0x89, 0xd8, 0xe7, 0x7a, 0xa5, 0x78, 0xb5, 0xab, 0x95, 0xd7, 0x9e, 0x5a, 0x62, 0x8e, 0xe3, 0xb7, - 0x68, 0x87, 0x46, 0xfb, 0x84, 0x5d, 0x44, 0xab, 0x38, 0x89, 0xae, 0x56, 0xfb, 0xf1, 0xfc, 0x22, - 0xd7, 0x7f, 0x7f, 0x38, 0xa7, 0xd9, 0xfb, 0xe5, 0xe9, 0xfe, 0x59, 0xb4, 0x38, 0x28, 0x34, 0xf2, - 0xcf, 0xcd, 0xb3, 0xc7, 0x73, 0xc2, 0x1e, 0xd7, 0xfe, 0x53, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, - 0xca, 0xcb, 0x15, 0xa8, 0x67, 0x15, 0x00, 0x00, +func (x *TimestampRules) GetWithin() *durationpb.Duration { + if x != nil { + return x.Within + } + return nil +} + +var file_validate_validate_proto_extTypes = []protoimpl.ExtensionInfo{ + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1071, + Name: "validate.disabled", + Tag: "varint,1071,opt,name=disabled", + Filename: "validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1072, + Name: "validate.ignored", + Tag: "varint,1072,opt,name=ignored", + Filename: "validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.OneofOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 1071, + Name: "validate.required", + Tag: "varint,1071,opt,name=required", + Filename: "validate/validate.proto", + }, + { + ExtendedType: (*descriptorpb.FieldOptions)(nil), + ExtensionType: (*FieldRules)(nil), + Field: 1071, + Name: "validate.rules", + Tag: "bytes,1071,opt,name=rules", + Filename: "validate/validate.proto", + }, +} + +// Extension fields to descriptorpb.MessageOptions. +var ( + // Disabled nullifies any validation rules for this message, including any + // message fields associated with it that do support validation. + // + // optional bool disabled = 1071; + E_Disabled = &file_validate_validate_proto_extTypes[0] + // Ignore skips generation of validation methods for this message. + // + // optional bool ignored = 1072; + E_Ignored = &file_validate_validate_proto_extTypes[1] +) + +// Extension fields to descriptorpb.OneofOptions. +var ( + // Required ensures that exactly one the field options in a oneof is set; + // validation fails if no fields in the oneof are set. + // + // optional bool required = 1071; + E_Required = &file_validate_validate_proto_extTypes[2] +) + +// Extension fields to descriptorpb.FieldOptions. +var ( + // Rules specify the validations to be performed on this field. By default, + // no validation is performed against a field. + // + // optional validate.FieldRules rules = 1071; + E_Rules = &file_validate_validate_proto_extTypes[3] +) + +var File_validate_validate_proto protoreflect.FileDescriptor + +var file_validate_validate_proto_rawDesc = []byte{ + 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc8, 0x08, 0x0a, 0x0a, 0x46, 0x69, 0x65, 0x6c, 0x64, + 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x30, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x07, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x66, 0x6c, 0x6f, 0x61, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, + 0x65, 0x2e, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x12, 0x2f, 0x0a, 0x06, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, + 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, + 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2c, 0x0a, 0x05, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x49, + 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x05, 0x69, 0x6e, 0x74, + 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, 0x49, + 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, 0x6e, + 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x55, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x75, 0x69, + 0x6e, 0x74, 0x36, 0x34, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x53, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, 0x73, + 0x69, 0x6e, 0x74, 0x33, 0x32, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x53, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x06, + 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, + 0x32, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x32, 0x0a, 0x07, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x36, 0x34, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x07, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x35, + 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, + 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x12, 0x35, 0x0a, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, + 0x34, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x48, 0x00, 0x52, 0x08, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x12, 0x29, 0x0a, 0x04, + 0x62, 0x6f, 0x6f, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, + 0x00, 0x52, 0x04, 0x62, 0x6f, 0x6f, 0x6c, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, + 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x12, 0x2c, 0x0a, 0x05, 0x62, 0x79, 0x74, 0x65, + 0x73, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, + 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, + 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x04, 0x65, 0x6e, 0x75, + 0x6d, 0x12, 0x35, 0x0a, 0x08, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x12, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x52, + 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x26, 0x0a, 0x03, 0x6d, 0x61, 0x70, 0x18, + 0x13, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x03, 0x6d, 0x61, 0x70, + 0x12, 0x26, 0x0a, 0x03, 0x61, 0x6e, 0x79, 0x18, 0x14, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x48, 0x00, 0x52, 0x03, 0x61, 0x6e, 0x79, 0x12, 0x35, 0x0a, 0x08, 0x64, 0x75, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x15, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x76, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x08, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x38, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x16, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x48, 0x00, 0x52, 0x09, + 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x02, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x02, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x02, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x02, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x02, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x02, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x01, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x01, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, + 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x01, 0x52, 0x05, + 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x74, + 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, + 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x67, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x03, 0x67, 0x74, + 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, + 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, + 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb0, 0x01, 0x0a, 0x0a, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x6c, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x6c, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, + 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x03, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x03, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, + 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x63, + 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, + 0x20, 0x03, 0x28, 0x0d, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, + 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, + 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, + 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x04, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, + 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x04, 0x52, 0x05, 0x6e, 0x6f, + 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, + 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53, 0x49, 0x6e, 0x74, 0x33, + 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x11, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, + 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x11, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, + 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x11, 0x52, 0x03, 0x67, 0x74, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x11, 0x52, 0x02, 0x69, 0x6e, + 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x11, + 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, + 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x53, + 0x49, 0x6e, 0x74, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x12, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02, 0x6c, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x12, 0x52, 0x03, 0x6c, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x12, 0x52, 0x02, + 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x12, 0x52, + 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x12, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x12, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb2, + 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x07, 0x52, 0x05, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x07, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x07, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x07, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x07, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x07, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, + 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x07, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0xb2, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, + 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x06, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, + 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x06, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x06, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x06, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, + 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x06, 0x52, 0x05, + 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, + 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3, 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69, + 0x78, 0x65, 0x64, 0x33, 0x32, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02, 0x6c, 0x74, + 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x03, 0x6c, + 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0f, 0x52, 0x02, + 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0f, 0x52, + 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0f, + 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0f, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0xb3, + 0x01, 0x0a, 0x0d, 0x53, 0x46, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x10, 0x52, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x10, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x74, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x10, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x10, 0x52, 0x02, 0x67, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x10, 0x52, 0x03, 0x67, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x06, 0x20, 0x03, 0x28, 0x10, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x10, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, + 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, + 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x22, 0x21, 0x0a, 0x09, 0x42, 0x6f, 0x6f, 0x6c, 0x52, 0x75, 0x6c, 0x65, + 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x22, 0xd4, 0x05, 0x0a, 0x0b, 0x53, 0x74, 0x72, 0x69, + 0x6e, 0x67, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, + 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, + 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, + 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x65, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x14, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, 0x65, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, + 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, + 0x61, 0x78, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, + 0x6d, 0x61, 0x78, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, + 0x65, 0x72, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, + 0x66, 0x66, 0x69, 0x78, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, + 0x69, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x21, + 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x17, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6e, 0x6f, 0x74, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x0b, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x16, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, + 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, + 0x12, 0x1c, 0x0a, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x08, 0x48, 0x00, 0x52, 0x08, 0x68, 0x6f, 0x73, 0x74, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, + 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, + 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, + 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x36, 0x18, 0x10, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x36, 0x12, 0x12, 0x0a, 0x03, + 0x75, 0x72, 0x69, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x03, 0x75, 0x72, 0x69, + 0x12, 0x19, 0x0a, 0x07, 0x75, 0x72, 0x69, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x12, 0x20, 0x01, 0x28, + 0x08, 0x48, 0x00, 0x52, 0x06, 0x75, 0x72, 0x69, 0x52, 0x65, 0x66, 0x12, 0x1a, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x14, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x12, 0x40, 0x0a, + 0x10, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x72, 0x65, 0x67, 0x65, + 0x78, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x65, 0x2e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x48, 0x00, 0x52, + 0x0e, 0x77, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, 0x78, 0x12, + 0x1c, 0x0a, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x18, 0x19, 0x20, 0x01, 0x28, 0x08, 0x3a, + 0x04, 0x74, 0x72, 0x75, 0x65, 0x52, 0x06, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x12, 0x21, 0x0a, + 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x1a, 0x20, + 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, 0x74, 0x79, + 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x22, 0xe2, + 0x02, 0x0a, 0x0a, 0x42, 0x79, 0x74, 0x65, 0x73, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x14, 0x0a, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x63, 0x6f, + 0x6e, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x65, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x03, 0x6c, 0x65, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x5f, 0x6c, 0x65, 0x6e, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6d, 0x69, 0x6e, 0x4c, 0x65, 0x6e, 0x12, 0x17, + 0x0a, 0x07, 0x6d, 0x61, 0x78, 0x5f, 0x6c, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x06, 0x6d, 0x61, 0x78, 0x4c, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, + 0x72, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, + 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x75, 0x66, + 0x66, 0x69, 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x73, 0x75, 0x66, 0x66, 0x69, + 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, + 0x06, 0x6e, 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x05, 0x6e, + 0x6f, 0x74, 0x49, 0x6e, 0x12, 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0x14, 0x0a, 0x04, 0x69, 0x70, 0x76, 0x34, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, 0x76, 0x34, 0x12, 0x14, 0x0a, 0x04, + 0x69, 0x70, 0x76, 0x36, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x04, 0x69, 0x70, + 0x76, 0x36, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, + 0x74, 0x79, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, + 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x0c, 0x0a, 0x0a, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, + 0x6f, 0x77, 0x6e, 0x22, 0x6b, 0x0a, 0x09, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, + 0x64, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, + 0x66, 0x69, 0x6e, 0x65, 0x64, 0x4f, 0x6e, 0x6c, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, 0x18, + 0x03, 0x20, 0x03, 0x28, 0x05, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, 0x74, + 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x05, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, + 0x22, 0x3e, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x6b, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, + 0x73, 0x6b, 0x69, 0x70, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, + 0x22, 0xb0, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x75, 0x6c, + 0x65, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, + 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x49, 0x74, 0x65, 0x6d, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, + 0x69, 0x71, 0x75, 0x65, 0x12, 0x2a, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, + 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, + 0x70, 0x74, 0x79, 0x22, 0xdc, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x08, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a, + 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x08, 0x6d, 0x61, 0x78, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6e, 0x6f, + 0x5f, 0x73, 0x70, 0x61, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, + 0x6f, 0x53, 0x70, 0x61, 0x72, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, + 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x04, 0x6b, 0x65, 0x79, + 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x22, 0x4d, 0x0a, 0x08, 0x41, 0x6e, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x6e, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x15, 0x0a, 0x06, 0x6e, 0x6f, + 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, + 0x6e, 0x22, 0xe9, 0x02, 0x0a, 0x0d, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x75, + 0x6c, 0x65, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, + 0x2f, 0x0a, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, + 0x12, 0x29, 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x6c, + 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x29, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x02, 0x67, 0x74, 0x12, 0x2b, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x03, 0x67, 0x74, 0x65, + 0x12, 0x29, 0x0a, 0x02, 0x69, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, + 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x02, 0x69, 0x6e, 0x12, 0x30, 0x0a, 0x06, 0x6e, + 0x6f, 0x74, 0x5f, 0x69, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, + 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x74, 0x49, 0x6e, 0x22, 0xf3, 0x02, + 0x0a, 0x0e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x75, 0x6c, 0x65, 0x73, + 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x30, 0x0a, 0x05, + 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, + 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, + 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x05, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x12, 0x2a, + 0x0a, 0x02, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, + 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x02, 0x6c, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x6c, 0x74, + 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, + 0x61, 0x6d, 0x70, 0x52, 0x03, 0x6c, 0x74, 0x65, 0x12, 0x2a, 0x0a, 0x02, 0x67, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, + 0x52, 0x02, 0x67, 0x74, 0x12, 0x2c, 0x0a, 0x03, 0x67, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x03, 0x67, + 0x74, 0x65, 0x12, 0x15, 0x0a, 0x06, 0x6c, 0x74, 0x5f, 0x6e, 0x6f, 0x77, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x05, 0x6c, 0x74, 0x4e, 0x6f, 0x77, 0x12, 0x15, 0x0a, 0x06, 0x67, 0x74, 0x5f, + 0x6e, 0x6f, 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x67, 0x74, 0x4e, 0x6f, 0x77, + 0x12, 0x31, 0x0a, 0x06, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x06, 0x77, 0x69, 0x74, + 0x68, 0x69, 0x6e, 0x2a, 0x46, 0x0a, 0x0a, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x52, 0x65, 0x67, 0x65, + 0x78, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x14, + 0x0a, 0x10, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x48, 0x54, 0x54, 0x50, 0x5f, 0x48, 0x45, 0x41, + 0x44, 0x45, 0x52, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x02, 0x3a, 0x3c, 0x0a, 0x08, 0x64, + 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x07, 0x69, 0x67, 0x6e, + 0x6f, 0x72, 0x65, 0x64, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xb0, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x69, 0x67, + 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3a, 0x3a, 0x0a, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, + 0x64, 0x3a, 0x4a, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, + 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xaf, 0x08, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2e, 0x46, 0x69, 0x65, 0x6c, + 0x64, 0x52, 0x75, 0x6c, 0x65, 0x73, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x42, 0x50, 0x0a, + 0x1a, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x70, + 0x67, 0x76, 0x2e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x5a, 0x32, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, + 0x78, 0x79, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x76, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, +} + +var ( + file_validate_validate_proto_rawDescOnce sync.Once + file_validate_validate_proto_rawDescData = file_validate_validate_proto_rawDesc +) + +func file_validate_validate_proto_rawDescGZIP() []byte { + file_validate_validate_proto_rawDescOnce.Do(func() { + file_validate_validate_proto_rawDescData = protoimpl.X.CompressGZIP(file_validate_validate_proto_rawDescData) + }) + return file_validate_validate_proto_rawDescData +} + +var file_validate_validate_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_validate_validate_proto_msgTypes = make([]protoimpl.MessageInfo, 23) +var file_validate_validate_proto_goTypes = []interface{}{ + (KnownRegex)(0), // 0: validate.KnownRegex + (*FieldRules)(nil), // 1: validate.FieldRules + (*FloatRules)(nil), // 2: validate.FloatRules + (*DoubleRules)(nil), // 3: validate.DoubleRules + (*Int32Rules)(nil), // 4: validate.Int32Rules + (*Int64Rules)(nil), // 5: validate.Int64Rules + (*UInt32Rules)(nil), // 6: validate.UInt32Rules + (*UInt64Rules)(nil), // 7: validate.UInt64Rules + (*SInt32Rules)(nil), // 8: validate.SInt32Rules + (*SInt64Rules)(nil), // 9: validate.SInt64Rules + (*Fixed32Rules)(nil), // 10: validate.Fixed32Rules + (*Fixed64Rules)(nil), // 11: validate.Fixed64Rules + (*SFixed32Rules)(nil), // 12: validate.SFixed32Rules + (*SFixed64Rules)(nil), // 13: validate.SFixed64Rules + (*BoolRules)(nil), // 14: validate.BoolRules + (*StringRules)(nil), // 15: validate.StringRules + (*BytesRules)(nil), // 16: validate.BytesRules + (*EnumRules)(nil), // 17: validate.EnumRules + (*MessageRules)(nil), // 18: validate.MessageRules + (*RepeatedRules)(nil), // 19: validate.RepeatedRules + (*MapRules)(nil), // 20: validate.MapRules + (*AnyRules)(nil), // 21: validate.AnyRules + (*DurationRules)(nil), // 22: validate.DurationRules + (*TimestampRules)(nil), // 23: validate.TimestampRules + (*durationpb.Duration)(nil), // 24: google.protobuf.Duration + (*timestamppb.Timestamp)(nil), // 25: google.protobuf.Timestamp + (*descriptorpb.MessageOptions)(nil), // 26: google.protobuf.MessageOptions + (*descriptorpb.OneofOptions)(nil), // 27: google.protobuf.OneofOptions + (*descriptorpb.FieldOptions)(nil), // 28: google.protobuf.FieldOptions +} +var file_validate_validate_proto_depIdxs = []int32{ + 18, // 0: validate.FieldRules.message:type_name -> validate.MessageRules + 2, // 1: validate.FieldRules.float:type_name -> validate.FloatRules + 3, // 2: validate.FieldRules.double:type_name -> validate.DoubleRules + 4, // 3: validate.FieldRules.int32:type_name -> validate.Int32Rules + 5, // 4: validate.FieldRules.int64:type_name -> validate.Int64Rules + 6, // 5: validate.FieldRules.uint32:type_name -> validate.UInt32Rules + 7, // 6: validate.FieldRules.uint64:type_name -> validate.UInt64Rules + 8, // 7: validate.FieldRules.sint32:type_name -> validate.SInt32Rules + 9, // 8: validate.FieldRules.sint64:type_name -> validate.SInt64Rules + 10, // 9: validate.FieldRules.fixed32:type_name -> validate.Fixed32Rules + 11, // 10: validate.FieldRules.fixed64:type_name -> validate.Fixed64Rules + 12, // 11: validate.FieldRules.sfixed32:type_name -> validate.SFixed32Rules + 13, // 12: validate.FieldRules.sfixed64:type_name -> validate.SFixed64Rules + 14, // 13: validate.FieldRules.bool:type_name -> validate.BoolRules + 15, // 14: validate.FieldRules.string:type_name -> validate.StringRules + 16, // 15: validate.FieldRules.bytes:type_name -> validate.BytesRules + 17, // 16: validate.FieldRules.enum:type_name -> validate.EnumRules + 19, // 17: validate.FieldRules.repeated:type_name -> validate.RepeatedRules + 20, // 18: validate.FieldRules.map:type_name -> validate.MapRules + 21, // 19: validate.FieldRules.any:type_name -> validate.AnyRules + 22, // 20: validate.FieldRules.duration:type_name -> validate.DurationRules + 23, // 21: validate.FieldRules.timestamp:type_name -> validate.TimestampRules + 0, // 22: validate.StringRules.well_known_regex:type_name -> validate.KnownRegex + 1, // 23: validate.RepeatedRules.items:type_name -> validate.FieldRules + 1, // 24: validate.MapRules.keys:type_name -> validate.FieldRules + 1, // 25: validate.MapRules.values:type_name -> validate.FieldRules + 24, // 26: validate.DurationRules.const:type_name -> google.protobuf.Duration + 24, // 27: validate.DurationRules.lt:type_name -> google.protobuf.Duration + 24, // 28: validate.DurationRules.lte:type_name -> google.protobuf.Duration + 24, // 29: validate.DurationRules.gt:type_name -> google.protobuf.Duration + 24, // 30: validate.DurationRules.gte:type_name -> google.protobuf.Duration + 24, // 31: validate.DurationRules.in:type_name -> google.protobuf.Duration + 24, // 32: validate.DurationRules.not_in:type_name -> google.protobuf.Duration + 25, // 33: validate.TimestampRules.const:type_name -> google.protobuf.Timestamp + 25, // 34: validate.TimestampRules.lt:type_name -> google.protobuf.Timestamp + 25, // 35: validate.TimestampRules.lte:type_name -> google.protobuf.Timestamp + 25, // 36: validate.TimestampRules.gt:type_name -> google.protobuf.Timestamp + 25, // 37: validate.TimestampRules.gte:type_name -> google.protobuf.Timestamp + 24, // 38: validate.TimestampRules.within:type_name -> google.protobuf.Duration + 26, // 39: validate.disabled:extendee -> google.protobuf.MessageOptions + 26, // 40: validate.ignored:extendee -> google.protobuf.MessageOptions + 27, // 41: validate.required:extendee -> google.protobuf.OneofOptions + 28, // 42: validate.rules:extendee -> google.protobuf.FieldOptions + 1, // 43: validate.rules:type_name -> validate.FieldRules + 44, // [44:44] is the sub-list for method output_type + 44, // [44:44] is the sub-list for method input_type + 43, // [43:44] is the sub-list for extension type_name + 39, // [39:43] is the sub-list for extension extendee + 0, // [0:39] is the sub-list for field type_name +} + +func init() { file_validate_validate_proto_init() } +func file_validate_validate_proto_init() { + if File_validate_validate_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_validate_validate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FieldRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FloatRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DoubleRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Int64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UInt32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UInt64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SInt32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SInt64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fixed32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Fixed64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SFixed32Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SFixed64Rules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BoolRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*StringRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BytesRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*EnumRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MessageRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*RepeatedRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MapRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AnyRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*DurationRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_validate_validate_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*TimestampRules); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + file_validate_validate_proto_msgTypes[0].OneofWrappers = []interface{}{ + (*FieldRules_Float)(nil), + (*FieldRules_Double)(nil), + (*FieldRules_Int32)(nil), + (*FieldRules_Int64)(nil), + (*FieldRules_Uint32)(nil), + (*FieldRules_Uint64)(nil), + (*FieldRules_Sint32)(nil), + (*FieldRules_Sint64)(nil), + (*FieldRules_Fixed32)(nil), + (*FieldRules_Fixed64)(nil), + (*FieldRules_Sfixed32)(nil), + (*FieldRules_Sfixed64)(nil), + (*FieldRules_Bool)(nil), + (*FieldRules_String_)(nil), + (*FieldRules_Bytes)(nil), + (*FieldRules_Enum)(nil), + (*FieldRules_Repeated)(nil), + (*FieldRules_Map)(nil), + (*FieldRules_Any)(nil), + (*FieldRules_Duration)(nil), + (*FieldRules_Timestamp)(nil), + } + file_validate_validate_proto_msgTypes[14].OneofWrappers = []interface{}{ + (*StringRules_Email)(nil), + (*StringRules_Hostname)(nil), + (*StringRules_Ip)(nil), + (*StringRules_Ipv4)(nil), + (*StringRules_Ipv6)(nil), + (*StringRules_Uri)(nil), + (*StringRules_UriRef)(nil), + (*StringRules_Address)(nil), + (*StringRules_Uuid)(nil), + (*StringRules_WellKnownRegex)(nil), + } + file_validate_validate_proto_msgTypes[15].OneofWrappers = []interface{}{ + (*BytesRules_Ip)(nil), + (*BytesRules_Ipv4)(nil), + (*BytesRules_Ipv6)(nil), + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_validate_validate_proto_rawDesc, + NumEnums: 1, + NumMessages: 23, + NumExtensions: 4, + NumServices: 0, + }, + GoTypes: file_validate_validate_proto_goTypes, + DependencyIndexes: file_validate_validate_proto_depIdxs, + EnumInfos: file_validate_validate_proto_enumTypes, + MessageInfos: file_validate_validate_proto_msgTypes, + ExtensionInfos: file_validate_validate_proto_extTypes, + }.Build() + File_validate_validate_proto = out.File + file_validate_validate_proto_rawDesc = nil + file_validate_validate_proto_goTypes = nil + file_validate_validate_proto_depIdxs = nil } diff --git a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto index e50286e22..705d382aa 100644 --- a/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto +++ b/vendor/github.com/envoyproxy/protoc-gen-validate/validate/validate.proto @@ -12,26 +12,29 @@ import "google/protobuf/timestamp.proto"; extend google.protobuf.MessageOptions { // Disabled nullifies any validation rules for this message, including any // message fields associated with it that do support validation. - optional bool disabled = 919191; + optional bool disabled = 1071; + // Ignore skips generation of validation methods for this message. + optional bool ignored = 1072; } // Validation rules applied at the oneof level extend google.protobuf.OneofOptions { // Required ensures that exactly one the field options in a oneof is set; // validation fails if no fields in the oneof are set. - optional bool required = 919191; + optional bool required = 1071; } // Validation rules applied at the field level extend google.protobuf.FieldOptions { // Rules specify the validations to be performed on this field. By default, // no validation is performed against a field. - optional FieldRules rules = 919191; + optional FieldRules rules = 1071; } // FieldRules encapsulates the rules for each type of field. Depending on the // field, the correct set should be used to ensure proper validations. message FieldRules { + optional MessageRules message = 17; oneof type { // Scalar Field Types FloatRules float = 1; @@ -52,7 +55,6 @@ message FieldRules { // Complex Field Types EnumRules enum = 16; - MessageRules message = 17; RepeatedRules repeated = 18; MapRules map = 19; @@ -93,6 +95,10 @@ message FloatRules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated float not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // DoubleRules describes the constraints applied to `double` values @@ -125,6 +131,10 @@ message DoubleRules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated double not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // Int32Rules describes the constraints applied to `int32` values @@ -157,6 +167,10 @@ message Int32Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated int32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // Int64Rules describes the constraints applied to `int64` values @@ -189,6 +203,10 @@ message Int64Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated int64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // UInt32Rules describes the constraints applied to `uint32` values @@ -221,6 +239,10 @@ message UInt32Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated uint32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // UInt64Rules describes the constraints applied to `uint64` values @@ -253,6 +275,10 @@ message UInt64Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated uint64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // SInt32Rules describes the constraints applied to `sint32` values @@ -285,6 +311,10 @@ message SInt32Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated sint32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // SInt64Rules describes the constraints applied to `sint64` values @@ -317,6 +347,10 @@ message SInt64Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated sint64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // Fixed32Rules describes the constraints applied to `fixed32` values @@ -349,6 +383,10 @@ message Fixed32Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated fixed32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // Fixed64Rules describes the constraints applied to `fixed64` values @@ -381,6 +419,10 @@ message Fixed64Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated fixed64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // SFixed32Rules describes the constraints applied to `sfixed32` values @@ -413,6 +455,10 @@ message SFixed32Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated sfixed32 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // SFixed64Rules describes the constraints applied to `sfixed64` values @@ -445,6 +491,10 @@ message SFixed64Rules { // NotIn specifies that this field cannot be equal to one of the specified // values repeated sfixed64 not_in = 7; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 8; } // BoolRules describes the constraints applied to `bool` values @@ -474,7 +524,6 @@ message StringRules { optional uint64 max_len = 3; // LenBytes specifies that this field must be the specified number of bytes - // at a minimum optional uint64 len_bytes = 20; // MinBytes specifies that this field must be the specified number of bytes @@ -502,6 +551,10 @@ message StringRules { // anywhere in the string. optional string contains = 9; + // NotContains specifies that this field cannot have the specified substring + // anywhere in the string. + optional string not_contains = 23; + // In specifies that this field must be equal to one of the specified // values repeated string in = 10; @@ -545,7 +598,36 @@ message StringRules { // defined by RFC 1034 (which does not support internationalized domain // names or IDNs), or it can be a valid IP (v4 or v6). bool address = 21; + + // Uuid specifies that the field must be a valid UUID as defined by + // RFC 4122 + bool uuid = 22; + + // WellKnownRegex specifies a common well known pattern defined as a regex. + KnownRegex well_known_regex = 24; } + + // This applies to regexes HTTP_HEADER_NAME and HTTP_HEADER_VALUE to enable + // strict header validation. + // By default, this is true, and HTTP header validations are RFC-compliant. + // Setting to false will enable a looser validations that only disallows + // \r\n\0 characters, which can be used to bypass header matching rules. + optional bool strict = 25 [default = true]; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 26; +} + +// WellKnownRegex contain some well-known patterns. +enum KnownRegex { + UNKNOWN = 0; + + // HTTP header name as defined by RFC 7230. + HTTP_HEADER_NAME = 1; + + // HTTP header value as defined by RFC 7230. + HTTP_HEADER_VALUE = 2; } // BytesRules describe the constraints applied to `bytes` values @@ -604,6 +686,10 @@ message BytesRules { // format bool ipv6 = 12; } + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 14; } // EnumRules describe the constraints applied to enum values @@ -654,6 +740,10 @@ message RepeatedRules { // Repeated message fields will still execute validation against each item // unless skip is specified here. optional FieldRules items = 4; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 5; } // MapRules describe the constraints applied to `map` values @@ -677,6 +767,10 @@ message MapRules { // in the field. Message values will still have their validations evaluated // unless skip is specified here. optional FieldRules values = 5; + + // IgnoreEmpty specifies that the validation rules of this field should be + // evaluated only if the field is not empty + optional bool ignore_empty = 6; } // AnyRules describe constraints applied exclusively to the diff --git a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go b/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go deleted file mode 100644 index 63dc05785..000000000 --- a/vendor/github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.pb.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: github.com/golang/protobuf/protoc-gen-go/descriptor/descriptor.proto - -package descriptor - -import ( - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - descriptorpb "google.golang.org/protobuf/types/descriptorpb" - reflect "reflect" -) - -// Symbols defined in public import of google/protobuf/descriptor.proto. - -type FieldDescriptorProto_Type = descriptorpb.FieldDescriptorProto_Type - -const FieldDescriptorProto_TYPE_DOUBLE = descriptorpb.FieldDescriptorProto_TYPE_DOUBLE -const FieldDescriptorProto_TYPE_FLOAT = descriptorpb.FieldDescriptorProto_TYPE_FLOAT -const FieldDescriptorProto_TYPE_INT64 = descriptorpb.FieldDescriptorProto_TYPE_INT64 -const FieldDescriptorProto_TYPE_UINT64 = descriptorpb.FieldDescriptorProto_TYPE_UINT64 -const FieldDescriptorProto_TYPE_INT32 = descriptorpb.FieldDescriptorProto_TYPE_INT32 -const FieldDescriptorProto_TYPE_FIXED64 = descriptorpb.FieldDescriptorProto_TYPE_FIXED64 -const FieldDescriptorProto_TYPE_FIXED32 = descriptorpb.FieldDescriptorProto_TYPE_FIXED32 -const FieldDescriptorProto_TYPE_BOOL = descriptorpb.FieldDescriptorProto_TYPE_BOOL -const FieldDescriptorProto_TYPE_STRING = descriptorpb.FieldDescriptorProto_TYPE_STRING -const FieldDescriptorProto_TYPE_GROUP = descriptorpb.FieldDescriptorProto_TYPE_GROUP -const FieldDescriptorProto_TYPE_MESSAGE = descriptorpb.FieldDescriptorProto_TYPE_MESSAGE -const FieldDescriptorProto_TYPE_BYTES = descriptorpb.FieldDescriptorProto_TYPE_BYTES -const FieldDescriptorProto_TYPE_UINT32 = descriptorpb.FieldDescriptorProto_TYPE_UINT32 -const FieldDescriptorProto_TYPE_ENUM = descriptorpb.FieldDescriptorProto_TYPE_ENUM -const FieldDescriptorProto_TYPE_SFIXED32 = descriptorpb.FieldDescriptorProto_TYPE_SFIXED32 -const FieldDescriptorProto_TYPE_SFIXED64 = descriptorpb.FieldDescriptorProto_TYPE_SFIXED64 -const FieldDescriptorProto_TYPE_SINT32 = descriptorpb.FieldDescriptorProto_TYPE_SINT32 -const FieldDescriptorProto_TYPE_SINT64 = descriptorpb.FieldDescriptorProto_TYPE_SINT64 - -var FieldDescriptorProto_Type_name = descriptorpb.FieldDescriptorProto_Type_name -var FieldDescriptorProto_Type_value = descriptorpb.FieldDescriptorProto_Type_value - -type FieldDescriptorProto_Label = descriptorpb.FieldDescriptorProto_Label - -const FieldDescriptorProto_LABEL_OPTIONAL = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL -const FieldDescriptorProto_LABEL_REQUIRED = descriptorpb.FieldDescriptorProto_LABEL_REQUIRED -const FieldDescriptorProto_LABEL_REPEATED = descriptorpb.FieldDescriptorProto_LABEL_REPEATED - -var FieldDescriptorProto_Label_name = descriptorpb.FieldDescriptorProto_Label_name -var FieldDescriptorProto_Label_value = descriptorpb.FieldDescriptorProto_Label_value - -type FileOptions_OptimizeMode = descriptorpb.FileOptions_OptimizeMode - -const FileOptions_SPEED = descriptorpb.FileOptions_SPEED -const FileOptions_CODE_SIZE = descriptorpb.FileOptions_CODE_SIZE -const FileOptions_LITE_RUNTIME = descriptorpb.FileOptions_LITE_RUNTIME - -var FileOptions_OptimizeMode_name = descriptorpb.FileOptions_OptimizeMode_name -var FileOptions_OptimizeMode_value = descriptorpb.FileOptions_OptimizeMode_value - -type FieldOptions_CType = descriptorpb.FieldOptions_CType - -const FieldOptions_STRING = descriptorpb.FieldOptions_STRING -const FieldOptions_CORD = descriptorpb.FieldOptions_CORD -const FieldOptions_STRING_PIECE = descriptorpb.FieldOptions_STRING_PIECE - -var FieldOptions_CType_name = descriptorpb.FieldOptions_CType_name -var FieldOptions_CType_value = descriptorpb.FieldOptions_CType_value - -type FieldOptions_JSType = descriptorpb.FieldOptions_JSType - -const FieldOptions_JS_NORMAL = descriptorpb.FieldOptions_JS_NORMAL -const FieldOptions_JS_STRING = descriptorpb.FieldOptions_JS_STRING -const FieldOptions_JS_NUMBER = descriptorpb.FieldOptions_JS_NUMBER - -var FieldOptions_JSType_name = descriptorpb.FieldOptions_JSType_name -var FieldOptions_JSType_value = descriptorpb.FieldOptions_JSType_value - -type MethodOptions_IdempotencyLevel = descriptorpb.MethodOptions_IdempotencyLevel - -const MethodOptions_IDEMPOTENCY_UNKNOWN = descriptorpb.MethodOptions_IDEMPOTENCY_UNKNOWN -const MethodOptions_NO_SIDE_EFFECTS = descriptorpb.MethodOptions_NO_SIDE_EFFECTS -const MethodOptions_IDEMPOTENT = descriptorpb.MethodOptions_IDEMPOTENT - -var MethodOptions_IdempotencyLevel_name = descriptorpb.MethodOptions_IdempotencyLevel_name -var MethodOptions_IdempotencyLevel_value = descriptorpb.MethodOptions_IdempotencyLevel_value - -type FileDescriptorSet = descriptorpb.FileDescriptorSet -type FileDescriptorProto = descriptorpb.FileDescriptorProto -type DescriptorProto = descriptorpb.DescriptorProto -type ExtensionRangeOptions = descriptorpb.ExtensionRangeOptions -type FieldDescriptorProto = descriptorpb.FieldDescriptorProto -type OneofDescriptorProto = descriptorpb.OneofDescriptorProto -type EnumDescriptorProto = descriptorpb.EnumDescriptorProto -type EnumValueDescriptorProto = descriptorpb.EnumValueDescriptorProto -type ServiceDescriptorProto = descriptorpb.ServiceDescriptorProto -type MethodDescriptorProto = descriptorpb.MethodDescriptorProto - -const Default_MethodDescriptorProto_ClientStreaming = descriptorpb.Default_MethodDescriptorProto_ClientStreaming -const Default_MethodDescriptorProto_ServerStreaming = descriptorpb.Default_MethodDescriptorProto_ServerStreaming - -type FileOptions = descriptorpb.FileOptions - -const Default_FileOptions_JavaMultipleFiles = descriptorpb.Default_FileOptions_JavaMultipleFiles -const Default_FileOptions_JavaStringCheckUtf8 = descriptorpb.Default_FileOptions_JavaStringCheckUtf8 -const Default_FileOptions_OptimizeFor = descriptorpb.Default_FileOptions_OptimizeFor -const Default_FileOptions_CcGenericServices = descriptorpb.Default_FileOptions_CcGenericServices -const Default_FileOptions_JavaGenericServices = descriptorpb.Default_FileOptions_JavaGenericServices -const Default_FileOptions_PyGenericServices = descriptorpb.Default_FileOptions_PyGenericServices -const Default_FileOptions_PhpGenericServices = descriptorpb.Default_FileOptions_PhpGenericServices -const Default_FileOptions_Deprecated = descriptorpb.Default_FileOptions_Deprecated -const Default_FileOptions_CcEnableArenas = descriptorpb.Default_FileOptions_CcEnableArenas - -type MessageOptions = descriptorpb.MessageOptions - -const Default_MessageOptions_MessageSetWireFormat = descriptorpb.Default_MessageOptions_MessageSetWireFormat -const Default_MessageOptions_NoStandardDescriptorAccessor = descriptorpb.Default_MessageOptions_NoStandardDescriptorAccessor -const Default_MessageOptions_Deprecated = descriptorpb.Default_MessageOptions_Deprecated - -type FieldOptions = descriptorpb.FieldOptions - -const Default_FieldOptions_Ctype = descriptorpb.Default_FieldOptions_Ctype -const Default_FieldOptions_Jstype = descriptorpb.Default_FieldOptions_Jstype -const Default_FieldOptions_Lazy = descriptorpb.Default_FieldOptions_Lazy -const Default_FieldOptions_Deprecated = descriptorpb.Default_FieldOptions_Deprecated -const Default_FieldOptions_Weak = descriptorpb.Default_FieldOptions_Weak - -type OneofOptions = descriptorpb.OneofOptions -type EnumOptions = descriptorpb.EnumOptions - -const Default_EnumOptions_Deprecated = descriptorpb.Default_EnumOptions_Deprecated - -type EnumValueOptions = descriptorpb.EnumValueOptions - -const Default_EnumValueOptions_Deprecated = descriptorpb.Default_EnumValueOptions_Deprecated - -type ServiceOptions = descriptorpb.ServiceOptions - -const Default_ServiceOptions_Deprecated = descriptorpb.Default_ServiceOptions_Deprecated - -type MethodOptions = descriptorpb.MethodOptions - -const Default_MethodOptions_Deprecated = descriptorpb.Default_MethodOptions_Deprecated -const Default_MethodOptions_IdempotencyLevel = descriptorpb.Default_MethodOptions_IdempotencyLevel - -type UninterpretedOption = descriptorpb.UninterpretedOption -type SourceCodeInfo = descriptorpb.SourceCodeInfo -type GeneratedCodeInfo = descriptorpb.GeneratedCodeInfo -type DescriptorProto_ExtensionRange = descriptorpb.DescriptorProto_ExtensionRange -type DescriptorProto_ReservedRange = descriptorpb.DescriptorProto_ReservedRange -type EnumDescriptorProto_EnumReservedRange = descriptorpb.EnumDescriptorProto_EnumReservedRange -type UninterpretedOption_NamePart = descriptorpb.UninterpretedOption_NamePart -type SourceCodeInfo_Location = descriptorpb.SourceCodeInfo_Location -type GeneratedCodeInfo_Annotation = descriptorpb.GeneratedCodeInfo_Annotation - -var File_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto protoreflect.FileDescriptor - -var file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_rawDesc = []byte{ - 0x0a, 0x44, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, - 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, - 0x6e, 0x2d, 0x67, 0x6f, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x3b, - 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x00, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x32, -} - -var file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_goTypes = []interface{}{} -var file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_init() } -func file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_init() { - if File_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto != nil { - return - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_rawDesc, - NumEnums: 0, - NumMessages: 0, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_goTypes, - DependencyIndexes: file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_depIdxs, - }.Build() - File_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto = out.File - file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_rawDesc = nil - file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_goTypes = nil - file_github_com_golang_protobuf_protoc_gen_go_descriptor_descriptor_proto_depIdxs = nil -} diff --git a/vendor/google.golang.org/grpc/balancer/balancer.go b/vendor/google.golang.org/grpc/balancer/balancer.go index 392b21fb2..09d61dd1b 100644 --- a/vendor/google.golang.org/grpc/balancer/balancer.go +++ b/vendor/google.golang.org/grpc/balancer/balancer.go @@ -279,6 +279,14 @@ type PickResult struct { // type, Done may not be called. May be nil if the balancer does not wish // to be notified when the RPC completes. Done func(DoneInfo) + + // Metadata provides a way for LB policies to inject arbitrary per-call + // metadata. Any metadata returned here will be merged with existing + // metadata added by the client application. + // + // LB policies with child policies are responsible for propagating metadata + // injected by their children to the ClientConn, as part of Pick(). + Metatada metadata.MD } // TransientFailureError returns e. It exists for backward compatibility and diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go index 045668904..d607d4e9e 100644 --- a/vendor/google.golang.org/grpc/clientconn.go +++ b/vendor/google.golang.org/grpc/clientconn.go @@ -256,7 +256,7 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn * if err != nil { return nil, err } - cc.authority, err = determineAuthority(cc.parsedTarget.Endpoint, cc.target, cc.dopts) + cc.authority, err = determineAuthority(cc.parsedTarget.Endpoint(), cc.target, cc.dopts) if err != nil { return nil, err } @@ -934,7 +934,7 @@ func (cc *ClientConn) healthCheckConfig() *healthCheckConfig { return cc.sc.healthCheckConfig } -func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, func(balancer.DoneInfo), error) { +func (cc *ClientConn) getTransport(ctx context.Context, failfast bool, method string) (transport.ClientTransport, balancer.PickResult, error) { return cc.blockingpicker.pick(ctx, failfast, balancer.PickInfo{ Ctx: ctx, FullMethodName: method, @@ -1237,9 +1237,11 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne addr.ServerName = ac.cc.getServerName(addr) hctx, hcancel := context.WithCancel(ac.ctx) - onClose := grpcsync.OnceFunc(func() { + onClose := func(r transport.GoAwayReason) { ac.mu.Lock() defer ac.mu.Unlock() + // adjust params based on GoAwayReason + ac.adjustParams(r) if ac.state == connectivity.Shutdown { // Already shut down. tearDown() already cleared the transport and // canceled hctx via ac.ctx, and we expected this connection to be @@ -1260,19 +1262,13 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne // Always go idle and wait for the LB policy to initiate a new // connection attempt. ac.updateConnectivityState(connectivity.Idle, nil) - }) - onGoAway := func(r transport.GoAwayReason) { - ac.mu.Lock() - ac.adjustParams(r) - ac.mu.Unlock() - onClose() } connectCtx, cancel := context.WithDeadline(ac.ctx, connectDeadline) defer cancel() copts.ChannelzParentID = ac.channelzID - newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onGoAway, onClose) + newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onClose) if err != nil { if logger.V(2) { logger.Infof("Creating new client transport to %q: %v", addr, err) @@ -1380,7 +1376,7 @@ func (ac *addrConn) startHealthCheck(ctx context.Context) { if status.Code(err) == codes.Unimplemented { channelz.Error(logger, ac.channelzID, "Subchannel health check is unimplemented at server side, thus health check is disabled") } else { - channelz.Errorf(logger, ac.channelzID, "HealthCheckFunc exits with unexpected error %v", err) + channelz.Errorf(logger, ac.channelzID, "Health checking failed: %v", err) } } }() @@ -1591,30 +1587,17 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) { } // parseTarget uses RFC 3986 semantics to parse the given target into a -// resolver.Target struct containing scheme, authority and endpoint. Query +// resolver.Target struct containing scheme, authority and url. Query // params are stripped from the endpoint. func parseTarget(target string) (resolver.Target, error) { u, err := url.Parse(target) if err != nil { return resolver.Target{}, err } - // For targets of the form "[scheme]://[authority]/endpoint, the endpoint - // value returned from url.Parse() contains a leading "/". Although this is - // in accordance with RFC 3986, we do not want to break existing resolver - // implementations which expect the endpoint without the leading "/". So, we - // end up stripping the leading "/" here. But this will result in an - // incorrect parsing for something like "unix:///path/to/socket". Since we - // own the "unix" resolver, we can workaround in the unix resolver by using - // the `URL` field instead of the `Endpoint` field. - endpoint := u.Path - if endpoint == "" { - endpoint = u.Opaque - } - endpoint = strings.TrimPrefix(endpoint, "/") + return resolver.Target{ Scheme: u.Scheme, Authority: u.Host, - Endpoint: endpoint, URL: *u, }, nil } diff --git a/vendor/google.golang.org/grpc/credentials/tls.go b/vendor/google.golang.org/grpc/credentials/tls.go index ce2bbc10a..877b7cd21 100644 --- a/vendor/google.golang.org/grpc/credentials/tls.go +++ b/vendor/google.golang.org/grpc/credentials/tls.go @@ -23,9 +23,9 @@ import ( "crypto/tls" "crypto/x509" "fmt" - "io/ioutil" "net" "net/url" + "os" credinternal "google.golang.org/grpc/internal/credentials" ) @@ -166,7 +166,7 @@ func NewClientTLSFromCert(cp *x509.CertPool, serverNameOverride string) Transpor // it will override the virtual host name of authority (e.g. :authority header // field) in requests. func NewClientTLSFromFile(certFile, serverNameOverride string) (TransportCredentials, error) { - b, err := ioutil.ReadFile(certFile) + b, err := os.ReadFile(certFile) if err != nil { return nil, err } diff --git a/vendor/google.golang.org/grpc/dialoptions.go b/vendor/google.golang.org/grpc/dialoptions.go index 8f5b536f1..4866da101 100644 --- a/vendor/google.golang.org/grpc/dialoptions.go +++ b/vendor/google.golang.org/grpc/dialoptions.go @@ -44,6 +44,7 @@ func init() { extraDialOptions = nil } internal.WithBinaryLogger = withBinaryLogger + internal.JoinDialOptions = newJoinDialOption } // dialOptions configure a Dial call. dialOptions are set by the DialOption @@ -111,6 +112,20 @@ func newFuncDialOption(f func(*dialOptions)) *funcDialOption { } } +type joinDialOption struct { + opts []DialOption +} + +func (jdo *joinDialOption) apply(do *dialOptions) { + for _, opt := range jdo.opts { + opt.apply(do) + } +} + +func newJoinDialOption(opts ...DialOption) DialOption { + return &joinDialOption{opts: opts} +} + // WithWriteBufferSize determines how much data can be batched before doing a // write on the wire. The corresponding memory allocation for this buffer will // be twice the size to keep syscalls low. The default value for this buffer is diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go index 711763d54..07a586135 100644 --- a/vendor/google.golang.org/grpc/encoding/encoding.go +++ b/vendor/google.golang.org/grpc/encoding/encoding.go @@ -75,7 +75,9 @@ var registeredCompressor = make(map[string]Compressor) // registered with the same name, the one registered last will take effect. func RegisterCompressor(c Compressor) { registeredCompressor[c.Name()] = c - grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) + if !grpcutil.IsCompressorNameRegistered(c.Name()) { + grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name()) + } } // GetCompressor returns Compressor for the given compressor name. diff --git a/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/vendor/google.golang.org/grpc/grpclog/loggerv2.go index b5560b47e..5de66e40d 100644 --- a/vendor/google.golang.org/grpc/grpclog/loggerv2.go +++ b/vendor/google.golang.org/grpc/grpclog/loggerv2.go @@ -22,7 +22,6 @@ import ( "encoding/json" "fmt" "io" - "io/ioutil" "log" "os" "strconv" @@ -140,9 +139,9 @@ func newLoggerV2WithConfig(infoW, warningW, errorW io.Writer, c loggerV2Config) // newLoggerV2 creates a loggerV2 to be used as default logger. // All logs are written to stderr. func newLoggerV2() LoggerV2 { - errorW := ioutil.Discard - warningW := ioutil.Discard - infoW := ioutil.Discard + errorW := io.Discard + warningW := io.Discard + infoW := io.Discard logLevel := os.Getenv("GRPC_GO_LOG_SEVERITY_LEVEL") switch logLevel { diff --git a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go index 85e3ff281..d71e44177 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go @@ -26,7 +26,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes" - pb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -79,7 +79,7 @@ func NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger { // Build is an internal only method for building the proto message out of the // input event. It's made public to enable other library to reuse as much logic // in TruncatingMethodLogger as possible. -func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry { +func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *binlogpb.GrpcLogEntry { m := c.toProto() timestamp, _ := ptypes.TimestampProto(time.Now()) m.Timestamp = timestamp @@ -87,11 +87,11 @@ func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry { m.SequenceIdWithinCall = ml.idWithinCallGen.next() switch pay := m.Payload.(type) { - case *pb.GrpcLogEntry_ClientHeader: + case *binlogpb.GrpcLogEntry_ClientHeader: m.PayloadTruncated = ml.truncateMetadata(pay.ClientHeader.GetMetadata()) - case *pb.GrpcLogEntry_ServerHeader: + case *binlogpb.GrpcLogEntry_ServerHeader: m.PayloadTruncated = ml.truncateMetadata(pay.ServerHeader.GetMetadata()) - case *pb.GrpcLogEntry_Message: + case *binlogpb.GrpcLogEntry_Message: m.PayloadTruncated = ml.truncateMessage(pay.Message) } return m @@ -102,7 +102,7 @@ func (ml *TruncatingMethodLogger) Log(c LogEntryConfig) { ml.sink.Write(ml.Build(c)) } -func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) { +func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *binlogpb.Metadata) (truncated bool) { if ml.headerMaxLen == maxUInt { return false } @@ -132,7 +132,7 @@ func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated return truncated } -func (ml *TruncatingMethodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) { +func (ml *TruncatingMethodLogger) truncateMessage(msgPb *binlogpb.Message) (truncated bool) { if ml.messageMaxLen == maxUInt { return false } @@ -145,7 +145,7 @@ func (ml *TruncatingMethodLogger) truncateMessage(msgPb *pb.Message) (truncated // LogEntryConfig represents the configuration for binary log entry. type LogEntryConfig interface { - toProto() *pb.GrpcLogEntry + toProto() *binlogpb.GrpcLogEntry } // ClientHeader configs the binary log entry to be a ClientHeader entry. @@ -159,10 +159,10 @@ type ClientHeader struct { PeerAddr net.Addr } -func (c *ClientHeader) toProto() *pb.GrpcLogEntry { +func (c *ClientHeader) toProto() *binlogpb.GrpcLogEntry { // This function doesn't need to set all the fields (e.g. seq ID). The Log // function will set the fields when necessary. - clientHeader := &pb.ClientHeader{ + clientHeader := &binlogpb.ClientHeader{ Metadata: mdToMetadataProto(c.Header), MethodName: c.MethodName, Authority: c.Authority, @@ -170,16 +170,16 @@ func (c *ClientHeader) toProto() *pb.GrpcLogEntry { if c.Timeout > 0 { clientHeader.Timeout = ptypes.DurationProto(c.Timeout) } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER, - Payload: &pb.GrpcLogEntry_ClientHeader{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HEADER, + Payload: &binlogpb.GrpcLogEntry_ClientHeader{ ClientHeader: clientHeader, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -195,19 +195,19 @@ type ServerHeader struct { PeerAddr net.Addr } -func (c *ServerHeader) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER, - Payload: &pb.GrpcLogEntry_ServerHeader{ - ServerHeader: &pb.ServerHeader{ +func (c *ServerHeader) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_HEADER, + Payload: &binlogpb.GrpcLogEntry_ServerHeader{ + ServerHeader: &binlogpb.ServerHeader{ Metadata: mdToMetadataProto(c.Header), }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -223,7 +223,7 @@ type ClientMessage struct { Message interface{} } -func (c *ClientMessage) toProto() *pb.GrpcLogEntry { +func (c *ClientMessage) toProto() *binlogpb.GrpcLogEntry { var ( data []byte err error @@ -238,19 +238,19 @@ func (c *ClientMessage) toProto() *pb.GrpcLogEntry { } else { grpclogLogger.Infof("binarylogging: message to log is neither proto.message nor []byte") } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE, - Payload: &pb.GrpcLogEntry_Message{ - Message: &pb.Message{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_MESSAGE, + Payload: &binlogpb.GrpcLogEntry_Message{ + Message: &binlogpb.Message{ Length: uint32(len(data)), Data: data, }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -263,7 +263,7 @@ type ServerMessage struct { Message interface{} } -func (c *ServerMessage) toProto() *pb.GrpcLogEntry { +func (c *ServerMessage) toProto() *binlogpb.GrpcLogEntry { var ( data []byte err error @@ -278,19 +278,19 @@ func (c *ServerMessage) toProto() *pb.GrpcLogEntry { } else { grpclogLogger.Infof("binarylogging: message to log is neither proto.message nor []byte") } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE, - Payload: &pb.GrpcLogEntry_Message{ - Message: &pb.Message{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_MESSAGE, + Payload: &binlogpb.GrpcLogEntry_Message{ + Message: &binlogpb.Message{ Length: uint32(len(data)), Data: data, }, }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -300,15 +300,15 @@ type ClientHalfClose struct { OnClientSide bool } -func (c *ClientHalfClose) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE, +func (c *ClientHalfClose) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CLIENT_HALF_CLOSE, Payload: nil, // No payload here. } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -324,7 +324,7 @@ type ServerTrailer struct { PeerAddr net.Addr } -func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { +func (c *ServerTrailer) toProto() *binlogpb.GrpcLogEntry { st, ok := status.FromError(c.Err) if !ok { grpclogLogger.Info("binarylogging: error in trailer is not a status error") @@ -340,10 +340,10 @@ func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { grpclogLogger.Infof("binarylogging: failed to marshal status proto: %v", err) } } - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER, - Payload: &pb.GrpcLogEntry_Trailer{ - Trailer: &pb.Trailer{ + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_SERVER_TRAILER, + Payload: &binlogpb.GrpcLogEntry_Trailer{ + Trailer: &binlogpb.Trailer{ Metadata: mdToMetadataProto(c.Trailer), StatusCode: uint32(st.Code()), StatusMessage: st.Message(), @@ -352,9 +352,9 @@ func (c *ServerTrailer) toProto() *pb.GrpcLogEntry { }, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } if c.PeerAddr != nil { ret.Peer = addrToProto(c.PeerAddr) @@ -367,15 +367,15 @@ type Cancel struct { OnClientSide bool } -func (c *Cancel) toProto() *pb.GrpcLogEntry { - ret := &pb.GrpcLogEntry{ - Type: pb.GrpcLogEntry_EVENT_TYPE_CANCEL, +func (c *Cancel) toProto() *binlogpb.GrpcLogEntry { + ret := &binlogpb.GrpcLogEntry{ + Type: binlogpb.GrpcLogEntry_EVENT_TYPE_CANCEL, Payload: nil, } if c.OnClientSide { - ret.Logger = pb.GrpcLogEntry_LOGGER_CLIENT + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_CLIENT } else { - ret.Logger = pb.GrpcLogEntry_LOGGER_SERVER + ret.Logger = binlogpb.GrpcLogEntry_LOGGER_SERVER } return ret } @@ -392,15 +392,15 @@ func metadataKeyOmit(key string) bool { return strings.HasPrefix(key, "grpc-") } -func mdToMetadataProto(md metadata.MD) *pb.Metadata { - ret := &pb.Metadata{} +func mdToMetadataProto(md metadata.MD) *binlogpb.Metadata { + ret := &binlogpb.Metadata{} for k, vv := range md { if metadataKeyOmit(k) { continue } for _, v := range vv { ret.Entry = append(ret.Entry, - &pb.MetadataEntry{ + &binlogpb.MetadataEntry{ Key: k, Value: []byte(v), }, @@ -410,26 +410,26 @@ func mdToMetadataProto(md metadata.MD) *pb.Metadata { return ret } -func addrToProto(addr net.Addr) *pb.Address { - ret := &pb.Address{} +func addrToProto(addr net.Addr) *binlogpb.Address { + ret := &binlogpb.Address{} switch a := addr.(type) { case *net.TCPAddr: if a.IP.To4() != nil { - ret.Type = pb.Address_TYPE_IPV4 + ret.Type = binlogpb.Address_TYPE_IPV4 } else if a.IP.To16() != nil { - ret.Type = pb.Address_TYPE_IPV6 + ret.Type = binlogpb.Address_TYPE_IPV6 } else { - ret.Type = pb.Address_TYPE_UNKNOWN + ret.Type = binlogpb.Address_TYPE_UNKNOWN // Do not set address and port fields. break } ret.Address = a.IP.String() ret.IpPort = uint32(a.Port) case *net.UnixAddr: - ret.Type = pb.Address_TYPE_UNIX + ret.Type = binlogpb.Address_TYPE_UNIX ret.Address = a.String() default: - ret.Type = pb.Address_TYPE_UNKNOWN + ret.Type = binlogpb.Address_TYPE_UNKNOWN } return ret } diff --git a/vendor/google.golang.org/grpc/internal/binarylog/sink.go b/vendor/google.golang.org/grpc/internal/binarylog/sink.go index c2fdd58b3..264de387c 100644 --- a/vendor/google.golang.org/grpc/internal/binarylog/sink.go +++ b/vendor/google.golang.org/grpc/internal/binarylog/sink.go @@ -26,7 +26,7 @@ import ( "time" "github.com/golang/protobuf/proto" - pb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" + binlogpb "google.golang.org/grpc/binarylog/grpc_binarylog_v1" ) var ( @@ -42,15 +42,15 @@ type Sink interface { // Write will be called to write the log entry into the sink. // // It should be thread-safe so it can be called in parallel. - Write(*pb.GrpcLogEntry) error + Write(*binlogpb.GrpcLogEntry) error // Close will be called when the Sink is replaced by a new Sink. Close() error } type noopSink struct{} -func (ns *noopSink) Write(*pb.GrpcLogEntry) error { return nil } -func (ns *noopSink) Close() error { return nil } +func (ns *noopSink) Write(*binlogpb.GrpcLogEntry) error { return nil } +func (ns *noopSink) Close() error { return nil } // newWriterSink creates a binary log sink with the given writer. // @@ -66,7 +66,7 @@ type writerSink struct { out io.Writer } -func (ws *writerSink) Write(e *pb.GrpcLogEntry) error { +func (ws *writerSink) Write(e *binlogpb.GrpcLogEntry) error { b, err := proto.Marshal(e) if err != nil { grpclogLogger.Errorf("binary logging: failed to marshal proto message: %v", err) @@ -96,7 +96,7 @@ type bufferedSink struct { done chan struct{} } -func (fs *bufferedSink) Write(e *pb.GrpcLogEntry) error { +func (fs *bufferedSink) Write(e *binlogpb.GrpcLogEntry) error { fs.mu.Lock() defer fs.mu.Unlock() if !fs.flusherStarted { diff --git a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go index 7edd196bd..5ba9d94d4 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go @@ -21,19 +21,42 @@ package envconfig import ( "os" + "strconv" "strings" ) -const ( - prefix = "GRPC_GO_" - txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS" - advertiseCompressorsStr = prefix + "ADVERTISE_COMPRESSORS" -) - var ( // TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false"). - TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false") + TXTErrIgnore = boolFromEnv("GRPC_GO_IGNORE_TXT_ERRORS", true) // AdvertiseCompressors is set if registered compressor should be advertised // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false"). - AdvertiseCompressors = !strings.EqualFold(os.Getenv(advertiseCompressorsStr), "false") + AdvertiseCompressors = boolFromEnv("GRPC_GO_ADVERTISE_COMPRESSORS", true) + // RingHashCap indicates the maximum ring size which defaults to 4096 + // entries but may be overridden by setting the environment variable + // "GRPC_RING_HASH_CAP". This does not override the default bounds + // checking which NACKs configs specifying ring sizes > 8*1024*1024 (~8M). + RingHashCap = uint64FromEnv("GRPC_RING_HASH_CAP", 4096, 1, 8*1024*1024) ) + +func boolFromEnv(envVar string, def bool) bool { + if def { + // The default is true; return true unless the variable is "false". + return !strings.EqualFold(os.Getenv(envVar), "false") + } + // The default is false; return false unless the variable is "true". + return strings.EqualFold(os.Getenv(envVar), "true") +} + +func uint64FromEnv(envVar string, def, min, max uint64) uint64 { + v, err := strconv.ParseUint(os.Getenv(envVar), 10, 64) + if err != nil { + return def + } + if v < min { + return min + } + if v > max { + return max + } + return v +} diff --git a/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/vendor/google.golang.org/grpc/internal/envconfig/xds.go index af09711a3..04136882c 100644 --- a/vendor/google.golang.org/grpc/internal/envconfig/xds.go +++ b/vendor/google.golang.org/grpc/internal/envconfig/xds.go @@ -20,7 +20,6 @@ package envconfig import ( "os" - "strings" ) const ( @@ -36,16 +35,6 @@ const ( // // When both bootstrap FileName and FileContent are set, FileName is used. XDSBootstrapFileContentEnv = "GRPC_XDS_BOOTSTRAP_CONFIG" - - ringHashSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" - clientSideSecuritySupportEnv = "GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT" - aggregateAndDNSSupportEnv = "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" - rbacSupportEnv = "GRPC_XDS_EXPERIMENTAL_RBAC" - outlierDetectionSupportEnv = "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" - federationEnv = "GRPC_EXPERIMENTAL_XDS_FEDERATION" - rlsInXDSEnv = "GRPC_EXPERIMENTAL_XDS_RLS_LB" - - c2pResolverTestOnlyTrafficDirectorURIEnv = "GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI" ) var ( @@ -64,38 +53,40 @@ var ( // XDSRingHash indicates whether ring hash support is enabled, which can be // disabled by setting the environment variable // "GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH" to "false". - XDSRingHash = !strings.EqualFold(os.Getenv(ringHashSupportEnv), "false") + XDSRingHash = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH", true) // XDSClientSideSecurity is used to control processing of security // configuration on the client-side. // // Note that there is no env var protection for the server-side because we // have a brand new API on the server-side and users explicitly need to use // the new API to get security integration on the server. - XDSClientSideSecurity = !strings.EqualFold(os.Getenv(clientSideSecuritySupportEnv), "false") + XDSClientSideSecurity = boolFromEnv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT", true) // XDSAggregateAndDNS indicates whether processing of aggregated cluster // and DNS cluster is enabled, which can be enabled by setting the // environment variable // "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER" to // "true". - XDSAggregateAndDNS = !strings.EqualFold(os.Getenv(aggregateAndDNSSupportEnv), "false") + XDSAggregateAndDNS = boolFromEnv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER", true) // XDSRBAC indicates whether xDS configured RBAC HTTP Filter is enabled, // which can be disabled by setting the environment variable // "GRPC_XDS_EXPERIMENTAL_RBAC" to "false". - XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false") + XDSRBAC = boolFromEnv("GRPC_XDS_EXPERIMENTAL_RBAC", true) // XDSOutlierDetection indicates whether outlier detection support is // enabled, which can be disabled by setting the environment variable // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "false". - XDSOutlierDetection = !strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "false") - // XDSFederation indicates whether federation support is enabled. - XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true") + XDSOutlierDetection = boolFromEnv("GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION", true) + // XDSFederation indicates whether federation support is enabled, which can + // be enabled by setting the environment variable + // "GRPC_EXPERIMENTAL_XDS_FEDERATION" to "true". + XDSFederation = boolFromEnv("GRPC_EXPERIMENTAL_XDS_FEDERATION", false) // XDSRLS indicates whether processing of Cluster Specifier plugins and // support for the RLS CLuster Specifier is enabled, which can be enabled by // setting the environment variable "GRPC_EXPERIMENTAL_XDS_RLS_LB" to // "true". - XDSRLS = strings.EqualFold(os.Getenv(rlsInXDSEnv), "true") + XDSRLS = boolFromEnv("GRPC_EXPERIMENTAL_XDS_RLS_LB", false) // C2PResolverTestOnlyTrafficDirectorURI is the TD URI for testing. - C2PResolverTestOnlyTrafficDirectorURI = os.Getenv(c2pResolverTestOnlyTrafficDirectorURIEnv) + C2PResolverTestOnlyTrafficDirectorURI = os.Getenv("GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI") ) diff --git a/vendor/google.golang.org/grpc/internal/internal.go b/vendor/google.golang.org/grpc/internal/internal.go index fd0ee3dca..0a76d9de6 100644 --- a/vendor/google.golang.org/grpc/internal/internal.go +++ b/vendor/google.golang.org/grpc/internal/internal.go @@ -77,6 +77,9 @@ var ( // ClearGlobalDialOptions clears the array of extra DialOption. This // method is useful in testing and benchmarking. ClearGlobalDialOptions func() + // JoinDialOptions combines the dial options passed as arguments into a + // single dial option. + JoinDialOptions interface{} // func(...grpc.DialOption) grpc.DialOption // JoinServerOptions combines the server options passed as arguments into a // single server option. JoinServerOptions interface{} // func(...grpc.ServerOption) grpc.ServerOption diff --git a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go index b08ac30ad..09a667f33 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go +++ b/vendor/google.golang.org/grpc/internal/resolver/dns/dns_resolver.go @@ -116,7 +116,7 @@ type dnsBuilder struct{} // Build creates and starts a DNS resolver that watches the name resolution of the target. func (b *dnsBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - host, port, err := parseTarget(target.Endpoint, defaultPort) + host, port, err := parseTarget(target.Endpoint(), defaultPort) if err != nil { return nil, err } diff --git a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go index c6e08221f..afac56572 100644 --- a/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go +++ b/vendor/google.golang.org/grpc/internal/resolver/passthrough/passthrough.go @@ -31,7 +31,7 @@ const scheme = "passthrough" type passthroughBuilder struct{} func (*passthroughBuilder) Build(target resolver.Target, cc resolver.ClientConn, opts resolver.BuildOptions) (resolver.Resolver, error) { - if target.Endpoint == "" && opts.Dialer == nil { + if target.Endpoint() == "" && opts.Dialer == nil { return nil, errors.New("passthrough: received empty target in Build()") } r := &passthroughResolver{ @@ -52,7 +52,7 @@ type passthroughResolver struct { } func (r *passthroughResolver) start() { - r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint}}}) + r.cc.UpdateState(resolver.State{Addresses: []resolver.Address{{Addr: r.target.Endpoint()}}}) } func (*passthroughResolver) ResolveNow(o resolver.ResolveNowOptions) {} diff --git a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go index aaa9c859a..9097385e1 100644 --- a/vendor/google.golang.org/grpc/internal/transport/controlbuf.go +++ b/vendor/google.golang.org/grpc/internal/transport/controlbuf.go @@ -527,6 +527,9 @@ const minBatchSize = 1000 // As an optimization, to increase the batch size for each flush, loopy yields the processor, once // if the batch size is too low to give stream goroutines a chance to fill it up. func (l *loopyWriter) run() (err error) { + // Always flush the writer before exiting in case there are pending frames + // to be sent. + defer l.framer.writer.Flush() for { it, err := l.cbuf.get(true) if err != nil { @@ -650,16 +653,18 @@ func (l *loopyWriter) headerHandler(h *headerFrame) error { itl: &itemList{}, wq: h.wq, } - str.itl.enqueue(h) - return l.originateStream(str) + return l.originateStream(str, h) } -func (l *loopyWriter) originateStream(str *outStream) error { - hdr := str.itl.dequeue().(*headerFrame) +func (l *loopyWriter) originateStream(str *outStream, hdr *headerFrame) error { + // l.draining is set when handling GoAway. In which case, we want to avoid + // creating new streams. + if l.draining { + // TODO: provide a better error with the reason we are in draining. + hdr.onOrphaned(errStreamDrain) + return nil + } if err := hdr.initStream(str.id); err != nil { - if err == errStreamDrain { // errStreamDrain need not close transport - return nil - } return err } if err := l.writeHeader(str.id, hdr.endStream, hdr.hf, hdr.onWrite); err != nil { @@ -757,7 +762,7 @@ func (l *loopyWriter) cleanupStreamHandler(c *cleanupStream) error { return err } } - if l.side == clientSide && l.draining && len(l.estdStreams) == 0 { + if l.draining && len(l.estdStreams) == 0 { return errors.New("finished processing active streams while in draining mode") } return nil @@ -812,7 +817,6 @@ func (l *loopyWriter) goAwayHandler(g *goAway) error { } func (l *loopyWriter) closeConnectionHandler() error { - l.framer.writer.Flush() // Exit loopyWriter entirely by returning an error here. This will lead to // the transport closing the connection, and, ultimately, transport // closure. diff --git a/vendor/google.golang.org/grpc/internal/transport/defaults.go b/vendor/google.golang.org/grpc/internal/transport/defaults.go index 9fa306b2e..bc8ee0747 100644 --- a/vendor/google.golang.org/grpc/internal/transport/defaults.go +++ b/vendor/google.golang.org/grpc/internal/transport/defaults.go @@ -47,3 +47,9 @@ const ( defaultClientMaxHeaderListSize = uint32(16 << 20) defaultServerMaxHeaderListSize = uint32(16 << 20) ) + +// MaxStreamID is the upper bound for the stream ID before the current +// transport gracefully closes and new transport is created for subsequent RPCs. +// This is set to 75% of 2^31-1. Streams are identified with an unsigned 31-bit +// integer. It's exported so that tests can override it. +var MaxStreamID = uint32(math.MaxInt32 * 3 / 4) diff --git a/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/vendor/google.golang.org/grpc/internal/transport/handler_server.go index ebe8bfe33..e6626bf96 100644 --- a/vendor/google.golang.org/grpc/internal/transport/handler_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/handler_server.go @@ -65,7 +65,7 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s contentSubtype, validContentType := grpcutil.ContentSubtype(contentType) if !validContentType { msg := fmt.Sprintf("invalid gRPC request content-type %q", contentType) - http.Error(w, msg, http.StatusBadRequest) + http.Error(w, msg, http.StatusUnsupportedMediaType) return nil, errors.New(msg) } if _, ok := w.(http.Flusher); !ok { @@ -87,7 +87,7 @@ func NewServerHandlerTransport(w http.ResponseWriter, r *http.Request, stats []s if v := r.Header.Get("grpc-timeout"); v != "" { to, err := decodeTimeout(v) if err != nil { - msg := fmt.Sprintf("malformed time-out: %v", err) + msg := fmt.Sprintf("malformed grpc-timeout: %v", err) http.Error(w, msg, http.StatusBadRequest) return nil, status.Error(codes.Internal, msg) } diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/vendor/google.golang.org/grpc/internal/transport/http2_client.go index 3e582a285..79ee8aea0 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_client.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_client.go @@ -140,8 +140,7 @@ type http2Client struct { channelzID *channelz.Identifier czData *channelzData - onGoAway func(GoAwayReason) - onClose func() + onClose func(GoAwayReason) bufferPool *bufferPool @@ -197,7 +196,7 @@ func isTemporary(err error) bool { // newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2 // and starts to receive messages on it. Non-nil error returns if construction // fails. -func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) { +func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (_ *http2Client, err error) { scheme := "http" ctx, cancel := context.WithCancel(ctx) defer func() { @@ -217,7 +216,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts if opts.FailOnNonTempDialError { return nil, connectionErrorf(isTemporary(err), err, "transport: error while dialing: %v", err) } - return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err) + return nil, connectionErrorf(true, err, "transport: Error while dialing: %v", err) } // Any further errors will close the underlying connection @@ -343,7 +342,6 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts streamQuota: defaultMaxStreamsClient, streamsQuotaAvailable: make(chan struct{}, 1), czData: new(channelzData), - onGoAway: onGoAway, keepaliveEnabled: keepaliveEnabled, bufferPool: newBufferPool(), onClose: onClose, @@ -744,15 +742,12 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, endStream: false, initStream: func(id uint32) error { t.mu.Lock() - if state := t.state; state != reachable { + // TODO: handle transport closure in loopy instead and remove this + // initStream is never called when transport is draining. + if t.state == closing { t.mu.Unlock() - // Do a quick cleanup. - err := error(errStreamDrain) - if state == closing { - err = ErrConnClosing - } - cleanup(err) - return err + cleanup(ErrConnClosing) + return ErrConnClosing } if channelz.IsOn() { atomic.AddInt64(&t.czData.streamsStarted, 1) @@ -770,6 +765,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, } firstTry := true var ch chan struct{} + transportDrainRequired := false checkForStreamQuota := func(it interface{}) bool { if t.streamQuota <= 0 { // Can go negative if server decreases it. if firstTry { @@ -785,6 +781,11 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, h := it.(*headerFrame) h.streamID = t.nextID t.nextID += 2 + + // Drain client transport if nextID > MaxStreamID which signals gRPC that + // the connection is closed and a new one must be created for subsequent RPCs. + transportDrainRequired = t.nextID > MaxStreamID + s.id = h.streamID s.fc = &inFlow{limit: uint32(t.initialWindowSize)} t.mu.Lock() @@ -864,6 +865,12 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream, sh.HandleRPC(s.ctx, outHeader) } } + if transportDrainRequired { + if logger.V(logLevel) { + logger.Infof("transport: t.nextID > MaxStreamID. Draining") + } + t.GracefulClose() + } return s, nil } @@ -957,7 +964,9 @@ func (t *http2Client) Close(err error) { } // Call t.onClose ASAP to prevent the client from attempting to create new // streams. - t.onClose() + if t.state != draining { + t.onClose(GoAwayInvalid) + } t.state = closing streams := t.activeStreams t.activeStreams = nil @@ -1010,6 +1019,7 @@ func (t *http2Client) GracefulClose() { if logger.V(logLevel) { logger.Infof("transport: GracefulClose called") } + t.onClose(GoAwayInvalid) t.state = draining active := len(t.activeStreams) t.mu.Unlock() @@ -1172,7 +1182,7 @@ func (t *http2Client) handleRSTStream(f *http2.RSTStreamFrame) { statusCode, ok := http2ErrConvTab[f.ErrCode] if !ok { if logger.V(logLevel) { - logger.Warningf("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error %v", f.ErrCode) + logger.Warningf("transport: http2Client.handleRSTStream found no mapped gRPC status for the received http2 error: %v", f.ErrCode) } statusCode = codes.Unknown } @@ -1290,8 +1300,10 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) { // Notify the clientconn about the GOAWAY before we set the state to // draining, to allow the client to stop attempting to create streams // before disallowing new streams on this connection. - t.onGoAway(t.goAwayReason) - t.state = draining + if t.state != draining { + t.onClose(t.goAwayReason) + t.state = draining + } } // All streams with IDs greater than the GoAwayId // and smaller than the previous GoAway ID should be killed. @@ -1780,3 +1792,9 @@ func (t *http2Client) getOutFlowWindow() int64 { return -2 } } + +func (t *http2Client) stateForTesting() transportState { + t.mu.Lock() + defer t.mu.Unlock() + return t.state +} diff --git a/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/vendor/google.golang.org/grpc/internal/transport/http2_server.go index 37e089bc8..bc3da7067 100644 --- a/vendor/google.golang.org/grpc/internal/transport/http2_server.go +++ b/vendor/google.golang.org/grpc/internal/transport/http2_server.go @@ -380,13 +380,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( fc: &inFlow{limit: uint32(t.initialWindowSize)}, } var ( - // If a gRPC Response-Headers has already been received, then it means - // that the peer is speaking gRPC and we are in gRPC mode. - isGRPC = false - mdata = make(map[string][]string) - httpMethod string - // headerError is set if an error is encountered while parsing the headers - headerError bool + // if false, content-type was missing or invalid + isGRPC = false + contentType = "" + mdata = make(map[string][]string) + httpMethod string + // these are set if an error is encountered while parsing the headers + protocolError bool + headerError *status.Status timeoutSet bool timeout time.Duration @@ -397,6 +398,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( case "content-type": contentSubtype, validContentType := grpcutil.ContentSubtype(hf.Value) if !validContentType { + contentType = hf.Value break } mdata[hf.Name] = append(mdata[hf.Name], hf.Value) @@ -412,7 +414,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( timeoutSet = true var err error if timeout, err = decodeTimeout(hf.Value); err != nil { - headerError = true + headerError = status.Newf(codes.Internal, "malformed grpc-timeout: %v", err) } // "Transports must consider requests containing the Connection header // as malformed." - A41 @@ -420,14 +422,14 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( if logger.V(logLevel) { logger.Errorf("transport: http2Server.operateHeaders parsed a :connection header which makes a request malformed as per the HTTP/2 spec") } - headerError = true + protocolError = true default: if isReservedHeader(hf.Name) && !isWhitelistedHeader(hf.Name) { break } v, err := decodeMetadataHeader(hf.Name, hf.Value) if err != nil { - headerError = true + headerError = status.Newf(codes.Internal, "malformed binary metadata %q in header %q: %v", hf.Value, hf.Name, err) logger.Warningf("Failed to decode metadata header (%q, %q): %v", hf.Name, hf.Value, err) break } @@ -446,7 +448,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( logger.Errorf("transport: %v", errMsg) } t.controlBuf.put(&earlyAbortStream{ - httpStatus: 400, + httpStatus: http.StatusBadRequest, streamID: streamID, contentSubtype: s.contentSubtype, status: status.New(codes.Internal, errMsg), @@ -455,7 +457,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( return nil } - if !isGRPC || headerError { + if protocolError { t.controlBuf.put(&cleanupStream{ streamID: streamID, rst: true, @@ -464,6 +466,26 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func( }) return nil } + if !isGRPC { + t.controlBuf.put(&earlyAbortStream{ + httpStatus: http.StatusUnsupportedMediaType, + streamID: streamID, + contentSubtype: s.contentSubtype, + status: status.Newf(codes.InvalidArgument, "invalid gRPC request content-type %q", contentType), + rst: !frame.StreamEnded(), + }) + return nil + } + if headerError != nil { + t.controlBuf.put(&earlyAbortStream{ + httpStatus: http.StatusBadRequest, + streamID: streamID, + contentSubtype: s.contentSubtype, + status: headerError, + rst: !frame.StreamEnded(), + }) + return nil + } // "If :authority is missing, Host must be renamed to :authority." - A41 if len(mdata[":authority"]) == 0 { diff --git a/vendor/google.golang.org/grpc/internal/transport/transport.go b/vendor/google.golang.org/grpc/internal/transport/transport.go index 6cff20c8e..0ac77ea4f 100644 --- a/vendor/google.golang.org/grpc/internal/transport/transport.go +++ b/vendor/google.golang.org/grpc/internal/transport/transport.go @@ -583,8 +583,8 @@ type ConnectOptions struct { // NewClientTransport establishes the transport with the required ConnectOptions // and returns it to the caller. -func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) { - return newHTTP2Client(connectCtx, ctx, addr, opts, onGoAway, onClose) +func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onClose func(GoAwayReason)) (ClientTransport, error) { + return newHTTP2Client(connectCtx, ctx, addr, opts, onClose) } // Options provides additional hints and information for message diff --git a/vendor/google.golang.org/grpc/picker_wrapper.go b/vendor/google.golang.org/grpc/picker_wrapper.go index a5d5516ee..c525dc070 100644 --- a/vendor/google.golang.org/grpc/picker_wrapper.go +++ b/vendor/google.golang.org/grpc/picker_wrapper.go @@ -58,12 +58,18 @@ func (pw *pickerWrapper) updatePicker(p balancer.Picker) { pw.mu.Unlock() } -func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) func(balancer.DoneInfo) { +// doneChannelzWrapper performs the following: +// - increments the calls started channelz counter +// - wraps the done function in the passed in result to increment the calls +// failed or calls succeeded channelz counter before invoking the actual +// done function. +func doneChannelzWrapper(acw *acBalancerWrapper, result *balancer.PickResult) { acw.mu.Lock() ac := acw.ac acw.mu.Unlock() ac.incrCallsStarted() - return func(b balancer.DoneInfo) { + done := result.Done + result.Done = func(b balancer.DoneInfo) { if b.Err != nil && b.Err != io.EOF { ac.incrCallsFailed() } else { @@ -82,7 +88,7 @@ func doneChannelzWrapper(acw *acBalancerWrapper, done func(balancer.DoneInfo)) f // - the current picker returns other errors and failfast is false. // - the subConn returned by the current picker is not READY // When one of these situations happens, pick blocks until the picker gets updated. -func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, func(balancer.DoneInfo), error) { +func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.PickInfo) (transport.ClientTransport, balancer.PickResult, error) { var ch chan struct{} var lastPickErr error @@ -90,7 +96,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. pw.mu.Lock() if pw.done { pw.mu.Unlock() - return nil, nil, ErrClientConnClosing + return nil, balancer.PickResult{}, ErrClientConnClosing } if pw.picker == nil { @@ -111,9 +117,9 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. } switch ctx.Err() { case context.DeadlineExceeded: - return nil, nil, status.Error(codes.DeadlineExceeded, errStr) + return nil, balancer.PickResult{}, status.Error(codes.DeadlineExceeded, errStr) case context.Canceled: - return nil, nil, status.Error(codes.Canceled, errStr) + return nil, balancer.PickResult{}, status.Error(codes.Canceled, errStr) } case <-ch: } @@ -125,7 +131,6 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. pw.mu.Unlock() pickResult, err := p.Pick(info) - if err != nil { if err == balancer.ErrNoSubConnAvailable { continue @@ -136,7 +141,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. if istatus.IsRestrictedControlPlaneCode(st) { err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err) } - return nil, nil, dropError{error: err} + return nil, balancer.PickResult{}, dropError{error: err} } // For all other errors, wait for ready RPCs should block and other // RPCs should fail with unavailable. @@ -144,7 +149,7 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. lastPickErr = err continue } - return nil, nil, status.Error(codes.Unavailable, err.Error()) + return nil, balancer.PickResult{}, status.Error(codes.Unavailable, err.Error()) } acw, ok := pickResult.SubConn.(*acBalancerWrapper) @@ -154,9 +159,10 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer. } if t := acw.getAddrConn().getReadyTransport(); t != nil { if channelz.IsOn() { - return t, doneChannelzWrapper(acw, pickResult.Done), nil + doneChannelzWrapper(acw, &pickResult) + return t, pickResult, nil } - return t, pickResult.Done, nil + return t, pickResult, nil } if pickResult.Done != nil { // Calling done with nil error, no bytes sent and no bytes received. diff --git a/vendor/google.golang.org/grpc/pickfirst.go b/vendor/google.golang.org/grpc/pickfirst.go index b3a55481b..fc91b4d26 100644 --- a/vendor/google.golang.org/grpc/pickfirst.go +++ b/vendor/google.golang.org/grpc/pickfirst.go @@ -51,7 +51,7 @@ type pickfirstBalancer struct { func (b *pickfirstBalancer) ResolverError(err error) { if logger.V(2) { - logger.Infof("pickfirstBalancer: ResolverError called with error %v", err) + logger.Infof("pickfirstBalancer: ResolverError called with error: %v", err) } if b.subConn == nil { b.state = connectivity.TransientFailure diff --git a/vendor/google.golang.org/grpc/resolver/resolver.go b/vendor/google.golang.org/grpc/resolver/resolver.go index 967cbc737..654e9ce69 100644 --- a/vendor/google.golang.org/grpc/resolver/resolver.go +++ b/vendor/google.golang.org/grpc/resolver/resolver.go @@ -24,6 +24,7 @@ import ( "context" "net" "net/url" + "strings" "google.golang.org/grpc/attributes" "google.golang.org/grpc/credentials" @@ -247,9 +248,6 @@ type Target struct { Scheme string // Deprecated: use URL.Host instead. Authority string - // Deprecated: use URL.Path or URL.Opaque instead. The latter is set when - // the former is empty. - Endpoint string // URL contains the parsed dial target with an optional default scheme added // to it if the original dial target contained no scheme or contained an // unregistered scheme. Any query params specified in the original dial @@ -257,6 +255,24 @@ type Target struct { URL url.URL } +// Endpoint retrieves endpoint without leading "/" from either `URL.Path` +// or `URL.Opaque`. The latter is used when the former is empty. +func (t Target) Endpoint() string { + endpoint := t.URL.Path + if endpoint == "" { + endpoint = t.URL.Opaque + } + // For targets of the form "[scheme]://[authority]/endpoint, the endpoint + // value returned from url.Parse() contains a leading "/". Although this is + // in accordance with RFC 3986, we do not want to break existing resolver + // implementations which expect the endpoint without the leading "/". So, we + // end up stripping the leading "/" here. But this will result in an + // incorrect parsing for something like "unix:///path/to/socket". Since we + // own the "unix" resolver, we can workaround in the unix resolver by using + // the `URL` field. + return strings.TrimPrefix(endpoint, "/") +} + // Builder creates a resolver that will be used to watch name resolution updates. type Builder interface { // Build creates a new resolver for the given target. diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go index 934fc1aa0..cb7020ebe 100644 --- a/vendor/google.golang.org/grpc/rpc_util.go +++ b/vendor/google.golang.org/grpc/rpc_util.go @@ -25,7 +25,6 @@ import ( "encoding/binary" "fmt" "io" - "io/ioutil" "math" "strings" "sync" @@ -77,7 +76,7 @@ func NewGZIPCompressorWithLevel(level int) (Compressor, error) { return &gzipCompressor{ pool: sync.Pool{ New: func() interface{} { - w, err := gzip.NewWriterLevel(ioutil.Discard, level) + w, err := gzip.NewWriterLevel(io.Discard, level) if err != nil { panic(err) } @@ -143,7 +142,7 @@ func (d *gzipDecompressor) Do(r io.Reader) ([]byte, error) { z.Close() d.pool.Put(z) }() - return ioutil.ReadAll(z) + return io.ReadAll(z) } func (d *gzipDecompressor) Type() string { @@ -297,7 +296,8 @@ func (o FailFastCallOption) before(c *callInfo) error { func (o FailFastCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxCallRecvMsgSize returns a CallOption which sets the maximum message size -// in bytes the client can receive. +// in bytes the client can receive. If this is not set, gRPC uses the default +// 4MB. func MaxCallRecvMsgSize(bytes int) CallOption { return MaxRecvMsgSizeCallOption{MaxRecvMsgSize: bytes} } @@ -320,7 +320,8 @@ func (o MaxRecvMsgSizeCallOption) before(c *callInfo) error { func (o MaxRecvMsgSizeCallOption) after(c *callInfo, attempt *csAttempt) {} // MaxCallSendMsgSize returns a CallOption which sets the maximum message size -// in bytes the client can send. +// in bytes the client can send. If this is not set, gRPC uses the default +// `math.MaxInt32`. func MaxCallSendMsgSize(bytes int) CallOption { return MaxSendMsgSizeCallOption{MaxSendMsgSize: bytes} } @@ -711,7 +712,7 @@ func recvAndDecompress(p *parser, s *transport.Stream, dc Decompressor, maxRecei d, size, err = decompress(compressor, d, maxReceiveMessageSize) } if err != nil { - return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message %v", err) + return nil, status.Errorf(codes.Internal, "grpc: failed to decompress the received message: %v", err) } if size > maxReceiveMessageSize { // TODO: Revisit the error code. Currently keep it consistent with java @@ -746,7 +747,7 @@ func decompress(compressor encoding.Compressor, d []byte, maxReceiveMessageSize } // Read from LimitReader with limit max+1. So if the underlying // reader is over limit, the result will be bigger than max. - d, err = ioutil.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) + d, err = io.ReadAll(io.LimitReader(dcReader, int64(maxReceiveMessageSize)+1)) return d, len(d), err } @@ -759,7 +760,7 @@ func recv(p *parser, c baseCodec, s *transport.Stream, dc Decompressor, m interf return err } if err := c.Unmarshal(d, m); err != nil { - return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message %v", err) + return status.Errorf(codes.Internal, "grpc: failed to unmarshal the received message: %v", err) } if payInfo != nil { payInfo.uncompressedBytes = d diff --git a/vendor/google.golang.org/grpc/server.go b/vendor/google.golang.org/grpc/server.go index 2808b7c83..d5a6e78be 100644 --- a/vendor/google.golang.org/grpc/server.go +++ b/vendor/google.golang.org/grpc/server.go @@ -1299,7 +1299,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport. d, err := recvAndDecompress(&parser{r: stream}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp) if err != nil { if e := t.WriteStatus(stream, status.Convert(err)); e != nil { - channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status %v", e) + channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e) } return err } diff --git a/vendor/google.golang.org/grpc/service_config.go b/vendor/google.golang.org/grpc/service_config.go index 01bbb2025..f22acace4 100644 --- a/vendor/google.golang.org/grpc/service_config.go +++ b/vendor/google.golang.org/grpc/service_config.go @@ -226,7 +226,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { var rsc jsonSC err := json.Unmarshal([]byte(js), &rsc) if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } sc := ServiceConfig{ @@ -254,7 +254,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { } d, err := parseDuration(m.Timeout) if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } @@ -263,7 +263,7 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { Timeout: d, } if mc.RetryPolicy, err = convertRetryPolicy(m.RetryPolicy); err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to %v", js, err) + logger.Warningf("grpc: unmarshaling service config %s: %v", js, err) return &serviceconfig.ParseResult{Err: err} } if m.MaxRequestMessageBytes != nil { @@ -283,13 +283,13 @@ func parseServiceConfig(js string) *serviceconfig.ParseResult { for i, n := range *m.Name { path, err := n.generatePath() if err != nil { - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } if _, ok := paths[path]; ok { err = errDuplicatedName - logger.Warningf("grpc: parseServiceConfig error unmarshaling %s due to methodConfig[%d]: %v", js, i, err) + logger.Warningf("grpc: error unmarshaling service config %s due to methodConfig[%d]: %v", js, i, err) return &serviceconfig.ParseResult{Err: err} } paths[path] = struct{}{} diff --git a/vendor/google.golang.org/grpc/stream.go b/vendor/google.golang.org/grpc/stream.go index 0f8e6c014..93231af2a 100644 --- a/vendor/google.golang.org/grpc/stream.go +++ b/vendor/google.golang.org/grpc/stream.go @@ -438,7 +438,7 @@ func (a *csAttempt) getTransport() error { cs := a.cs var err error - a.t, a.done, err = cs.cc.getTransport(a.ctx, cs.callInfo.failFast, cs.callHdr.Method) + a.t, a.pickResult, err = cs.cc.getTransport(a.ctx, cs.callInfo.failFast, cs.callHdr.Method) if err != nil { if de, ok := err.(dropError); ok { err = de.error @@ -455,6 +455,25 @@ func (a *csAttempt) getTransport() error { func (a *csAttempt) newStream() error { cs := a.cs cs.callHdr.PreviousAttempts = cs.numRetries + + // Merge metadata stored in PickResult, if any, with existing call metadata. + // It is safe to overwrite the csAttempt's context here, since all state + // maintained in it are local to the attempt. When the attempt has to be + // retried, a new instance of csAttempt will be created. + if a.pickResult.Metatada != nil { + // We currently do not have a function it the metadata package which + // merges given metadata with existing metadata in a context. Existing + // function `AppendToOutgoingContext()` takes a variadic argument of key + // value pairs. + // + // TODO: Make it possible to retrieve key value pairs from metadata.MD + // in a form passable to AppendToOutgoingContext(), or create a version + // of AppendToOutgoingContext() that accepts a metadata.MD. + md, _ := metadata.FromOutgoingContext(a.ctx) + md = metadata.Join(md, a.pickResult.Metatada) + a.ctx = metadata.NewOutgoingContext(a.ctx, md) + } + s, err := a.t.NewStream(a.ctx, cs.callHdr) if err != nil { nse, ok := err.(*transport.NewStreamError) @@ -529,12 +548,12 @@ type clientStream struct { // csAttempt implements a single transport stream attempt within a // clientStream. type csAttempt struct { - ctx context.Context - cs *clientStream - t transport.ClientTransport - s *transport.Stream - p *parser - done func(balancer.DoneInfo) + ctx context.Context + cs *clientStream + t transport.ClientTransport + s *transport.Stream + p *parser + pickResult balancer.PickResult finished bool dc Decompressor @@ -1103,12 +1122,12 @@ func (a *csAttempt) finish(err error) { tr = a.s.Trailer() } - if a.done != nil { + if a.pickResult.Done != nil { br := false if a.s != nil { br = a.s.BytesReceived() } - a.done(balancer.DoneInfo{ + a.pickResult.Done(balancer.DoneInfo{ Err: err, Trailer: tr, BytesSent: a.s != nil, @@ -1464,6 +1483,9 @@ type ServerStream interface { // It is safe to have a goroutine calling SendMsg and another goroutine // calling RecvMsg on the same stream at the same time, but it is not safe // to call SendMsg on the same stream in different goroutines. + // + // It is not safe to modify the message after calling SendMsg. Tracing + // libraries and stats handlers may use the message lazily. SendMsg(m interface{}) error // RecvMsg blocks until it receives a message into m or the stream is // done. It returns io.EOF when the client has performed a CloseSend. On diff --git a/vendor/google.golang.org/grpc/version.go b/vendor/google.golang.org/grpc/version.go index 6410a0b96..fe552c315 100644 --- a/vendor/google.golang.org/grpc/version.go +++ b/vendor/google.golang.org/grpc/version.go @@ -19,4 +19,4 @@ package grpc // Version is the current grpc version. -const Version = "1.52.3" +const Version = "1.53.0" diff --git a/vendor/google.golang.org/grpc/vet.sh b/vendor/google.golang.org/grpc/vet.sh index 1d03c0914..3728aed04 100644 --- a/vendor/google.golang.org/grpc/vet.sh +++ b/vendor/google.golang.org/grpc/vet.sh @@ -66,6 +66,17 @@ elif [[ "$#" -ne 0 ]]; then die "Unknown argument(s): $*" fi +# - Check that generated proto files are up to date. +if [[ -z "${VET_SKIP_PROTO}" ]]; then + PATH="/home/travis/bin:${PATH}" make proto && \ + git status --porcelain 2>&1 | fail_on_output || \ + (git status; git --no-pager diff; exit 1) +fi + +if [[ -n "${VET_ONLY_PROTO}" ]]; then + exit 0 +fi + # - Ensure all source files contain a copyright message. # (Done in two parts because Darwin "git grep" has broken support for compound # exclusion matches.) @@ -93,13 +104,6 @@ git grep '"github.com/envoyproxy/go-control-plane/envoy' -- '*.go' ':(exclude)*. misspell -error . -# - Check that generated proto files are up to date. -if [[ -z "${VET_SKIP_PROTO}" ]]; then - PATH="/home/travis/bin:${PATH}" make proto && \ - git status --porcelain 2>&1 | fail_on_output || \ - (git status; git --no-pager diff; exit 1) -fi - # - gofmt, goimports, golint (with exceptions for generated code), go vet, # go mod tidy. # Perform these checks on each module inside gRPC. @@ -111,7 +115,7 @@ for MOD_FILE in $(find . -name 'go.mod'); do goimports -l . 2>&1 | not grep -vE "\.pb\.go" golint ./... 2>&1 | not grep -vE "/grpc_testing_not_regenerate/.*\.pb\.go:" - go mod tidy + go mod tidy -compat=1.17 git status --porcelain 2>&1 | fail_on_output || \ (git status; git --no-pager diff; exit 1) popd diff --git a/vendor/modules.txt b/vendor/modules.txt index 368368638..91340d999 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -109,8 +109,8 @@ github.com/emirpasic/gods/queues/linkedlistqueue github.com/emirpasic/gods/stacks github.com/emirpasic/gods/stacks/linkedliststack github.com/emirpasic/gods/utils -# github.com/envoyproxy/protoc-gen-validate v0.1.0 -## explicit +# github.com/envoyproxy/protoc-gen-validate v0.9.1 +## explicit; go 1.17 github.com/envoyproxy/protoc-gen-validate/validate # github.com/fatih/color v1.14.1 ## explicit; go 1.17 @@ -133,7 +133,6 @@ github.com/golang/mock/gomock ## explicit; go 1.9 github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto -github.com/golang/protobuf/protoc-gen-go/descriptor github.com/golang/protobuf/ptypes github.com/golang/protobuf/ptypes/any github.com/golang/protobuf/ptypes/duration @@ -368,10 +367,10 @@ google.golang.org/appengine/internal/log google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch -# google.golang.org/genproto v0.0.0-20221227171554-f9683d7f8bef +# google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f ## explicit; go 1.19 google.golang.org/genproto/googleapis/rpc/status -# google.golang.org/grpc v1.52.3 +# google.golang.org/grpc v1.53.0 ## explicit; go 1.17 google.golang.org/grpc google.golang.org/grpc/attributes