# Compute Engine v1 API - Class ProjectsClient (3.28.0)

3.28.0 (latest) 3.27.0 3.26.0 3.25.0 3.24.0 3.23.0 3.22.0 3.21.0 3.20.0 3.19.0 3.18.0 3.17.0 3.16.0 3.15.0 3.14.0 3.13.0 3.12.0 3.11.0 3.10.0 3.9.0 3.8.0 3.7.0 3.6.0 3.5.0 3.4.0 3.3.0 3.2.0 3.1.0 3.0.0 2.17.0 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 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.4.0 1.3.0 1.2.0 1.1.0 1.0.0

    public abstract class ProjectsClient

Reference documentation and code samples for the Compute Engine v1 API class ProjectsClient.

Projects client wrapper, for convenient use.

## Inheritance

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

## 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)

## Derived Types

[ProjectsClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClientImpl)

## Namespace

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

## Assembly

Google.Cloud.Compute.V1.dll

## Remarks

The Projects API.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the Projects service, which is a host of "compute.googleapis.com" and a port of
443.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default Projects scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1https://learn.microsoft.com/dotnet/api/system.string` |   |

**Remarks** The default Projects scopes are:

- <https://www.googleapis.com/auth/compute>
- <https://www.googleapis.com/auth/cloud-platform>

### DisableXpnHostOperationsClient

    public virtual OperationsClient DisableXpnHostOperationsClient { get; }

The long-running operations client for `DisableXpnHost`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### DisableXpnResourceOperationsClient

    public virtual OperationsClient DisableXpnResourceOperationsClient { get; }

The long-running operations client for `DisableXpnResource`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### EnableXpnHostOperationsClient

    public virtual OperationsClient EnableXpnHostOperationsClient { get; }

The long-running operations client for `EnableXpnHost`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### EnableXpnResourceOperationsClient

    public virtual OperationsClient EnableXpnResourceOperationsClient { get; }

The long-running operations client for `EnableXpnResource`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### GrpcClient

    public virtual Projects.ProjectsClient GrpcClient { get; }

The underlying gRPC Projects client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Projectshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Projects.ProjectsClient` |   |

### MoveDiskOperationsClient

    public virtual OperationsClient MoveDiskOperationsClient { get; }

The long-running operations client for `MoveDisk`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### MoveInstanceOperationsClient

    public virtual OperationsClient MoveInstanceOperationsClient { get; }

The long-running operations client for `MoveInstance`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata.html` |   |

### SetCloudArmorTierOperationsClient

    public virtual OperationsClient SetCloudArmorTierOperationsClient { get; }

The long-running operations client for `SetCloudArmorTier`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### SetCommonInstanceMetadataOperationsClient

    public virtual OperationsClient SetCommonInstanceMetadataOperationsClient { get; }

The long-running operations client for `SetCommonInstanceMetadata`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### SetDefaultNetworkTierOperationsClient

    public virtual OperationsClient SetDefaultNetworkTierOperationsClient { get; }

The long-running operations client for `SetDefaultNetworkTier`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

### SetUsageExportBucketOperationsClient

    public virtual OperationsClient SetUsageExportBucketOperationsClient { get; }

The long-running operations client for `SetUsageExportBucket`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.OperationsClient.html` |   |

## Methods

### Create()

    public static ProjectsClient Create()

Synchronously creates a [ProjectsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [ProjectsClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClientBuilder).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient` | The created [ProjectsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient). |

### CreateAsync(CancellationToken)

    public static Task<ProjectsClient> CreateAsync(CancellationToken cancellationToken = default)

Asynchronously creates a [ProjectsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient) using the default credentials, endpoint and settings.
To specify custom credentials or other settings, use [ProjectsClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClientBuilder).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient` | The task representing the created [ProjectsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient). |

### DisableXpnHost(DisableXpnHostProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> DisableXpnHost(DisableXpnHostProjectRequest request, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DisableXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    DisableXpnHostProjectRequest request = new DisableXpnHostProjectRequest
    {
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.DisableXpnHost(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnHost(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnHost(string, CallSettings)

    public virtual Operation<Operation, Operation> DisableXpnHost(string project, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.DisableXpnHost(project);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnHost(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnHostAsync(DisableXpnHostProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(DisableXpnHostProjectRequest request, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DisableXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    DisableXpnHostProjectRequest request = new DisableXpnHostProjectRequest
    {
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnHostAsync(DisableXpnHostProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(DisableXpnHostProjectRequest request, CancellationToken cancellationToken)

Disable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DisableXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    DisableXpnHostProjectRequest request = new DisableXpnHostProjectRequest
    {
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnHostAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(string project, CallSettings callSettings = null)

Disable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(project);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnHostAsync(string, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> DisableXpnHostAsync(string project, CancellationToken cancellationToken)

Disable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnHostAsync(project);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnResource(DisableXpnResourceProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> DisableXpnResource(DisableXpnResourceProjectRequest request, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with
this host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DisableXpnResourceProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    DisableXpnResourceProjectRequest request = new DisableXpnResourceProjectRequest
    {
        RequestId = "",
        ProjectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.DisableXpnResource(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnResource(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnResource(string, ProjectsDisableXpnResourceRequest, CallSettings)

    public virtual Operation<Operation, Operation> DisableXpnResource(string project, ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with
this host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsDisableXpnResourceRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsDisableXpnResourceRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.DisableXpnResource(project, projectsDisableXpnResourceRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceDisableXpnResource(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnResourceAsync(DisableXpnResourceProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(DisableXpnResourceProjectRequest request, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with
this host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DisableXpnResourceProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    DisableXpnResourceProjectRequest request = new DisableXpnResourceProjectRequest
    {
        RequestId = "",
        ProjectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnResourceAsync(DisableXpnResourceProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(DisableXpnResourceProjectRequest request, CancellationToken cancellationToken)

Disable a service resource (also known as service project) associated with
this host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DisableXpnResourceProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    DisableXpnResourceProjectRequest request = new DisableXpnResourceProjectRequest
    {
        RequestId = "",
        ProjectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnResourceAsync(string, ProjectsDisableXpnResourceRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(string project, ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource, CallSettings callSettings = null)

Disable a service resource (also known as service project) associated with
this host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsDisableXpnResourceRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsDisableXpnResourceRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(project, projectsDisableXpnResourceRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### DisableXpnResourceAsync(string, ProjectsDisableXpnResourceRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> DisableXpnResourceAsync(string project, ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource, CancellationToken cancellationToken)

Disable a service resource (also known as service project) associated with
this host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsDisableXpnResourceRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsDisableXpnResourceRequest` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsDisableXpnResourceRequest projectsDisableXpnResourceRequestResource = new ProjectsDisableXpnResourceRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.DisableXpnResourceAsync(project, projectsDisableXpnResourceRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceDisableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnHost(EnableXpnHostProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> EnableXpnHost(EnableXpnHostProjectRequest request, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.EnableXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    EnableXpnHostProjectRequest request = new EnableXpnHostProjectRequest
    {
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.EnableXpnHost(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnHost(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnHost(string, CallSettings)

    public virtual Operation<Operation, Operation> EnableXpnHost(string project, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.EnableXpnHost(project);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnHost(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnHostAsync(EnableXpnHostProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(EnableXpnHostProjectRequest request, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.EnableXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    EnableXpnHostProjectRequest request = new EnableXpnHostProjectRequest
    {
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnHostAsync(EnableXpnHostProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(EnableXpnHostProjectRequest request, CancellationToken cancellationToken)

Enable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.EnableXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    EnableXpnHostProjectRequest request = new EnableXpnHostProjectRequest
    {
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnHostAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(string project, CallSettings callSettings = null)

Enable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(project);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnHostAsync(string, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> EnableXpnHostAsync(string project, CancellationToken cancellationToken)

Enable this project as a shared VPC host project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnHostAsync(project);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnHostAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnResource(EnableXpnResourceProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> EnableXpnResource(EnableXpnResourceProjectRequest request, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that
subnets in the host project can be used by instances in the service
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.EnableXpnResourceProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    EnableXpnResourceProjectRequest request = new EnableXpnResourceProjectRequest
    {
        RequestId = "",
        Project = "",
        ProjectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.EnableXpnResource(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnResource(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnResource(string, ProjectsEnableXpnResourceRequest, CallSettings)

    public virtual Operation<Operation, Operation> EnableXpnResource(string project, ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that
subnets in the host project can be used by instances in the service
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsEnableXpnResourceRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsEnableXpnResourceRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.EnableXpnResource(project, projectsEnableXpnResourceRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceEnableXpnResource(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnResourceAsync(EnableXpnResourceProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(EnableXpnResourceProjectRequest request, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that
subnets in the host project can be used by instances in the service
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.EnableXpnResourceProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    EnableXpnResourceProjectRequest request = new EnableXpnResourceProjectRequest
    {
        RequestId = "",
        Project = "",
        ProjectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnResourceAsync(EnableXpnResourceProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(EnableXpnResourceProjectRequest request, CancellationToken cancellationToken)

Enable service resource (a.k.a service project) for a host project, so that
subnets in the host project can be used by instances in the service
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.EnableXpnResourceProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    EnableXpnResourceProjectRequest request = new EnableXpnResourceProjectRequest
    {
        RequestId = "",
        Project = "",
        ProjectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnResourceAsync(string, ProjectsEnableXpnResourceRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(string project, ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource, CallSettings callSettings = null)

Enable service resource (a.k.a service project) for a host project, so that
subnets in the host project can be used by instances in the service
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsEnableXpnResourceRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsEnableXpnResourceRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(project, projectsEnableXpnResourceRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### EnableXpnResourceAsync(string, ProjectsEnableXpnResourceRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> EnableXpnResourceAsync(string project, ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource, CancellationToken cancellationToken)

Enable service resource (a.k.a service project) for a host project, so that
subnets in the host project can be used by instances in the service
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsEnableXpnResourceRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsEnableXpnResourceRequest` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsEnableXpnResourceRequest projectsEnableXpnResourceRequestResource = new ProjectsEnableXpnResourceRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.EnableXpnResourceAsync(project, projectsEnableXpnResourceRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceEnableXpnResourceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### Get(GetProjectRequest, CallSettings)

    public virtual Project Get(GetProjectRequest request, CallSettings callSettings = null)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded
information from the response by using a field mask. This practice is
especially recommended for unused quota information (the `quotas` field).
To exclude one or more fields, set your request's `fields` query parameter
to only include the fields you need. For example, to only include the `id`
and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
your request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    GetProjectRequest request = new GetProjectRequest { Project = "", };
    // Make the request
    Project response = projectsClient.Get(request);

### Get(string, CallSettings)

    public virtual Project Get(string project, CallSettings callSettings = null)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded
information from the response by using a field mask. This practice is
especially recommended for unused quota information (the `quotas` field).
To exclude one or more fields, set your request's `fields` query parameter
to only include the fields you need. For example, to only include the `id`
and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
your request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    Project response = projectsClient.Get(project);

### GetAsync(GetProjectRequest, CallSettings)

    public virtual Task<Project> GetAsync(GetProjectRequest request, CallSettings callSettings = null)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded
information from the response by using a field mask. This practice is
especially recommended for unused quota information (the `quotas` field).
To exclude one or more fields, set your request's `fields` query parameter
to only include the fields you need. For example, to only include the `id`
and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
your request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    GetProjectRequest request = new GetProjectRequest { Project = "", };
    // Make the request
    Project response = await projectsClient.GetAsync(request);

### GetAsync(GetProjectRequest, CancellationToken)

    public virtual Task<Project> GetAsync(GetProjectRequest request, CancellationToken cancellationToken)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded
information from the response by using a field mask. This practice is
especially recommended for unused quota information (the `quotas` field).
To exclude one or more fields, set your request's `fields` query parameter
to only include the fields you need. For example, to only include the `id`
and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
your request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    GetProjectRequest request = new GetProjectRequest { Project = "", };
    // Make the request
    Project response = await projectsClient.GetAsync(request);

### GetAsync(string, CallSettings)

    public virtual Task<Project> GetAsync(string project, CallSettings callSettings = null)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded
information from the response by using a field mask. This practice is
especially recommended for unused quota information (the `quotas` field).
To exclude one or more fields, set your request's `fields` query parameter
to only include the fields you need. For example, to only include the `id`
and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
your request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    Project response = await projectsClient.GetAsync(project);

### GetAsync(string, CancellationToken)

    public virtual Task<Project> GetAsync(string project, CancellationToken cancellationToken)

Returns the specified Project resource.

To decrease latency for this method, you can optionally omit any unneeded
information from the response by using a field mask. This practice is
especially recommended for unused quota information (the `quotas` field).
To exclude one or more fields, set your request's `fields` query parameter
to only include the fields you need. For example, to only include the `id`
and `selfLink` fields, add the query parameter `?fields=id,selfLink` to
your request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    Project response = await projectsClient.GetAsync(project);

### GetXpnHost(GetXpnHostProjectRequest, CallSettings)

    public virtual Project GetXpnHost(GetXpnHostProjectRequest request, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty
if no link exists.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    GetXpnHostProjectRequest request = new GetXpnHostProjectRequest { Project = "", };
    // Make the request
    Project response = projectsClient.GetXpnHost(request);

### GetXpnHost(string, CallSettings)

    public virtual Project GetXpnHost(string project, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty
if no link exists.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    Project response = projectsClient.GetXpnHost(project);

### GetXpnHostAsync(GetXpnHostProjectRequest, CallSettings)

    public virtual Task<Project> GetXpnHostAsync(GetXpnHostProjectRequest request, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty
if no link exists.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    GetXpnHostProjectRequest request = new GetXpnHostProjectRequest { Project = "", };
    // Make the request
    Project response = await projectsClient.GetXpnHostAsync(request);

### GetXpnHostAsync(GetXpnHostProjectRequest, CancellationToken)

    public virtual Task<Project> GetXpnHostAsync(GetXpnHostProjectRequest request, CancellationToken cancellationToken)

Gets the shared VPC host project that this project links to. May be empty
if no link exists.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetXpnHostProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    GetXpnHostProjectRequest request = new GetXpnHostProjectRequest { Project = "", };
    // Make the request
    Project response = await projectsClient.GetXpnHostAsync(request);

### GetXpnHostAsync(string, CallSettings)

    public virtual Task<Project> GetXpnHostAsync(string project, CallSettings callSettings = null)

Gets the shared VPC host project that this project links to. May be empty
if no link exists.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    Project response = await projectsClient.GetXpnHostAsync(project);

### GetXpnHostAsync(string, CancellationToken)

    public virtual Task<Project> GetXpnHostAsync(string project, CancellationToken cancellationToken)

Gets the shared VPC host project that this project links to. May be empty
if no link exists.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    Project response = await projectsClient.GetXpnHostAsync(project);

### GetXpnResources(GetXpnResourcesProjectsRequest, CallSettings)

    public virtual PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResources(GetXpnResourcesProjectsRequest request, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetXpnResourcesProjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsGetXpnResourceshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId` | A pageable sequence of [XpnResourceId](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    GetXpnResourcesProjectsRequest request = new GetXpnResourcesProjectsRequest
    {
        OrderBy = "",
        Project = "",
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResources(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (XpnResourceId item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ProjectsGetXpnResources page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (XpnResourceId item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<XpnResourceId> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (XpnResourceId item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### GetXpnResources(string, string, int?, CallSettings)

    public virtual PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResources(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsGetXpnResourceshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId` | A pageable sequence of [XpnResourceId](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    PagedEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResources(project);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (XpnResourceId item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (ProjectsGetXpnResources page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (XpnResourceId item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<XpnResourceId> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (XpnResourceId item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### GetXpnResourcesAsync(GetXpnResourcesProjectsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResourcesAsync(GetXpnResourcesProjectsRequest request, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetXpnResourcesProjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsGetXpnResourceshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId` | A pageable asynchronous sequence of [XpnResourceId](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    GetXpnResourcesProjectsRequest request = new GetXpnResourcesProjectsRequest
    {
        OrderBy = "",
        Project = "",
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResourcesAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (XpnResourceId item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ProjectsGetXpnResources page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (XpnResourceId item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<XpnResourceId> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (XpnResourceId item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### GetXpnResourcesAsync(string, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> GetXpnResourcesAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Gets service resources (a.k.a service project) associated with this host
project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsGetXpnResourceshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId` | A pageable asynchronous sequence of [XpnResourceId](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnResourceId) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    PagedAsyncEnumerable<ProjectsGetXpnResources, XpnResourceId> response = projectsClient.GetXpnResourcesAsync(project);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (XpnResourceId item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (ProjectsGetXpnResources page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (XpnResourceId item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<XpnResourceId> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (XpnResourceId item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListXpnHosts(ListXpnHostsProjectsRequest, CallSettings)

    public virtual PagedEnumerable<XpnHostList, Project> ListXpnHosts(ListXpnHostsProjectsRequest request, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListXpnHostsProjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnHostListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A pageable sequence of [Project](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    ListXpnHostsProjectsRequest request = new ListXpnHostsProjectsRequest
    {
        OrderBy = "",
        Project = "",
        ProjectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest(),
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHosts(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Project item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (XpnHostList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Project item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Project> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Project item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListXpnHosts(string, ProjectsListXpnHostsRequest, string, int?, CallSettings)

    public virtual PagedEnumerable<XpnHostList, Project> ListXpnHosts(string project, ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsListXpnHostsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsListXpnHostsRequest` The body resource for this request |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnHostListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A pageable sequence of [Project](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest();
    // Make the request
    PagedEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHosts(project, projectsListXpnHostsRequestResource);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (Project item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    foreach (XpnHostList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Project item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Project> singlePage = response.ReadPage(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Project item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListXpnHostsAsync(ListXpnHostsProjectsRequest, CallSettings)

    public virtual PagedAsyncEnumerable<XpnHostList, Project> ListXpnHostsAsync(ListXpnHostsProjectsRequest request, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListXpnHostsProjectsRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnHostListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A pageable asynchronous sequence of [Project](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    ListXpnHostsProjectsRequest request = new ListXpnHostsProjectsRequest
    {
        OrderBy = "",
        Project = "",
        ProjectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest(),
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedAsyncEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHostsAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Project item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (XpnHostList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Project item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Project> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Project item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### ListXpnHostsAsync(string, ProjectsListXpnHostsRequest, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<XpnHostList, Project> ListXpnHostsAsync(string project, ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists all shared VPC host projects visible to the user in an organization.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsListXpnHostsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsListXpnHostsRequest` The body resource for this request |
| `pageToken` | `https://learn.microsoft.com/dotnet/api/system.string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `https://learn.microsoft.com/dotnet/api/system.int32` The size of page to request. The response will not be larger than this, but may be smaller. A value of `null` or `0` uses a server-defined page size. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.PagedAsyncEnumerable-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.XpnHostListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project` | A pageable asynchronous sequence of [Project](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Project) resources. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsListXpnHostsRequest projectsListXpnHostsRequestResource = new ProjectsListXpnHostsRequest();
    // Make the request
    PagedAsyncEnumerable<XpnHostList, Project> response = projectsClient.ListXpnHostsAsync(project, projectsListXpnHostsRequestResource);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (Project item in response)
    {
        // Do something with each item
        Console.WriteLine(item);
    }

    // Or iterate over pages (of server-defined size), performing one RPC per page
    await foreach (XpnHostList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (Project item in page)
        {
            // Do something with each item
            Console.WriteLine(item);
        }
    }

    // Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
    int pageSize = 10;
    Page<Project> singlePage = await response.ReadPageAsync(pageSize);
    // Do something with the page of items
    Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
    foreach (Project item in singlePage)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
    // Store the pageToken, for when the next page is required.
    string nextPageToken = singlePage.NextPageToken;

### MoveDisk(MoveDiskProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> MoveDisk(MoveDiskProjectRequest request, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new
projects. To move a disk to a different region or zone, follow the steps in
[Change the location of a
disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until
September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in
the response body about the upcoming deprecation. You can skip the message
to continue using the service without interruption.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.MoveDiskProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    MoveDiskProjectRequest request = new MoveDiskProjectRequest
    {
        RequestId = "",
        Project = "",
        DiskMoveRequestResource = new DiskMoveRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.MoveDisk(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveDisk(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveDisk(string, DiskMoveRequest, CallSettings)

    public virtual Operation<Operation, Operation> MoveDisk(string project, DiskMoveRequest diskMoveRequestResource, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new
projects. To move a disk to a different region or zone, follow the steps in
[Change the location of a
disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until
September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in
the response body about the upcoming deprecation. You can skip the message
to continue using the service without interruption.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `diskMoveRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DiskMoveRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    DiskMoveRequest diskMoveRequestResource = new DiskMoveRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.MoveDisk(project, diskMoveRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveDisk(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveDiskAsync(MoveDiskProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(MoveDiskProjectRequest request, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new
projects. To move a disk to a different region or zone, follow the steps in
[Change the location of a
disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until
September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in
the response body about the upcoming deprecation. You can skip the message
to continue using the service without interruption.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.MoveDiskProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    MoveDiskProjectRequest request = new MoveDiskProjectRequest
    {
        RequestId = "",
        Project = "",
        DiskMoveRequestResource = new DiskMoveRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveDiskAsync(MoveDiskProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(MoveDiskProjectRequest request, CancellationToken cancellationToken)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new
projects. To move a disk to a different region or zone, follow the steps in
[Change the location of a
disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until
September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in
the response body about the upcoming deprecation. You can skip the message
to continue using the service without interruption.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.MoveDiskProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    MoveDiskProjectRequest request = new MoveDiskProjectRequest
    {
        RequestId = "",
        Project = "",
        DiskMoveRequestResource = new DiskMoveRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveDiskAsync(string, DiskMoveRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(string project, DiskMoveRequest diskMoveRequestResource, CallSettings callSettings = null)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new
projects. To move a disk to a different region or zone, follow the steps in
[Change the location of a
disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until
September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in
the response body about the upcoming deprecation. You can skip the message
to continue using the service without interruption.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `diskMoveRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DiskMoveRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    DiskMoveRequest diskMoveRequestResource = new DiskMoveRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(project, diskMoveRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveDiskAsync(string, DiskMoveRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> MoveDiskAsync(string project, DiskMoveRequest diskMoveRequestResource, CancellationToken cancellationToken)

Moves a persistent disk from one zone to another.
*Note*: The moveDisk API will be deprecated on September 29, 2026.

Starting September 29, 2025, you can't use the moveDisk API on new
projects. To move a disk to a different region or zone, follow the steps in
[Change the location of a
disk](https://cloud.google.com/compute/docs/disks/migrate-to-hyperdisk#migrate-to-hd).

Projects that already use the moveDisk API can continue usage until
September 29, 2026.

Starting November 1, 2025, API responses will include a warning message in
the response body about the upcoming deprecation. You can skip the message
to continue using the service without interruption.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `diskMoveRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DiskMoveRequest` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    DiskMoveRequest diskMoveRequestResource = new DiskMoveRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveDiskAsync(project, diskMoveRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveDiskAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveInstance(MoveInstanceProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> MoveInstance(MoveInstanceProjectRequest request, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to
another.
*Note* : Moving VMs or disks by using this method might
cause unexpected behavior. For more information, see the [known
issue](https://docs.cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
\[Deprecated\] This method is deprecated. See [moving instance across
zones](https://docs.cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.MoveInstanceProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    MoveInstanceProjectRequest request = new MoveInstanceProjectRequest
    {
        RequestId = "",
        Project = "",
        InstanceMoveRequestResource = new InstanceMoveRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.MoveInstance(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveInstance(string, InstanceMoveRequest, CallSettings)

    public virtual Operation<Operation, Operation> MoveInstance(string project, InstanceMoveRequest instanceMoveRequestResource, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to
another.
*Note* : Moving VMs or disks by using this method might
cause unexpected behavior. For more information, see the [known
issue](https://docs.cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
\[Deprecated\] This method is deprecated. See [moving instance across
zones](https://docs.cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `instanceMoveRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.InstanceMoveRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    InstanceMoveRequest instanceMoveRequestResource = new InstanceMoveRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.MoveInstance(project, instanceMoveRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceMoveInstance(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveInstanceAsync(MoveInstanceProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(MoveInstanceProjectRequest request, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to
another.
*Note* : Moving VMs or disks by using this method might
cause unexpected behavior. For more information, see the [known
issue](https://docs.cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
\[Deprecated\] This method is deprecated. See [moving instance across
zones](https://docs.cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.MoveInstanceProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    MoveInstanceProjectRequest request = new MoveInstanceProjectRequest
    {
        RequestId = "",
        Project = "",
        InstanceMoveRequestResource = new InstanceMoveRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveInstanceAsync(MoveInstanceProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(MoveInstanceProjectRequest request, CancellationToken cancellationToken)

Moves an instance and its attached persistent disks from one zone to
another.
*Note* : Moving VMs or disks by using this method might
cause unexpected behavior. For more information, see the [known
issue](https://docs.cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
\[Deprecated\] This method is deprecated. See [moving instance across
zones](https://docs.cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.MoveInstanceProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    MoveInstanceProjectRequest request = new MoveInstanceProjectRequest
    {
        RequestId = "",
        Project = "",
        InstanceMoveRequestResource = new InstanceMoveRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveInstanceAsync(string, InstanceMoveRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(string project, InstanceMoveRequest instanceMoveRequestResource, CallSettings callSettings = null)

Moves an instance and its attached persistent disks from one zone to
another.
*Note* : Moving VMs or disks by using this method might
cause unexpected behavior. For more information, see the [known
issue](https://docs.cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
\[Deprecated\] This method is deprecated. See [moving instance across
zones](https://docs.cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `instanceMoveRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.InstanceMoveRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    InstanceMoveRequest instanceMoveRequestResource = new InstanceMoveRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(project, instanceMoveRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### MoveInstanceAsync(string, InstanceMoveRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> MoveInstanceAsync(string project, InstanceMoveRequest instanceMoveRequestResource, CancellationToken cancellationToken)

Moves an instance and its attached persistent disks from one zone to
another.
*Note* : Moving VMs or disks by using this method might
cause unexpected behavior. For more information, see the [known
issue](https://docs.cloud.google.com/compute/docs/troubleshooting/known-issues#moving_vms_or_disks_using_the_moveinstance_api_or_the_causes_unexpected_behavior).
\[Deprecated\] This method is deprecated. See [moving instance across
zones](https://docs.cloud.google.com/compute/docs/instances/moving-instance-across-zones) instead.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `instanceMoveRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.InstanceMoveRequest` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    InstanceMoveRequest instanceMoveRequestResource = new InstanceMoveRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.MoveInstanceAsync(project, instanceMoveRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceMoveInstanceAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### PollOnceDisableXpnHost(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceDisableXpnHost(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `DisableXpnHost`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceDisableXpnHostAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceDisableXpnHostAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`DisableXpnHost`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceDisableXpnResource(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceDisableXpnResource(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `DisableXpnResource`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceDisableXpnResourceAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceDisableXpnResourceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`DisableXpnResource`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceEnableXpnHost(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceEnableXpnHost(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `EnableXpnHost`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceEnableXpnHostAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceEnableXpnHostAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`EnableXpnHost`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceEnableXpnResource(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceEnableXpnResource(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `EnableXpnResource`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceEnableXpnResourceAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceEnableXpnResourceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`EnableXpnResource`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceMoveDisk(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceMoveDisk(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `MoveDisk`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceMoveDiskAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceMoveDiskAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`MoveDisk`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceMoveInstance(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceMoveInstance(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `MoveInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceMoveInstanceAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceMoveInstanceAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`MoveInstance`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceSetCloudArmorTier(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceSetCloudArmorTier(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `SetCloudArmorTier`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceSetCloudArmorTierAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceSetCloudArmorTierAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`SetCloudArmorTier`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceSetCommonInstanceMetadata(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceSetCommonInstanceMetadata(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of
`SetCommonInstanceMetadata`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceSetCommonInstanceMetadataAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceSetCommonInstanceMetadataAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`SetCommonInstanceMetadata`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceSetDefaultNetworkTier(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceSetDefaultNetworkTier(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `SetDefaultNetworkTier`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceSetDefaultNetworkTierAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceSetDefaultNetworkTierAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`SetDefaultNetworkTier`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### PollOnceSetUsageExportBucket(string, CallSettings)

    public virtual Operation<Operation, Operation> PollOnceSetUsageExportBucket(string operationName, CallSettings callSettings = null)

Poll an operation once, using an `operationName` from a previous invocation of `SetUsageExportBucket`
.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The result of polling the operation. |

### PollOnceSetUsageExportBucketAsync(string, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PollOnceSetUsageExportBucketAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an `operationName` from a previous invocation of
`SetUsageExportBucket`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `https://learn.microsoft.com/dotnet/api/system.string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A task representing the result of polling the operation. |

### SetCloudArmorTier(SetCloudArmorTierProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetCloudArmorTier(SetCloudArmorTierProjectRequest request, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
billing account of the project must be subscribed to Cloud Armor
Enterprise. See Subscribing
to Cloud Armor Enterprise for more information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetCloudArmorTierProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    SetCloudArmorTierProjectRequest request = new SetCloudArmorTierProjectRequest
    {
        RequestId = "",
        ProjectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetCloudArmorTier(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCloudArmorTier(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCloudArmorTier(string, ProjectsSetCloudArmorTierRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetCloudArmorTier(string project, ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
billing account of the project must be subscribed to Cloud Armor
Enterprise. See Subscribing
to Cloud Armor Enterprise for more information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsSetCloudArmorTierRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsSetCloudArmorTierRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetCloudArmorTier(project, projectsSetCloudArmorTierRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCloudArmorTier(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest request, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
billing account of the project must be subscribed to Cloud Armor
Enterprise. See Subscribing
to Cloud Armor Enterprise for more information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetCloudArmorTierProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetCloudArmorTierProjectRequest request = new SetCloudArmorTierProjectRequest
    {
        RequestId = "",
        ProjectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(SetCloudArmorTierProjectRequest request, CancellationToken cancellationToken)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
billing account of the project must be subscribed to Cloud Armor
Enterprise. See Subscribing
to Cloud Armor Enterprise for more information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetCloudArmorTierProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetCloudArmorTierProjectRequest request = new SetCloudArmorTierProjectRequest
    {
        RequestId = "",
        ProjectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCloudArmorTierAsync(string, ProjectsSetCloudArmorTierRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(string project, ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource, CallSettings callSettings = null)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
billing account of the project must be subscribed to Cloud Armor
Enterprise. See Subscribing
to Cloud Armor Enterprise for more information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsSetCloudArmorTierRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsSetCloudArmorTierRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(project, projectsSetCloudArmorTierRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCloudArmorTierAsync(string, ProjectsSetCloudArmorTierRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetCloudArmorTierAsync(string project, ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource, CancellationToken cancellationToken)

Sets the Cloud Armor tier of the project. To set ENTERPRISE or above the
billing account of the project must be subscribed to Cloud Armor
Enterprise. See Subscribing
to Cloud Armor Enterprise for more information.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsSetCloudArmorTierRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsSetCloudArmorTierRequest` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsSetCloudArmorTierRequest projectsSetCloudArmorTierRequestResource = new ProjectsSetCloudArmorTierRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCloudArmorTierAsync(project, projectsSetCloudArmorTierRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCloudArmorTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCommonInstanceMetadata(SetCommonInstanceMetadataProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetCommonInstanceMetadata(SetCommonInstanceMetadataProjectRequest request, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetCommonInstanceMetadataProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    SetCommonInstanceMetadataProjectRequest request = new SetCommonInstanceMetadataProjectRequest
    {
        RequestId = "",
        Project = "",
        MetadataResource = new Metadata(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetCommonInstanceMetadata(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCommonInstanceMetadata(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCommonInstanceMetadata(string, Metadata, CallSettings)

    public virtual Operation<Operation, Operation> SetCommonInstanceMetadata(string project, Metadata metadataResource, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `metadataResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Metadata` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    Metadata metadataResource = new Metadata();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetCommonInstanceMetadata(project, metadataResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetCommonInstanceMetadata(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest request, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetCommonInstanceMetadataProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetCommonInstanceMetadataProjectRequest request = new SetCommonInstanceMetadataProjectRequest
    {
        RequestId = "",
        Project = "",
        MetadataResource = new Metadata(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(SetCommonInstanceMetadataProjectRequest request, CancellationToken cancellationToken)

Sets metadata common to all instances within the specified project using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetCommonInstanceMetadataProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetCommonInstanceMetadataProjectRequest request = new SetCommonInstanceMetadataProjectRequest
    {
        RequestId = "",
        Project = "",
        MetadataResource = new Metadata(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCommonInstanceMetadataAsync(string, Metadata, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(string project, Metadata metadataResource, CallSettings callSettings = null)

Sets metadata common to all instances within the specified project using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `metadataResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Metadata` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    Metadata metadataResource = new Metadata();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(project, metadataResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetCommonInstanceMetadataAsync(string, Metadata, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetCommonInstanceMetadataAsync(string project, Metadata metadataResource, CancellationToken cancellationToken)

Sets metadata common to all instances within the specified project using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `metadataResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Metadata` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    Metadata metadataResource = new Metadata();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetCommonInstanceMetadataAsync(project, metadataResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetCommonInstanceMetadataAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetDefaultNetworkTier(SetDefaultNetworkTierProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetDefaultNetworkTier(SetDefaultNetworkTierProjectRequest request, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is
used when an address/forwardingRule/instance is created without specifying
the network tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetDefaultNetworkTierProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    SetDefaultNetworkTierProjectRequest request = new SetDefaultNetworkTierProjectRequest
    {
        RequestId = "",
        ProjectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetDefaultNetworkTier(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetDefaultNetworkTier(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetDefaultNetworkTier(string, ProjectsSetDefaultNetworkTierRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetDefaultNetworkTier(string project, ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is
used when an address/forwardingRule/instance is created without specifying
the network tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsSetDefaultNetworkTierRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsSetDefaultNetworkTierRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetDefaultNetworkTier(project, projectsSetDefaultNetworkTierRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetDefaultNetworkTier(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest request, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is
used when an address/forwardingRule/instance is created without specifying
the network tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetDefaultNetworkTierProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetDefaultNetworkTierProjectRequest request = new SetDefaultNetworkTierProjectRequest
    {
        RequestId = "",
        ProjectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(SetDefaultNetworkTierProjectRequest request, CancellationToken cancellationToken)

Sets the default network tier of the project. The default network tier is
used when an address/forwardingRule/instance is created without specifying
the network tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetDefaultNetworkTierProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetDefaultNetworkTierProjectRequest request = new SetDefaultNetworkTierProjectRequest
    {
        RequestId = "",
        ProjectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest(),
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetDefaultNetworkTierAsync(string, ProjectsSetDefaultNetworkTierRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(string project, ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource, CallSettings callSettings = null)

Sets the default network tier of the project. The default network tier is
used when an address/forwardingRule/instance is created without specifying
the network tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsSetDefaultNetworkTierRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsSetDefaultNetworkTierRequest` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(project, projectsSetDefaultNetworkTierRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetDefaultNetworkTierAsync(string, ProjectsSetDefaultNetworkTierRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetDefaultNetworkTierAsync(string project, ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource, CancellationToken cancellationToken)

Sets the default network tier of the project. The default network tier is
used when an address/forwardingRule/instance is created without specifying
the network tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `projectsSetDefaultNetworkTierRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsSetDefaultNetworkTierRequest` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ProjectsSetDefaultNetworkTierRequest projectsSetDefaultNetworkTierRequestResource = new ProjectsSetDefaultNetworkTierRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetDefaultNetworkTierAsync(project, projectsSetDefaultNetworkTierRequestResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetDefaultNetworkTierAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetUsageExportBucket(SetUsageExportBucketProjectRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetUsageExportBucket(SetUsageExportBucketProjectRequest request, CallSettings callSettings = null)

Enables the usage export feature and sets theusage export bucket
where reports are stored. If you provide an empty request body using this
method, the usage export feature will be disabled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetUsageExportBucketProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    SetUsageExportBucketProjectRequest request = new SetUsageExportBucketProjectRequest
    {
        UsageExportLocationResource = new UsageExportLocation(),
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetUsageExportBucket(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetUsageExportBucket(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetUsageExportBucket(string, UsageExportLocation, CallSettings)

    public virtual Operation<Operation, Operation> SetUsageExportBucket(string project, UsageExportLocation usageExportLocationResource, CallSettings callSettings = null)

Enables the usage export feature and sets theusage export bucket
where reports are stored. If you provide an empty request body using this
method, the usage export feature will be disabled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `usageExportLocationResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.UsageExportLocation` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | The RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = ProjectsClient.Create();
    // Initialize request argument(s)
    string project = "";
    UsageExportLocation usageExportLocationResource = new UsageExportLocation();
    // Make the request
    lro::Operation<Operation, Operation> response = projectsClient.SetUsageExportBucket(project, usageExportLocationResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = response.PollUntilCompleted();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = projectsClient.PollOnceSetUsageExportBucket(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest request, CallSettings callSettings = null)

Enables the usage export feature and sets theusage export bucket
where reports are stored. If you provide an empty request body using this
method, the usage export feature will be disabled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetUsageExportBucketProjectRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetUsageExportBucketProjectRequest request = new SetUsageExportBucketProjectRequest
    {
        UsageExportLocationResource = new UsageExportLocation(),
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(SetUsageExportBucketProjectRequest request, CancellationToken cancellationToken)

Enables the usage export feature and sets theusage export bucket
where reports are stored. If you provide an empty request body using this
method, the usage export feature will be disabled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetUsageExportBucketProjectRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    SetUsageExportBucketProjectRequest request = new SetUsageExportBucketProjectRequest
    {
        UsageExportLocationResource = new UsageExportLocation(),
        RequestId = "",
        Project = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(request);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetUsageExportBucketAsync(string, UsageExportLocation, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(string project, UsageExportLocation usageExportLocationResource, CallSettings callSettings = null)

Enables the usage export feature and sets theusage export bucket
where reports are stored. If you provide an empty request body using this
method, the usage export feature will be disabled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `usageExportLocationResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.UsageExportLocation` The body resource for this request |
| `callSettings` | `https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.CallSettings.html` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    UsageExportLocation usageExportLocationResource = new UsageExportLocation();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(project, usageExportLocationResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### SetUsageExportBucketAsync(string, UsageExportLocation, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetUsageExportBucketAsync(string project, UsageExportLocation usageExportLocationResource, CancellationToken cancellationToken)

Enables the usage export feature and sets theusage export bucket
where reports are stored. If you provide an empty request body using this
method, the usage export feature will be disabled.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `usageExportLocationResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.UsageExportLocation` The body resource for this request |
| `cancellationToken` | `https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task-1https://docs.cloud.google.com/dotnet/docs/reference/Google.LongRunning/latest/Google.LongRunning.Operation-2.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.Operation` | A Task containing the RPC response. |

**Example**

    // Create client
    ProjectsClient projectsClient = await ProjectsClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    UsageExportLocation usageExportLocationResource = new UsageExportLocation();
    // Make the request
    lro::Operation<Operation, Operation> response = await projectsClient.SetUsageExportBucketAsync(project, usageExportLocationResource);

    // Poll until the returned long-running operation is complete
    lro::Operation<Operation, Operation> completedResponse = await response.PollUntilCompletedAsync();
    // Retrieve the operation result
    Operation result = completedResponse.Result;

    // Or get the name of the operation
    string operationName = response.Name;
    // This name can be stored, then the long-running operation retrieved later by name
    lro::Operation<Operation, Operation> retrievedResponse = await projectsClient.PollOnceSetUsageExportBucketAsync(operationName);
    // Check if the retrieved long-running operation has completed
    if (retrievedResponse.IsCompleted)
    {
        // If it has completed, then access the result
        Operation retrievedResult = retrievedResponse.Result;
    }

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient#Google_Cloud_Compute_V1_ProjectsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient#Google_Cloud_Compute_V1_ProjectsClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient#Google_Cloud_Compute_V1_ProjectsClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ProjectsClient#Google_Cloud_Compute_V1_ProjectsClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.