# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: envoy/service/ratelimit/v2/rls.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from envoy.api.v2.core import base_pb2 as envoy_dot_api_dot_v2_dot_core_dot_base__pb2
try:
  envoy_dot_api_dot_v2_dot_core_dot_socket__option__pb2 = envoy_dot_api_dot_v2_dot_core_dot_base__pb2.envoy_dot_api_dot_v2_dot_core_dot_socket__option__pb2
except AttributeError:
  envoy_dot_api_dot_v2_dot_core_dot_socket__option__pb2 = envoy_dot_api_dot_v2_dot_core_dot_base__pb2.envoy.api.v2.core.socket_option_pb2
from envoy.api.v2.ratelimit import ratelimit_pb2 as envoy_dot_api_dot_v2_dot_ratelimit_dot_ratelimit__pb2
from udpa.annotations import migrate_pb2 as udpa_dot_annotations_dot_migrate__pb2
from udpa.annotations import status_pb2 as udpa_dot_annotations_dot_status__pb2


DESCRIPTOR = _descriptor.FileDescriptor(
  name='envoy/service/ratelimit/v2/rls.proto',
  package='envoy.service.ratelimit.v2',
  syntax='proto3',
  serialized_options=b'\n(io.envoyproxy.envoy.service.ratelimit.v2B\010RlsProtoP\001\210\001\001\272\200\310\321\006\002\020\001',
  create_key=_descriptor._internal_create_key,
  serialized_pb=b'\n$envoy/service/ratelimit/v2/rls.proto\x12\x1a\x65nvoy.service.ratelimit.v2\x1a\x1c\x65nvoy/api/v2/core/base.proto\x1a&envoy/api/v2/ratelimit/ratelimit.proto\x1a\x1eudpa/annotations/migrate.proto\x1a\x1dudpa/annotations/status.proto\"y\n\x10RateLimitRequest\x12\x0e\n\x06\x64omain\x18\x01 \x01(\t\x12@\n\x0b\x64\x65scriptors\x18\x02 \x03(\x0b\x32+.envoy.api.v2.ratelimit.RateLimitDescriptor\x12\x13\n\x0bhits_addend\x18\x03 \x01(\r\"\xf1\x05\n\x11RateLimitResponse\x12H\n\x0coverall_code\x18\x01 \x01(\x0e\x32\x32.envoy.service.ratelimit.v2.RateLimitResponse.Code\x12P\n\x08statuses\x18\x02 \x03(\x0b\x32>.envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus\x12P\n\x07headers\x18\x03 \x03(\x0b\x32\x1e.envoy.api.v2.core.HeaderValueB\x1f\xf2\x98\xfe\x8f\x05\x19\n\x17response_headers_to_add\x12>\n\x16request_headers_to_add\x18\x04 \x03(\x0b\x32\x1e.envoy.api.v2.core.HeaderValue\x1a\xc0\x01\n\tRateLimit\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x19\n\x11requests_per_unit\x18\x01 \x01(\r\x12J\n\x04unit\x18\x02 \x01(\x0e\x32<.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit\">\n\x04Unit\x12\x0b\n\x07UNKNOWN\x10\x00\x12\n\n\x06SECOND\x10\x01\x12\n\n\x06MINUTE\x10\x02\x12\x08\n\x04HOUR\x10\x03\x12\x07\n\x03\x44\x41Y\x10\x04\x1a\xbd\x01\n\x10\x44\x65scriptorStatus\x12@\n\x04\x63ode\x18\x01 \x01(\x0e\x32\x32.envoy.service.ratelimit.v2.RateLimitResponse.Code\x12N\n\rcurrent_limit\x18\x02 \x01(\x0b\x32\x37.envoy.service.ratelimit.v2.RateLimitResponse.RateLimit\x12\x17\n\x0flimit_remaining\x18\x03 \x01(\r\"+\n\x04\x43ode\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02OK\x10\x01\x12\x0e\n\nOVER_LIMIT\x10\x02\x32\x84\x01\n\x10RateLimitService\x12p\n\x0fShouldRateLimit\x12,.envoy.service.ratelimit.v2.RateLimitRequest\x1a-.envoy.service.ratelimit.v2.RateLimitResponse\"\x00\x42\x41\n(io.envoyproxy.envoy.service.ratelimit.v2B\x08RlsProtoP\x01\x88\x01\x01\xba\x80\xc8\xd1\x06\x02\x10\x01\x62\x06proto3'
  ,
  dependencies=[envoy_dot_api_dot_v2_dot_core_dot_base__pb2.DESCRIPTOR,envoy_dot_api_dot_v2_dot_ratelimit_dot_ratelimit__pb2.DESCRIPTOR,udpa_dot_annotations_dot_migrate__pb2.DESCRIPTOR,udpa_dot_annotations_dot_status__pb2.DESCRIPTOR,])



_RATELIMITRESPONSE_RATELIMIT_UNIT = _descriptor.EnumDescriptor(
  name='Unit',
  full_name='envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.Unit',
  filename=None,
  file=DESCRIPTOR,
  create_key=_descriptor._internal_create_key,
  values=[
    _descriptor.EnumValueDescriptor(
      name='UNKNOWN', index=0, number=0,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='SECOND', index=1, number=1,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='MINUTE', index=2, number=2,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='HOUR', index=3, number=3,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='DAY', index=4, number=4,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
  ],
  containing_type=None,
  serialized_options=None,
  serialized_start=779,
  serialized_end=841,
)
_sym_db.RegisterEnumDescriptor(_RATELIMITRESPONSE_RATELIMIT_UNIT)

_RATELIMITRESPONSE_CODE = _descriptor.EnumDescriptor(
  name='Code',
  full_name='envoy.service.ratelimit.v2.RateLimitResponse.Code',
  filename=None,
  file=DESCRIPTOR,
  create_key=_descriptor._internal_create_key,
  values=[
    _descriptor.EnumValueDescriptor(
      name='UNKNOWN', index=0, number=0,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='OK', index=1, number=1,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
    _descriptor.EnumValueDescriptor(
      name='OVER_LIMIT', index=2, number=2,
      serialized_options=None,
      type=None,
      create_key=_descriptor._internal_create_key),
  ],
  containing_type=None,
  serialized_options=None,
  serialized_start=1035,
  serialized_end=1078,
)
_sym_db.RegisterEnumDescriptor(_RATELIMITRESPONSE_CODE)


_RATELIMITREQUEST = _descriptor.Descriptor(
  name='RateLimitRequest',
  full_name='envoy.service.ratelimit.v2.RateLimitRequest',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='domain', full_name='envoy.service.ratelimit.v2.RateLimitRequest.domain', index=0,
      number=1, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='descriptors', full_name='envoy.service.ratelimit.v2.RateLimitRequest.descriptors', index=1,
      number=2, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='hits_addend', full_name='envoy.service.ratelimit.v2.RateLimitRequest.hits_addend', index=2,
      number=3, type=13, cpp_type=3, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=201,
  serialized_end=322,
)


_RATELIMITRESPONSE_RATELIMIT = _descriptor.Descriptor(
  name='RateLimit',
  full_name='envoy.service.ratelimit.v2.RateLimitResponse.RateLimit',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='name', full_name='envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.name', index=0,
      number=3, type=9, cpp_type=9, label=1,
      has_default_value=False, default_value=b"".decode('utf-8'),
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='requests_per_unit', full_name='envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.requests_per_unit', index=1,
      number=1, type=13, cpp_type=3, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='unit', full_name='envoy.service.ratelimit.v2.RateLimitResponse.RateLimit.unit', index=2,
      number=2, type=14, cpp_type=8, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
    _RATELIMITRESPONSE_RATELIMIT_UNIT,
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=649,
  serialized_end=841,
)

_RATELIMITRESPONSE_DESCRIPTORSTATUS = _descriptor.Descriptor(
  name='DescriptorStatus',
  full_name='envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='code', full_name='envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.code', index=0,
      number=1, type=14, cpp_type=8, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='current_limit', full_name='envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.current_limit', index=1,
      number=2, type=11, cpp_type=10, label=1,
      has_default_value=False, default_value=None,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='limit_remaining', full_name='envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus.limit_remaining', index=2,
      number=3, type=13, cpp_type=3, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[],
  enum_types=[
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=844,
  serialized_end=1033,
)

_RATELIMITRESPONSE = _descriptor.Descriptor(
  name='RateLimitResponse',
  full_name='envoy.service.ratelimit.v2.RateLimitResponse',
  filename=None,
  file=DESCRIPTOR,
  containing_type=None,
  create_key=_descriptor._internal_create_key,
  fields=[
    _descriptor.FieldDescriptor(
      name='overall_code', full_name='envoy.service.ratelimit.v2.RateLimitResponse.overall_code', index=0,
      number=1, type=14, cpp_type=8, label=1,
      has_default_value=False, default_value=0,
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='statuses', full_name='envoy.service.ratelimit.v2.RateLimitResponse.statuses', index=1,
      number=2, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='headers', full_name='envoy.service.ratelimit.v2.RateLimitResponse.headers', index=2,
      number=3, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=b'\362\230\376\217\005\031\n\027response_headers_to_add', file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
    _descriptor.FieldDescriptor(
      name='request_headers_to_add', full_name='envoy.service.ratelimit.v2.RateLimitResponse.request_headers_to_add', index=3,
      number=4, type=11, cpp_type=10, label=3,
      has_default_value=False, default_value=[],
      message_type=None, enum_type=None, containing_type=None,
      is_extension=False, extension_scope=None,
      serialized_options=None, file=DESCRIPTOR,  create_key=_descriptor._internal_create_key),
  ],
  extensions=[
  ],
  nested_types=[_RATELIMITRESPONSE_RATELIMIT, _RATELIMITRESPONSE_DESCRIPTORSTATUS, ],
  enum_types=[
    _RATELIMITRESPONSE_CODE,
  ],
  serialized_options=None,
  is_extendable=False,
  syntax='proto3',
  extension_ranges=[],
  oneofs=[
  ],
  serialized_start=325,
  serialized_end=1078,
)

_RATELIMITREQUEST.fields_by_name['descriptors'].message_type = envoy_dot_api_dot_v2_dot_ratelimit_dot_ratelimit__pb2._RATELIMITDESCRIPTOR
_RATELIMITRESPONSE_RATELIMIT.fields_by_name['unit'].enum_type = _RATELIMITRESPONSE_RATELIMIT_UNIT
_RATELIMITRESPONSE_RATELIMIT.containing_type = _RATELIMITRESPONSE
_RATELIMITRESPONSE_RATELIMIT_UNIT.containing_type = _RATELIMITRESPONSE_RATELIMIT
_RATELIMITRESPONSE_DESCRIPTORSTATUS.fields_by_name['code'].enum_type = _RATELIMITRESPONSE_CODE
_RATELIMITRESPONSE_DESCRIPTORSTATUS.fields_by_name['current_limit'].message_type = _RATELIMITRESPONSE_RATELIMIT
_RATELIMITRESPONSE_DESCRIPTORSTATUS.containing_type = _RATELIMITRESPONSE
_RATELIMITRESPONSE.fields_by_name['overall_code'].enum_type = _RATELIMITRESPONSE_CODE
_RATELIMITRESPONSE.fields_by_name['statuses'].message_type = _RATELIMITRESPONSE_DESCRIPTORSTATUS
_RATELIMITRESPONSE.fields_by_name['headers'].message_type = envoy_dot_api_dot_v2_dot_core_dot_base__pb2._HEADERVALUE
_RATELIMITRESPONSE.fields_by_name['request_headers_to_add'].message_type = envoy_dot_api_dot_v2_dot_core_dot_base__pb2._HEADERVALUE
_RATELIMITRESPONSE_CODE.containing_type = _RATELIMITRESPONSE
DESCRIPTOR.message_types_by_name['RateLimitRequest'] = _RATELIMITREQUEST
DESCRIPTOR.message_types_by_name['RateLimitResponse'] = _RATELIMITRESPONSE
_sym_db.RegisterFileDescriptor(DESCRIPTOR)

RateLimitRequest = _reflection.GeneratedProtocolMessageType('RateLimitRequest', (_message.Message,), {
  'DESCRIPTOR' : _RATELIMITREQUEST,
  '__module__' : 'envoy.service.ratelimit.v2.rls_pb2'
  # @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v2.RateLimitRequest)
  })
_sym_db.RegisterMessage(RateLimitRequest)

RateLimitResponse = _reflection.GeneratedProtocolMessageType('RateLimitResponse', (_message.Message,), {

  'RateLimit' : _reflection.GeneratedProtocolMessageType('RateLimit', (_message.Message,), {
    'DESCRIPTOR' : _RATELIMITRESPONSE_RATELIMIT,
    '__module__' : 'envoy.service.ratelimit.v2.rls_pb2'
    # @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v2.RateLimitResponse.RateLimit)
    })
  ,

  'DescriptorStatus' : _reflection.GeneratedProtocolMessageType('DescriptorStatus', (_message.Message,), {
    'DESCRIPTOR' : _RATELIMITRESPONSE_DESCRIPTORSTATUS,
    '__module__' : 'envoy.service.ratelimit.v2.rls_pb2'
    # @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v2.RateLimitResponse.DescriptorStatus)
    })
  ,
  'DESCRIPTOR' : _RATELIMITRESPONSE,
  '__module__' : 'envoy.service.ratelimit.v2.rls_pb2'
  # @@protoc_insertion_point(class_scope:envoy.service.ratelimit.v2.RateLimitResponse)
  })
_sym_db.RegisterMessage(RateLimitResponse)
_sym_db.RegisterMessage(RateLimitResponse.RateLimit)
_sym_db.RegisterMessage(RateLimitResponse.DescriptorStatus)


DESCRIPTOR._options = None
_RATELIMITRESPONSE.fields_by_name['headers']._options = None

_RATELIMITSERVICE = _descriptor.ServiceDescriptor(
  name='RateLimitService',
  full_name='envoy.service.ratelimit.v2.RateLimitService',
  file=DESCRIPTOR,
  index=0,
  serialized_options=None,
  create_key=_descriptor._internal_create_key,
  serialized_start=1081,
  serialized_end=1213,
  methods=[
  _descriptor.MethodDescriptor(
    name='ShouldRateLimit',
    full_name='envoy.service.ratelimit.v2.RateLimitService.ShouldRateLimit',
    index=0,
    containing_service=None,
    input_type=_RATELIMITREQUEST,
    output_type=_RATELIMITRESPONSE,
    serialized_options=None,
    create_key=_descriptor._internal_create_key,
  ),
])
_sym_db.RegisterServiceDescriptor(_RATELIMITSERVICE)

DESCRIPTOR.services_by_name['RateLimitService'] = _RATELIMITSERVICE

# @@protoc_insertion_point(module_scope)
