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

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

ForwardingRules client wrapper, for convenient use.

## Inheritance

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

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

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

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

## Properties

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

The default endpoint for the ForwardingRules 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 ForwardingRules 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 ForwardingRules 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 ForwardingRules.ForwardingRulesClient GrpcClient { get; }

The underlying gRPC ForwardingRules client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRuleshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRules.ForwardingRulesClient` |   |

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

### AggregatedList(AggregatedListForwardingRulesRequest, CallSettings)

    public virtual PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedList(AggregatedListForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

To prevent failure, it is recommended that you set the
`returnPartialSuccess` parameter to `true`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.AggregatedListForwardingRulesRequest` 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.ForwardingRuleAggregatedListhttps://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2https://learn.microsoft.com/dotnet/api/system.stringhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRulesScopedList` | A pageable sequence of [KeyValuePair\<TKey, TValue\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) resources. |

**Example**

    // Create client
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    AggregatedListForwardingRulesRequest request = new AggregatedListForwardingRulesRequest
    {
        OrderBy = "",
        Project = "",
        ServiceProjectNumber = 0L,
        Filter = "",
        IncludeAllScopes = false,
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedList(request);

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

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

    public virtual PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedList(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

To prevent failure, it is recommended that you set the
`returnPartialSuccess` parameter to `true`.

| **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.ForwardingRuleAggregatedListhttps://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2https://learn.microsoft.com/dotnet/api/system.stringhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRulesScopedList` | A pageable sequence of [KeyValuePair\<TKey, TValue\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) resources. |

**Example**

    // Create client
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    PagedEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedList(project);

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

### AggregatedListAsync(AggregatedListForwardingRulesRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedListAsync(AggregatedListForwardingRulesRequest request, CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

To prevent failure, it is recommended that you set the
`returnPartialSuccess` parameter to `true`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.AggregatedListForwardingRulesRequest` 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.ForwardingRuleAggregatedListhttps://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2https://learn.microsoft.com/dotnet/api/system.stringhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRulesScopedList` | A pageable asynchronous sequence of [KeyValuePair\<TKey, TValue\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) resources. |

**Example**

    // Create client
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    AggregatedListForwardingRulesRequest request = new AggregatedListForwardingRulesRequest
    {
        OrderBy = "",
        Project = "",
        ServiceProjectNumber = 0L,
        Filter = "",
        IncludeAllScopes = false,
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedListAsync(request);

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

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

    public virtual PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> AggregatedListAsync(string project, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Retrieves an aggregated list of forwarding rules.

To prevent failure, it is recommended that you set the
`returnPartialSuccess` parameter to `true`.

| **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.ForwardingRuleAggregatedListhttps://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2https://learn.microsoft.com/dotnet/api/system.stringhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRulesScopedList` | A pageable asynchronous sequence of [KeyValuePair\<TKey, TValue\>](https://learn.microsoft.com/dotnet/api/system.collections.generic.keyvaluepair-2) resources. |

**Example**

    // Create client
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    // Make the request
    PagedAsyncEnumerable<ForwardingRuleAggregatedList, KeyValuePair<string, ForwardingRulesScopedList>> response = forwardingRulesClient.AggregatedListAsync(project);

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

### Create()

    public static ForwardingRulesClient Create()

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

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

### CreateAsync(CancellationToken)

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

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

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

### Delete(DeleteForwardingRuleRequest, CallSettings)

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

Deletes the specified ForwardingRule resource.

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

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

Deletes the specified ForwardingRule resource.

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

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

Deletes the specified ForwardingRule resource.

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

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

Deletes the specified ForwardingRule resource.

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

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

Deletes the specified ForwardingRule resource.

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

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

Deletes the specified ForwardingRule resource.

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

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

Returns the specified ForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    GetForwardingRuleRequest request = new GetForwardingRuleRequest
    {
        Region = "",
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    ForwardingRule response = forwardingRulesClient.Get(request);

### Get(string, string, string, CallSettings)

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

Returns the specified ForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    // Make the request
    ForwardingRule response = forwardingRulesClient.Get(project, region, forwardingRule);

### GetAsync(GetForwardingRuleRequest, CallSettings)

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

Returns the specified ForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    GetForwardingRuleRequest request = new GetForwardingRuleRequest
    {
        Region = "",
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    ForwardingRule response = await forwardingRulesClient.GetAsync(request);

### GetAsync(GetForwardingRuleRequest, CancellationToken)

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

Returns the specified ForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.GetForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    GetForwardingRuleRequest request = new GetForwardingRuleRequest
    {
        Region = "",
        Project = "",
        ForwardingRule = "",
    };
    // Make the request
    ForwardingRule response = await forwardingRulesClient.GetAsync(request);

### GetAsync(string, string, string, CallSettings)

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

Returns the specified ForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    // Make the request
    ForwardingRule response = await forwardingRulesClient.GetAsync(project, region, forwardingRule);

### GetAsync(string, string, string, CancellationToken)

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

Returns the specified ForwardingRule resource.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    // Make the request
    ForwardingRule response = await forwardingRulesClient.GetAsync(project, region, forwardingRule);

### Insert(InsertForwardingRuleRequest, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region 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.InsertForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    InsertForwardingRuleRequest request = new InsertForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, string, ForwardingRule, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.Insert(project, region, 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 = forwardingRulesClient.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(InsertForwardingRuleRequest, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region 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.InsertForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    InsertForwardingRuleRequest request = new InsertForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(InsertForwardingRuleRequest, CancellationToken)

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

Creates a ForwardingRule resource in the specified project and region 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.InsertForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    InsertForwardingRuleRequest request = new InsertForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, string, ForwardingRule, CallSettings)

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

Creates a ForwardingRule resource in the specified project and region using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.InsertAsync(project, region, 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 forwardingRulesClient.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, string, ForwardingRule, CancellationToken)

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

Creates a ForwardingRule resource in the specified project and region using
the data included in the request.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.InsertAsync(project, region, 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 forwardingRulesClient.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(ListForwardingRulesRequest, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified
project and region.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListForwardingRulesRequest` 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    ListForwardingRulesRequest request = new ListForwardingRulesRequest
    {
        Region = "",
        OrderBy = "",
        Project = "",
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.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, string, int?, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified
project and region.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    // Make the request
    PagedEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.List(project, region);

    // 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(ListForwardingRulesRequest, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified
project and region.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ListForwardingRulesRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    ListForwardingRulesRequest request = new ListForwardingRulesRequest
    {
        Region = "",
        OrderBy = "",
        Project = "",
        Filter = "",
        ReturnPartialSuccess = false,
    };
    // Make the request
    PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.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, string, int?, CallSettings)

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

Retrieves a list of ForwardingRule resources available to the specified
project and region.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `https://learn.microsoft.com/dotnet/api/system.string` Project ID for this request. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    // Make the request
    PagedAsyncEnumerable<ForwardingRuleList, ForwardingRule> response = forwardingRulesClient.ListAsync(project, region);

    // 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(PatchForwardingRuleRequest, CallSettings)

    public virtual Operation<Operation, Operation> Patch(PatchForwardingRuleRequest 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.PatchForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    PatchForwardingRuleRequest request = new PatchForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRule = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, string, ForwardingRule, CallSettings)

    public virtual Operation<Operation, Operation> Patch(string project, string region, 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.Patch(project, region, 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 = forwardingRulesClient.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(PatchForwardingRuleRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchForwardingRuleRequest 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.PatchForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    PatchForwardingRuleRequest request = new PatchForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRule = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(PatchForwardingRuleRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(PatchForwardingRuleRequest 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.PatchForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    PatchForwardingRuleRequest request = new PatchForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRule = "",
        ForwardingRuleResource = new ForwardingRule(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, string, ForwardingRule, CallSettings)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.PatchAsync(project, region, 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 forwardingRulesClient.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, string, ForwardingRule, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> PatchAsync(string project, string region, 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    ForwardingRule forwardingRuleResource = new ForwardingRule();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.PatchAsync(project, region, 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 forwardingRulesClient.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(SetLabelsForwardingRuleRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetLabels(SetLabelsForwardingRuleRequest 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.SetLabelsForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Resource = "",
        Project = "",
        RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, string, RegionSetLabelsRequest, CallSettings)

    public virtual Operation<Operation, Operation> SetLabels(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` The region for this request. |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` Name or id of the resource for this request. |
| `regionSetLabelsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.RegionSetLabelsRequest` 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string resource = "";
    RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.SetLabels(project, region, resource, regionSetLabelsRequestResource);

    // 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 = forwardingRulesClient.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(SetLabelsForwardingRuleRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsForwardingRuleRequest 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.SetLabelsForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Resource = "",
        Project = "",
        RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(SetLabelsForwardingRuleRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(SetLabelsForwardingRuleRequest 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.SetLabelsForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetLabelsForwardingRuleRequest request = new SetLabelsForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Resource = "",
        Project = "",
        RegionSetLabelsRequestResource = new RegionSetLabelsRequest(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, string, RegionSetLabelsRequest, CallSettings)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` The region for this request. |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` Name or id of the resource for this request. |
| `regionSetLabelsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.RegionSetLabelsRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string resource = "";
    RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

    // 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 forwardingRulesClient.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, string, RegionSetLabelsRequest, CancellationToken)

    public virtual Task<Operation<Operation, Operation>> SetLabelsAsync(string project, string region, string resource, RegionSetLabelsRequest regionSetLabelsRequestResource, 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` The region for this request. |
| `resource` | `https://learn.microsoft.com/dotnet/api/system.string` Name or id of the resource for this request. |
| `regionSetLabelsRequestResource` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.RegionSetLabelsRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string resource = "";
    RegionSetLabelsRequest regionSetLabelsRequestResource = new RegionSetLabelsRequest();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetLabelsAsync(project, region, resource, regionSetLabelsRequestResource);

    // 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 forwardingRulesClient.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(SetTargetForwardingRuleRequest, CallSettings)

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

Changes target URL for forwarding rule. 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.SetTargetForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    SetTargetForwardingRuleRequest request = new SetTargetForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRule = "",
        TargetReferenceResource = new TargetReference(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.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 = forwardingRulesClient.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, string, TargetReference, CallSettings)

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

Changes target URL for forwarding rule. 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = ForwardingRulesClient.Create();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    TargetReference targetReferenceResource = new TargetReference();
    // Make the request
    lro::Operation<Operation, Operation> response = forwardingRulesClient.SetTarget(project, region, 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 = forwardingRulesClient.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(SetTargetForwardingRuleRequest, CallSettings)

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

Changes target URL for forwarding rule. 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.SetTargetForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetTargetForwardingRuleRequest request = new SetTargetForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRule = "",
        TargetReferenceResource = new TargetReference(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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(SetTargetForwardingRuleRequest, CancellationToken)

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

Changes target URL for forwarding rule. 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.SetTargetForwardingRuleRequest` 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    SetTargetForwardingRuleRequest request = new SetTargetForwardingRuleRequest
    {
        RequestId = "",
        Region = "",
        Project = "",
        ForwardingRule = "",
        TargetReferenceResource = new TargetReference(),
    };
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.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 forwardingRulesClient.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, string, TargetReference, CallSettings)

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

Changes target URL for forwarding rule. 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    TargetReference targetReferenceResource = new TargetReference();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetTargetAsync(project, region, 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 forwardingRulesClient.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, string, TargetReference, CancellationToken)

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

Changes target URL for forwarding rule. 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. |
| `region` | `https://learn.microsoft.com/dotnet/api/system.string` Name of the region scoping 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
    ForwardingRulesClient forwardingRulesClient = await ForwardingRulesClient.CreateAsync();
    // Initialize request argument(s)
    string project = "";
    string region = "";
    string forwardingRule = "";
    TargetReference targetReferenceResource = new TargetReference();
    // Make the request
    lro::Operation<Operation, Operation> response = await forwardingRulesClient.SetTargetAsync(project, region, 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 forwardingRulesClient.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.ForwardingRulesClient#Google_Cloud_Compute_V1_ForwardingRulesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRulesClient#Google_Cloud_Compute_V1_ForwardingRulesClient_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.ForwardingRulesClient#Google_Cloud_Compute_V1_ForwardingRulesClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Compute.V1/latest/Google.Cloud.Compute.V1.ForwardingRulesClient#Google_Cloud_Compute_V1_ForwardingRulesClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.