# frozen_string_literal: true
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/api/servicecontrol/v1/quota_controller.proto

require 'google/protobuf'

require 'google/api/annotations_pb'
require 'google/api/servicecontrol/v1/metric_value_pb'
require 'google/rpc/status_pb'
require 'google/api/client_pb'


descriptor_data = "\n3google/api/servicecontrol/v1/quota_controller.proto\x12\x1cgoogle.api.servicecontrol.v1\x1a\x1cgoogle/api/annotations.proto\x1a/google/api/servicecontrol/v1/metric_value.proto\x1a\x17google/rpc/status.proto\x1a\x17google/api/client.proto\"\x91\x01\n\x14\x41llocateQuotaRequest\x12\x14\n\x0cservice_name\x18\x01 \x01(\t\x12H\n\x12\x61llocate_operation\x18\x02 \x01(\x0b\x32,.google.api.servicecontrol.v1.QuotaOperation\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\xc6\x03\n\x0eQuotaOperation\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x13\n\x0bmethod_name\x18\x02 \x01(\t\x12\x13\n\x0b\x63onsumer_id\x18\x03 \x01(\t\x12H\n\x06labels\x18\x04 \x03(\x0b\x32\x38.google.api.servicecontrol.v1.QuotaOperation.LabelsEntry\x12\x43\n\rquota_metrics\x18\x05 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12J\n\nquota_mode\x18\x06 \x01(\x0e\x32\x36.google.api.servicecontrol.v1.QuotaOperation.QuotaMode\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"j\n\tQuotaMode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\n\n\x06NORMAL\x10\x01\x12\x0f\n\x0b\x42\x45ST_EFFORT\x10\x02\x12\x0e\n\nCHECK_ONLY\x10\x03\x12\x0e\n\nQUERY_ONLY\x10\x04\x12\x0f\n\x0b\x41\x44JUST_ONLY\x10\x05\"\xd0\x01\n\x15\x41llocateQuotaResponse\x12\x14\n\x0coperation_id\x18\x01 \x01(\t\x12\x41\n\x0f\x61llocate_errors\x18\x02 \x03(\x0b\x32(.google.api.servicecontrol.v1.QuotaError\x12\x43\n\rquota_metrics\x18\x03 \x03(\x0b\x32,.google.api.servicecontrol.v1.MetricValueSet\x12\x19\n\x11service_config_id\x18\x04 \x01(\t\"\x9c\x02\n\nQuotaError\x12;\n\x04\x63ode\x18\x01 \x01(\x0e\x32-.google.api.servicecontrol.v1.QuotaError.Code\x12\x0f\n\x07subject\x18\x02 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x03 \x01(\t\x12\"\n\x06status\x18\x04 \x01(\x0b\x32\x12.google.rpc.Status\"\x86\x01\n\x04\x43ode\x12\x0f\n\x0bUNSPECIFIED\x10\x00\x12\x16\n\x12RESOURCE_EXHAUSTED\x10\x08\x12\x16\n\x12\x42ILLING_NOT_ACTIVE\x10k\x12\x13\n\x0fPROJECT_DELETED\x10l\x12\x13\n\x0f\x41PI_KEY_INVALID\x10i\x12\x13\n\x0f\x41PI_KEY_EXPIRED\x10p2\xc5\x02\n\x0fQuotaController\x12\xae\x01\n\rAllocateQuota\x12\x32.google.api.servicecontrol.v1.AllocateQuotaRequest\x1a\x33.google.api.servicecontrol.v1.AllocateQuotaResponse\"4\x82\xd3\xe4\x93\x02.\")/v1/services/{service_name}:allocateQuota:\x01*\x1a\x80\x01\xca\x41\x1dservicecontrol.googleapis.com\xd2\x41]https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/servicecontrolB\xef\x01\n com.google.api.servicecontrol.v1B\x14QuotaControllerProtoP\x01ZJcloud.google.com/go/servicecontrol/apiv1/servicecontrolpb;servicecontrolpb\xf8\x01\x01\xaa\x02\x1eGoogle.Cloud.ServiceControl.V1\xca\x02\x1eGoogle\\Cloud\\ServiceControl\\V1\xea\x02!Google::Cloud::ServiceControl::V1b\x06proto3"

pool = Google::Protobuf::DescriptorPool.generated_pool

begin
  pool.add_serialized_file(descriptor_data)
rescue TypeError
  # Compatibility code: will be removed in the next major version.
  require 'google/protobuf/descriptor_pb'
  parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
  parsed.clear_dependency
  serialized = parsed.class.encode(parsed)
  file = pool.add_serialized_file(serialized)
  warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
  imports = [
    ["google.api.servicecontrol.v1.MetricValueSet", "google/api/servicecontrol/v1/metric_value.proto"],
    ["google.rpc.Status", "google/rpc/status.proto"],
  ]
  imports.each do |type_name, expected_filename|
    import_file = pool.lookup(type_name).file_descriptor
    if import_file.name != expected_filename
      warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
    end
  end
  warn "Each proto file must use a consistent fully-qualified name."
  warn "This will become an error in the next major version."
end

module Google
  module Cloud
    module ServiceControl
      module V1
        AllocateQuotaRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaRequest").msgclass
        QuotaOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation").msgclass
        QuotaOperation::QuotaMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaOperation.QuotaMode").enummodule
        AllocateQuotaResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.AllocateQuotaResponse").msgclass
        QuotaError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError").msgclass
        QuotaError::Code = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.api.servicecontrol.v1.QuotaError.Code").enummodule
      end
    end
  end
end
