# Compute Engine v1 API - Class GlobalForwardingRulesClient (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 GlobalForwardingRulesClient

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

GlobalForwardingRules client wrapper, for convenient use.

## Inheritance

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

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

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

## 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 GlobalForwardingRules API.

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the GlobalForwardingRules 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 GlobalForwardingRules 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 GlobalForwardingRules scopes are:

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

### DeleteOperationsClient

    public virtual OperationsClient DeleteOperationsClient { get; }

The long-running operations client for `Delete`.

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

### GrpcClient

    public virtual GlobalForwardingRules.GlobalForwardingRulesClient GrpcClient { get; }

The underlying gRPC GlobalForwardingRules client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalForwardingRuleshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalForwardingRules.GlobalForwardingRulesClient` |   |

### InsertOperationsClient

    public virtual OperationsClient InsertOperationsClient { get; }

The long-running operations client for `Insert`.

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

### PatchOperationsClient

    public virtual OperationsClient PatchOperationsClient { get; }

The long-running operations client for `Patch`.

| **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` |   |

### SetLabelsOperationsClient

    public virtual OperationsClient SetLabelsOperationsClient { get; }

The long-running operations client for `SetLabels`.

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

### SetTargetOperationsClient

    public virtual OperationsClient SetTargetOperationsClient { get; }

The long-running operations client for `SetTarget`.

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

## Methods

### Create()

    public static GlobalForwardingRulesClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

| **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.GlobalForwardingRulesClient` | The task representing the created [GlobalForwardingRulesClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalForwardingRulesClient). |

### Delete(DeleteGlobalForwardingRuleRequest, CallSettings)

    public virtual Operation<Operation, Operation> Delete(DeleteGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Deletes the specified GlobalForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DeleteGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    DeleteGlobalForwardingRuleRequest request = new DeleteGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Delete(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 = globalForwardingRulesClient.PollOnceDelete(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;
    }

### Delete(string, string, CallSettings)

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

Deletes the specified GlobalForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to delete. |
| `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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Delete(project, forwardingRule);

    // 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 = globalForwardingRulesClient.PollOnceDelete(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;
    }

### DeleteAsync(DeleteGlobalForwardingRuleRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Deletes the specified GlobalForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DeleteGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    DeleteGlobalForwardingRuleRequest request = new DeleteGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(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 globalForwardingRulesClient.PollOnceDeleteAsync(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;
    }

### DeleteAsync(DeleteGlobalForwardingRuleRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> DeleteAsync(DeleteGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Deletes the specified GlobalForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.DeleteGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    DeleteGlobalForwardingRuleRequest request = new DeleteGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(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 globalForwardingRulesClient.PollOnceDeleteAsync(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;
    }

### DeleteAsync(string, string, CallSettings)

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

Deletes the specified GlobalForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to delete. |
| `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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(project, forwardingRule);

    // 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 globalForwardingRulesClient.PollOnceDeleteAsync(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;
    }

### DeleteAsync(string, string, CancellationToken)

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

Deletes the specified GlobalForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to delete. |
| `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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.DeleteAsync(project, forwardingRule);

    // 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 globalForwardingRulesClient.PollOnceDeleteAsync(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(GetGlobalForwardingRuleRequest, CallSettings)

    public virtual ForwardingRule Get(GetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Returns the specified GlobalForwardingRule resource. Gets a list of
available forwarding rules by making a list() request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetGlobalForwardingRuleRequest` 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.ForwardingRule` | The RPC response. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    GetGlobalForwardingRuleRequest request = new GetGlobalForwardingRuleRequest
    {
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    ForwardingRule response = globalForwardingRulesClient.Get(request);

### Get(string, string, CallSettings)

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

Returns the specified GlobalForwardingRule resource. Gets a list of
available forwarding rules by making a list() request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to return. |
| `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.ForwardingRule` | The RPC response. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    // Make the request
    ForwardingRule response = globalForwardingRulesClient.Get(project, forwardingRule);

### GetAsync(GetGlobalForwardingRuleRequest, CallSettings)

    public virtual Task<ForwardingRule> GetAsync(GetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Returns the specified GlobalForwardingRule resource. Gets a list of
available forwarding rules by making a list() request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetGlobalForwardingRuleRequest` 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.ForwardingRule` | A Task containing the RPC response. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    GetGlobalForwardingRuleRequest request = new GetGlobalForwardingRuleRequest
    {
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    ForwardingRule response = await globalForwardingRulesClient.GetAsync(request);

### GetAsync(GetGlobalForwardingRuleRequest, CancellationToken)

    public virtual Task<ForwardingRule> GetAsync(GetGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Returns the specified GlobalForwardingRule resource. Gets a list of
available forwarding rules by making a list() request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetGlobalForwardingRuleRequest` 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.ForwardingRule` | A Task containing the RPC response. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    GetGlobalForwardingRuleRequest request = new GetGlobalForwardingRuleRequest
    {
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    ForwardingRule response = await globalForwardingRulesClient.GetAsync(request);

### GetAsync(string, string, CallSettings)

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

Returns the specified GlobalForwardingRule resource. Gets a list of
available forwarding rules by making a list() request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to return. |
| `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.ForwardingRule` | A Task containing the RPC response. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    // Make the request
    ForwardingRule response = await globalForwardingRulesClient.GetAsync(project, forwardingRule);

### GetAsync(string, string, CancellationToken)

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

Returns the specified GlobalForwardingRule resource. Gets a list of
available forwarding rules by making a list() request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to return. |
| `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.ForwardingRule` | A Task containing the RPC response. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    // Make the request
    ForwardingRule response = await globalForwardingRulesClient.GetAsync(project, forwardingRule);

### Insert(InsertGlobalForwardingRuleRequest, CallSettings)

    public virtual Operation<Operation, Operation> Insert(InsertGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in 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.InsertGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    InsertGlobalForwardingRuleRequest request = new InsertGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Insert(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 = globalForwardingRulesClient.PollOnceInsert(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;
    }

### Insert(string, ForwardingRule, CallSettings)

    public virtual Operation<Operation, Operation> Insert(string project, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in 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. |
| `forwardingRuleResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Insert(project, forwardingRuleResource);

    // 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 = globalForwardingRulesClient.PollOnceInsert(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;
    }

### InsertAsync(InsertGlobalForwardingRuleRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in 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.InsertGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    InsertGlobalForwardingRuleRequest request = new InsertGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(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 globalForwardingRulesClient.PollOnceInsertAsync(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;
    }

### InsertAsync(InsertGlobalForwardingRuleRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> InsertAsync(InsertGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Creates a GlobalForwardingRule resource in 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.InsertGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    InsertGlobalForwardingRuleRequest request = new InsertGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(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 globalForwardingRulesClient.PollOnceInsertAsync(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;
    }

### InsertAsync(string, ForwardingRule, CallSettings)

    public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Creates a GlobalForwardingRule resource in 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. |
| `forwardingRuleResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(project, forwardingRuleResource);

    // 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 globalForwardingRulesClient.PollOnceInsertAsync(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;
    }

### InsertAsync(string, ForwardingRule, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> InsertAsync(string project, ForwardingRule forwardingRuleResource, CancellationToken cancellationToken)

Creates a GlobalForwardingRule resource in 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. |
| `forwardingRuleResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.InsertAsync(project, forwardingRuleResource);

    // 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 globalForwardingRulesClient.PollOnceInsertAsync(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;
    }

### List(ListGlobalForwardingRulesRequest, CallSettings)

    public virtual PagedEnumerable<ForwardingRuleList, ForwardingRule> List(ListGlobalForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the
specified project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListGlobalForwardingRulesRequest` 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.ForwardingRuleListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` | A pageable sequence of [ForwardingRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule) resources. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    ListGlobalForwardingRulesRequest request = new ListGlobalForwardingRulesRequest
    {
        OrderBy = "",
        Project = "",
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.List(request);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (ForwardingRule 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 (ForwardingRuleList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (ForwardingRule 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<ForwardingRule> 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 (ForwardingRule 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;

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

    public virtual PagedEnumerable<ForwardingRuleList, ForwardingRule> List(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the
specified 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.ForwardingRuleListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` | A pageable sequence of [ForwardingRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule) resources. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    PagedEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.List(project);

    // Iterate over all response items, lazily performing RPCs as required
    foreach (ForwardingRule 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 (ForwardingRuleList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (ForwardingRule 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<ForwardingRule> 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 (ForwardingRule 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;

### ListAsync(ListGlobalForwardingRulesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> ListAsync(ListGlobalForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the
specified project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListGlobalForwardingRulesRequest` 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.ForwardingRuleListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` | A pageable asynchronous sequence of [ForwardingRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule) resources. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    ListGlobalForwardingRulesRequest request = new ListGlobalForwardingRulesRequest
    {
        OrderBy = "",
        Project = "",
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.ListAsync(request);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (ForwardingRule 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 (ForwardingRuleList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (ForwardingRule 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<ForwardingRule> 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 (ForwardingRule 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;

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

    public virtual PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> ListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves a list of GlobalForwardingRule resources available to the
specified 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.ForwardingRuleListhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` | A pageable asynchronous sequence of [ForwardingRule](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule) resources. |

**Example**

    // Create client
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = globalForwardingRulesClient.ListAsync(project);

    // Iterate over all response items, lazily performing RPCs as required
    await foreach (ForwardingRule 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 (ForwardingRuleList page in response.AsRawResponses())
    {
        // Do something with each page of items
        Console.WriteLine("A page of results:");
        foreach (ForwardingRule 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<ForwardingRule> 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 (ForwardingRule 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;

### Patch(PatchGlobalForwardingRuleRequest, CallSettings)

    public virtual Operation<Operation, Operation> Patch(PatchGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the
request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules. Currently, you can only
patch 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.PatchGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    PatchGlobalForwardingRuleRequest request = new PatchGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Patch(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 = globalForwardingRulesClient.PollOncePatch(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;
    }

### Patch(string, string, ForwardingRule, CallSettings)

    public virtual Operation<Operation, Operation> Patch(string project, string forwardingRule, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the
request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules. Currently, you can only
patch the network_tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to patch. |
| `forwardingRuleResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.Patch(project, forwardingRule, forwardingRuleResource);

    // 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 = globalForwardingRulesClient.PollOncePatch(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;
    }

### PatchAsync(PatchGlobalForwardingRuleRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the
request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules. Currently, you can only
patch 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.PatchGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    PatchGlobalForwardingRuleRequest request = new PatchGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(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 globalForwardingRulesClient.PollOncePatchAsync(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;
    }

### PatchAsync(PatchGlobalForwardingRuleRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Updates the specified forwarding rule with the data included in the
request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules. Currently, you can only
patch 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.PatchGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    PatchGlobalForwardingRuleRequest request = new PatchGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(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 globalForwardingRulesClient.PollOncePatchAsync(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;
    }

### PatchAsync(string, string, ForwardingRule, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string forwardingRule, ForwardingRule forwardingRuleResource, CallSettings callSettings = null)

Updates the specified forwarding rule with the data included in the
request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules. Currently, you can only
patch the network_tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to patch. |
| `forwardingRuleResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(project, forwardingRule, forwardingRuleResource);

    // 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 globalForwardingRulesClient.PollOncePatchAsync(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;
    }

### PatchAsync(string, string, ForwardingRule, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string forwardingRule, ForwardingRule forwardingRuleResource, CancellationToken cancellationToken)

Updates the specified forwarding rule with the data included in the
request. This method supportsPATCH
semantics and uses theJSON merge
patch format and processing rules. Currently, you can only
patch the network_tier field.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource to patch. |
| `forwardingRuleResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRule` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.PatchAsync(project, forwardingRule, forwardingRuleResource);

    // 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 globalForwardingRulesClient.PollOncePatchAsync(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;
    }

### PollOnceDelete(string, CallSettings)

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

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

| **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. |

### PollOnceDeleteAsync(string, CallSettings)

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

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

| **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. |

### PollOnceInsert(string, CallSettings)

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

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

| **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. |

### PollOnceInsertAsync(string, CallSettings)

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

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

| **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. |

### PollOncePatch(string, CallSettings)

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

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

| **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. |

### PollOncePatchAsync(string, CallSettings)

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

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

| **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. |

### PollOnceSetLabels(string, CallSettings)

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

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

| **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. |

### PollOnceSetLabelsAsync(string, CallSettings)

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

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

| **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. |

### PollOnceSetTarget(string, CallSettings)

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

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

| **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. |

### PollOnceSetTargetAsync(string, CallSettings)

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

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

| **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. |

### SetLabels(SetLabelsGlobalForwardingRuleRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetLabels(SetLabelsGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels,
read the
Labeling resources documentation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetLabelsGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    SetLabelsGlobalForwardingRuleRequest request = new SetLabelsGlobalForwardingRuleRequest
    {
        Resource = "",
        Project = "",
        GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetLabels(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 = globalForwardingRulesClient.PollOnceSetLabels(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;
    }

### SetLabels(string, string, GlobalSetLabelsRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetLabels(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels,
read the
Labeling resources documentation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` Name or id of the resource for this request. |
| `globalSetLabelsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalSetLabelsRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string resource = "";
    GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetLabels(project, resource, globalSetLabelsRequestResource);

    // 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 = globalForwardingRulesClient.PollOnceSetLabels(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;
    }

### SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels,
read the
Labeling resources documentation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetLabelsGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetLabelsGlobalForwardingRuleRequest request = new SetLabelsGlobalForwardingRuleRequest
    {
        Resource = "",
        Project = "",
        GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(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 globalForwardingRulesClient.PollOnceSetLabelsAsync(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;
    }

### SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Sets the labels on the specified resource. To learn more about labels,
read the
Labeling resources documentation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetLabelsGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetLabelsGlobalForwardingRuleRequest request = new SetLabelsGlobalForwardingRuleRequest
    {
        Resource = "",
        Project = "",
        GlobalSetLabelsRequestResource = new GlobalSetLabelsRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(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 globalForwardingRulesClient.PollOnceSetLabelsAsync(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;
    }

### SetLabelsAsync(string, string, GlobalSetLabelsRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CallSettings callSettings = null)

Sets the labels on the specified resource. To learn more about labels,
read the
Labeling resources documentation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` Name or id of the resource for this request. |
| `globalSetLabelsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalSetLabelsRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string resource = "";
    GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(project, resource, globalSetLabelsRequestResource);

    // 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 globalForwardingRulesClient.PollOnceSetLabelsAsync(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;
    }

### SetLabelsAsync(string, string, GlobalSetLabelsRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string resource, GlobalSetLabelsRequest globalSetLabelsRequestResource, CancellationToken cancellationToken)

Sets the labels on the specified resource. To learn more about labels,
read the
Labeling resources documentation.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` Name or id of the resource for this request. |
| `globalSetLabelsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalSetLabelsRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string resource = "";
    GlobalSetLabelsRequest globalSetLabelsRequestResource = new GlobalSetLabelsRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetLabelsAsync(project, resource, globalSetLabelsRequestResource);

    // 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 globalForwardingRulesClient.PollOnceSetLabelsAsync(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;
    }

### SetTarget(SetTargetGlobalForwardingRuleRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetTarget(SetTargetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target
should be of the same type as the old target.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetTargetGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    SetTargetGlobalForwardingRuleRequest request = new SetTargetGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
        TargetReferenceResource = new TargetReference(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetTarget(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 = globalForwardingRulesClient.PollOnceSetTarget(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;
    }

### SetTarget(string, string, TargetReference, CallSettings)

    public virtual Operation<Operation, Operation> SetTarget(string project, string forwardingRule, TargetReference targetReferenceResource, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target
should be of the same type as the old target.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource in which target is to be set. |
| `targetReferenceResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.TargetReference` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = GlobalForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    TargetReference targetReferenceResource = new TargetReference();
    // Make the request
    lro::Operation<Operation, Operation> response = globalForwardingRulesClient.SetTarget(project, forwardingRule, targetReferenceResource);

    // 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 = globalForwardingRulesClient.PollOnceSetTarget(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;
    }

### SetTargetAsync(SetTargetGlobalForwardingRuleRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetTargetAsync(SetTargetGlobalForwardingRuleRequest request, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target
should be of the same type as the old target.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetTargetGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetTargetGlobalForwardingRuleRequest request = new SetTargetGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
        TargetReferenceResource = new TargetReference(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(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 globalForwardingRulesClient.PollOnceSetTargetAsync(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;
    }

### SetTargetAsync(SetTargetGlobalForwardingRuleRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetTargetAsync(SetTargetGlobalForwardingRuleRequest request, CancellationToken cancellationToken)

Changes target URL for the GlobalForwardingRule resource. The new target
should be of the same type as the old target.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.SetTargetGlobalForwardingRuleRequest` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetTargetGlobalForwardingRuleRequest request = new SetTargetGlobalForwardingRuleRequest
    {
        RequestId = "",
        Project = "",
        ForwardingRule = "",
        TargetReferenceResource = new TargetReference(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(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 globalForwardingRulesClient.PollOnceSetTargetAsync(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;
    }

### SetTargetAsync(string, string, TargetReference, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetTargetAsync(string project, string forwardingRule, TargetReference targetReferenceResource, CallSettings callSettings = null)

Changes target URL for the GlobalForwardingRule resource. The new target
should be of the same type as the old target.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource in which target is to be set. |
| `targetReferenceResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.TargetReference` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    TargetReference targetReferenceResource = new TargetReference();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(project, forwardingRule, targetReferenceResource);

    // 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 globalForwardingRulesClient.PollOnceSetTargetAsync(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;
    }

### SetTargetAsync(string, string, TargetReference, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetTargetAsync(string project, string forwardingRule, TargetReference targetReferenceResource, CancellationToken cancellationToken)

Changes target URL for the GlobalForwardingRule resource. The new target
should be of the same type as the old target.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `forwardingRule` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the ForwardingRule resource in which target is to be set. |
| `targetReferenceResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.TargetReference` 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
    GlobalForwardingRulesClient globalForwardingRulesClient = await GlobalForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string forwardingRule = "";
    TargetReference targetReferenceResource = new TargetReference();
    // Make the request
    lro::Operation<Operation, Operation> response = await globalForwardingRulesClient.SetTargetAsync(project, forwardingRule, targetReferenceResource);

    // 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 globalForwardingRulesClient.PollOnceSetTargetAsync(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.GlobalForwardingRulesClient#Google_Cloud_Compute_V1_GlobalForwardingRulesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalForwardingRulesClient#Google_Cloud_Compute_V1_GlobalForwardingRulesClient_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.GlobalForwardingRulesClient#Google_Cloud_Compute_V1_GlobalForwardingRulesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GlobalForwardingRulesClient#Google_Cloud_Compute_V1_GlobalForwardingRulesClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.