github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/go-control-plane/envoy/service/ratelimit/v2/rls.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.25.0
     4  // 	protoc        v3.16.0
     5  // source: envoy/service/ratelimit/v2/rls.proto
     6  
     7  package envoy_service_ratelimit_v2
     8  
     9  import (
    10  	context "context"
    11  	_ "github.com/cncf/xds/go/udpa/annotations"
    12  	core "github.com/hxx258456/ccgo/go-control-plane/envoy/api/v2/core"
    13  	ratelimit "github.com/hxx258456/ccgo/go-control-plane/envoy/api/v2/ratelimit"
    14  	proto "github.com/golang/protobuf/proto"
    15  	grpc "github.com/hxx258456/ccgo/grpc"
    16  	codes "github.com/hxx258456/ccgo/grpc/codes"
    17  	status "github.com/hxx258456/ccgo/grpc/status"
    18  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    19  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    20  	reflect "reflect"
    21  	sync "sync"
    22  )
    23  
    24  const (
    25  	// Verify that this generated code is sufficiently up-to-date.
    26  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    27  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    28  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    29  )
    30  
    31  // This is a compile-time assertion that a sufficiently up-to-date version
    32  // of the legacy proto package is being used.
    33  const _ = proto.ProtoPackageIsVersion4
    34  
    35  type RateLimitResponse_Code int32
    36  
    37  const (
    38  	// The response code is not known.
    39  	RateLimitResponse_UNKNOWN RateLimitResponse_Code = 0
    40  	// The response code to notify that the number of requests are under limit.
    41  	RateLimitResponse_OK RateLimitResponse_Code = 1
    42  	// The response code to notify that the number of requests are over limit.
    43  	RateLimitResponse_OVER_LIMIT RateLimitResponse_Code = 2
    44  )
    45  
    46  // Enum value maps for RateLimitResponse_Code.
    47  var (
    48  	RateLimitResponse_Code_name = map[int32]string{
    49  		0: "UNKNOWN",
    50  		1: "OK",
    51  		2: "OVER_LIMIT",
    52  	}
    53  	RateLimitResponse_Code_value = map[string]int32{
    54  		"UNKNOWN":    0,
    55  		"OK":         1,
    56  		"OVER_LIMIT": 2,
    57  	}
    58  )
    59  
    60  func (x RateLimitResponse_Code) Enum() *RateLimitResponse_Code {
    61  	p := new(RateLimitResponse_Code)
    62  	*p = x
    63  	return p
    64  }
    65  
    66  func (x RateLimitResponse_Code) String() string {
    67  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
    68  }
    69  
    70  func (RateLimitResponse_Code) Descriptor() protoreflect.EnumDescriptor {
    71  	return file_envoy_service_ratelimit_v2_rls_proto_enumTypes[0].Descriptor()
    72  }
    73  
    74  func (RateLimitResponse_Code) Type() protoreflect.EnumType {
    75  	return &file_envoy_service_ratelimit_v2_rls_proto_enumTypes[0]
    76  }
    77  
    78  func (x RateLimitResponse_Code) Number() protoreflect.EnumNumber {
    79  	return protoreflect.EnumNumber(x)
    80  }
    81  
    82  // Deprecated: Use RateLimitResponse_Code.Descriptor instead.
    83  func (RateLimitResponse_Code) EnumDescriptor() ([]byte, []int) {
    84  	return file_envoy_service_ratelimit_v2_rls_proto_rawDescGZIP(), []int{1, 0}
    85  }
    86  
    87  type RateLimitResponse_RateLimit_Unit int32
    88  
    89  const (
    90  	// The time unit is not known.
    91  	RateLimitResponse_RateLimit_UNKNOWN RateLimitResponse_RateLimit_Unit = 0
    92  	// The time unit representing a second.
    93  	RateLimitResponse_RateLimit_SECOND RateLimitResponse_RateLimit_Unit = 1
    94  	// The time unit representing a minute.
    95  	RateLimitResponse_RateLimit_MINUTE RateLimitResponse_RateLimit_Unit = 2
    96  	// The time unit representing an hour.
    97  	RateLimitResponse_RateLimit_HOUR RateLimitResponse_RateLimit_Unit = 3
    98  	// The time unit representing a day.
    99  	RateLimitResponse_RateLimit_DAY RateLimitResponse_RateLimit_Unit = 4
   100  )
   101  
   102  // Enum value maps for RateLimitResponse_RateLimit_Unit.
   103  var (
   104  	RateLimitResponse_RateLimit_Unit_name = map[int32]string{
   105  		0: "UNKNOWN",
   106  		1: "SECOND",
   107  		2: "MINUTE",
   108  		3: "HOUR",
   109  		4: "DAY",
   110  	}
   111  	RateLimitResponse_RateLimit_Unit_value = map[string]int32{
   112  		"UNKNOWN": 0,
   113  		"SECOND":  1,
   114  		"MINUTE":  2,
   115  		"HOUR":    3,
   116  		"DAY":     4,
   117  	}
   118  )
   119  
   120  func (x RateLimitResponse_RateLimit_Unit) Enum() *RateLimitResponse_RateLimit_Unit {
   121  	p := new(RateLimitResponse_RateLimit_Unit)
   122  	*p = x
   123  	return p
   124  }
   125  
   126  func (x RateLimitResponse_RateLimit_Unit) String() string {
   127  	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
   128  }
   129  
   130  func (RateLimitResponse_RateLimit_Unit) Descriptor() protoreflect.EnumDescriptor {
   131  	return file_envoy_service_ratelimit_v2_rls_proto_enumTypes[1].Descriptor()
   132  }
   133  
   134  func (RateLimitResponse_RateLimit_Unit) Type() protoreflect.EnumType {
   135  	return &file_envoy_service_ratelimit_v2_rls_proto_enumTypes[1]
   136  }
   137  
   138  func (x RateLimitResponse_RateLimit_Unit) Number() protoreflect.EnumNumber {
   139  	return protoreflect.EnumNumber(x)
   140  }
   141  
   142  // Deprecated: Use RateLimitResponse_RateLimit_Unit.Descriptor instead.
   143  func (RateLimitResponse_RateLimit_Unit) EnumDescriptor() ([]byte, []int) {
   144  	return file_envoy_service_ratelimit_v2_rls_proto_rawDescGZIP(), []int{1, 0, 0}
   145  }
   146  
   147  // Main message for a rate limit request. The rate limit service is designed to be fully generic
   148  // in the sense that it can operate on arbitrary hierarchical key/value pairs. The loaded
   149  // configuration will parse the request and find the most specific limit to apply. In addition,
   150  // a RateLimitRequest can contain multiple "descriptors" to limit on. When multiple descriptors
   151  // are provided, the server will limit on *ALL* of them and return an OVER_LIMIT response if any
   152  // of them are over limit. This enables more complex application level rate limiting scenarios
   153  // if desired.
   154  type RateLimitRequest struct {
   155  	state         protoimpl.MessageState
   156  	sizeCache     protoimpl.SizeCache
   157  	unknownFields protoimpl.UnknownFields
   158  
   159  	// All rate limit requests must specify a domain. This enables the configuration to be per
   160  	// application without fear of overlap. E.g., "envoy".
   161  	Domain string `protobuf:"bytes,1,opt,name=domain,proto3" json:"domain,omitempty"`
   162  	// All rate limit requests must specify at least one RateLimitDescriptor. Each descriptor is
   163  	// processed by the service (see below). If any of the descriptors are over limit, the entire
   164  	// request is considered to be over limit.
   165  	Descriptors []*ratelimit.RateLimitDescriptor `protobuf:"bytes,2,rep,name=descriptors,proto3" json:"descriptors,omitempty"`
   166  	// Rate limit requests can optionally specify the number of hits a request adds to the matched
   167  	// limit. If the value is not set in the message, a request increases the matched limit by 1.
   168  	HitsAddend uint32 `protobuf:"varint,3,opt,name=hits_addend,json=hitsAddend,proto3" json:"hits_addend,omitempty"`
   169  }
   170  
   171  func (x *RateLimitRequest) Reset() {
   172  	*x = RateLimitRequest{}
   173  	if protoimpl.UnsafeEnabled {
   174  		mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[0]
   175  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   176  		ms.StoreMessageInfo(mi)
   177  	}
   178  }
   179  
   180  func (x *RateLimitRequest) String() string {
   181  	return protoimpl.X.MessageStringOf(x)
   182  }
   183  
   184  func (*RateLimitRequest) ProtoMessage() {}
   185  
   186  func (x *RateLimitRequest) ProtoReflect() protoreflect.Message {
   187  	mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[0]
   188  	if protoimpl.UnsafeEnabled && x != nil {
   189  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   190  		if ms.LoadMessageInfo() == nil {
   191  			ms.StoreMessageInfo(mi)
   192  		}
   193  		return ms
   194  	}
   195  	return mi.MessageOf(x)
   196  }
   197  
   198  // Deprecated: Use RateLimitRequest.ProtoReflect.Descriptor instead.
   199  func (*RateLimitRequest) Descriptor() ([]byte, []int) {
   200  	return file_envoy_service_ratelimit_v2_rls_proto_rawDescGZIP(), []int{0}
   201  }
   202  
   203  func (x *RateLimitRequest) GetDomain() string {
   204  	if x != nil {
   205  		return x.Domain
   206  	}
   207  	return ""
   208  }
   209  
   210  func (x *RateLimitRequest) GetDescriptors() []*ratelimit.RateLimitDescriptor {
   211  	if x != nil {
   212  		return x.Descriptors
   213  	}
   214  	return nil
   215  }
   216  
   217  func (x *RateLimitRequest) GetHitsAddend() uint32 {
   218  	if x != nil {
   219  		return x.HitsAddend
   220  	}
   221  	return 0
   222  }
   223  
   224  // A response from a ShouldRateLimit call.
   225  type RateLimitResponse struct {
   226  	state         protoimpl.MessageState
   227  	sizeCache     protoimpl.SizeCache
   228  	unknownFields protoimpl.UnknownFields
   229  
   230  	// The overall response code which takes into account all of the descriptors that were passed
   231  	// in the RateLimitRequest message.
   232  	OverallCode RateLimitResponse_Code `protobuf:"varint,1,opt,name=overall_code,json=overallCode,proto3,enum=envoy.service.ratelimit.v2.RateLimitResponse_Code" json:"overall_code,omitempty"`
   233  	// A list of DescriptorStatus messages which matches the length of the descriptor list passed
   234  	// in the RateLimitRequest. This can be used by the caller to determine which individual
   235  	// descriptors failed and/or what the currently configured limits are for all of them.
   236  	Statuses []*RateLimitResponse_DescriptorStatus `protobuf:"bytes,2,rep,name=statuses,proto3" json:"statuses,omitempty"`
   237  	// A list of headers to add to the response
   238  	Headers []*core.HeaderValue `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
   239  	// A list of headers to add to the request when forwarded
   240  	RequestHeadersToAdd []*core.HeaderValue `protobuf:"bytes,4,rep,name=request_headers_to_add,json=requestHeadersToAdd,proto3" json:"request_headers_to_add,omitempty"`
   241  }
   242  
   243  func (x *RateLimitResponse) Reset() {
   244  	*x = RateLimitResponse{}
   245  	if protoimpl.UnsafeEnabled {
   246  		mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[1]
   247  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   248  		ms.StoreMessageInfo(mi)
   249  	}
   250  }
   251  
   252  func (x *RateLimitResponse) String() string {
   253  	return protoimpl.X.MessageStringOf(x)
   254  }
   255  
   256  func (*RateLimitResponse) ProtoMessage() {}
   257  
   258  func (x *RateLimitResponse) ProtoReflect() protoreflect.Message {
   259  	mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[1]
   260  	if protoimpl.UnsafeEnabled && x != nil {
   261  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   262  		if ms.LoadMessageInfo() == nil {
   263  			ms.StoreMessageInfo(mi)
   264  		}
   265  		return ms
   266  	}
   267  	return mi.MessageOf(x)
   268  }
   269  
   270  // Deprecated: Use RateLimitResponse.ProtoReflect.Descriptor instead.
   271  func (*RateLimitResponse) Descriptor() ([]byte, []int) {
   272  	return file_envoy_service_ratelimit_v2_rls_proto_rawDescGZIP(), []int{1}
   273  }
   274  
   275  func (x *RateLimitResponse) GetOverallCode() RateLimitResponse_Code {
   276  	if x != nil {
   277  		return x.OverallCode
   278  	}
   279  	return RateLimitResponse_UNKNOWN
   280  }
   281  
   282  func (x *RateLimitResponse) GetStatuses() []*RateLimitResponse_DescriptorStatus {
   283  	if x != nil {
   284  		return x.Statuses
   285  	}
   286  	return nil
   287  }
   288  
   289  func (x *RateLimitResponse) GetHeaders() []*core.HeaderValue {
   290  	if x != nil {
   291  		return x.Headers
   292  	}
   293  	return nil
   294  }
   295  
   296  func (x *RateLimitResponse) GetRequestHeadersToAdd() []*core.HeaderValue {
   297  	if x != nil {
   298  		return x.RequestHeadersToAdd
   299  	}
   300  	return nil
   301  }
   302  
   303  // Defines an actual rate limit in terms of requests per unit of time and the unit itself.
   304  type RateLimitResponse_RateLimit struct {
   305  	state         protoimpl.MessageState
   306  	sizeCache     protoimpl.SizeCache
   307  	unknownFields protoimpl.UnknownFields
   308  
   309  	// A name or description of this limit.
   310  	Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
   311  	// The number of requests per unit of time.
   312  	RequestsPerUnit uint32 `protobuf:"varint,1,opt,name=requests_per_unit,json=requestsPerUnit,proto3" json:"requests_per_unit,omitempty"`
   313  	// The unit of time.
   314  	Unit RateLimitResponse_RateLimit_Unit `protobuf:"varint,2,opt,name=unit,proto3,enum=envoy.service.ratelimit.v2.RateLimitResponse_RateLimit_Unit" json:"unit,omitempty"`
   315  }
   316  
   317  func (x *RateLimitResponse_RateLimit) Reset() {
   318  	*x = RateLimitResponse_RateLimit{}
   319  	if protoimpl.UnsafeEnabled {
   320  		mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[2]
   321  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   322  		ms.StoreMessageInfo(mi)
   323  	}
   324  }
   325  
   326  func (x *RateLimitResponse_RateLimit) String() string {
   327  	return protoimpl.X.MessageStringOf(x)
   328  }
   329  
   330  func (*RateLimitResponse_RateLimit) ProtoMessage() {}
   331  
   332  func (x *RateLimitResponse_RateLimit) ProtoReflect() protoreflect.Message {
   333  	mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[2]
   334  	if protoimpl.UnsafeEnabled && x != nil {
   335  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   336  		if ms.LoadMessageInfo() == nil {
   337  			ms.StoreMessageInfo(mi)
   338  		}
   339  		return ms
   340  	}
   341  	return mi.MessageOf(x)
   342  }
   343  
   344  // Deprecated: Use RateLimitResponse_RateLimit.ProtoReflect.Descriptor instead.
   345  func (*RateLimitResponse_RateLimit) Descriptor() ([]byte, []int) {
   346  	return file_envoy_service_ratelimit_v2_rls_proto_rawDescGZIP(), []int{1, 0}
   347  }
   348  
   349  func (x *RateLimitResponse_RateLimit) GetName() string {
   350  	if x != nil {
   351  		return x.Name
   352  	}
   353  	return ""
   354  }
   355  
   356  func (x *RateLimitResponse_RateLimit) GetRequestsPerUnit() uint32 {
   357  	if x != nil {
   358  		return x.RequestsPerUnit
   359  	}
   360  	return 0
   361  }
   362  
   363  func (x *RateLimitResponse_RateLimit) GetUnit() RateLimitResponse_RateLimit_Unit {
   364  	if x != nil {
   365  		return x.Unit
   366  	}
   367  	return RateLimitResponse_RateLimit_UNKNOWN
   368  }
   369  
   370  type RateLimitResponse_DescriptorStatus struct {
   371  	state         protoimpl.MessageState
   372  	sizeCache     protoimpl.SizeCache
   373  	unknownFields protoimpl.UnknownFields
   374  
   375  	// The response code for an individual descriptor.
   376  	Code RateLimitResponse_Code `protobuf:"varint,1,opt,name=code,proto3,enum=envoy.service.ratelimit.v2.RateLimitResponse_Code" json:"code,omitempty"`
   377  	// The current limit as configured by the server. Useful for debugging, etc.
   378  	CurrentLimit *RateLimitResponse_RateLimit `protobuf:"bytes,2,opt,name=current_limit,json=currentLimit,proto3" json:"current_limit,omitempty"`
   379  	// The limit remaining in the current time unit.
   380  	LimitRemaining uint32 `protobuf:"varint,3,opt,name=limit_remaining,json=limitRemaining,proto3" json:"limit_remaining,omitempty"`
   381  }
   382  
   383  func (x *RateLimitResponse_DescriptorStatus) Reset() {
   384  	*x = RateLimitResponse_DescriptorStatus{}
   385  	if protoimpl.UnsafeEnabled {
   386  		mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[3]
   387  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   388  		ms.StoreMessageInfo(mi)
   389  	}
   390  }
   391  
   392  func (x *RateLimitResponse_DescriptorStatus) String() string {
   393  	return protoimpl.X.MessageStringOf(x)
   394  }
   395  
   396  func (*RateLimitResponse_DescriptorStatus) ProtoMessage() {}
   397  
   398  func (x *RateLimitResponse_DescriptorStatus) ProtoReflect() protoreflect.Message {
   399  	mi := &file_envoy_service_ratelimit_v2_rls_proto_msgTypes[3]
   400  	if protoimpl.UnsafeEnabled && x != nil {
   401  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   402  		if ms.LoadMessageInfo() == nil {
   403  			ms.StoreMessageInfo(mi)
   404  		}
   405  		return ms
   406  	}
   407  	return mi.MessageOf(x)
   408  }
   409  
   410  // Deprecated: Use RateLimitResponse_DescriptorStatus.ProtoReflect.Descriptor instead.
   411  func (*RateLimitResponse_DescriptorStatus) Descriptor() ([]byte, []int) {
   412  	return file_envoy_service_ratelimit_v2_rls_proto_rawDescGZIP(), []int{1, 1}
   413  }
   414  
   415  func (x *RateLimitResponse_DescriptorStatus) GetCode() RateLimitResponse_Code {
   416  	if x != nil {
   417  		return x.Code
   418  	}
   419  	return RateLimitResponse_UNKNOWN
   420  }
   421  
   422  func (x *RateLimitResponse_DescriptorStatus) GetCurrentLimit() *RateLimitResponse_RateLimit {
   423  	if x != nil {
   424  		return x.CurrentLimit
   425  	}
   426  	return nil
   427  }
   428  
   429  func (x *RateLimitResponse_DescriptorStatus) GetLimitRemaining() uint32 {
   430  	if x != nil {
   431  		return x.LimitRemaining
   432  	}
   433  	return 0
   434  }
   435  
   436  var File_envoy_service_ratelimit_v2_rls_proto protoreflect.FileDescriptor
   437  
   438  var file_envoy_service_ratelimit_v2_rls_proto_rawDesc = []byte{
   439  	0x0a, 0x24, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f,
   440  	0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x76, 0x32, 0x2f, 0x72, 0x6c, 0x73,
   441  	0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1a, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65,
   442  	0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e,
   443  	0x76, 0x32, 0x1a, 0x1c, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32,
   444  	0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
   445  	0x1a, 0x26, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x72,
   446  	0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2f, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d,
   447  	0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
   448  	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61,
   449  	0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x75, 0x64, 0x70, 0x61, 0x2f, 0x61,
   450  	0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75,
   451  	0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a, 0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65,
   452  	0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06,
   453  	0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x6f,
   454  	0x6d, 0x61, 0x69, 0x6e, 0x12, 0x4d, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
   455  	0x6f, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
   456  	0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d,
   457  	0x69, 0x74, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x44, 0x65, 0x73, 0x63,
   458  	0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
   459  	0x6f, 0x72, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x69, 0x74, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x65,
   460  	0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x68, 0x69, 0x74, 0x73, 0x41, 0x64,
   461  	0x64, 0x65, 0x6e, 0x64, 0x22, 0xe7, 0x06, 0x0a, 0x11, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d,
   462  	0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0c, 0x6f, 0x76,
   463  	0x65, 0x72, 0x61, 0x6c, 0x6c, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
   464  	0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
   465  	0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61,
   466  	0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
   467  	0x43, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x6f, 0x76, 0x65, 0x72, 0x61, 0x6c, 0x6c, 0x43, 0x6f, 0x64,
   468  	0x65, 0x12, 0x5a, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x18, 0x02, 0x20,
   469  	0x03, 0x28, 0x0b, 0x32, 0x3e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76,
   470  	0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32,
   471  	0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
   472  	0x73, 0x65, 0x2e, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61,
   473  	0x74, 0x75, 0x73, 0x52, 0x08, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x65, 0x73, 0x12, 0x59, 0x0a,
   474  	0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e,
   475  	0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f,
   476  	0x72, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x1f,
   477  	0xf2, 0x98, 0xfe, 0x8f, 0x05, 0x19, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
   478  	0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x52,
   479  	0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x53, 0x0a, 0x16, 0x72, 0x65, 0x71, 0x75,
   480  	0x65, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x61,
   481  	0x64, 0x64, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79,
   482  	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x48, 0x65, 0x61,
   483  	0x64, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x13, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
   484  	0x74, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x54, 0x6f, 0x41, 0x64, 0x64, 0x1a, 0xdd, 0x01,
   485  	0x0a, 0x09, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
   486  	0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
   487  	0x2a, 0x0a, 0x11, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x70, 0x65, 0x72, 0x5f,
   488  	0x75, 0x6e, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0f, 0x72, 0x65, 0x71, 0x75,
   489  	0x65, 0x73, 0x74, 0x73, 0x50, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x50, 0x0a, 0x04, 0x75,
   490  	0x6e, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3c, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
   491  	0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69,
   492  	0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74,
   493  	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d,
   494  	0x69, 0x74, 0x2e, 0x55, 0x6e, 0x69, 0x74, 0x52, 0x04, 0x75, 0x6e, 0x69, 0x74, 0x22, 0x3e, 0x0a,
   495  	0x04, 0x55, 0x6e, 0x69, 0x74, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e,
   496  	0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x45, 0x43, 0x4f, 0x4e, 0x44, 0x10, 0x01, 0x12, 0x0a,
   497  	0x0a, 0x06, 0x4d, 0x49, 0x4e, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x4f,
   498  	0x55, 0x52, 0x10, 0x03, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x41, 0x59, 0x10, 0x04, 0x1a, 0xe1, 0x01,
   499  	0x0a, 0x10, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x74, 0x61, 0x74,
   500  	0x75, 0x73, 0x12, 0x46, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e,
   501  	0x32, 0x32, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
   502  	0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61,
   503  	0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e,
   504  	0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x5c, 0x0a, 0x0d, 0x63, 0x75,
   505  	0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
   506  	0x0b, 0x32, 0x37, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63,
   507  	0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76, 0x32, 0x2e, 0x52,
   508  	0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
   509  	0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72,
   510  	0x65, 0x6e, 0x74, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6c, 0x69, 0x6d, 0x69,
   511  	0x74, 0x5f, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28,
   512  	0x0d, 0x52, 0x0e, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x69, 0x6e,
   513  	0x67, 0x22, 0x2b, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b,
   514  	0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, 0x4f, 0x4b, 0x10, 0x01, 0x12, 0x0e,
   515  	0x0a, 0x0a, 0x4f, 0x56, 0x45, 0x52, 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x10, 0x02, 0x32, 0x84,
   516  	0x01, 0x0a, 0x10, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72, 0x76,
   517  	0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0f, 0x53, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x52, 0x61, 0x74,
   518  	0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x2c, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73,
   519  	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74,
   520  	0x2e, 0x76, 0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71,
   521  	0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
   522  	0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76,
   523  	0x32, 0x2e, 0x52, 0x61, 0x74, 0x65, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
   524  	0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x41, 0x0a, 0x28, 0x69, 0x6f, 0x2e, 0x65, 0x6e, 0x76, 0x6f,
   525  	0x79, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x65, 0x6e, 0x76, 0x6f, 0x79, 0x2e, 0x73, 0x65, 0x72,
   526  	0x76, 0x69, 0x63, 0x65, 0x2e, 0x72, 0x61, 0x74, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x2e, 0x76,
   527  	0x32, 0x42, 0x08, 0x52, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x88, 0x01, 0x01,
   528  	0xba, 0x80, 0xc8, 0xd1, 0x06, 0x02, 0x10, 0x01, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   529  }
   530  
   531  var (
   532  	file_envoy_service_ratelimit_v2_rls_proto_rawDescOnce sync.Once
   533  	file_envoy_service_ratelimit_v2_rls_proto_rawDescData = file_envoy_service_ratelimit_v2_rls_proto_rawDesc
   534  )
   535  
   536  func file_envoy_service_ratelimit_v2_rls_proto_rawDescGZIP() []byte {
   537  	file_envoy_service_ratelimit_v2_rls_proto_rawDescOnce.Do(func() {
   538  		file_envoy_service_ratelimit_v2_rls_proto_rawDescData = protoimpl.X.CompressGZIP(file_envoy_service_ratelimit_v2_rls_proto_rawDescData)
   539  	})
   540  	return file_envoy_service_ratelimit_v2_rls_proto_rawDescData
   541  }
   542  
   543  var file_envoy_service_ratelimit_v2_rls_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
   544  var file_envoy_service_ratelimit_v2_rls_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
   545  var file_envoy_service_ratelimit_v2_rls_proto_goTypes = []interface{}{
   546  	(RateLimitResponse_Code)(0),                // 0: envoy.service.ratelimit.v2.RateLimitResponse.Code
   547  	(RateLimitResponse_RateLimit_Unit)(0),      // 1: envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit
   548  	(*RateLimitRequest)(nil),                   // 2: envoy.service.ratelimit.v2.RateLimitRequest
   549  	(*RateLimitResponse)(nil),                  // 3: envoy.service.ratelimit.v2.RateLimitResponse
   550  	(*RateLimitResponse_RateLimit)(nil),        // 4: envoy.service.ratelimit.v2.RateLimitResponse.RateLimit
   551  	(*RateLimitResponse_DescriptorStatus)(nil), // 5: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus
   552  	(*ratelimit.RateLimitDescriptor)(nil),      // 6: envoy.api.v2.ratelimit.RateLimitDescriptor
   553  	(*core.HeaderValue)(nil),                   // 7: envoy.api.v2.core.HeaderValue
   554  }
   555  var file_envoy_service_ratelimit_v2_rls_proto_depIdxs = []int32{
   556  	6, // 0: envoy.service.ratelimit.v2.RateLimitRequest.descriptors:type_name -> envoy.api.v2.ratelimit.RateLimitDescriptor
   557  	0, // 1: envoy.service.ratelimit.v2.RateLimitResponse.overall_code:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.Code
   558  	5, // 2: envoy.service.ratelimit.v2.RateLimitResponse.statuses:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus
   559  	7, // 3: envoy.service.ratelimit.v2.RateLimitResponse.headers:type_name -> envoy.api.v2.core.HeaderValue
   560  	7, // 4: envoy.service.ratelimit.v2.RateLimitResponse.request_headers_to_add:type_name -> envoy.api.v2.core.HeaderValue
   561  	1, // 5: envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.unit:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit
   562  	0, // 6: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.code:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.Code
   563  	4, // 7: envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.current_limit:type_name -> envoy.service.ratelimit.v2.RateLimitResponse.RateLimit
   564  	2, // 8: envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit:input_type -> envoy.service.ratelimit.v2.RateLimitRequest
   565  	3, // 9: envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit:output_type -> envoy.service.ratelimit.v2.RateLimitResponse
   566  	9, // [9:10] is the sub-list for method output_type
   567  	8, // [8:9] is the sub-list for method input_type
   568  	8, // [8:8] is the sub-list for extension type_name
   569  	8, // [8:8] is the sub-list for extension extendee
   570  	0, // [0:8] is the sub-list for field type_name
   571  }
   572  
   573  func init() { file_envoy_service_ratelimit_v2_rls_proto_init() }
   574  func file_envoy_service_ratelimit_v2_rls_proto_init() {
   575  	if File_envoy_service_ratelimit_v2_rls_proto != nil {
   576  		return
   577  	}
   578  	if !protoimpl.UnsafeEnabled {
   579  		file_envoy_service_ratelimit_v2_rls_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   580  			switch v := v.(*RateLimitRequest); i {
   581  			case 0:
   582  				return &v.state
   583  			case 1:
   584  				return &v.sizeCache
   585  			case 2:
   586  				return &v.unknownFields
   587  			default:
   588  				return nil
   589  			}
   590  		}
   591  		file_envoy_service_ratelimit_v2_rls_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   592  			switch v := v.(*RateLimitResponse); i {
   593  			case 0:
   594  				return &v.state
   595  			case 1:
   596  				return &v.sizeCache
   597  			case 2:
   598  				return &v.unknownFields
   599  			default:
   600  				return nil
   601  			}
   602  		}
   603  		file_envoy_service_ratelimit_v2_rls_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
   604  			switch v := v.(*RateLimitResponse_RateLimit); i {
   605  			case 0:
   606  				return &v.state
   607  			case 1:
   608  				return &v.sizeCache
   609  			case 2:
   610  				return &v.unknownFields
   611  			default:
   612  				return nil
   613  			}
   614  		}
   615  		file_envoy_service_ratelimit_v2_rls_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
   616  			switch v := v.(*RateLimitResponse_DescriptorStatus); i {
   617  			case 0:
   618  				return &v.state
   619  			case 1:
   620  				return &v.sizeCache
   621  			case 2:
   622  				return &v.unknownFields
   623  			default:
   624  				return nil
   625  			}
   626  		}
   627  	}
   628  	type x struct{}
   629  	out := protoimpl.TypeBuilder{
   630  		File: protoimpl.DescBuilder{
   631  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   632  			RawDescriptor: file_envoy_service_ratelimit_v2_rls_proto_rawDesc,
   633  			NumEnums:      2,
   634  			NumMessages:   4,
   635  			NumExtensions: 0,
   636  			NumServices:   1,
   637  		},
   638  		GoTypes:           file_envoy_service_ratelimit_v2_rls_proto_goTypes,
   639  		DependencyIndexes: file_envoy_service_ratelimit_v2_rls_proto_depIdxs,
   640  		EnumInfos:         file_envoy_service_ratelimit_v2_rls_proto_enumTypes,
   641  		MessageInfos:      file_envoy_service_ratelimit_v2_rls_proto_msgTypes,
   642  	}.Build()
   643  	File_envoy_service_ratelimit_v2_rls_proto = out.File
   644  	file_envoy_service_ratelimit_v2_rls_proto_rawDesc = nil
   645  	file_envoy_service_ratelimit_v2_rls_proto_goTypes = nil
   646  	file_envoy_service_ratelimit_v2_rls_proto_depIdxs = nil
   647  }
   648  
   649  // Reference imports to suppress errors if they are not otherwise used.
   650  var _ context.Context
   651  var _ grpc.ClientConnInterface
   652  
   653  // This is a compile-time assertion to ensure that this generated file
   654  // is compatible with the grpc package it is being compiled against.
   655  const _ = grpc.SupportPackageIsVersion6
   656  
   657  // RateLimitServiceClient is the client API for RateLimitService service.
   658  //
   659  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   660  type RateLimitServiceClient interface {
   661  	// Determine whether rate limiting should take place.
   662  	ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error)
   663  }
   664  
   665  type rateLimitServiceClient struct {
   666  	cc grpc.ClientConnInterface
   667  }
   668  
   669  func NewRateLimitServiceClient(cc grpc.ClientConnInterface) RateLimitServiceClient {
   670  	return &rateLimitServiceClient{cc}
   671  }
   672  
   673  func (c *rateLimitServiceClient) ShouldRateLimit(ctx context.Context, in *RateLimitRequest, opts ...grpc.CallOption) (*RateLimitResponse, error) {
   674  	out := new(RateLimitResponse)
   675  	err := c.cc.Invoke(ctx, "/envoy.service.ratelimit.v2.RateLimitService/ShouldRateLimit", in, out, opts...)
   676  	if err != nil {
   677  		return nil, err
   678  	}
   679  	return out, nil
   680  }
   681  
   682  // RateLimitServiceServer is the server API for RateLimitService service.
   683  type RateLimitServiceServer interface {
   684  	// Determine whether rate limiting should take place.
   685  	ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error)
   686  }
   687  
   688  // UnimplementedRateLimitServiceServer can be embedded to have forward compatible implementations.
   689  type UnimplementedRateLimitServiceServer struct {
   690  }
   691  
   692  func (*UnimplementedRateLimitServiceServer) ShouldRateLimit(context.Context, *RateLimitRequest) (*RateLimitResponse, error) {
   693  	return nil, status.Errorf(codes.Unimplemented, "method ShouldRateLimit not implemented")
   694  }
   695  
   696  func RegisterRateLimitServiceServer(s *grpc.Server, srv RateLimitServiceServer) {
   697  	s.RegisterService(&_RateLimitService_serviceDesc, srv)
   698  }
   699  
   700  func _RateLimitService_ShouldRateLimit_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   701  	in := new(RateLimitRequest)
   702  	if err := dec(in); err != nil {
   703  		return nil, err
   704  	}
   705  	if interceptor == nil {
   706  		return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, in)
   707  	}
   708  	info := &grpc.UnaryServerInfo{
   709  		Server:     srv,
   710  		FullMethod: "/envoy.service.ratelimit.v2.RateLimitService/ShouldRateLimit",
   711  	}
   712  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   713  		return srv.(RateLimitServiceServer).ShouldRateLimit(ctx, req.(*RateLimitRequest))
   714  	}
   715  	return interceptor(ctx, in, info, handler)
   716  }
   717  
   718  var _RateLimitService_serviceDesc = grpc.ServiceDesc{
   719  	ServiceName: "envoy.service.ratelimit.v2.RateLimitService",
   720  	HandlerType: (*RateLimitServiceServer)(nil),
   721  	Methods: []grpc.MethodDesc{
   722  		{
   723  			MethodName: "ShouldRateLimit",
   724  			Handler:    _RateLimitService_ShouldRateLimit_Handler,
   725  		},
   726  	},
   727  	Streams:  []grpc.StreamDesc{},
   728  	Metadata: "envoy/service/ratelimit/v2/rls.proto",
   729  }