2.6.0 (latest) 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public class QuotaController.QuotaControllerClient : ClientBase<QuotaController.QuotaControllerClient>

Reference documentation and code samples for the Service Control v1 API class QuotaController.QuotaControllerClient.

Client for QuotaController

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt) \> [ClientBase](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt)[QuotaController](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1.QuotaController.md.txt)[QuotaControllerClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1.QuotaController.QuotaControllerClient.md.txt) \> QuotaController.QuotaControllerClient

## Inherited Members

[ClientBase\<QuotaController.QuotaControllerClient\>.WithHost(string)](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase-1.md.txt#Grpc_Core_ClientBase_1_WithHost_System_String_) [ClientBase.CallInvoker](https://docs.cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ClientBase.md.txt#Grpc_Core_ClientBase_CallInvoker) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.ServiceControl.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ServiceControl.V1/latest/Google.Cloud.ServiceControl.V1.md.txt)

## Assembly

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` | `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` | `ChannelBase` The channel to use to make remote calls. |

### QuotaControllerClient(ClientBaseConfiguration)

    protected QuotaControllerClient(ClientBase.ClientBaseConfiguration configuration)

Protected constructor to allow creation of configured clients.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` 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](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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `AllocateQuotaRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AllocateQuotaResponse` | The response received from the server. |

### AllocateQuota(AllocateQuotaRequest, Metadata, DateTime?, CancellationToken)

    public virtual AllocateQuotaResponse AllocateQuota(AllocateQuotaRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `AllocateQuotaRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `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](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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `AllocateQuotaRequest` The request to send to the server. |
| `options` | `CallOptions` The options for the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallAllocateQuotaResponse` | The call object. |

### AllocateQuotaAsync(AllocateQuotaRequest, Metadata, DateTime?, CancellationToken)

    public virtual AsyncUnaryCall<AllocateQuotaResponse> AllocateQuotaAsync(AllocateQuotaRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default)

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.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `AllocateQuotaRequest` The request to send to the server. |
| `headers` | `Metadata` The initial metadata to send with the call. This parameter is optional. |
| `deadline` | `System.DateTime` An optional deadline for the call. The call will be cancelled if deadline is hit. |
| `cancellationToken` | `CancellationToken` An optional token for canceling the call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncUnaryCallAllocateQuotaResponse` | The call object. |

### NewInstance(ClientBaseConfiguration)

    protected override QuotaController.QuotaControllerClient NewInstance(ClientBase.ClientBaseConfiguration configuration)

Creates a new instance of client from given `ClientBaseConfiguration`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `configuration` | `ClientBaseClientBaseConfiguration` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `QuotaControllerQuotaControllerClient` |   |

**Overrides** Grpc.Core.ClientBase\<Google.Cloud.ServiceControl.V1.QuotaController.QuotaControllerClient\>.NewInstance(Grpc.Core.ClientBase.ClientBaseConfiguration)