From 6b2745dc599856b285ab12db49ee9f4d677d171f Mon Sep 17 00:00:00 2001 From: "update-envoy[bot]" <135279899+update-envoy[bot]@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:38:43 +0000 Subject: [PATCH] Mirrored from envoyproxy/envoy @ aba0fe82f7e6a98ccd896c63a888f01722696a1a Signed-off-by: update-envoy[bot] <135279899+update-envoy[bot]@users.noreply.github.com> --- envoy/COMMIT | 2 +- .../common/ratelimit/v3/ratelimit.pb.go | 1 - .../http/ratelimit/v3/rate_limit.pb.go | 1625 ++------------- .../ratelimit/v3/rate_limit.pb.validate.go | 1856 ----------------- .../ratelimit/v3/rate_limit_vtproto.pb.go | 1352 +----------- 5 files changed, 310 insertions(+), 4526 deletions(-) diff --git a/envoy/COMMIT b/envoy/COMMIT index 84268dbc66..7a29582868 100644 --- a/envoy/COMMIT +++ b/envoy/COMMIT @@ -1 +1 @@ -640fcc0f2637c50c51bdd831de26c588debc9277 +aba0fe82f7e6a98ccd896c63a888f01722696a1a diff --git a/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go b/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go index b10aa0f536..39c6e7b2cc 100755 --- a/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go +++ b/envoy/extensions/common/ratelimit/v3/ratelimit.pb.go @@ -189,7 +189,6 @@ type RateLimitDescriptor struct { Limit *RateLimitDescriptor_RateLimitOverride `protobuf:"bytes,2,opt,name=limit,proto3" json:"limit,omitempty"` // Optional hits_addend for the rate limit descriptor. If set the value will override the // request level hits_addend. - // [#not-implemented-hide:] HitsAddend *wrapperspb.UInt64Value `protobuf:"bytes,3,opt,name=hits_addend,json=hitsAddend,proto3" json:"hits_addend,omitempty"` } diff --git a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go index 48a37f71d2..3d7e0db874 100755 --- a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go +++ b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.go @@ -11,7 +11,6 @@ import ( v32 "github.com/envoyproxy/go-control-plane/envoy/config/core/v3" v3 "github.com/envoyproxy/go-control-plane/envoy/config/ratelimit/v3" v33 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3" - v34 "github.com/envoyproxy/go-control-plane/envoy/type/metadata/v3" v31 "github.com/envoyproxy/go-control-plane/envoy/type/v3" _ "github.com/envoyproxy/protoc-gen-validate/validate" protoreflect "google.golang.org/protobuf/reflect/protoreflect" @@ -79,54 +78,6 @@ func (RateLimit_XRateLimitHeadersRFCVersion) EnumDescriptor() ([]byte, []int) { return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{0, 0} } -type RateLimitConfig_Action_MetaData_Source int32 - -const ( - // Query :ref:`dynamic metadata ` - RateLimitConfig_Action_MetaData_DYNAMIC RateLimitConfig_Action_MetaData_Source = 0 - // Query :ref:`route entry metadata ` - RateLimitConfig_Action_MetaData_ROUTE_ENTRY RateLimitConfig_Action_MetaData_Source = 1 -) - -// Enum value maps for RateLimitConfig_Action_MetaData_Source. -var ( - RateLimitConfig_Action_MetaData_Source_name = map[int32]string{ - 0: "DYNAMIC", - 1: "ROUTE_ENTRY", - } - RateLimitConfig_Action_MetaData_Source_value = map[string]int32{ - "DYNAMIC": 0, - "ROUTE_ENTRY": 1, - } -) - -func (x RateLimitConfig_Action_MetaData_Source) Enum() *RateLimitConfig_Action_MetaData_Source { - p := new(RateLimitConfig_Action_MetaData_Source) - *p = x - return p -} - -func (x RateLimitConfig_Action_MetaData_Source) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (RateLimitConfig_Action_MetaData_Source) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1].Descriptor() -} - -func (RateLimitConfig_Action_MetaData_Source) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1] -} - -func (x RateLimitConfig_Action_MetaData_Source) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use RateLimitConfig_Action_MetaData_Source.Descriptor instead. -func (RateLimitConfig_Action_MetaData_Source) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 6, 0} -} - // [#next-major-version: unify with local ratelimit, should use common.ratelimit.v3.VhRateLimitsOptions instead.] type RateLimitPerRoute_VhRateLimitsOptions int32 @@ -164,11 +115,11 @@ func (x RateLimitPerRoute_VhRateLimitsOptions) String() string { } func (RateLimitPerRoute_VhRateLimitsOptions) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[2].Descriptor() + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1].Descriptor() } func (RateLimitPerRoute_VhRateLimitsOptions) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[2] + return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[1] } func (x RateLimitPerRoute_VhRateLimitsOptions) Number() protoreflect.EnumNumber { @@ -177,7 +128,7 @@ func (x RateLimitPerRoute_VhRateLimitsOptions) Number() protoreflect.EnumNumber // Deprecated: Use RateLimitPerRoute_VhRateLimitsOptions.Descriptor instead. func (RateLimitPerRoute_VhRateLimitsOptions) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{2, 0} + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0} } // The override option determines how the filter handles the cases where there is an override config at a more specific level than this one (from least to most specific: virtual host, route, cluster weight). @@ -222,11 +173,11 @@ func (x RateLimitPerRoute_OverrideOptions) String() string { } func (RateLimitPerRoute_OverrideOptions) Descriptor() protoreflect.EnumDescriptor { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[3].Descriptor() + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[2].Descriptor() } func (RateLimitPerRoute_OverrideOptions) Type() protoreflect.EnumType { - return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[3] + return &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes[2] } func (x RateLimitPerRoute_OverrideOptions) Number() protoreflect.EnumNumber { @@ -235,7 +186,7 @@ func (x RateLimitPerRoute_OverrideOptions) Number() protoreflect.EnumNumber { // Deprecated: Use RateLimitPerRoute_OverrideOptions.Descriptor instead. func (RateLimitPerRoute_OverrideOptions) EnumDescriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{2, 1} + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 1} } // [#next-free-field: 14] @@ -447,98 +398,6 @@ func (x *RateLimit) GetStatPrefix() string { return "" } -// Global rate limiting :ref:`architecture overview `. -// Also applies to Local rate limiting :ref:`using descriptors `. -// [#not-implemented-hide:] -type RateLimitConfig struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Refers to the stage set in the filter. The rate limit configuration only - // applies to filters with the same stage number. The default stage number is - // 0. - // - // .. note:: - // - // The filter supports a range of 0 - 10 inclusively for stage numbers. - Stage uint32 `protobuf:"varint,1,opt,name=stage,proto3" json:"stage,omitempty"` - // The key to be set in runtime to disable this rate limit configuration. - DisableKey string `protobuf:"bytes,2,opt,name=disable_key,json=disableKey,proto3" json:"disable_key,omitempty"` - // A list of actions that are to be applied for this rate limit configuration. - // Order matters as the actions are processed sequentially and the descriptor - // is composed by appending descriptor entries in that sequence. If an action - // cannot append a descriptor entry, no descriptor is generated for the - // configuration. See :ref:`composing actions - // ` for additional documentation. - Actions []*RateLimitConfig_Action `protobuf:"bytes,3,rep,name=actions,proto3" json:"actions,omitempty"` - // An optional limit override to be appended to the descriptor produced by this - // rate limit configuration. If the override value is invalid or cannot be resolved - // from metadata, no override is provided. See :ref:`rate limit override - // ` for more information. - Limit *RateLimitConfig_Override `protobuf:"bytes,4,opt,name=limit,proto3" json:"limit,omitempty"` -} - -func (x *RateLimitConfig) Reset() { - *x = RateLimitConfig{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig) ProtoMessage() {} - -func (x *RateLimitConfig) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig.ProtoReflect.Descriptor instead. -func (*RateLimitConfig) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1} -} - -func (x *RateLimitConfig) GetStage() uint32 { - if x != nil { - return x.Stage - } - return 0 -} - -func (x *RateLimitConfig) GetDisableKey() string { - if x != nil { - return x.DisableKey - } - return "" -} - -func (x *RateLimitConfig) GetActions() []*RateLimitConfig_Action { - if x != nil { - return x.Actions - } - return nil -} - -func (x *RateLimitConfig) GetLimit() *RateLimitConfig_Override { - if x != nil { - return x.Limit - } - return nil -} - type RateLimitPerRoute struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -550,11 +409,25 @@ type RateLimitPerRoute struct { // Specifies if the rate limit filter should include the lower levels (route level, virtual host level or cluster weight level) rate limits override options. // [#not-implemented-hide:] OverrideOption RateLimitPerRoute_OverrideOptions `protobuf:"varint,2,opt,name=override_option,json=overrideOption,proto3,enum=envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute_OverrideOptions" json:"override_option,omitempty"` - // Rate limit configuration. If not set, uses the + // Rate limit configuration that is used to generate a list of descriptor entries based on + // the request context. The generated entries will be used to find one or multiple matched rate + // limit rule from the “descriptors“. + // If this is set, then // :ref:`VirtualHost.rate_limits` or - // :ref:`RouteAction.rate_limits` fields instead. - // [#not-implemented-hide:] - RateLimits []*RateLimitConfig `protobuf:"bytes,3,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` + // :ref:`RouteAction.rate_limits` fields + // will be ignored. + // + // .. note:: + // + // Not all configuration fields of + // :ref:`rate limit config ` is supported at here. + // Following fields are not supported: + // + // 1. :ref:`rate limit stage `. + // 2. :ref:`dynamic metadata `. + // 3. :ref:`disable_key `. + // 4. :ref:`override limit `. + RateLimits []*v33.RateLimit `protobuf:"bytes,3,rep,name=rate_limits,json=rateLimits,proto3" json:"rate_limits,omitempty"` // Overrides the domain. If not set, uses the filter-level domain instead. Domain string `protobuf:"bytes,4,opt,name=domain,proto3" json:"domain,omitempty"` } @@ -562,7 +435,7 @@ type RateLimitPerRoute struct { func (x *RateLimitPerRoute) Reset() { *x = RateLimitPerRoute{} if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[2] + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -575,7 +448,7 @@ func (x *RateLimitPerRoute) String() string { func (*RateLimitPerRoute) ProtoMessage() {} func (x *RateLimitPerRoute) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[2] + mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -588,7 +461,7 @@ func (x *RateLimitPerRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use RateLimitPerRoute.ProtoReflect.Descriptor instead. func (*RateLimitPerRoute) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{2} + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1} } func (x *RateLimitPerRoute) GetVhRateLimits() RateLimitPerRoute_VhRateLimitsOptions { @@ -605,7 +478,7 @@ func (x *RateLimitPerRoute) GetOverrideOption() RateLimitPerRoute_OverrideOption return RateLimitPerRoute_DEFAULT } -func (x *RateLimitPerRoute) GetRateLimits() []*RateLimitConfig { +func (x *RateLimitPerRoute) GetRateLimits() []*v33.RateLimit { if x != nil { return x.RateLimits } @@ -619,1130 +492,193 @@ func (x *RateLimitPerRoute) GetDomain() string { return "" } -// [#next-free-field: 10] -type RateLimitConfig_Action struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Types that are assignable to ActionSpecifier: - // - // *RateLimitConfig_Action_SourceCluster_ - // *RateLimitConfig_Action_DestinationCluster_ - // *RateLimitConfig_Action_RequestHeaders_ - // *RateLimitConfig_Action_RemoteAddress_ - // *RateLimitConfig_Action_GenericKey_ - // *RateLimitConfig_Action_HeaderValueMatch_ - // *RateLimitConfig_Action_Metadata - // *RateLimitConfig_Action_Extension - ActionSpecifier isRateLimitConfig_Action_ActionSpecifier `protobuf_oneof:"action_specifier"` -} - -func (x *RateLimitConfig_Action) Reset() { - *x = RateLimitConfig_Action{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action) ProtoMessage() {} - -func (x *RateLimitConfig_Action) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0} -} - -func (m *RateLimitConfig_Action) GetActionSpecifier() isRateLimitConfig_Action_ActionSpecifier { - if m != nil { - return m.ActionSpecifier - } - return nil -} - -func (x *RateLimitConfig_Action) GetSourceCluster() *RateLimitConfig_Action_SourceCluster { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_SourceCluster_); ok { - return x.SourceCluster - } - return nil -} - -func (x *RateLimitConfig_Action) GetDestinationCluster() *RateLimitConfig_Action_DestinationCluster { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_DestinationCluster_); ok { - return x.DestinationCluster - } - return nil -} - -func (x *RateLimitConfig_Action) GetRequestHeaders() *RateLimitConfig_Action_RequestHeaders { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_RequestHeaders_); ok { - return x.RequestHeaders - } - return nil -} - -func (x *RateLimitConfig_Action) GetRemoteAddress() *RateLimitConfig_Action_RemoteAddress { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_RemoteAddress_); ok { - return x.RemoteAddress - } - return nil -} - -func (x *RateLimitConfig_Action) GetGenericKey() *RateLimitConfig_Action_GenericKey { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_GenericKey_); ok { - return x.GenericKey - } - return nil -} - -func (x *RateLimitConfig_Action) GetHeaderValueMatch() *RateLimitConfig_Action_HeaderValueMatch { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_HeaderValueMatch_); ok { - return x.HeaderValueMatch - } - return nil -} - -func (x *RateLimitConfig_Action) GetMetadata() *RateLimitConfig_Action_MetaData { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_Metadata); ok { - return x.Metadata - } - return nil -} - -func (x *RateLimitConfig_Action) GetExtension() *v32.TypedExtensionConfig { - if x, ok := x.GetActionSpecifier().(*RateLimitConfig_Action_Extension); ok { - return x.Extension - } - return nil -} - -type isRateLimitConfig_Action_ActionSpecifier interface { - isRateLimitConfig_Action_ActionSpecifier() -} - -type RateLimitConfig_Action_SourceCluster_ struct { - // Rate limit on source cluster. - SourceCluster *RateLimitConfig_Action_SourceCluster `protobuf:"bytes,1,opt,name=source_cluster,json=sourceCluster,proto3,oneof"` -} - -type RateLimitConfig_Action_DestinationCluster_ struct { - // Rate limit on destination cluster. - DestinationCluster *RateLimitConfig_Action_DestinationCluster `protobuf:"bytes,2,opt,name=destination_cluster,json=destinationCluster,proto3,oneof"` -} - -type RateLimitConfig_Action_RequestHeaders_ struct { - // Rate limit on request headers. - RequestHeaders *RateLimitConfig_Action_RequestHeaders `protobuf:"bytes,3,opt,name=request_headers,json=requestHeaders,proto3,oneof"` -} - -type RateLimitConfig_Action_RemoteAddress_ struct { - // Rate limit on remote address. - RemoteAddress *RateLimitConfig_Action_RemoteAddress `protobuf:"bytes,4,opt,name=remote_address,json=remoteAddress,proto3,oneof"` -} - -type RateLimitConfig_Action_GenericKey_ struct { - // Rate limit on a generic key. - GenericKey *RateLimitConfig_Action_GenericKey `protobuf:"bytes,5,opt,name=generic_key,json=genericKey,proto3,oneof"` -} - -type RateLimitConfig_Action_HeaderValueMatch_ struct { - // Rate limit on the existence of request headers. - HeaderValueMatch *RateLimitConfig_Action_HeaderValueMatch `protobuf:"bytes,6,opt,name=header_value_match,json=headerValueMatch,proto3,oneof"` -} - -type RateLimitConfig_Action_Metadata struct { - // Rate limit on metadata. - Metadata *RateLimitConfig_Action_MetaData `protobuf:"bytes,8,opt,name=metadata,proto3,oneof"` -} +var File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto protoreflect.FileDescriptor -type RateLimitConfig_Action_Extension struct { - // Rate limit descriptor extension. See the rate limit descriptor extensions documentation. - // [#extension-category: envoy.rate_limit_descriptors] - Extension *v32.TypedExtensionConfig `protobuf:"bytes,9,opt,name=extension,proto3,oneof"` +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc = []byte{ + 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, + 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, + 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, + 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, + 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, + 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, + 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x1d, + 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, + 0x64, 0x70, 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, + 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x1a, 0x17, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x08, 0x0a, 0x09, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, + 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, + 0x42, 0x1e, 0x72, 0x1c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x08, + 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x04, 0x62, 0x6f, 0x74, 0x68, 0x52, 0x00, + 0x52, 0x0b, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, + 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 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, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, + 0x64, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x4a, + 0x0a, 0x22, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, + 0x73, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x78, 0x68, 0x61, 0x75, + 0x73, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x72, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x41, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x45, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x69, 0x0a, 0x12, 0x72, 0x61, + 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, + 0x02, 0x10, 0x01, 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x78, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, + 0x74, 0x2e, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, + 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x58, + 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x4a, 0x0a, 0x22, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x58, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x52, 0x61, 0x74, 0x65, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x13, + 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x75, 0x73, 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, + 0x64, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, + 0x64, 0x64, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, + 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, + 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x0a, 0x52, 0x14, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, + 0x64, 0x12, 0x41, 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, + 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, 0x6e, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, + 0x66, 0x69, 0x78, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x22, 0x3c, 0x0a, 0x1b, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x46, 0x46, 0x10, 0x00, 0x12, 0x14, 0x0a, + 0x10, 0x44, 0x52, 0x41, 0x46, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x30, + 0x33, 0x10, 0x01, 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, + 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, + 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, + 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x8f, 0x04, 0x0a, + 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, + 0x74, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0e, 0x76, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, + 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, + 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x68, 0x52, 0x61, 0x74, + 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, + 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x76, 0x68, 0x52, 0x61, 0x74, 0x65, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, + 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, + 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, + 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, + 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, + 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x72, + 0x69, 0x64, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x41, 0x0a, 0x0b, 0x72, 0x61, 0x74, + 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, + 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x52, 0x0a, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, + 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x3c, 0x0a, 0x13, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x4f, + 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, + 0x4c, 0x55, 0x44, 0x45, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, + 0x10, 0x02, 0x22, 0x5a, 0x0a, 0x0f, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, + 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x5f, 0x50, + 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x43, 0x4c, 0x55, + 0x44, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, + 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x03, 0x42, 0xb3, + 0x01, 0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x02, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, + 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, + 0x2e, 0x76, 0x33, 0x42, 0x0e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, + 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x61, 0x74, 0x65, + 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, + 0x69, 0x74, 0x76, 0x33, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } -func (*RateLimitConfig_Action_SourceCluster_) isRateLimitConfig_Action_ActionSpecifier() {} - -func (*RateLimitConfig_Action_DestinationCluster_) isRateLimitConfig_Action_ActionSpecifier() {} - -func (*RateLimitConfig_Action_RequestHeaders_) isRateLimitConfig_Action_ActionSpecifier() {} - -func (*RateLimitConfig_Action_RemoteAddress_) isRateLimitConfig_Action_ActionSpecifier() {} - -func (*RateLimitConfig_Action_GenericKey_) isRateLimitConfig_Action_ActionSpecifier() {} - -func (*RateLimitConfig_Action_HeaderValueMatch_) isRateLimitConfig_Action_ActionSpecifier() {} - -func (*RateLimitConfig_Action_Metadata) isRateLimitConfig_Action_ActionSpecifier() {} - -func (*RateLimitConfig_Action_Extension) isRateLimitConfig_Action_ActionSpecifier() {} - -type RateLimitConfig_Override struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields +var ( + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce sync.Once + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc +) - // Types that are assignable to OverrideSpecifier: - // - // *RateLimitConfig_Override_DynamicMetadata_ - OverrideSpecifier isRateLimitConfig_Override_OverrideSpecifier `protobuf_oneof:"override_specifier"` +func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP() []byte { + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce.Do(func() { + file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData) + }) + return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData } -func (x *RateLimitConfig_Override) Reset() { - *x = RateLimitConfig_Override{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_goTypes = []interface{}{ + (RateLimit_XRateLimitHeadersRFCVersion)(0), // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion + (RateLimitPerRoute_VhRateLimitsOptions)(0), // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions + (RateLimitPerRoute_OverrideOptions)(0), // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.OverrideOptions + (*RateLimit)(nil), // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimit + (*RateLimitPerRoute)(nil), // 4: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute + (*durationpb.Duration)(nil), // 5: google.protobuf.Duration + (*v3.RateLimitServiceConfig)(nil), // 6: envoy.config.ratelimit.v3.RateLimitServiceConfig + (*v31.HttpStatus)(nil), // 7: envoy.type.v3.HttpStatus + (*v32.HeaderValueOption)(nil), // 8: envoy.config.core.v3.HeaderValueOption + (*v33.RateLimit)(nil), // 9: envoy.config.route.v3.RateLimit } - -func (x *RateLimitConfig_Override) String() string { - return protoimpl.X.MessageStringOf(x) +var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_depIdxs = []int32{ + 5, // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.timeout:type_name -> google.protobuf.Duration + 6, // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v3.RateLimitServiceConfig + 0, // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimit.enable_x_ratelimit_headers:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion + 7, // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimit.rate_limited_status:type_name -> envoy.type.v3.HttpStatus + 8, // 4: envoy.extensions.filters.http.ratelimit.v3.RateLimit.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption + 7, // 5: envoy.extensions.filters.http.ratelimit.v3.RateLimit.status_on_error:type_name -> envoy.type.v3.HttpStatus + 1, // 6: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions + 2, // 7: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.override_option:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.OverrideOptions + 9, // 8: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.rate_limits:type_name -> envoy.config.route.v3.RateLimit + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } -func (*RateLimitConfig_Override) ProtoMessage() {} - -func (x *RateLimitConfig_Override) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Override.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Override) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 1} -} - -func (m *RateLimitConfig_Override) GetOverrideSpecifier() isRateLimitConfig_Override_OverrideSpecifier { - if m != nil { - return m.OverrideSpecifier - } - return nil -} - -func (x *RateLimitConfig_Override) GetDynamicMetadata() *RateLimitConfig_Override_DynamicMetadata { - if x, ok := x.GetOverrideSpecifier().(*RateLimitConfig_Override_DynamicMetadata_); ok { - return x.DynamicMetadata - } - return nil -} - -type isRateLimitConfig_Override_OverrideSpecifier interface { - isRateLimitConfig_Override_OverrideSpecifier() -} - -type RateLimitConfig_Override_DynamicMetadata_ struct { - // Limit override from dynamic metadata. - DynamicMetadata *RateLimitConfig_Override_DynamicMetadata `protobuf:"bytes,1,opt,name=dynamic_metadata,json=dynamicMetadata,proto3,oneof"` -} - -func (*RateLimitConfig_Override_DynamicMetadata_) isRateLimitConfig_Override_OverrideSpecifier() {} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("source_cluster", "") -// -// is derived from the :option:`--service-cluster` option. -type RateLimitConfig_Action_SourceCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimitConfig_Action_SourceCluster) Reset() { - *x = RateLimitConfig_Action_SourceCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action_SourceCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action_SourceCluster) ProtoMessage() {} - -func (x *RateLimitConfig_Action_SourceCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action_SourceCluster.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action_SourceCluster) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 0} -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("destination_cluster", "") -// -// Once a request matches against a route table rule, a routed cluster is determined by one of -// the following :ref:`route table configuration ` -// settings: -// -// - :ref:`cluster ` indicates the upstream cluster -// to route to. -// - :ref:`weighted_clusters ` -// chooses a cluster randomly from a set of clusters with attributed weight. -// - :ref:`cluster_header ` indicates which -// header in the request contains the target cluster. -type RateLimitConfig_Action_DestinationCluster struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimitConfig_Action_DestinationCluster) Reset() { - *x = RateLimitConfig_Action_DestinationCluster{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action_DestinationCluster) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action_DestinationCluster) ProtoMessage() {} - -func (x *RateLimitConfig_Action_DestinationCluster) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action_DestinationCluster.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action_DestinationCluster) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 1} -} - -// The following descriptor entry is appended when a header contains a key that matches the -// “header_name“: -// -// .. code-block:: cpp -// -// ("", "") -type RateLimitConfig_Action_RequestHeaders struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The header name to be queried from the request headers. The header’s - // value is used to populate the value of the descriptor entry for the - // descriptor_key. - HeaderName string `protobuf:"bytes,1,opt,name=header_name,json=headerName,proto3" json:"header_name,omitempty"` - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // If set to true, Envoy skips the descriptor while calling rate limiting service - // when header is not present in the request. By default it skips calling the - // rate limiting service if this header is not present in the request. - SkipIfAbsent bool `protobuf:"varint,3,opt,name=skip_if_absent,json=skipIfAbsent,proto3" json:"skip_if_absent,omitempty"` -} - -func (x *RateLimitConfig_Action_RequestHeaders) Reset() { - *x = RateLimitConfig_Action_RequestHeaders{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action_RequestHeaders) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action_RequestHeaders) ProtoMessage() {} - -func (x *RateLimitConfig_Action_RequestHeaders) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action_RequestHeaders.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action_RequestHeaders) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 2} -} - -func (x *RateLimitConfig_Action_RequestHeaders) GetHeaderName() string { - if x != nil { - return x.HeaderName - } - return "" -} - -func (x *RateLimitConfig_Action_RequestHeaders) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimitConfig_Action_RequestHeaders) GetSkipIfAbsent() bool { - if x != nil { - return x.SkipIfAbsent - } - return false -} - -// The following descriptor entry is appended to the descriptor and is populated using the -// trusted address from :ref:`x-forwarded-for `: -// -// .. code-block:: cpp -// -// ("remote_address", "") -type RateLimitConfig_Action_RemoteAddress struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RateLimitConfig_Action_RemoteAddress) Reset() { - *x = RateLimitConfig_Action_RemoteAddress{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action_RemoteAddress) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action_RemoteAddress) ProtoMessage() {} - -func (x *RateLimitConfig_Action_RemoteAddress) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action_RemoteAddress.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action_RemoteAddress) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 3} -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("generic_key", "") -type RateLimitConfig_Action_GenericKey struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - // An optional key to use in the descriptor entry. If not set it defaults - // to 'generic_key' as the descriptor key. - DescriptorKey string `protobuf:"bytes,2,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` -} - -func (x *RateLimitConfig_Action_GenericKey) Reset() { - *x = RateLimitConfig_Action_GenericKey{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action_GenericKey) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action_GenericKey) ProtoMessage() {} - -func (x *RateLimitConfig_Action_GenericKey) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action_GenericKey.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action_GenericKey) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 4} -} - -func (x *RateLimitConfig_Action_GenericKey) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimitConfig_Action_GenericKey) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -// The following descriptor entry is appended to the descriptor: -// -// .. code-block:: cpp -// -// ("header_match", "") -type RateLimitConfig_Action_HeaderValueMatch struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The value to use in the descriptor entry. - DescriptorValue string `protobuf:"bytes,1,opt,name=descriptor_value,json=descriptorValue,proto3" json:"descriptor_value,omitempty"` - // If set to true, the action will append a descriptor entry when the - // request matches the headers. If set to false, the action will append a - // descriptor entry when the request does not match the headers. The - // default value is true. - ExpectMatch bool `protobuf:"varint,2,opt,name=expect_match,json=expectMatch,proto3" json:"expect_match,omitempty"` - // Specifies a set of headers that the rate limit action should match - // on. The action will check the request’s headers against all the - // specified headers in the config. A match will happen if all the - // headers in the config are present in the request with the same values - // (or based on presence if the value field is not in the config). - Headers []*v33.HeaderMatcher `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"` -} - -func (x *RateLimitConfig_Action_HeaderValueMatch) Reset() { - *x = RateLimitConfig_Action_HeaderValueMatch{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action_HeaderValueMatch) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action_HeaderValueMatch) ProtoMessage() {} - -func (x *RateLimitConfig_Action_HeaderValueMatch) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action_HeaderValueMatch.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action_HeaderValueMatch) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 5} -} - -func (x *RateLimitConfig_Action_HeaderValueMatch) GetDescriptorValue() string { - if x != nil { - return x.DescriptorValue - } - return "" -} - -func (x *RateLimitConfig_Action_HeaderValueMatch) GetExpectMatch() bool { - if x != nil { - return x.ExpectMatch - } - return false -} - -func (x *RateLimitConfig_Action_HeaderValueMatch) GetHeaders() []*v33.HeaderMatcher { - if x != nil { - return x.Headers - } - return nil -} - -// The following descriptor entry is appended when the metadata contains a key value: -// -// .. code-block:: cpp -// -// ("", "") -// -// [#next-free-field: 6] -type RateLimitConfig_Action_MetaData struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The key to use in the descriptor entry. - DescriptorKey string `protobuf:"bytes,1,opt,name=descriptor_key,json=descriptorKey,proto3" json:"descriptor_key,omitempty"` - // Metadata struct that defines the key and path to retrieve the string value. A match will - // only happen if the value in the metadata is of type string. - MetadataKey *v34.MetadataKey `protobuf:"bytes,2,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` - // An optional value to use if “metadata_key“ is empty. If not set and - // no value is present under the metadata_key then “skip_if_absent“ is followed to - // skip calling the rate limiting service or skip the descriptor. - DefaultValue string `protobuf:"bytes,3,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` - // Source of metadata - Source RateLimitConfig_Action_MetaData_Source `protobuf:"varint,4,opt,name=source,proto3,enum=envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig_Action_MetaData_Source" json:"source,omitempty"` - // If set to true, Envoy skips the descriptor while calling rate limiting service - // when “metadata_key“ is empty and “default_value“ is not set. By default it skips calling the - // rate limiting service in that case. - SkipIfAbsent bool `protobuf:"varint,5,opt,name=skip_if_absent,json=skipIfAbsent,proto3" json:"skip_if_absent,omitempty"` -} - -func (x *RateLimitConfig_Action_MetaData) Reset() { - *x = RateLimitConfig_Action_MetaData{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Action_MetaData) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Action_MetaData) ProtoMessage() {} - -func (x *RateLimitConfig_Action_MetaData) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Action_MetaData.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Action_MetaData) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 0, 6} -} - -func (x *RateLimitConfig_Action_MetaData) GetDescriptorKey() string { - if x != nil { - return x.DescriptorKey - } - return "" -} - -func (x *RateLimitConfig_Action_MetaData) GetMetadataKey() *v34.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -func (x *RateLimitConfig_Action_MetaData) GetDefaultValue() string { - if x != nil { - return x.DefaultValue - } - return "" -} - -func (x *RateLimitConfig_Action_MetaData) GetSource() RateLimitConfig_Action_MetaData_Source { - if x != nil { - return x.Source - } - return RateLimitConfig_Action_MetaData_DYNAMIC -} - -func (x *RateLimitConfig_Action_MetaData) GetSkipIfAbsent() bool { - if x != nil { - return x.SkipIfAbsent - } - return false -} - -// Fetches the override from the dynamic metadata. -type RateLimitConfig_Override_DynamicMetadata struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Metadata struct that defines the key and path to retrieve the struct value. - // The value must be a struct containing an integer "requests_per_unit" property - // and a "unit" property with a value parseable to :ref:`RateLimitUnit - // enum ` - MetadataKey *v34.MetadataKey `protobuf:"bytes,1,opt,name=metadata_key,json=metadataKey,proto3" json:"metadata_key,omitempty"` -} - -func (x *RateLimitConfig_Override_DynamicMetadata) Reset() { - *x = RateLimitConfig_Override_DynamicMetadata{} - if protoimpl.UnsafeEnabled { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RateLimitConfig_Override_DynamicMetadata) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RateLimitConfig_Override_DynamicMetadata) ProtoMessage() {} - -func (x *RateLimitConfig_Override_DynamicMetadata) ProtoReflect() protoreflect.Message { - mi := &file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_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) -} - -// Deprecated: Use RateLimitConfig_Override_DynamicMetadata.ProtoReflect.Descriptor instead. -func (*RateLimitConfig_Override_DynamicMetadata) Descriptor() ([]byte, []int) { - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP(), []int{1, 1, 0} -} - -func (x *RateLimitConfig_Override_DynamicMetadata) GetMetadataKey() *v34.MetadataKey { - if x != nil { - return x.MetadataKey - } - return nil -} - -var File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto protoreflect.FileDescriptor - -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc = []byte{ - 0x0a, 0x3b, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, - 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x2a, 0x65, - 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, 0x2f, - 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x24, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x33, - 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x23, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2f, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6c, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x72, 0x6f, 0x75, - 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, - 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2f, 0x76, 0x33, 0x2f, 0x6d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x65, 0x6e, 0x76, 0x6f, - 0x79, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2f, 0x76, 0x33, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x73, - 0x74, 0x61, 0x74, 0x75, 0x73, 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, 0x1d, 0x75, 0x64, 0x70, - 0x61, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x75, 0x64, 0x70, 0x61, - 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x76, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x2f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x08, 0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, - 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x06, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x67, 0x65, 0x12, 0x44, 0x0a, 0x0c, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, 0x42, 0x1e, 0x72, - 0x1c, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x08, 0x65, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x52, 0x04, 0x62, 0x6f, 0x74, 0x68, 0x52, 0x00, 0x52, 0x0b, 0x72, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x33, 0x0a, 0x07, 0x74, 0x69, - 0x6d, 0x65, 0x6f, 0x75, 0x74, 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, 0x07, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x12, - 0x2a, 0x0a, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x5f, - 0x64, 0x65, 0x6e, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x44, 0x65, 0x6e, 0x79, 0x12, 0x4a, 0x0a, 0x22, 0x72, - 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x5f, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x65, 0x78, 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, - 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x65, 0x64, 0x41, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x45, 0x78, - 0x68, 0x61, 0x75, 0x73, 0x74, 0x65, 0x64, 0x12, 0x69, 0x0a, 0x12, 0x72, 0x61, 0x74, 0x65, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, - 0x52, 0x10, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x98, 0x01, 0x0a, 0x1a, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x58, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x17, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x58, 0x52, 0x61, 0x74, - 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x4a, 0x0a, - 0x22, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x78, 0x5f, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1e, 0x64, 0x69, 0x73, 0x61, 0x62, - 0x6c, 0x65, 0x58, 0x45, 0x6e, 0x76, 0x6f, 0x79, 0x52, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x65, 0x64, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x49, 0x0a, 0x13, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, - 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x11, 0x72, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x68, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x18, - 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x10, 0x0a, 0x52, 0x14, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x12, 0x41, - 0x0a, 0x0f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5f, 0x6f, 0x6e, 0x5f, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, - 0x74, 0x79, 0x70, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x4f, 0x6e, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x22, 0x3c, 0x0a, 0x1b, 0x58, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, - 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x46, 0x43, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x07, 0x0a, 0x03, 0x4f, 0x46, 0x46, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x52, - 0x41, 0x46, 0x54, 0x5f, 0x56, 0x45, 0x52, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x30, 0x33, 0x10, 0x01, - 0x3a, 0x37, 0x9a, 0xc5, 0x88, 0x1e, 0x32, 0x0a, 0x30, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0xe0, 0x12, 0x0a, 0x0f, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1d, 0x0a, - 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x2a, 0x02, 0x18, 0x0a, 0x52, 0x05, 0x73, 0x74, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x0b, - 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x4b, 0x65, 0x79, 0x12, 0x66, 0x0a, - 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x42, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, 0x01, 0x52, 0x07, 0x61, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x5a, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x1a, 0xb7, 0x0e, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x79, 0x0a, 0x0e, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, - 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, - 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, - 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, - 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x88, 0x01, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, - 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x55, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x73, 0x74, 0x69, 0x6e, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x48, 0x00, 0x52, 0x12, - 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x12, 0x7c, 0x0a, 0x0f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x51, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x48, 0x00, - 0x52, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x12, 0x79, 0x0a, 0x0e, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x50, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, - 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, - 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x52, 0x65, 0x6d, - 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x00, 0x52, 0x0d, 0x72, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x70, 0x0a, 0x0b, 0x67, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x48, - 0x00, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x83, 0x01, - 0x0a, 0x12, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6d, - 0x61, 0x74, 0x63, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x53, 0x2e, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, - 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x48, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x48, - 0x00, 0x52, 0x10, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, - 0x74, 0x63, 0x68, 0x12, 0x69, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x4b, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, - 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, - 0x74, 0x61, 0x48, 0x00, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x4a, - 0x0a, 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2a, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x45, 0x78, - 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, - 0x09, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x1a, 0x0f, 0x0a, 0x0d, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x1a, 0x14, 0x0a, 0x12, 0x44, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, - 0x72, 0x1a, 0x96, 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x0a, 0x0b, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x0d, 0xfa, 0x42, 0x0a, 0x72, 0x08, - 0x10, 0x01, 0xc8, 0x01, 0x00, 0xc0, 0x01, 0x01, 0x52, 0x0a, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, - 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, - 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x69, 0x66, 0x5f, - 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, - 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x1a, 0x0f, 0x0a, 0x0d, 0x52, 0x65, - 0x6d, 0x6f, 0x74, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x1a, 0x67, 0x0a, 0x0a, 0x47, - 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x25, 0x0a, - 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, - 0x72, 0x4b, 0x65, 0x79, 0x1a, 0xb3, 0x01, 0x0a, 0x10, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x12, 0x32, 0x0a, 0x10, 0x64, 0x65, 0x73, - 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0f, 0x64, 0x65, - 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x0a, - 0x0c, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x5f, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x4d, 0x61, 0x74, 0x63, 0x68, - 0x12, 0x48, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x76, 0x33, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x4d, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x92, 0x01, 0x02, 0x08, - 0x01, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0xf5, 0x02, 0x0a, 0x08, 0x4d, - 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x0e, 0x64, 0x65, 0x73, 0x63, 0x72, - 0x69, 0x70, 0x74, 0x6f, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x07, 0xfa, 0x42, 0x04, 0x72, 0x02, 0x10, 0x01, 0x52, 0x0d, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, - 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, - 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x74, - 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x52, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x41, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x44, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x6f, 0x75, 0x72, - 0x63, 0x65, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x73, 0x6b, 0x69, 0x70, 0x5f, 0x69, 0x66, 0x5f, - 0x61, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x73, 0x6b, - 0x69, 0x70, 0x49, 0x66, 0x41, 0x62, 0x73, 0x65, 0x6e, 0x74, 0x22, 0x26, 0x0a, 0x06, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x59, 0x4e, 0x41, 0x4d, 0x49, 0x43, 0x10, - 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x5f, 0x45, 0x4e, 0x54, 0x52, 0x59, - 0x10, 0x01, 0x42, 0x17, 0x0a, 0x10, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x1a, 0x8e, 0x02, 0x0a, 0x08, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x10, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x54, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, - 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, - 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, - 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x2e, 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, - 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x48, 0x00, 0x52, 0x0f, 0x64, 0x79, 0x6e, - 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x63, 0x0a, 0x0f, - 0x44, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, - 0x50, 0x0a, 0x0c, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x74, 0x79, - 0x70, 0x65, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x76, 0x33, 0x2e, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, 0x79, 0x42, 0x08, 0xfa, 0x42, 0x05, 0x8a, - 0x01, 0x02, 0x10, 0x01, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x4b, 0x65, - 0x79, 0x42, 0x19, 0x0a, 0x12, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x5f, 0x73, 0x70, - 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x03, 0xf8, 0x42, 0x01, 0x22, 0xaa, 0x04, 0x0a, - 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, - 0x74, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x0e, 0x76, 0x68, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x51, 0x2e, 0x65, 0x6e, - 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, - 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, 0x56, 0x68, 0x52, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x08, - 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0c, 0x76, 0x68, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x80, 0x01, 0x0a, 0x0f, 0x6f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x4d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, - 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, - 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x2e, - 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, - 0x08, 0xfa, 0x42, 0x05, 0x82, 0x01, 0x02, 0x10, 0x01, 0x52, 0x0e, 0x6f, 0x76, 0x65, 0x72, 0x72, - 0x69, 0x64, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5c, 0x0a, 0x0b, 0x72, 0x61, 0x74, - 0x65, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3b, - 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x72, - 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x2e, 0x52, 0x61, 0x74, 0x65, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x72, 0x61, 0x74, - 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x22, - 0x3c, 0x0a, 0x13, 0x56, 0x68, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x0c, 0x0a, 0x08, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, - 0x44, 0x45, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x10, - 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, 0x10, 0x02, 0x22, 0x5a, 0x0a, - 0x0f, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, 0x46, 0x41, 0x55, 0x4c, 0x54, 0x10, 0x00, 0x12, 0x13, 0x0a, - 0x0f, 0x4f, 0x56, 0x45, 0x52, 0x52, 0x49, 0x44, 0x45, 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, - 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x45, 0x5f, 0x50, 0x4f, - 0x4c, 0x49, 0x43, 0x59, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x47, 0x4e, 0x4f, 0x52, 0x45, - 0x5f, 0x50, 0x4f, 0x4c, 0x49, 0x43, 0x59, 0x10, 0x03, 0x42, 0xb3, 0x01, 0xba, 0x80, 0xc8, 0xd1, - 0x06, 0x02, 0x10, 0x02, 0x0a, 0x38, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, - 0x70, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x33, 0x42, 0x0e, - 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x5d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6e, 0x76, - 0x6f, 0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x67, 0x6f, 0x2d, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x2d, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x2f, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x65, - 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, - 0x2f, 0x76, 0x33, 0x3b, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x76, 0x33, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce sync.Once - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc -) - -func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescGZIP() []byte { - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescOnce.Do(func() { - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData) - }) - return file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDescData -} - -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_enumTypes = make([]protoimpl.EnumInfo, 4) -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes = make([]protoimpl.MessageInfo, 13) -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_goTypes = []interface{}{ - (RateLimit_XRateLimitHeadersRFCVersion)(0), // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion - (RateLimitConfig_Action_MetaData_Source)(0), // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.Source - (RateLimitPerRoute_VhRateLimitsOptions)(0), // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions - (RateLimitPerRoute_OverrideOptions)(0), // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.OverrideOptions - (*RateLimit)(nil), // 4: envoy.extensions.filters.http.ratelimit.v3.RateLimit - (*RateLimitConfig)(nil), // 5: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig - (*RateLimitPerRoute)(nil), // 6: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute - (*RateLimitConfig_Action)(nil), // 7: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action - (*RateLimitConfig_Override)(nil), // 8: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override - (*RateLimitConfig_Action_SourceCluster)(nil), // 9: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.SourceCluster - (*RateLimitConfig_Action_DestinationCluster)(nil), // 10: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.DestinationCluster - (*RateLimitConfig_Action_RequestHeaders)(nil), // 11: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RequestHeaders - (*RateLimitConfig_Action_RemoteAddress)(nil), // 12: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RemoteAddress - (*RateLimitConfig_Action_GenericKey)(nil), // 13: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.GenericKey - (*RateLimitConfig_Action_HeaderValueMatch)(nil), // 14: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.HeaderValueMatch - (*RateLimitConfig_Action_MetaData)(nil), // 15: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData - (*RateLimitConfig_Override_DynamicMetadata)(nil), // 16: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.DynamicMetadata - (*durationpb.Duration)(nil), // 17: google.protobuf.Duration - (*v3.RateLimitServiceConfig)(nil), // 18: envoy.config.ratelimit.v3.RateLimitServiceConfig - (*v31.HttpStatus)(nil), // 19: envoy.type.v3.HttpStatus - (*v32.HeaderValueOption)(nil), // 20: envoy.config.core.v3.HeaderValueOption - (*v32.TypedExtensionConfig)(nil), // 21: envoy.config.core.v3.TypedExtensionConfig - (*v33.HeaderMatcher)(nil), // 22: envoy.config.route.v3.HeaderMatcher - (*v34.MetadataKey)(nil), // 23: envoy.type.metadata.v3.MetadataKey -} -var file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_depIdxs = []int32{ - 17, // 0: envoy.extensions.filters.http.ratelimit.v3.RateLimit.timeout:type_name -> google.protobuf.Duration - 18, // 1: envoy.extensions.filters.http.ratelimit.v3.RateLimit.rate_limit_service:type_name -> envoy.config.ratelimit.v3.RateLimitServiceConfig - 0, // 2: envoy.extensions.filters.http.ratelimit.v3.RateLimit.enable_x_ratelimit_headers:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimit.XRateLimitHeadersRFCVersion - 19, // 3: envoy.extensions.filters.http.ratelimit.v3.RateLimit.rate_limited_status:type_name -> envoy.type.v3.HttpStatus - 20, // 4: envoy.extensions.filters.http.ratelimit.v3.RateLimit.response_headers_to_add:type_name -> envoy.config.core.v3.HeaderValueOption - 19, // 5: envoy.extensions.filters.http.ratelimit.v3.RateLimit.status_on_error:type_name -> envoy.type.v3.HttpStatus - 7, // 6: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.actions:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action - 8, // 7: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.limit:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override - 2, // 8: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.vh_rate_limits:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.VhRateLimitsOptions - 3, // 9: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.override_option:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.OverrideOptions - 5, // 10: envoy.extensions.filters.http.ratelimit.v3.RateLimitPerRoute.rate_limits:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig - 9, // 11: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.source_cluster:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.SourceCluster - 10, // 12: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.destination_cluster:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.DestinationCluster - 11, // 13: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.request_headers:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RequestHeaders - 12, // 14: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.remote_address:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.RemoteAddress - 13, // 15: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.generic_key:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.GenericKey - 14, // 16: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.header_value_match:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.HeaderValueMatch - 15, // 17: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.metadata:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData - 21, // 18: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.extension:type_name -> envoy.config.core.v3.TypedExtensionConfig - 16, // 19: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.dynamic_metadata:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.DynamicMetadata - 22, // 20: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.HeaderValueMatch.headers:type_name -> envoy.config.route.v3.HeaderMatcher - 23, // 21: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 1, // 22: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.source:type_name -> envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Action.MetaData.Source - 23, // 23: envoy.extensions.filters.http.ratelimit.v3.RateLimitConfig.Override.DynamicMetadata.metadata_key:type_name -> envoy.type.metadata.v3.MetadataKey - 24, // [24:24] is the sub-list for method output_type - 24, // [24:24] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name -} - -func init() { file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() } -func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() { - if File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto != nil { - return +func init() { file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() } +func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() { + if File_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto != nil { + return } if !protoimpl.UnsafeEnabled { file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -1758,18 +694,6 @@ func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() { } } file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RateLimitPerRoute); i { case 0: return &v.state @@ -1781,147 +705,14 @@ func file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_init() { return nil } } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Override); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action_SourceCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action_DestinationCluster); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action_RequestHeaders); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action_RemoteAddress); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action_GenericKey); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action_HeaderValueMatch); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Action_MetaData); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RateLimitConfig_Override_DynamicMetadata); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[3].OneofWrappers = []interface{}{ - (*RateLimitConfig_Action_SourceCluster_)(nil), - (*RateLimitConfig_Action_DestinationCluster_)(nil), - (*RateLimitConfig_Action_RequestHeaders_)(nil), - (*RateLimitConfig_Action_RemoteAddress_)(nil), - (*RateLimitConfig_Action_GenericKey_)(nil), - (*RateLimitConfig_Action_HeaderValueMatch_)(nil), - (*RateLimitConfig_Action_Metadata)(nil), - (*RateLimitConfig_Action_Extension)(nil), - } - file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_msgTypes[4].OneofWrappers = []interface{}{ - (*RateLimitConfig_Override_DynamicMetadata_)(nil), } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_envoy_extensions_filters_http_ratelimit_v3_rate_limit_proto_rawDesc, - NumEnums: 4, - NumMessages: 13, + NumEnums: 3, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go index 9842acae1c..ea298e2f0a 100755 --- a/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go +++ b/envoy/extensions/filters/http/ratelimit/v3/rate_limit.pb.validate.go @@ -366,193 +366,6 @@ var _RateLimit_RequestType_InLookup = map[string]struct{}{ "": {}, } -// Validate checks the field values on RateLimitConfig with the rules defined -// in the proto definition for this message. If any rules are violated, the -// first error encountered is returned, or nil if there are no violations. -func (m *RateLimitConfig) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimitConfigMultiError, or nil if none found. -func (m *RateLimitConfig) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetStage() > 10 { - err := RateLimitConfigValidationError{ - field: "Stage", - reason: "value must be less than or equal to 10", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DisableKey - - if len(m.GetActions()) < 1 { - err := RateLimitConfigValidationError{ - field: "Actions", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetActions() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfigValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfigValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfigValidationError{ - field: fmt.Sprintf("Actions[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if all { - switch v := interface{}(m.GetLimit()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfigValidationError{ - field: "Limit", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfigValidationError{ - field: "Limit", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetLimit()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfigValidationError{ - field: "Limit", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RateLimitConfigMultiError(errors) - } - - return nil -} - -// RateLimitConfigMultiError is an error wrapping multiple validation errors -// returned by RateLimitConfig.ValidateAll() if the designated constraints -// aren't met. -type RateLimitConfigMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfigMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfigMultiError) AllErrors() []error { return m } - -// RateLimitConfigValidationError is the validation error returned by -// RateLimitConfig.Validate if the designated constraints aren't met. -type RateLimitConfigValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfigValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfigValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfigValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfigValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfigValidationError) ErrorName() string { return "RateLimitConfigValidationError" } - -// Error satisfies the builtin error interface -func (e RateLimitConfigValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfigValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfigValidationError{} - // Validate checks the field values on RateLimitPerRoute with the rules defined // in the proto definition for this message. If any rules are violated, the // first error encountered is returned, or nil if there are no violations. @@ -712,1672 +525,3 @@ var _ interface { Cause() error ErrorName() string } = RateLimitPerRouteValidationError{} - -// Validate checks the field values on RateLimitConfig_Action with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimitConfig_Action) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig_Action with the rules -// defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimitConfig_ActionMultiError, or nil if none found. -func (m *RateLimitConfig_Action) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofActionSpecifierPresent := false - switch v := m.ActionSpecifier.(type) { - case *RateLimitConfig_Action_SourceCluster_: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetSourceCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetSourceCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "SourceCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitConfig_Action_DestinationCluster_: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetDestinationCluster()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDestinationCluster()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "DestinationCluster", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitConfig_Action_RequestHeaders_: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRequestHeaders()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRequestHeaders()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "RequestHeaders", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitConfig_Action_RemoteAddress_: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetRemoteAddress()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetRemoteAddress()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "RemoteAddress", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitConfig_Action_GenericKey_: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetGenericKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetGenericKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "GenericKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitConfig_Action_HeaderValueMatch_: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetHeaderValueMatch()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetHeaderValueMatch()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "HeaderValueMatch", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitConfig_Action_Metadata: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "Metadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - case *RateLimitConfig_Action_Extension: - if v == nil { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofActionSpecifierPresent = true - - if all { - switch v := interface{}(m.GetExtension()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_ActionValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetExtension()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_ActionValidationError{ - field: "Extension", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofActionSpecifierPresent { - err := RateLimitConfig_ActionValidationError{ - field: "ActionSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimitConfig_ActionMultiError(errors) - } - - return nil -} - -// RateLimitConfig_ActionMultiError is an error wrapping multiple validation -// errors returned by RateLimitConfig_Action.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_ActionMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_ActionMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_ActionMultiError) AllErrors() []error { return m } - -// RateLimitConfig_ActionValidationError is the validation error returned by -// RateLimitConfig_Action.Validate if the designated constraints aren't met. -type RateLimitConfig_ActionValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_ActionValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_ActionValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_ActionValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_ActionValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_ActionValidationError) ErrorName() string { - return "RateLimitConfig_ActionValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_ActionValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_ActionValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_ActionValidationError{} - -// Validate checks the field values on RateLimitConfig_Override with the rules -// defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimitConfig_Override) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig_Override with the -// rules defined in the proto definition for this message. If any rules are -// violated, the result is a list of violation errors wrapped in -// RateLimitConfig_OverrideMultiError, or nil if none found. -func (m *RateLimitConfig_Override) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Override) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - oneofOverrideSpecifierPresent := false - switch v := m.OverrideSpecifier.(type) { - case *RateLimitConfig_Override_DynamicMetadata_: - if v == nil { - err := RateLimitConfig_OverrideValidationError{ - field: "OverrideSpecifier", - reason: "oneof value cannot be a typed-nil", - } - if !all { - return err - } - errors = append(errors, err) - } - oneofOverrideSpecifierPresent = true - - if all { - switch v := interface{}(m.GetDynamicMetadata()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_OverrideValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_OverrideValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetDynamicMetadata()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_OverrideValidationError{ - field: "DynamicMetadata", - reason: "embedded message failed validation", - cause: err, - } - } - } - - default: - _ = v // ensures v is used - } - if !oneofOverrideSpecifierPresent { - err := RateLimitConfig_OverrideValidationError{ - field: "OverrideSpecifier", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if len(errors) > 0 { - return RateLimitConfig_OverrideMultiError(errors) - } - - return nil -} - -// RateLimitConfig_OverrideMultiError is an error wrapping multiple validation -// errors returned by RateLimitConfig_Override.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_OverrideMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_OverrideMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_OverrideMultiError) AllErrors() []error { return m } - -// RateLimitConfig_OverrideValidationError is the validation error returned by -// RateLimitConfig_Override.Validate if the designated constraints aren't met. -type RateLimitConfig_OverrideValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_OverrideValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_OverrideValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_OverrideValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_OverrideValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_OverrideValidationError) ErrorName() string { - return "RateLimitConfig_OverrideValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_OverrideValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Override.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_OverrideValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_OverrideValidationError{} - -// Validate checks the field values on RateLimitConfig_Action_SourceCluster -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RateLimitConfig_Action_SourceCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig_Action_SourceCluster -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimitConfig_Action_SourceClusterMultiError, or nil if none found. -func (m *RateLimitConfig_Action_SourceCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action_SourceCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimitConfig_Action_SourceClusterMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Action_SourceClusterMultiError is an error wrapping multiple -// validation errors returned by -// RateLimitConfig_Action_SourceCluster.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_Action_SourceClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Action_SourceClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Action_SourceClusterMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Action_SourceClusterValidationError is the validation error -// returned by RateLimitConfig_Action_SourceCluster.Validate if the designated -// constraints aren't met. -type RateLimitConfig_Action_SourceClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Action_SourceClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Action_SourceClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Action_SourceClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Action_SourceClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Action_SourceClusterValidationError) ErrorName() string { - return "RateLimitConfig_Action_SourceClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Action_SourceClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action_SourceCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Action_SourceClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Action_SourceClusterValidationError{} - -// Validate checks the field values on -// RateLimitConfig_Action_DestinationCluster with the rules defined in the -// proto definition for this message. If any rules are violated, the first -// error encountered is returned, or nil if there are no violations. -func (m *RateLimitConfig_Action_DestinationCluster) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RateLimitConfig_Action_DestinationCluster with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// RateLimitConfig_Action_DestinationClusterMultiError, or nil if none found. -func (m *RateLimitConfig_Action_DestinationCluster) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action_DestinationCluster) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimitConfig_Action_DestinationClusterMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Action_DestinationClusterMultiError is an error wrapping -// multiple validation errors returned by -// RateLimitConfig_Action_DestinationCluster.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_Action_DestinationClusterMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Action_DestinationClusterMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Action_DestinationClusterMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Action_DestinationClusterValidationError is the validation -// error returned by RateLimitConfig_Action_DestinationCluster.Validate if the -// designated constraints aren't met. -type RateLimitConfig_Action_DestinationClusterValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Action_DestinationClusterValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Action_DestinationClusterValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Action_DestinationClusterValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Action_DestinationClusterValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Action_DestinationClusterValidationError) ErrorName() string { - return "RateLimitConfig_Action_DestinationClusterValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Action_DestinationClusterValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action_DestinationCluster.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Action_DestinationClusterValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Action_DestinationClusterValidationError{} - -// Validate checks the field values on RateLimitConfig_Action_RequestHeaders -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RateLimitConfig_Action_RequestHeaders) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig_Action_RequestHeaders -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimitConfig_Action_RequestHeadersMultiError, or nil if none found. -func (m *RateLimitConfig_Action_RequestHeaders) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action_RequestHeaders) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetHeaderName()) < 1 { - err := RateLimitConfig_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if !_RateLimitConfig_Action_RequestHeaders_HeaderName_Pattern.MatchString(m.GetHeaderName()) { - err := RateLimitConfig_Action_RequestHeadersValidationError{ - field: "HeaderName", - reason: "value does not match regex pattern \"^[^\\x00\\n\\r]*$\"", - } - if !all { - return err - } - errors = append(errors, err) - } - - if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - err := RateLimitConfig_Action_RequestHeadersValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for SkipIfAbsent - - if len(errors) > 0 { - return RateLimitConfig_Action_RequestHeadersMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Action_RequestHeadersMultiError is an error wrapping -// multiple validation errors returned by -// RateLimitConfig_Action_RequestHeaders.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_Action_RequestHeadersMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Action_RequestHeadersMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Action_RequestHeadersMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Action_RequestHeadersValidationError is the validation error -// returned by RateLimitConfig_Action_RequestHeaders.Validate if the -// designated constraints aren't met. -type RateLimitConfig_Action_RequestHeadersValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Action_RequestHeadersValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Action_RequestHeadersValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Action_RequestHeadersValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Action_RequestHeadersValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Action_RequestHeadersValidationError) ErrorName() string { - return "RateLimitConfig_Action_RequestHeadersValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Action_RequestHeadersValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action_RequestHeaders.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Action_RequestHeadersValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Action_RequestHeadersValidationError{} - -var _RateLimitConfig_Action_RequestHeaders_HeaderName_Pattern = regexp.MustCompile("^[^\x00\n\r]*$") - -// Validate checks the field values on RateLimitConfig_Action_RemoteAddress -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RateLimitConfig_Action_RemoteAddress) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig_Action_RemoteAddress -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimitConfig_Action_RemoteAddressMultiError, or nil if none found. -func (m *RateLimitConfig_Action_RemoteAddress) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action_RemoteAddress) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if len(errors) > 0 { - return RateLimitConfig_Action_RemoteAddressMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Action_RemoteAddressMultiError is an error wrapping multiple -// validation errors returned by -// RateLimitConfig_Action_RemoteAddress.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_Action_RemoteAddressMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Action_RemoteAddressMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Action_RemoteAddressMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Action_RemoteAddressValidationError is the validation error -// returned by RateLimitConfig_Action_RemoteAddress.Validate if the designated -// constraints aren't met. -type RateLimitConfig_Action_RemoteAddressValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Action_RemoteAddressValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Action_RemoteAddressValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Action_RemoteAddressValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Action_RemoteAddressValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Action_RemoteAddressValidationError) ErrorName() string { - return "RateLimitConfig_Action_RemoteAddressValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Action_RemoteAddressValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action_RemoteAddress.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Action_RemoteAddressValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Action_RemoteAddressValidationError{} - -// Validate checks the field values on RateLimitConfig_Action_GenericKey with -// the rules defined in the proto definition for this message. If any rules -// are violated, the first error encountered is returned, or nil if there are -// no violations. -func (m *RateLimitConfig_Action_GenericKey) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig_Action_GenericKey -// with the rules defined in the proto definition for this message. If any -// rules are violated, the result is a list of violation errors wrapped in -// RateLimitConfig_Action_GenericKeyMultiError, or nil if none found. -func (m *RateLimitConfig_Action_GenericKey) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action_GenericKey) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - err := RateLimitConfig_Action_GenericKeyValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for DescriptorKey - - if len(errors) > 0 { - return RateLimitConfig_Action_GenericKeyMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Action_GenericKeyMultiError is an error wrapping multiple -// validation errors returned by -// RateLimitConfig_Action_GenericKey.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_Action_GenericKeyMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Action_GenericKeyMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Action_GenericKeyMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Action_GenericKeyValidationError is the validation error -// returned by RateLimitConfig_Action_GenericKey.Validate if the designated -// constraints aren't met. -type RateLimitConfig_Action_GenericKeyValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Action_GenericKeyValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Action_GenericKeyValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Action_GenericKeyValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Action_GenericKeyValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Action_GenericKeyValidationError) ErrorName() string { - return "RateLimitConfig_Action_GenericKeyValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Action_GenericKeyValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action_GenericKey.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Action_GenericKeyValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Action_GenericKeyValidationError{} - -// Validate checks the field values on RateLimitConfig_Action_HeaderValueMatch -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RateLimitConfig_Action_HeaderValueMatch) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RateLimitConfig_Action_HeaderValueMatch with the rules defined in the proto -// definition for this message. If any rules are violated, the result is a -// list of violation errors wrapped in -// RateLimitConfig_Action_HeaderValueMatchMultiError, or nil if none found. -func (m *RateLimitConfig_Action_HeaderValueMatch) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action_HeaderValueMatch) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetDescriptorValue()) < 1 { - err := RateLimitConfig_Action_HeaderValueMatchValidationError{ - field: "DescriptorValue", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for ExpectMatch - - if len(m.GetHeaders()) < 1 { - err := RateLimitConfig_Action_HeaderValueMatchValidationError{ - field: "Headers", - reason: "value must contain at least 1 item(s)", - } - if !all { - return err - } - errors = append(errors, err) - } - - for idx, item := range m.GetHeaders() { - _, _ = idx, item - - if all { - switch v := interface{}(item).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(item).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_Action_HeaderValueMatchValidationError{ - field: fmt.Sprintf("Headers[%v]", idx), - reason: "embedded message failed validation", - cause: err, - } - } - } - - } - - if len(errors) > 0 { - return RateLimitConfig_Action_HeaderValueMatchMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Action_HeaderValueMatchMultiError is an error wrapping -// multiple validation errors returned by -// RateLimitConfig_Action_HeaderValueMatch.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_Action_HeaderValueMatchMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Action_HeaderValueMatchMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Action_HeaderValueMatchMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Action_HeaderValueMatchValidationError is the validation -// error returned by RateLimitConfig_Action_HeaderValueMatch.Validate if the -// designated constraints aren't met. -type RateLimitConfig_Action_HeaderValueMatchValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Action_HeaderValueMatchValidationError) ErrorName() string { - return "RateLimitConfig_Action_HeaderValueMatchValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Action_HeaderValueMatchValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action_HeaderValueMatch.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Action_HeaderValueMatchValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Action_HeaderValueMatchValidationError{} - -// Validate checks the field values on RateLimitConfig_Action_MetaData with the -// rules defined in the proto definition for this message. If any rules are -// violated, the first error encountered is returned, or nil if there are no violations. -func (m *RateLimitConfig_Action_MetaData) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on RateLimitConfig_Action_MetaData with -// the rules defined in the proto definition for this message. If any rules -// are violated, the result is a list of violation errors wrapped in -// RateLimitConfig_Action_MetaDataMultiError, or nil if none found. -func (m *RateLimitConfig_Action_MetaData) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Action_MetaData) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if utf8.RuneCountInString(m.GetDescriptorKey()) < 1 { - err := RateLimitConfig_Action_MetaDataValidationError{ - field: "DescriptorKey", - reason: "value length must be at least 1 runes", - } - if !all { - return err - } - errors = append(errors, err) - } - - if m.GetMetadataKey() == nil { - err := RateLimitConfig_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadataKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_Action_MetaDataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - // no validation rules for DefaultValue - - if _, ok := RateLimitConfig_Action_MetaData_Source_name[int32(m.GetSource())]; !ok { - err := RateLimitConfig_Action_MetaDataValidationError{ - field: "Source", - reason: "value must be one of the defined enum values", - } - if !all { - return err - } - errors = append(errors, err) - } - - // no validation rules for SkipIfAbsent - - if len(errors) > 0 { - return RateLimitConfig_Action_MetaDataMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Action_MetaDataMultiError is an error wrapping multiple -// validation errors returned by RateLimitConfig_Action_MetaData.ValidateAll() -// if the designated constraints aren't met. -type RateLimitConfig_Action_MetaDataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Action_MetaDataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Action_MetaDataMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Action_MetaDataValidationError is the validation error -// returned by RateLimitConfig_Action_MetaData.Validate if the designated -// constraints aren't met. -type RateLimitConfig_Action_MetaDataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Action_MetaDataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Action_MetaDataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Action_MetaDataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Action_MetaDataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Action_MetaDataValidationError) ErrorName() string { - return "RateLimitConfig_Action_MetaDataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Action_MetaDataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Action_MetaData.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Action_MetaDataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Action_MetaDataValidationError{} - -// Validate checks the field values on RateLimitConfig_Override_DynamicMetadata -// with the rules defined in the proto definition for this message. If any -// rules are violated, the first error encountered is returned, or nil if -// there are no violations. -func (m *RateLimitConfig_Override_DynamicMetadata) Validate() error { - return m.validate(false) -} - -// ValidateAll checks the field values on -// RateLimitConfig_Override_DynamicMetadata with the rules defined in the -// proto definition for this message. If any rules are violated, the result is -// a list of violation errors wrapped in -// RateLimitConfig_Override_DynamicMetadataMultiError, or nil if none found. -func (m *RateLimitConfig_Override_DynamicMetadata) ValidateAll() error { - return m.validate(true) -} - -func (m *RateLimitConfig_Override_DynamicMetadata) validate(all bool) error { - if m == nil { - return nil - } - - var errors []error - - if m.GetMetadataKey() == nil { - err := RateLimitConfig_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "value is required", - } - if !all { - return err - } - errors = append(errors, err) - } - - if all { - switch v := interface{}(m.GetMetadataKey()).(type) { - case interface{ ValidateAll() error }: - if err := v.ValidateAll(); err != nil { - errors = append(errors, RateLimitConfig_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - case interface{ Validate() error }: - if err := v.Validate(); err != nil { - errors = append(errors, RateLimitConfig_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - }) - } - } - } else if v, ok := interface{}(m.GetMetadataKey()).(interface{ Validate() error }); ok { - if err := v.Validate(); err != nil { - return RateLimitConfig_Override_DynamicMetadataValidationError{ - field: "MetadataKey", - reason: "embedded message failed validation", - cause: err, - } - } - } - - if len(errors) > 0 { - return RateLimitConfig_Override_DynamicMetadataMultiError(errors) - } - - return nil -} - -// RateLimitConfig_Override_DynamicMetadataMultiError is an error wrapping -// multiple validation errors returned by -// RateLimitConfig_Override_DynamicMetadata.ValidateAll() if the designated -// constraints aren't met. -type RateLimitConfig_Override_DynamicMetadataMultiError []error - -// Error returns a concatenation of all the error messages it wraps. -func (m RateLimitConfig_Override_DynamicMetadataMultiError) Error() string { - var msgs []string - for _, err := range m { - msgs = append(msgs, err.Error()) - } - return strings.Join(msgs, "; ") -} - -// AllErrors returns a list of validation violation errors. -func (m RateLimitConfig_Override_DynamicMetadataMultiError) AllErrors() []error { return m } - -// RateLimitConfig_Override_DynamicMetadataValidationError is the validation -// error returned by RateLimitConfig_Override_DynamicMetadata.Validate if the -// designated constraints aren't met. -type RateLimitConfig_Override_DynamicMetadataValidationError struct { - field string - reason string - cause error - key bool -} - -// Field function returns field value. -func (e RateLimitConfig_Override_DynamicMetadataValidationError) Field() string { return e.field } - -// Reason function returns reason value. -func (e RateLimitConfig_Override_DynamicMetadataValidationError) Reason() string { return e.reason } - -// Cause function returns cause value. -func (e RateLimitConfig_Override_DynamicMetadataValidationError) Cause() error { return e.cause } - -// Key function returns key value. -func (e RateLimitConfig_Override_DynamicMetadataValidationError) Key() bool { return e.key } - -// ErrorName returns error name. -func (e RateLimitConfig_Override_DynamicMetadataValidationError) ErrorName() string { - return "RateLimitConfig_Override_DynamicMetadataValidationError" -} - -// Error satisfies the builtin error interface -func (e RateLimitConfig_Override_DynamicMetadataValidationError) Error() string { - cause := "" - if e.cause != nil { - cause = fmt.Sprintf(" | caused by: %v", e.cause) - } - - key := "" - if e.key { - key = "key for " - } - - return fmt.Sprintf( - "invalid %sRateLimitConfig_Override_DynamicMetadata.%s: %s%s", - key, - e.field, - e.reason, - cause) -} - -var _ error = RateLimitConfig_Override_DynamicMetadataValidationError{} - -var _ interface { - Field() string - Reason() string - Key() bool - Cause() error - ErrorName() string -} = RateLimitConfig_Override_DynamicMetadataValidationError{} diff --git a/envoy/extensions/filters/http/ratelimit/v3/rate_limit_vtproto.pb.go b/envoy/extensions/filters/http/ratelimit/v3/rate_limit_vtproto.pb.go index ee563b9019..de96a017df 100755 --- a/envoy/extensions/filters/http/ratelimit/v3/rate_limit_vtproto.pb.go +++ b/envoy/extensions/filters/http/ratelimit/v3/rate_limit_vtproto.pb.go @@ -214,1315 +214,159 @@ func (m *RateLimit) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *RateLimitConfig_Action_SourceCluster) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action_SourceCluster) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_SourceCluster) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action_DestinationCluster) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action_DestinationCluster) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_DestinationCluster) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action_RequestHeaders) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action_RequestHeaders) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_RequestHeaders) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.SkipIfAbsent { - i-- - if m.SkipIfAbsent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x18 - } - if len(m.DescriptorKey) > 0 { - i -= len(m.DescriptorKey) - copy(dAtA[i:], m.DescriptorKey) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DescriptorKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.HeaderName) > 0 { - i -= len(m.HeaderName) - copy(dAtA[i:], m.HeaderName) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.HeaderName))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action_RemoteAddress) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action_RemoteAddress) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_RemoteAddress) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action_GenericKey) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action_GenericKey) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_GenericKey) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.DescriptorKey) > 0 { - i -= len(m.DescriptorKey) - copy(dAtA[i:], m.DescriptorKey) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DescriptorKey))) - i-- - dAtA[i] = 0x12 - } - if len(m.DescriptorValue) > 0 { - i -= len(m.DescriptorValue) - copy(dAtA[i:], m.DescriptorValue) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DescriptorValue))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action_HeaderValueMatch) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action_HeaderValueMatch) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_HeaderValueMatch) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Headers) > 0 { - for iNdEx := len(m.Headers) - 1; iNdEx >= 0; iNdEx-- { - if vtmsg, ok := interface{}(m.Headers[iNdEx]).(interface { - MarshalToSizedBufferVTStrict([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Headers[iNdEx]) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x1a - } - } - if m.ExpectMatch { - i-- - if m.ExpectMatch { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x10 - } - if len(m.DescriptorValue) > 0 { - i -= len(m.DescriptorValue) - copy(dAtA[i:], m.DescriptorValue) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DescriptorValue))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action_MetaData) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action_MetaData) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_MetaData) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.SkipIfAbsent { - i-- - if m.SkipIfAbsent { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x28 - } - if m.Source != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Source)) - i-- - dAtA[i] = 0x20 - } - if len(m.DefaultValue) > 0 { - i -= len(m.DefaultValue) - copy(dAtA[i:], m.DefaultValue) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DefaultValue))) - i-- - dAtA[i] = 0x1a - } - if m.MetadataKey != nil { - if vtmsg, ok := interface{}(m.MetadataKey).(interface { - MarshalToSizedBufferVTStrict([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.MetadataKey) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x12 - } - if len(m.DescriptorKey) > 0 { - i -= len(m.DescriptorKey) - copy(dAtA[i:], m.DescriptorKey) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DescriptorKey))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Action) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_Extension); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_Metadata); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_HeaderValueMatch_); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_GenericKey_); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_RemoteAddress_); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_RequestHeaders_); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_DestinationCluster_); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - if msg, ok := m.ActionSpecifier.(*RateLimitConfig_Action_SourceCluster_); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Action_SourceCluster_) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_SourceCluster_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.SourceCluster != nil { - size, err := m.SourceCluster.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Action_DestinationCluster_) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_DestinationCluster_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DestinationCluster != nil { - size, err := m.DestinationCluster.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x12 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x12 - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Action_RequestHeaders_) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_RequestHeaders_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RequestHeaders != nil { - size, err := m.RequestHeaders.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x1a - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Action_RemoteAddress_) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_RemoteAddress_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.RemoteAddress != nil { - size, err := m.RemoteAddress.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x22 - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Action_GenericKey_) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_GenericKey_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.GenericKey != nil { - size, err := m.GenericKey.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x2a - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x2a - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Action_HeaderValueMatch_) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_HeaderValueMatch_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.HeaderValueMatch != nil { - size, err := m.HeaderValueMatch.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x32 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x32 - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Action_Metadata) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_Metadata) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Metadata != nil { - size, err := m.Metadata.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x42 - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x42 - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Action_Extension) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Action_Extension) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.Extension != nil { - if vtmsg, ok := interface{}(m.Extension).(interface { - MarshalToSizedBufferVTStrict([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.Extension) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0x4a - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0x4a - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig_Override_DynamicMetadata) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Override_DynamicMetadata) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Override_DynamicMetadata) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.MetadataKey != nil { - if vtmsg, ok := interface{}(m.MetadataKey).(interface { - MarshalToSizedBufferVTStrict([]byte) (int, error) - }); ok { - size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - } else { - encoded, err := proto.Marshal(m.MetadataKey) - if err != nil { - return 0, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Override) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig_Override) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Override) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if msg, ok := m.OverrideSpecifier.(*RateLimitConfig_Override_DynamicMetadata_); ok { - size, err := msg.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - } - return len(dAtA) - i, nil -} - -func (m *RateLimitConfig_Override_DynamicMetadata_) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig_Override_DynamicMetadata_) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - i := len(dAtA) - if m.DynamicMetadata != nil { - size, err := m.DynamicMetadata.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0xa - } else { - i = protohelpers.EncodeVarint(dAtA, i, 0) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} -func (m *RateLimitConfig) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitConfig) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitConfig) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if m.Limit != nil { - size, err := m.Limit.MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x22 - } - if len(m.Actions) > 0 { - for iNdEx := len(m.Actions) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.Actions[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if len(m.DisableKey) > 0 { - i -= len(m.DisableKey) - copy(dAtA[i:], m.DisableKey) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.DisableKey))) - i-- - dAtA[i] = 0x12 - } - if m.Stage != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.Stage)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RateLimitPerRoute) MarshalVTStrict() (dAtA []byte, err error) { - if m == nil { - return nil, nil - } - size := m.SizeVT() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *RateLimitPerRoute) MarshalToVTStrict(dAtA []byte) (int, error) { - size := m.SizeVT() - return m.MarshalToSizedBufferVTStrict(dAtA[:size]) -} - -func (m *RateLimitPerRoute) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { - if m == nil { - return 0, nil - } - i := len(dAtA) - _ = i - var l int - _ = l - if m.unknownFields != nil { - i -= len(m.unknownFields) - copy(dAtA[i:], m.unknownFields) - } - if len(m.Domain) > 0 { - i -= len(m.Domain) - copy(dAtA[i:], m.Domain) - i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Domain))) - i-- - dAtA[i] = 0x22 - } - if len(m.RateLimits) > 0 { - for iNdEx := len(m.RateLimits) - 1; iNdEx >= 0; iNdEx-- { - size, err := m.RateLimits[iNdEx].MarshalToSizedBufferVTStrict(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) - i-- - dAtA[i] = 0x1a - } - } - if m.OverrideOption != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OverrideOption)) - i-- - dAtA[i] = 0x10 - } - if m.VhRateLimits != 0 { - i = protohelpers.EncodeVarint(dAtA, i, uint64(m.VhRateLimits)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *RateLimit) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Domain) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Stage != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Stage)) - } - l = len(m.RequestType) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Timeout != nil { - l = (*durationpb.Duration)(m.Timeout).SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.FailureModeDeny { - n += 2 - } - if m.RateLimitedAsResourceExhausted { - n += 2 - } - if m.RateLimitService != nil { - if size, ok := interface{}(m.RateLimitService).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.RateLimitService) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.EnableXRatelimitHeaders != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.EnableXRatelimitHeaders)) - } - if m.DisableXEnvoyRatelimitedHeader { - n += 2 - } - if m.RateLimitedStatus != nil { - if size, ok := interface{}(m.RateLimitedStatus).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.RateLimitedStatus) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if len(m.ResponseHeadersToAdd) > 0 { - for _, e := range m.ResponseHeadersToAdd { - if size, ok := interface{}(e).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(e) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.StatusOnError != nil { - if size, ok := interface{}(m.StatusOnError).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.StatusOnError) - } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.StatPrefix) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Action_SourceCluster) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Action_DestinationCluster) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Action_RequestHeaders) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.HeaderName) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.DescriptorKey) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.SkipIfAbsent { - n += 2 - } - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Action_RemoteAddress) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Action_GenericKey) SizeVT() (n int) { +func (m *RateLimitPerRoute) MarshalVTStrict() (dAtA []byte, err error) { if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DescriptorValue) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + return nil, nil } - l = len(m.DescriptorKey) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + size := m.SizeVT() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBufferVTStrict(dAtA[:size]) + if err != nil { + return nil, err } - n += len(m.unknownFields) - return n + return dAtA[:n], nil +} + +func (m *RateLimitPerRoute) MarshalToVTStrict(dAtA []byte) (int, error) { + size := m.SizeVT() + return m.MarshalToSizedBufferVTStrict(dAtA[:size]) } -func (m *RateLimitConfig_Action_HeaderValueMatch) SizeVT() (n int) { +func (m *RateLimitPerRoute) MarshalToSizedBufferVTStrict(dAtA []byte) (int, error) { if m == nil { - return 0 + return 0, nil } + i := len(dAtA) + _ = i var l int _ = l - l = len(m.DescriptorValue) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + if m.unknownFields != nil { + i -= len(m.unknownFields) + copy(dAtA[i:], m.unknownFields) } - if m.ExpectMatch { - n += 2 + if len(m.Domain) > 0 { + i -= len(m.Domain) + copy(dAtA[i:], m.Domain) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(m.Domain))) + i-- + dAtA[i] = 0x22 } - if len(m.Headers) > 0 { - for _, e := range m.Headers { - if size, ok := interface{}(e).(interface { - SizeVT() int + if len(m.RateLimits) > 0 { + for iNdEx := len(m.RateLimits) - 1; iNdEx >= 0; iNdEx-- { + if vtmsg, ok := interface{}(m.RateLimits[iNdEx]).(interface { + MarshalToSizedBufferVTStrict([]byte) (int, error) }); ok { - l = size.SizeVT() + size, err := vtmsg.MarshalToSizedBufferVTStrict(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = protohelpers.EncodeVarint(dAtA, i, uint64(size)) } else { - l = proto.Size(e) + encoded, err := proto.Marshal(m.RateLimits[iNdEx]) + if err != nil { + return 0, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = protohelpers.EncodeVarint(dAtA, i, uint64(len(encoded))) } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Action_MetaData) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.DescriptorKey) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.MetadataKey != nil { - if size, ok := interface{}(m.MetadataKey).(interface { - SizeVT() int - }); ok { - l = size.SizeVT() - } else { - l = proto.Size(m.MetadataKey) + i-- + dAtA[i] = 0x1a } - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - l = len(m.DefaultValue) - if l > 0 { - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - if m.Source != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Source)) - } - if m.SkipIfAbsent { - n += 2 } - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Action) SizeVT() (n int) { - if m == nil { - return 0 + if m.OverrideOption != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.OverrideOption)) + i-- + dAtA[i] = 0x10 } - var l int - _ = l - if vtmsg, ok := m.ActionSpecifier.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() + if m.VhRateLimits != 0 { + i = protohelpers.EncodeVarint(dAtA, i, uint64(m.VhRateLimits)) + i-- + dAtA[i] = 0x8 } - n += len(m.unknownFields) - return n + return len(dAtA) - i, nil } -func (m *RateLimitConfig_Action_SourceCluster_) SizeVT() (n int) { +func (m *RateLimit) SizeVT() (n int) { if m == nil { return 0 } var l int _ = l - if m.SourceCluster != nil { - l = m.SourceCluster.SizeVT() + l = len(m.Domain) + if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 2 } - return n -} -func (m *RateLimitConfig_Action_DestinationCluster_) SizeVT() (n int) { - if m == nil { - return 0 + if m.Stage != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.Stage)) } - var l int - _ = l - if m.DestinationCluster != nil { - l = m.DestinationCluster.SizeVT() + l = len(m.RequestType) + if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 2 - } - return n -} -func (m *RateLimitConfig_Action_RequestHeaders_) SizeVT() (n int) { - if m == nil { - return 0 } - var l int - _ = l - if m.RequestHeaders != nil { - l = m.RequestHeaders.SizeVT() + if m.Timeout != nil { + l = (*durationpb.Duration)(m.Timeout).SizeVT() n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 2 } - return n -} -func (m *RateLimitConfig_Action_RemoteAddress_) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.RemoteAddress != nil { - l = m.RemoteAddress.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { + if m.FailureModeDeny { n += 2 } - return n -} -func (m *RateLimitConfig_Action_GenericKey_) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.GenericKey != nil { - l = m.GenericKey.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { + if m.RateLimitedAsResourceExhausted { n += 2 } - return n -} -func (m *RateLimitConfig_Action_HeaderValueMatch_) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.HeaderValueMatch != nil { - l = m.HeaderValueMatch.SizeVT() + if m.RateLimitService != nil { + if size, ok := interface{}(m.RateLimitService).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(m.RateLimitService) + } n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 2 } - return n -} -func (m *RateLimitConfig_Action_Metadata) SizeVT() (n int) { - if m == nil { - return 0 + if m.EnableXRatelimitHeaders != 0 { + n += 1 + protohelpers.SizeOfVarint(uint64(m.EnableXRatelimitHeaders)) } - var l int - _ = l - if m.Metadata != nil { - l = m.Metadata.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { + if m.DisableXEnvoyRatelimitedHeader { n += 2 } - return n -} -func (m *RateLimitConfig_Action_Extension) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Extension != nil { - if size, ok := interface{}(m.Extension).(interface { + if m.RateLimitedStatus != nil { + if size, ok := interface{}(m.RateLimitedStatus).(interface { SizeVT() int }); ok { l = size.SizeVT() } else { - l = proto.Size(m.Extension) + l = proto.Size(m.RateLimitedStatus) } n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 2 } - return n -} -func (m *RateLimitConfig_Override_DynamicMetadata) SizeVT() (n int) { - if m == nil { - return 0 + if len(m.ResponseHeadersToAdd) > 0 { + for _, e := range m.ResponseHeadersToAdd { + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } + n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) + } } - var l int - _ = l - if m.MetadataKey != nil { - if size, ok := interface{}(m.MetadataKey).(interface { + if m.StatusOnError != nil { + if size, ok := interface{}(m.StatusOnError).(interface { SizeVT() int }); ok { l = size.SizeVT() } else { - l = proto.Size(m.MetadataKey) + l = proto.Size(m.StatusOnError) } n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Override) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if vtmsg, ok := m.OverrideSpecifier.(interface{ SizeVT() int }); ok { - n += vtmsg.SizeVT() - } - n += len(m.unknownFields) - return n -} - -func (m *RateLimitConfig_Override_DynamicMetadata_) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DynamicMetadata != nil { - l = m.DynamicMetadata.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } else { - n += 2 - } - return n -} -func (m *RateLimitConfig) SizeVT() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Stage != 0 { - n += 1 + protohelpers.SizeOfVarint(uint64(m.Stage)) - } - l = len(m.DisableKey) + l = len(m.StatPrefix) if l > 0 { n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } - if len(m.Actions) > 0 { - for _, e := range m.Actions { - l = e.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } - } - if m.Limit != nil { - l = m.Limit.SizeVT() - n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) - } n += len(m.unknownFields) return n } @@ -1541,7 +385,13 @@ func (m *RateLimitPerRoute) SizeVT() (n int) { } if len(m.RateLimits) > 0 { for _, e := range m.RateLimits { - l = e.SizeVT() + if size, ok := interface{}(e).(interface { + SizeVT() int + }); ok { + l = size.SizeVT() + } else { + l = proto.Size(e) + } n += 1 + l + protohelpers.SizeOfVarint(uint64(l)) } }