# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: stanza/hub/v1/quota.proto
# Protobuf Python Version: 4.25.2
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import descriptor_pool as _descriptor_pool
from google.protobuf import symbol_database as _symbol_database
from google.protobuf.internal import builder as _builder
# @@protoc_insertion_point(imports)

_sym_db = _symbol_database.Default()


from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2
from stanza.hub.v1 import common_pb2 as stanza_dot_hub_dot_v1_dot_common__pb2


DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x19stanza/hub/v1/quota.proto\x12\rstanza.hub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\x1a\x1astanza/hub/v1/common.proto\"\xef\x01\n\x0fGetTokenRequest\x12\x45\n\x08selector\x18\x01 \x01(\x0b\x32#.stanza.hub.v1.GuardFeatureSelectorB\x04\xe2\x41\x01\x02R\x08selector\x12 \n\tclient_id\x18\x04 \x01(\tH\x00R\x08\x63lientId\x88\x01\x01\x12*\n\x0epriority_boost\x18\x05 \x01(\x05H\x01R\rpriorityBoost\x88\x01\x01\x12\x1b\n\x06weight\x18\x07 \x01(\x02H\x02R\x06weight\x88\x01\x01\x42\x0c\n\n_client_idB\x11\n\x0f_priority_boostB\t\n\x07_weight\"\xcd\x01\n\x10GetTokenResponse\x12\x1e\n\x07granted\x18\x01 \x01(\x08\x42\x04\xe2\x41\x01\x02R\x07granted\x12\x19\n\x05token\x18\x02 \x01(\tH\x00R\x05token\x88\x01\x01\x12\x32\n\x06reason\x18\x03 \x01(\x0e\x32\x15.stanza.hub.v1.ReasonH\x01R\x06reason\x88\x01\x01\x12,\n\x04mode\x18\x04 \x01(\x0e\x32\x13.stanza.hub.v1.ModeH\x02R\x04mode\x88\x01\x01\x42\x08\n\x06_tokenB\t\n\x07_reasonB\x07\n\x05_mode\"\x8b\x02\n\x14GetTokenLeaseRequest\x12\x45\n\x08selector\x18\x01 \x01(\x0b\x32#.stanza.hub.v1.GuardFeatureSelectorB\x04\xe2\x41\x01\x02R\x08selector\x12 \n\tclient_id\x18\x04 \x01(\tH\x00R\x08\x63lientId\x88\x01\x01\x12*\n\x0epriority_boost\x18\x05 \x01(\x05H\x01R\rpriorityBoost\x88\x01\x01\x12*\n\x0e\x64\x65\x66\x61ult_weight\x18\x07 \x01(\x02H\x02R\rdefaultWeight\x88\x01\x01\x42\x0c\n\n_client_idB\x11\n\x0f_priority_boostB\x11\n\x0f_default_weight\"j\n\x15GetTokenLeaseResponse\x12\x1e\n\x07granted\x18\x01 \x01(\x08\x42\x04\xe2\x41\x01\x02R\x07granted\x12\x31\n\x06leases\x18\x02 \x03(\x0b\x32\x19.stanza.hub.v1.TokenLeaseR\x06leases\"\xd5\x02\n\nTokenLease\x12#\n\rduration_msec\x18\x01 \x01(\x05R\x0c\x64urationMsec\x12\x14\n\x05token\x18\x02 \x01(\tR\x05token\x12\x18\n\x07\x66\x65\x61ture\x18\x03 \x01(\tR\x07\x66\x65\x61ture\x12%\n\x0epriority_boost\x18\x04 \x01(\x05R\rpriorityBoost\x12\x16\n\x06weight\x18\x05 \x01(\x02R\x06weight\x12-\n\x06reason\x18\x06 \x01(\x0e\x32\x15.stanza.hub.v1.ReasonR\x06reason\x12>\n\nexpires_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00R\texpiresAt\x88\x01\x01\x12,\n\x04mode\x18\x08 \x01(\x0e\x32\x13.stanza.hub.v1.ModeH\x01R\x04mode\x88\x01\x01\x42\r\n\x0b_expires_atB\x07\n\x05_mode\"\xa6\x01\n\x1cSetTokenLeaseConsumedRequest\x12\x1c\n\x06tokens\x18\x01 \x03(\tB\x04\xe2\x41\x01\x02R\x06tokens\x12\x30\n\x11weight_correction\x18\x02 \x01(\x02H\x00R\x10weightCorrection\x88\x01\x01\x12 \n\x0b\x65nvironment\x18\x03 \x01(\tR\x0b\x65nvironmentB\x14\n\x12_weight_correction\"\x1f\n\x1dSetTokenLeaseConsumedResponse\"H\n\x14ValidateTokenRequest\x12\x30\n\x06tokens\x18\x01 \x03(\x0b\x32\x18.stanza.hub.v1.TokenInfoR\x06tokens\"[\n\tTokenInfo\x12\x1a\n\x05token\x18\x01 \x01(\tB\x04\xe2\x41\x01\x02R\x05token\x12\x32\n\x05guard\x18\x02 \x01(\x0b\x32\x1c.stanza.hub.v1.GuardSelectorR\x05guard\"k\n\x15ValidateTokenResponse\x12\x14\n\x05valid\x18\x01 \x01(\x08R\x05valid\x12<\n\x0ctokens_valid\x18\x02 \x03(\x0b\x32\x19.stanza.hub.v1.TokenValidR\x0btokensValid\"8\n\nTokenValid\x12\x14\n\x05token\x18\x01 \x01(\tR\x05token\x12\x14\n\x05valid\x18\x02 \x01(\x08R\x05valid*\xac\x01\n\x06Reason\x12\x16\n\x12REASON_UNSPECIFIED\x10\x00\x12\x1b\n\x17REASON_SUFFICIENT_QUOTA\x10\x01\x12\x1d\n\x19REASON_INSUFFICIENT_QUOTA\x10\x02\x12$\n REASON_INSUFFICIENT_QUOTA_PARENT\x10\x03\x12\x10\n\x0cREASON_BURST\x10\x04\x12\x16\n\x12REASON_BEST_EFFORT\x10\x05\x32\x8c\t\n\x0cQuotaService\x12\x94\x02\n\x08GetToken\x12\x1e.stanza.hub.v1.GetTokenRequest\x1a\x1f.stanza.hub.v1.GetTokenResponse\"\xc6\x01\x92\x41\xa8\x01\x12\x10Get Access Token\x1a\x62Get a single token from Stanza Hub for access to given Guard (optional Feature name for priority).J0\n\x03\x32\x30\x30\x12)\n\x02OK\x12#\n!\x1a\x1f.stanza.hub.v1.GetTokenResponse\x82\xd3\xe4\x93\x02\x14\"\x0f/v1/quota/token:\x01*\x12\xb6\x02\n\rGetTokenLease\x12#.stanza.hub.v1.GetTokenLeaseRequest\x1a$.stanza.hub.v1.GetTokenLeaseResponse\"\xd9\x01\x92\x41\xbb\x01\x12\x17Get Access Token Leases\x1aiGet a set of token leases from Stanza Hub for access to given Guard (optional Feature name for priority).J5\n\x03\x32\x30\x30\x12.\n\x02OK\x12(\n&\x1a$.stanza.hub.v1.GetTokenLeaseResponse\x82\xd3\xe4\x93\x02\x14\"\x0f/v1/quota/lease:\x01*\x12\xa7\x02\n\x15SetTokenLeaseConsumed\x12+.stanza.hub.v1.SetTokenLeaseConsumedRequest\x1a,.stanza.hub.v1.SetTokenLeaseConsumedResponse\"\xb2\x01\x92\x41\x91\x01\x12\x15\x43onsume Access Tokens\x1a\x39Inform Stanza Hub that quota access tokens were consumed.J=\n\x03\x32\x30\x30\x12\x36\n\x02OK\x12\x30\n.\x1a,.stanza.hub.v1.SetTokenLeaseConsumedResponse\x82\xd3\xe4\x93\x02\x17\"\x12/v1/quota/consumed:\x01*\x12\x81\x02\n\rValidateToken\x12#.stanza.hub.v1.ValidateTokenRequest\x1a$.stanza.hub.v1.ValidateTokenResponse\"\xa4\x01\x92\x41~\x12\x16Validate Access Tokens\x1a-Validate quota access tokens with Stanza Hub.J5\n\x03\x32\x30\x30\x12.\n\x02OK\x12(\n&\x1a$.stanza.hub.v1.ValidateTokenResponse\x82\xd3\xe4\x93\x02\x1d\"\x18/v1/quota/validatetokens:\x01*B\x8a\x01\n\x11\x63om.stanza.hub.v1B\nQuotaProtoP\x01Z\x13stanza/hub/v1;hubpb\xa2\x02\x03SHX\xaa\x02\rStanza.Hub.V1\xca\x02\rStanza\\Hub\\V1\xe2\x02\x19Stanza\\Hub\\V1\\GPBMetadata\xea\x02\x0fStanza::Hub::V1b\x06proto3')

_globals = globals()
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'stanza.hub.v1.quota_pb2', _globals)
if _descriptor._USE_C_DESCRIPTORS == False:
  _globals['DESCRIPTOR']._options = None
  _globals['DESCRIPTOR']._serialized_options = b'\n\021com.stanza.hub.v1B\nQuotaProtoP\001Z\023stanza/hub/v1;hubpb\242\002\003SHX\252\002\rStanza.Hub.V1\312\002\rStanza\\Hub\\V1\342\002\031Stanza\\Hub\\V1\\GPBMetadata\352\002\017Stanza::Hub::V1'
  _globals['_GETTOKENREQUEST'].fields_by_name['selector']._options = None
  _globals['_GETTOKENREQUEST'].fields_by_name['selector']._serialized_options = b'\342A\001\002'
  _globals['_GETTOKENRESPONSE'].fields_by_name['granted']._options = None
  _globals['_GETTOKENRESPONSE'].fields_by_name['granted']._serialized_options = b'\342A\001\002'
  _globals['_GETTOKENLEASEREQUEST'].fields_by_name['selector']._options = None
  _globals['_GETTOKENLEASEREQUEST'].fields_by_name['selector']._serialized_options = b'\342A\001\002'
  _globals['_GETTOKENLEASERESPONSE'].fields_by_name['granted']._options = None
  _globals['_GETTOKENLEASERESPONSE'].fields_by_name['granted']._serialized_options = b'\342A\001\002'
  _globals['_SETTOKENLEASECONSUMEDREQUEST'].fields_by_name['tokens']._options = None
  _globals['_SETTOKENLEASECONSUMEDREQUEST'].fields_by_name['tokens']._serialized_options = b'\342A\001\002'
  _globals['_TOKENINFO'].fields_by_name['token']._options = None
  _globals['_TOKENINFO'].fields_by_name['token']._serialized_options = b'\342A\001\002'
  _globals['_QUOTASERVICE'].methods_by_name['GetToken']._options = None
  _globals['_QUOTASERVICE'].methods_by_name['GetToken']._serialized_options = b'\222A\250\001\022\020Get Access Token\032bGet a single token from Stanza Hub for access to given Guard (optional Feature name for priority).J0\n\003200\022)\n\002OK\022#\n!\032\037.stanza.hub.v1.GetTokenResponse\202\323\344\223\002\024\"\017/v1/quota/token:\001*'
  _globals['_QUOTASERVICE'].methods_by_name['GetTokenLease']._options = None
  _globals['_QUOTASERVICE'].methods_by_name['GetTokenLease']._serialized_options = b'\222A\273\001\022\027Get Access Token Leases\032iGet a set of token leases from Stanza Hub for access to given Guard (optional Feature name for priority).J5\n\003200\022.\n\002OK\022(\n&\032$.stanza.hub.v1.GetTokenLeaseResponse\202\323\344\223\002\024\"\017/v1/quota/lease:\001*'
  _globals['_QUOTASERVICE'].methods_by_name['SetTokenLeaseConsumed']._options = None
  _globals['_QUOTASERVICE'].methods_by_name['SetTokenLeaseConsumed']._serialized_options = b'\222A\221\001\022\025Consume Access Tokens\0329Inform Stanza Hub that quota access tokens were consumed.J=\n\003200\0226\n\002OK\0220\n.\032,.stanza.hub.v1.SetTokenLeaseConsumedResponse\202\323\344\223\002\027\"\022/v1/quota/consumed:\001*'
  _globals['_QUOTASERVICE'].methods_by_name['ValidateToken']._options = None
  _globals['_QUOTASERVICE'].methods_by_name['ValidateToken']._serialized_options = b'\222A~\022\026Validate Access Tokens\032-Validate quota access tokens with Stanza Hub.J5\n\003200\022.\n\002OK\022(\n&\032$.stanza.hub.v1.ValidateTokenResponse\202\323\344\223\002\035\"\030/v1/quota/validatetokens:\001*'
  _globals['_REASON']._serialized_start=1925
  _globals['_REASON']._serialized_end=2097
  _globals['_GETTOKENREQUEST']._serialized_start=217
  _globals['_GETTOKENREQUEST']._serialized_end=456
  _globals['_GETTOKENRESPONSE']._serialized_start=459
  _globals['_GETTOKENRESPONSE']._serialized_end=664
  _globals['_GETTOKENLEASEREQUEST']._serialized_start=667
  _globals['_GETTOKENLEASEREQUEST']._serialized_end=934
  _globals['_GETTOKENLEASERESPONSE']._serialized_start=936
  _globals['_GETTOKENLEASERESPONSE']._serialized_end=1042
  _globals['_TOKENLEASE']._serialized_start=1045
  _globals['_TOKENLEASE']._serialized_end=1386
  _globals['_SETTOKENLEASECONSUMEDREQUEST']._serialized_start=1389
  _globals['_SETTOKENLEASECONSUMEDREQUEST']._serialized_end=1555
  _globals['_SETTOKENLEASECONSUMEDRESPONSE']._serialized_start=1557
  _globals['_SETTOKENLEASECONSUMEDRESPONSE']._serialized_end=1588
  _globals['_VALIDATETOKENREQUEST']._serialized_start=1590
  _globals['_VALIDATETOKENREQUEST']._serialized_end=1662
  _globals['_TOKENINFO']._serialized_start=1664
  _globals['_TOKENINFO']._serialized_end=1755
  _globals['_VALIDATETOKENRESPONSE']._serialized_start=1757
  _globals['_VALIDATETOKENRESPONSE']._serialized_end=1864
  _globals['_TOKENVALID']._serialized_start=1866
  _globals['_TOKENVALID']._serialized_end=1922
  _globals['_QUOTASERVICE']._serialized_start=2100
  _globals['_QUOTASERVICE']._serialized_end=3264
# @@protoc_insertion_point(module_scope)
