syntax = "proto3";

package tidb_mgmt_service.v1;

import "global/nextgen/v1/rcu_quota.proto";
import "google/api/annotations.proto";
import "protoc-gen-openapiv2/options/annotations.proto";

/**
   All APIs here are for global control plane **internal** use only.
*/

option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
  swagger: "2.0"
  host: ""
  base_path: "/inner/mgmt/v1"
  info: {
    version: "v1"
    title: "Control Plane Internal API"
    description: "Control Plane Internal API."
  }
  schemes: HTTPS
};

service RcuQuotaService {
  rpc ListOrgRcuQuotas(global.nextgen.v1.ListOrgRcuQuotasRequest) returns (global.nextgen.v1.ListOrgRcuQuotasResponse) {
    option (google.api.http) = {get: "/{organization_id}/rcu_quotas"};
  }

  rpc UpdateRcuQuota(global.nextgen.v1.UpdateRcuQuotaRequest) returns (global.nextgen.v1.RcuQuota) {
    option (google.api.http) = {
      patch: "/rcu_quotas"
      body: "*"
    };
  }
}
