google-ads-api-client
Version:
A friendly and exhaustive client to the google-ads-api, code generated directly from google's published protobuf schema.
42 lines • 2.03 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.QuotaControllerClient = void 0;
const quota_controller_1 = require("./quota_controller");
const runtime_rpc_1 = require("@protobuf-ts/runtime-rpc");
/**
* [Google Quota Control API](/service-control/overview)
*
* Allows clients to allocate and release quota against a [managed
* service](https://cloud.google.com/service-management/reference/rpc/google.api/servicemanagement.v1#google.api.servicemanagement.v1.ManagedService).
*
* @generated from protobuf service google.api.servicecontrol.v1.QuotaController
*/
class QuotaControllerClient {
constructor(_transport) {
this._transport = _transport;
this.typeName = quota_controller_1.QuotaController.typeName;
this.methods = quota_controller_1.QuotaController.methods;
this.options = quota_controller_1.QuotaController.options;
}
/**
* Attempts to allocate quota for the specified consumer. It should be called
* before the operation is executed.
*
* This method requires the `servicemanagement.services.quota`
* permission on the specified service. For more information, see
* [Cloud IAM](https://cloud.google.com/iam).
*
* **NOTE:** The client **must** fail-open on server errors `INTERNAL`,
* `UNKNOWN`, `DEADLINE_EXCEEDED`, and `UNAVAILABLE`. To ensure system
* reliability, the server may inject these errors to prohibit any hard
* dependency on the quota functionality.
*
* @generated from protobuf rpc: AllocateQuota(google.api.servicecontrol.v1.AllocateQuotaRequest) returns (google.api.servicecontrol.v1.AllocateQuotaResponse);
*/
allocateQuota(input, options) {
const method = this.methods[0], opt = this._transport.mergeOptions(options);
return (0, runtime_rpc_1.stackIntercept)("unary", this._transport, method, opt, input);
}
}
exports.QuotaControllerClient = QuotaControllerClient;
//# sourceMappingURL=quota_controller.client.js.map