# BigQuery Reservation v1 API - Class ReservationService.ReservationServiceBase (2.12.0)

2.12.0 (latest) 2.11.0 2.10.0 2.9.0 2.8.0 2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.0 2.0.0 1.6.0 1.5.0 1.4.0 1.3.0 1.2.0

    [BindServiceMethod(typeof(ReservationService), "BindService")]
    public abstract class ReservationService.ReservationServiceBase

Reference documentation and code samples for the BigQuery Reservation v1 API class ReservationService.ReservationServiceBase.

Base class for server-side implementations of ReservationService

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ReservationService.ReservationServiceBase

## Inherited Members

[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.BigQuery.Reservation.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1)

## Assembly

Google.Cloud.BigQuery.Reservation.V1.dll

## Methods

### CreateAssignment(CreateAssignmentRequest, ServerCallContext)

    public virtual Task<Assignment> CreateAssignment(CreateAssignmentRequest request, ServerCallContext context)

Creates an assignment object which allows the given project to submit jobs
of a certain type using slots from the specified reservation.

Currently a
resource (project, folder, organization) can only have one assignment per
each (job_type, location) combination, and that reservation will be used
for all jobs of the matching type.

Different assignments can be created on different levels of the
projects, folders or organization hierarchy. During query execution,
the assignment is looked up at the project, folder and organization levels
in that order. The first assignment found is applied to the query.

When creating assignments, it does not matter if other assignments exist at
higher levels.

Example:

- The organization `organizationA` contains two projects, `project1` and `project2`.
- Assignments for all three entities (`organizationA`, `project1`, and `project2`) could all be created and mapped to the same or different reservations.

"None" assignments represent an absence of the assignment. Projects
assigned to None use on-demand pricing. To create a "None" assignment, use
"none" as a reservation_id in the parent. Example parent:
`projects/myproject/locations/US/reservations/none`.

Returns `google.rpc.Code.PERMISSION_DENIED` if user does not have
'bigquery.admin' permissions on the project using the reservation
and the project that owns this reservation.

Returns `google.rpc.Code.INVALID_ARGUMENT` when location of the assignment
does not match location of the reservation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CreateAssignmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Assignment` | The response to send back to the client (wrapped by a task). |

### CreateCapacityCommitment(CreateCapacityCommitmentRequest, ServerCallContext)

    public virtual Task<CapacityCommitment> CreateCapacityCommitment(CreateCapacityCommitmentRequest request, ServerCallContext context)

Creates a new capacity commitment resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CreateCapacityCommitmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment` | The response to send back to the client (wrapped by a task). |

### CreateReservation(CreateReservationRequest, ServerCallContext)

    public virtual Task<Reservation> CreateReservation(CreateReservationRequest request, ServerCallContext context)

Creates a new reservation resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CreateReservationRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Reservation` | The response to send back to the client (wrapped by a task). |

### CreateReservationGroup(CreateReservationGroupRequest, ServerCallContext)

    public virtual Task<ReservationGroup> CreateReservationGroup(CreateReservationGroupRequest request, ServerCallContext context)

Creates a new reservation group.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CreateReservationGroupRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ReservationGroup` | The response to send back to the client (wrapped by a task). |

### DeleteAssignment(DeleteAssignmentRequest, ServerCallContext)

    public virtual Task<Empty> DeleteAssignment(DeleteAssignmentRequest request, ServerCallContext context)

Deletes a assignment. No expansion will happen.

Example:

- Organization `organizationA` contains two projects, `project1` and `project2`.
- Reservation `res1` exists and was created previously.
- CreateAssignment was used previously to define the following associations between entities and reservations: `<organizationA, res1>` and `<project1, res1>`

In this example, deletion of the `<organizationA, res1>` assignment won't
affect the other assignment `<project1, res1>`. After said deletion,
queries from `project1` will still use `res1` while queries from
`project2` will switch to use on-demand mode.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.DeleteAssignmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response to send back to the client (wrapped by a task). |

### DeleteCapacityCommitment(DeleteCapacityCommitmentRequest, ServerCallContext)

    public virtual Task<Empty> DeleteCapacityCommitment(DeleteCapacityCommitmentRequest request, ServerCallContext context)

Deletes a capacity commitment. Attempting to delete capacity commitment
before its commitment_end_time will fail with the error code
`google.rpc.Code.FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.DeleteCapacityCommitmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response to send back to the client (wrapped by a task). |

### DeleteReservation(DeleteReservationRequest, ServerCallContext)

    public virtual Task<Empty> DeleteReservation(DeleteReservationRequest request, ServerCallContext context)

Deletes a reservation.
Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has
assignments.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.DeleteReservationRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response to send back to the client (wrapped by a task). |

### DeleteReservationGroup(DeleteReservationGroupRequest, ServerCallContext)

    public virtual Task<Empty> DeleteReservationGroup(DeleteReservationGroupRequest request, ServerCallContext context)

Deletes a reservation.
Returns `google.rpc.Code.FAILED_PRECONDITION` when reservation has
assignments.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.DeleteReservationGroupRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Empty.html` | The response to send back to the client (wrapped by a task). |

### FailoverReservation(FailoverReservationRequest, ServerCallContext)

    public virtual Task<Reservation> FailoverReservation(FailoverReservationRequest request, ServerCallContext context)

Fail over a reservation to the secondary location. The operation should be
done in the current secondary location, which will be promoted to the
new primary location for the reservation.
Attempting to failover a reservation in the current primary location will
fail with the error code `google.rpc.Code.FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.FailoverReservationRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Reservation` | The response to send back to the client (wrapped by a task). |

### GetBiReservation(GetBiReservationRequest, ServerCallContext)

    public virtual Task<BiReservation> GetBiReservation(GetBiReservationRequest request, ServerCallContext context)

Retrieves a BI reservation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.GetBiReservationRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.BiReservation` | The response to send back to the client (wrapped by a task). |

### GetCapacityCommitment(GetCapacityCommitmentRequest, ServerCallContext)

    public virtual Task<CapacityCommitment> GetCapacityCommitment(GetCapacityCommitmentRequest request, ServerCallContext context)

Returns information about the capacity commitment.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.GetCapacityCommitmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment` | The response to send back to the client (wrapped by a task). |

### GetIamPolicy(GetIamPolicyRequest, ServerCallContext)

    public virtual Task<Policy> GetIamPolicy(GetIamPolicyRequest request, ServerCallContext context)

Gets the access control policy for a resource.
May return:

- A`NOT_FOUND` error if the resource doesn't exist or you don't have the permission to view it.
- An empty policy if the resource exists but doesn't have a set policy.

Supported resources are:

- Reservations
- ReservationAssignments

To call this method, you must have the following Google IAM permissions:

- `bigqueryreservation.reservations.getIamPolicy` to get policies on reservations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.GetIamPolicyRequest.html` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The response to send back to the client (wrapped by a task). |

### GetReservation(GetReservationRequest, ServerCallContext)

    public virtual Task<Reservation> GetReservation(GetReservationRequest request, ServerCallContext context)

Returns information about the reservation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.GetReservationRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Reservation` | The response to send back to the client (wrapped by a task). |

### GetReservationGroup(GetReservationGroupRequest, ServerCallContext)

    public virtual Task<ReservationGroup> GetReservationGroup(GetReservationGroupRequest request, ServerCallContext context)

Returns information about the reservation group.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.GetReservationGroupRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ReservationGroup` | The response to send back to the client (wrapped by a task). |

### ListAssignments(ListAssignmentsRequest, ServerCallContext)

    public virtual Task<ListAssignmentsResponse> ListAssignments(ListAssignmentsRequest request, ServerCallContext context)

Lists assignments.

Only explicitly created assignments will be returned.

Example:

- Organization `organizationA` contains two projects, `project1` and `project2`.
- Reservation `res1` exists and was created previously.
- CreateAssignment was used previously to define the following associations between entities and reservations: `<organizationA, res1>` and `<project1, res1>`

In this example, ListAssignments will just return the above two assignments
for reservation `res1`, and no expansion/merge will happen.

The wildcard "-" can be used for
reservations in the request. In that case all assignments belongs to the
specified project and location will be listed.

**Note** "-" cannot be used for projects nor locations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListAssignmentsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListAssignmentsResponse` | The response to send back to the client (wrapped by a task). |

### ListCapacityCommitments(ListCapacityCommitmentsRequest, ServerCallContext)

    public virtual Task<ListCapacityCommitmentsResponse> ListCapacityCommitments(ListCapacityCommitmentsRequest request, ServerCallContext context)

Lists all the capacity commitments for the admin project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListCapacityCommitmentsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListCapacityCommitmentsResponse` | The response to send back to the client (wrapped by a task). |

### ListReservationGroups(ListReservationGroupsRequest, ServerCallContext)

    public virtual Task<ListReservationGroupsResponse> ListReservationGroups(ListReservationGroupsRequest request, ServerCallContext context)

Lists all the reservation groups for the project in the specified location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListReservationGroupsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListReservationGroupsResponse` | The response to send back to the client (wrapped by a task). |

### ListReservations(ListReservationsRequest, ServerCallContext)

    public virtual Task<ListReservationsResponse> ListReservations(ListReservationsRequest request, ServerCallContext context)

Lists all the reservations for the project in the specified location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListReservationsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.ListReservationsResponse` | The response to send back to the client (wrapped by a task). |

### MergeCapacityCommitments(MergeCapacityCommitmentsRequest, ServerCallContext)

    public virtual Task<CapacityCommitment> MergeCapacityCommitments(MergeCapacityCommitmentsRequest request, ServerCallContext context)

Merges capacity commitments of the same plan into a single commitment.

The resulting capacity commitment has the greater commitment_end_time
out of the to-be-merged capacity commitments.

Attempting to merge capacity commitments of different plan will fail
with the error code `google.rpc.Code.FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.MergeCapacityCommitmentsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment` | The response to send back to the client (wrapped by a task). |

### MoveAssignment(MoveAssignmentRequest, ServerCallContext)

    public virtual Task<Assignment> MoveAssignment(MoveAssignmentRequest request, ServerCallContext context)

Moves an assignment under a new reservation.

This differs from removing an existing assignment and recreating a new one
by providing a transactional change that ensures an assignee always has an
associated reservation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.MoveAssignmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Assignment` | The response to send back to the client (wrapped by a task). |

### SearchAllAssignments(SearchAllAssignmentsRequest, ServerCallContext)

    public virtual Task<SearchAllAssignmentsResponse> SearchAllAssignments(SearchAllAssignmentsRequest request, ServerCallContext context)

Looks up assignments for a specified resource for a particular region.
If the request is about a project:

1. Assignments created on the project will be returned if they exist.
2. Otherwise assignments created on the closest ancestor will be returned.
3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the
organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior
differences:

1. permission on the assignee will be verified in this API.
2. Hierarchy lookup (project-\>folder-\>organization) happens in this API.
3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.SearchAllAssignmentsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.SearchAllAssignmentsResponse` | The response to send back to the client (wrapped by a task). |

### SearchAssignments(SearchAssignmentsRequest, ServerCallContext)

    [Obsolete]
    public virtual Task<SearchAssignmentsResponse> SearchAssignments(SearchAssignmentsRequest request, ServerCallContext context)

Deprecated: Looks up assignments for a specified resource for a particular
region. If the request is about a project:

1. Assignments created on the project will be returned if they exist.
2. Otherwise assignments created on the closest ancestor will be returned.
3. Assignments for different JobTypes will all be returned.

The same logic applies if the request is about a folder.

If the request is about an organization, then assignments created on the
organization will be returned (organization doesn't have ancestors).

Comparing to ListAssignments, there are some behavior
differences:

1. permission on the assignee will be verified in this API.
2. Hierarchy lookup (project-\>folder-\>organization) happens in this API.
3. Parent here is `projects/*/locations/*`, instead of `projects/*/locations/*reservations/*`.

**Note** "-" cannot be used for projects
nor locations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.SearchAssignmentsRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.SearchAssignmentsResponse` | The response to send back to the client (wrapped by a task). |

### SetIamPolicy(SetIamPolicyRequest, ServerCallContext)

    public virtual Task<Policy> SetIamPolicy(SetIamPolicyRequest request, ServerCallContext context)

Sets an access control policy for a resource. Replaces any existing
policy.

Supported resources are:

- Reservations

To call this method, you must have the following Google IAM permissions:

- `bigqueryreservation.reservations.setIamPolicy` to set policies on reservations.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.SetIamPolicyRequest.html` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.Policy.html` | The response to send back to the client (wrapped by a task). |

### SplitCapacityCommitment(SplitCapacityCommitmentRequest, ServerCallContext)

    public virtual Task<SplitCapacityCommitmentResponse> SplitCapacityCommitment(SplitCapacityCommitmentRequest request, ServerCallContext context)

Splits capacity commitment to two commitments of the same plan and
`commitment_end_time`.

A common use case is to enable downgrading commitments.

For example, in order to downgrade from 10000 slots to 8000, you might
split a 10000 capacity commitment into commitments of 2000 and 8000. Then,
you delete the first one after the commitment end time passes.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.SplitCapacityCommitmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.SplitCapacityCommitmentResponse` | The response to send back to the client (wrapped by a task). |

### TestIamPermissions(TestIamPermissionsRequest, ServerCallContext)

    public virtual Task<TestIamPermissionsResponse> TestIamPermissions(TestIamPermissionsRequest request, ServerCallContext context)

Gets your permissions on a resource. Returns an empty set of permissions if
the resource doesn't exist.

Supported resources are:

- Reservations

No Google IAM permissions are required to call this method.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsRequest.html` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.TestIamPermissionsResponse.html` | The response to send back to the client (wrapped by a task). |

### UpdateAssignment(UpdateAssignmentRequest, ServerCallContext)

    public virtual Task<Assignment> UpdateAssignment(UpdateAssignmentRequest request, ServerCallContext context)

Updates an existing assignment.

Only the `priority` field can be updated.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.UpdateAssignmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Assignment` | The response to send back to the client (wrapped by a task). |

### UpdateBiReservation(UpdateBiReservationRequest, ServerCallContext)

    public virtual Task<BiReservation> UpdateBiReservation(UpdateBiReservationRequest request, ServerCallContext context)

Updates a BI reservation.

Only fields specified in the `field_mask` are updated.

A singleton BI reservation always exists with default size 0.
In order to reserve BI capacity it needs to be updated to an amount
greater than 0. In order to release BI capacity reservation size
must be set to 0.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.UpdateBiReservationRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.BiReservation` | The response to send back to the client (wrapped by a task). |

### UpdateCapacityCommitment(UpdateCapacityCommitmentRequest, ServerCallContext)

    public virtual Task<CapacityCommitment> UpdateCapacityCommitment(UpdateCapacityCommitmentRequest request, ServerCallContext context)

Updates an existing capacity commitment.

Only `plan` and `renewal_plan` fields can be updated.

Plan can only be changed to a plan of a longer commitment period.
Attempting to change to a plan with shorter commitment period will fail
with the error code `google.rpc.Code.FAILED_PRECONDITION`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.UpdateCapacityCommitmentRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.CapacityCommitment` | The response to send back to the client (wrapped by a task). |

### UpdateReservation(UpdateReservationRequest, ServerCallContext)

    public virtual Task<Reservation> UpdateReservation(UpdateReservationRequest request, ServerCallContext context)

Updates an existing reservation resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.UpdateReservationRequest` The request received from the client. |
| `context` | `https://cloud.google.com/dotnet/docs/reference/Grpc.Core/latest/Grpc.Core.ServerCallContext.html` The context of the server-side call handler being invoked. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BigQuery.Reservation.V1/latest/Google.Cloud.BigQuery.Reservation.V1.Reservation` | The response to send back to the client (wrapped by a task). |