public class QuotaControllerClient : ClientBase<QuotaController.QuotaControllerClient>
Client for QuotaController
Inheritance
System.Object > Grpc.Core.ClientBase > Grpc.Core.ClientBase<QuotaController.QuotaControllerClient> > QuotaController.QuotaControllerClientNamespace
Google.Cloud.ServiceControl.V1Assembly
Google.Cloud.ServiceControl.V1.dll
Constructors
QuotaControllerClient()
protected QuotaControllerClient()
Protected parameterless constructor to allow creation of test doubles.
QuotaControllerClient(CallInvoker)
public QuotaControllerClient(CallInvoker callInvoker)
Creates a new client for QuotaController that uses a custom CallInvoker
.
Parameter | |
---|---|
Name | Description |
callInvoker | Grpc.Core.CallInvoker The callInvoker to use to make remote calls. |
QuotaControllerClient(ChannelBase)
public QuotaControllerClient(ChannelBase channel)
Creates a new client for QuotaController
Parameter | |
---|---|
Name | Description |
channel | Grpc.Core.ChannelBase The channel to use to make remote calls. |
QuotaControllerClient(ClientBase.ClientBaseConfiguration)
protected QuotaControllerClient(ClientBase.ClientBaseConfiguration configuration)
Protected constructor to allow creation of configured clients.
Parameter | |
---|---|
Name | Description |
configuration | Grpc.Core.ClientBase.ClientBaseConfiguration The client configuration. |
Methods
AllocateQuota(AllocateQuotaRequest, CallOptions)
public virtual AllocateQuotaResponse AllocateQuota(AllocateQuotaRequest request, CallOptions 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.
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.
Parameters | |
---|---|
Name | Description |
request | AllocateQuotaRequest The request to send to the server. |
options | Grpc.Core.CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
AllocateQuotaResponse | The response received from the server. |
AllocateQuota(AllocateQuotaRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual AllocateQuotaResponse AllocateQuota(AllocateQuotaRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
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.
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.
Parameters | |
---|---|
Name | Description |
request | AllocateQuotaRequest The request to send to the server. |
headers | Grpc.Core.Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | System.Nullable<System.DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | System.Threading.CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
AllocateQuotaResponse | The response received from the server. |
AllocateQuotaAsync(AllocateQuotaRequest, CallOptions)
public virtual AsyncUnaryCall<AllocateQuotaResponse> AllocateQuotaAsync(AllocateQuotaRequest request, CallOptions 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.
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.
Parameters | |
---|---|
Name | Description |
request | AllocateQuotaRequest The request to send to the server. |
options | Grpc.Core.CallOptions The options for the call. |
Returns | |
---|---|
Type | Description |
Grpc.Core.AsyncUnaryCall<AllocateQuotaResponse> | The call object. |
AllocateQuotaAsync(AllocateQuotaRequest, Metadata, Nullable<DateTime>, CancellationToken)
public virtual AsyncUnaryCall<AllocateQuotaResponse> AllocateQuotaAsync(AllocateQuotaRequest request, Metadata headers = null, DateTime? deadline = default(DateTime? ), CancellationToken cancellationToken = default(CancellationToken))
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.
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.
Parameters | |
---|---|
Name | Description |
request | AllocateQuotaRequest The request to send to the server. |
headers | Grpc.Core.Metadata The initial metadata to send with the call. This parameter is optional. |
deadline | System.Nullable<System.DateTime> An optional deadline for the call. The call will be cancelled if deadline is hit. |
cancellationToken | System.Threading.CancellationToken An optional token for canceling the call. |
Returns | |
---|---|
Type | Description |
Grpc.Core.AsyncUnaryCall<AllocateQuotaResponse> | The call object. |
NewInstance(ClientBase.ClientBaseConfiguration)
protected override QuotaController.QuotaControllerClient NewInstance(ClientBase.ClientBaseConfiguration configuration)
Creates a new instance of client from given ClientBaseConfiguration
.
Parameter | |
---|---|
Name | Description |
configuration | Grpc.Core.ClientBase.ClientBaseConfiguration |
Returns | |
---|---|
Type | Description |
QuotaController.QuotaControllerClient |