1.4.0 (latest) 1.3.0 1.2.0 1.1.0 1.0.0

    public abstract class ClientGatewaysServiceClient

Reference documentation and code samples for the BeyondCorp Client Gateways v1 API class ClientGatewaysServiceClient.

ClientGatewaysService client wrapper, for convenient use.

## Inheritance

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

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

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

## Namespace

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

## Assembly

Google.Cloud.BeyondCorp.ClientGateways.V1.dll

## Remarks

API Overview:

The `beyondcorp.googleapis.com` service implements the Google Cloud
BeyondCorp API.

Data Model:

The ClientGatewaysService exposes the following resources:

- Client Gateways, named as follows: `projects/{project_id}/locations/{location_id}/clientGateways/{client_gateway_id}`.

## Properties

### CreateClientGatewayOperationsClient

    public virtual OperationsClient CreateClientGatewayOperationsClient { get; }

The long-running operations client for `CreateClientGateway`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ClientGatewaysService scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `IReadOnlyListstring` |   |

**Remarks** The default ClientGatewaysService scopes are:

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

<br />

### DeleteClientGatewayOperationsClient

    public virtual OperationsClient DeleteClientGatewayOperationsClient { get; }

The long-running operations client for `DeleteClientGateway`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

### GrpcClient

    public virtual ClientGatewaysService.ClientGatewaysServiceClient GrpcClient { get; }

The underlying gRPC ClientGatewaysService client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ClientGatewaysServiceClientGatewaysServiceClient` |   |

### IAMPolicyClient

    public virtual IAMPolicyClient IAMPolicyClient { get; }

The [IAMPolicyClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Iam.V1/latest/Google.Cloud.Iam.V1.IAMPolicyClient.md.txt) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `IAMPolicyClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.md.txt) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `LocationsClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ServiceMetadata` |   |

## Methods

### Create()

    public static ClientGatewaysServiceClient Create()

Synchronously creates a [ClientGatewaysServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[ClientGatewaysServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClientBuilder.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ClientGatewaysServiceClient` | The created [ClientGatewaysServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [ClientGatewaysServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt) using the default credentials, endpoint
and settings. To specify custom credentials or other settings, use
[ClientGatewaysServiceClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClientBuilder.md.txt).

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

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskClientGatewaysServiceClient` | The task representing the created [ClientGatewaysServiceClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt). |

### CreateClientGateway(LocationName, ClientGateway, string, CallSettings)

    public virtual Operation<ClientGateway, ClientGatewayOperationMetadata> CreateClientGateway(LocationName parent, ClientGateway clientGateway, string clientGatewayId, CallSettings callSettings = null)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. Value for parent. |
| `clientGateway` | `ClientGateway` Required. The resource being created. |
| `clientGatewayId` | `string` Optional. User-settable client gateway resource ID. - Must start with a letter. - Must contain between 4-63 characters from `/[a-z][0-9]-/`. - Must end with a number or a letter. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationClientGatewayClientGatewayOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ClientGateway clientGateway = new ClientGateway();
string clientGatewayId = "";
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = clientGatewaysServiceClient.CreateClientGateway(parent, clientGateway, clientGatewayId);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = clientGatewaysServiceClient.PollOnceCreateClientGateway(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGateway(CreateClientGatewayRequest, CallSettings)

    public virtual Operation<ClientGateway, ClientGatewayOperationMetadata> CreateClientGateway(CreateClientGatewayRequest request, CallSettings callSettings = null)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationClientGatewayClientGatewayOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
CreateClientGatewayRequest request = new CreateClientGatewayRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClientGatewayId = "",
    ClientGateway = new ClientGateway(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = clientGatewaysServiceClient.CreateClientGateway(request);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = clientGatewaysServiceClient.PollOnceCreateClientGateway(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGateway(string, ClientGateway, string, CallSettings)

    public virtual Operation<ClientGateway, ClientGatewayOperationMetadata> CreateClientGateway(string parent, ClientGateway clientGateway, string clientGatewayId, CallSettings callSettings = null)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Value for parent. |
| `clientGateway` | `ClientGateway` Required. The resource being created. |
| `clientGatewayId` | `string` Optional. User-settable client gateway resource ID. - Must start with a letter. - Must contain between 4-63 characters from `/[a-z][0-9]-/`. - Must end with a number or a letter. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationClientGatewayClientGatewayOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ClientGateway clientGateway = new ClientGateway();
string clientGatewayId = "";
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = clientGatewaysServiceClient.CreateClientGateway(parent, clientGateway, clientGatewayId);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = clientGatewaysServiceClient.PollOnceCreateClientGateway(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGatewayAsync(LocationName, ClientGateway, string, CallSettings)

    public virtual Task<Operation<ClientGateway, ClientGatewayOperationMetadata>> CreateClientGatewayAsync(LocationName parent, ClientGateway clientGateway, string clientGatewayId, CallSettings callSettings = null)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. Value for parent. |
| `clientGateway` | `ClientGateway` Required. The resource being created. |
| `clientGatewayId` | `string` Optional. User-settable client gateway resource ID. - Must start with a letter. - Must contain between 4-63 characters from `/[a-z][0-9]-/`. - Must end with a number or a letter. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationClientGatewayClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ClientGateway clientGateway = new ClientGateway();
string clientGatewayId = "";
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.CreateClientGatewayAsync(parent, clientGateway, clientGatewayId);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceCreateClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGatewayAsync(LocationName, ClientGateway, string, CancellationToken)

    public virtual Task<Operation<ClientGateway, ClientGatewayOperationMetadata>> CreateClientGatewayAsync(LocationName parent, ClientGateway clientGateway, string clientGatewayId, CancellationToken cancellationToken)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. Value for parent. |
| `clientGateway` | `ClientGateway` Required. The resource being created. |
| `clientGatewayId` | `string` Optional. User-settable client gateway resource ID. - Must start with a letter. - Must contain between 4-63 characters from `/[a-z][0-9]-/`. - Must end with a number or a letter. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationClientGatewayClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ClientGateway clientGateway = new ClientGateway();
string clientGatewayId = "";
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.CreateClientGatewayAsync(parent, clientGateway, clientGatewayId);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceCreateClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGatewayAsync(CreateClientGatewayRequest, CallSettings)

    public virtual Task<Operation<ClientGateway, ClientGatewayOperationMetadata>> CreateClientGatewayAsync(CreateClientGatewayRequest request, CallSettings callSettings = null)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationClientGatewayClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
CreateClientGatewayRequest request = new CreateClientGatewayRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClientGatewayId = "",
    ClientGateway = new ClientGateway(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.CreateClientGatewayAsync(request);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceCreateClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGatewayAsync(CreateClientGatewayRequest, CancellationToken)

    public virtual Task<Operation<ClientGateway, ClientGatewayOperationMetadata>> CreateClientGatewayAsync(CreateClientGatewayRequest request, CancellationToken cancellationToken)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CreateClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationClientGatewayClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
CreateClientGatewayRequest request = new CreateClientGatewayRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    ClientGatewayId = "",
    ClientGateway = new ClientGateway(),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.CreateClientGatewayAsync(request);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceCreateClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGatewayAsync(string, ClientGateway, string, CallSettings)

    public virtual Task<Operation<ClientGateway, ClientGatewayOperationMetadata>> CreateClientGatewayAsync(string parent, ClientGateway clientGateway, string clientGatewayId, CallSettings callSettings = null)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Value for parent. |
| `clientGateway` | `ClientGateway` Required. The resource being created. |
| `clientGatewayId` | `string` Optional. User-settable client gateway resource ID. - Must start with a letter. - Must contain between 4-63 characters from `/[a-z][0-9]-/`. - Must end with a number or a letter. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationClientGatewayClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ClientGateway clientGateway = new ClientGateway();
string clientGatewayId = "";
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.CreateClientGatewayAsync(parent, clientGateway, clientGatewayId);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceCreateClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### CreateClientGatewayAsync(string, ClientGateway, string, CancellationToken)

    public virtual Task<Operation<ClientGateway, ClientGatewayOperationMetadata>> CreateClientGatewayAsync(string parent, ClientGateway clientGateway, string clientGatewayId, CancellationToken cancellationToken)

Creates a new ClientGateway in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Value for parent. |
| `clientGateway` | `ClientGateway` Required. The resource being created. |
| `clientGatewayId` | `string` Optional. User-settable client gateway resource ID. - Must start with a letter. - Must contain between 4-63 characters from `/[a-z][0-9]-/`. - Must end with a number or a letter. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationClientGatewayClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
ClientGateway clientGateway = new ClientGateway();
string clientGatewayId = "";
// Make the request
Operation<ClientGateway, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.CreateClientGatewayAsync(parent, clientGateway, clientGatewayId);

// Poll until the returned long-running operation is complete
Operation<ClientGateway, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ClientGateway 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
Operation<ClientGateway, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceCreateClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ClientGateway retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGateway(ClientGatewayName, CallSettings)

    public virtual Operation<Empty, ClientGatewayOperationMetadata> DeleteClientGateway(ClientGatewayName name, CallSettings callSettings = null)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ClientGatewayName` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationEmptyClientGatewayOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
ClientGatewayName name = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]");
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = clientGatewaysServiceClient.DeleteClientGateway(name);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = clientGatewaysServiceClient.PollOnceDeleteClientGateway(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGateway(DeleteClientGatewayRequest, CallSettings)

    public virtual Operation<Empty, ClientGatewayOperationMetadata> DeleteClientGateway(DeleteClientGatewayRequest request, CallSettings callSettings = null)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationEmptyClientGatewayOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
DeleteClientGatewayRequest request = new DeleteClientGatewayRequest
{
    ClientGatewayName = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = clientGatewaysServiceClient.DeleteClientGateway(request);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = clientGatewaysServiceClient.PollOnceDeleteClientGateway(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGateway(string, CallSettings)

    public virtual Operation<Empty, ClientGatewayOperationMetadata> DeleteClientGateway(string name, CallSettings callSettings = null)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationEmptyClientGatewayOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientGateways/[CLIENT_GATEWAY]";
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = clientGatewaysServiceClient.DeleteClientGateway(name);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = clientGatewaysServiceClient.PollOnceDeleteClientGateway(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGatewayAsync(ClientGatewayName, CallSettings)

    public virtual Task<Operation<Empty, ClientGatewayOperationMetadata>> DeleteClientGatewayAsync(ClientGatewayName name, CallSettings callSettings = null)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ClientGatewayName` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
ClientGatewayName name = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]");
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.DeleteClientGatewayAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceDeleteClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGatewayAsync(ClientGatewayName, CancellationToken)

    public virtual Task<Operation<Empty, ClientGatewayOperationMetadata>> DeleteClientGatewayAsync(ClientGatewayName name, CancellationToken cancellationToken)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ClientGatewayName` Required. Name of the resource |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
ClientGatewayName name = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]");
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.DeleteClientGatewayAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceDeleteClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGatewayAsync(DeleteClientGatewayRequest, CallSettings)

    public virtual Task<Operation<Empty, ClientGatewayOperationMetadata>> DeleteClientGatewayAsync(DeleteClientGatewayRequest request, CallSettings callSettings = null)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteClientGatewayRequest request = new DeleteClientGatewayRequest
{
    ClientGatewayName = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.DeleteClientGatewayAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceDeleteClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGatewayAsync(DeleteClientGatewayRequest, CancellationToken)

    public virtual Task<Operation<Empty, ClientGatewayOperationMetadata>> DeleteClientGatewayAsync(DeleteClientGatewayRequest request, CancellationToken cancellationToken)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `DeleteClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteClientGatewayRequest request = new DeleteClientGatewayRequest
{
    ClientGatewayName = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]"),
    RequestId = "",
    ValidateOnly = false,
};
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.DeleteClientGatewayAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceDeleteClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGatewayAsync(string, CallSettings)

    public virtual Task<Operation<Empty, ClientGatewayOperationMetadata>> DeleteClientGatewayAsync(string name, CallSettings callSettings = null)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientGateways/[CLIENT_GATEWAY]";
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.DeleteClientGatewayAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceDeleteClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### DeleteClientGatewayAsync(string, CancellationToken)

    public virtual Task<Operation<Empty, ClientGatewayOperationMetadata>> DeleteClientGatewayAsync(string name, CancellationToken cancellationToken)

Deletes a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the resource |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyClientGatewayOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientGateways/[CLIENT_GATEWAY]";
// Make the request
Operation<Empty, ClientGatewayOperationMetadata> response = await clientGatewaysServiceClient.DeleteClientGatewayAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, ClientGatewayOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty 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
Operation<Empty, ClientGatewayOperationMetadata> retrievedResponse = await clientGatewaysServiceClient.PollOnceDeleteClientGatewayAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}
```

### GetClientGateway(ClientGatewayName, CallSettings)

    public virtual ClientGateway GetClientGateway(ClientGatewayName name, CallSettings callSettings = null)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ClientGatewayName` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ClientGateway` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
ClientGatewayName name = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]");
// Make the request
ClientGateway response = clientGatewaysServiceClient.GetClientGateway(name);
```

### GetClientGateway(GetClientGatewayRequest, CallSettings)

    public virtual ClientGateway GetClientGateway(GetClientGatewayRequest request, CallSettings callSettings = null)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ClientGateway` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
GetClientGatewayRequest request = new GetClientGatewayRequest
{
    ClientGatewayName = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]"),
};
// Make the request
ClientGateway response = clientGatewaysServiceClient.GetClientGateway(request);
```

### GetClientGateway(string, CallSettings)

    public virtual ClientGateway GetClientGateway(string name, CallSettings callSettings = null)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ClientGateway` | The RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientGateways/[CLIENT_GATEWAY]";
// Make the request
ClientGateway response = clientGatewaysServiceClient.GetClientGateway(name);
```

### GetClientGatewayAsync(ClientGatewayName, CallSettings)

    public virtual Task<ClientGateway> GetClientGatewayAsync(ClientGatewayName name, CallSettings callSettings = null)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ClientGatewayName` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskClientGateway` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
ClientGatewayName name = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]");
// Make the request
ClientGateway response = await clientGatewaysServiceClient.GetClientGatewayAsync(name);
```

### GetClientGatewayAsync(ClientGatewayName, CancellationToken)

    public virtual Task<ClientGateway> GetClientGatewayAsync(ClientGatewayName name, CancellationToken cancellationToken)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `ClientGatewayName` Required. Name of the resource |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskClientGateway` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
ClientGatewayName name = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]");
// Make the request
ClientGateway response = await clientGatewaysServiceClient.GetClientGatewayAsync(name);
```

### GetClientGatewayAsync(GetClientGatewayRequest, CallSettings)

    public virtual Task<ClientGateway> GetClientGatewayAsync(GetClientGatewayRequest request, CallSettings callSettings = null)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskClientGateway` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
GetClientGatewayRequest request = new GetClientGatewayRequest
{
    ClientGatewayName = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]"),
};
// Make the request
ClientGateway response = await clientGatewaysServiceClient.GetClientGatewayAsync(request);
```

### GetClientGatewayAsync(GetClientGatewayRequest, CancellationToken)

    public virtual Task<ClientGateway> GetClientGatewayAsync(GetClientGatewayRequest request, CancellationToken cancellationToken)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `GetClientGatewayRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskClientGateway` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
GetClientGatewayRequest request = new GetClientGatewayRequest
{
    ClientGatewayName = ClientGatewayName.FromProjectLocationClientGateway("[PROJECT]", "[LOCATION]", "[CLIENT_GATEWAY]"),
};
// Make the request
ClientGateway response = await clientGatewaysServiceClient.GetClientGatewayAsync(request);
```

### GetClientGatewayAsync(string, CallSettings)

    public virtual Task<ClientGateway> GetClientGatewayAsync(string name, CallSettings callSettings = null)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the resource |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskClientGateway` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientGateways/[CLIENT_GATEWAY]";
// Make the request
ClientGateway response = await clientGatewaysServiceClient.GetClientGatewayAsync(name);
```

### GetClientGatewayAsync(string, CancellationToken)

    public virtual Task<ClientGateway> GetClientGatewayAsync(string name, CancellationToken cancellationToken)

Gets details of a single ClientGateway.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` Required. Name of the resource |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskClientGateway` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/clientGateways/[CLIENT_GATEWAY]";
// Make the request
ClientGateway response = await clientGatewaysServiceClient.GetClientGatewayAsync(name);
```

### ListClientGateways(LocationName, string, int?, CallSettings)

    public virtual PagedEnumerable<ListClientGatewaysResponse, ClientGateway> ListClientGateways(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ClientGateways in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. Parent value for ListClientGatewaysRequest. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListClientGatewaysResponseClientGateway` | A pageable sequence of [ClientGateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGateway.md.txt) resources. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListClientGatewaysResponse, ClientGateway> response = clientGatewaysServiceClient.ListClientGateways(parent);

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

### ListClientGateways(ListClientGatewaysRequest, CallSettings)

    public virtual PagedEnumerable<ListClientGatewaysResponse, ClientGateway> ListClientGateways(ListClientGatewaysRequest request, CallSettings callSettings = null)

Lists ClientGateways in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListClientGatewaysRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListClientGatewaysResponseClientGateway` | A pageable sequence of [ClientGateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGateway.md.txt) resources. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
ListClientGatewaysRequest request = new ListClientGatewaysRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListClientGatewaysResponse, ClientGateway> response = clientGatewaysServiceClient.ListClientGateways(request);

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

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

    public virtual PagedEnumerable<ListClientGatewaysResponse, ClientGateway> ListClientGateways(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ClientGateways in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Parent value for ListClientGatewaysRequest. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedEnumerableListClientGatewaysResponseClientGateway` | A pageable sequence of [ClientGateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGateway.md.txt) resources. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = ClientGatewaysServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListClientGatewaysResponse, ClientGateway> response = clientGatewaysServiceClient.ListClientGateways(parent);

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

### ListClientGatewaysAsync(LocationName, string, int?, CallSettings)

    public virtual PagedAsyncEnumerable<ListClientGatewaysResponse, ClientGateway> ListClientGatewaysAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ClientGateways in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `LocationName` Required. Parent value for ListClientGatewaysRequest. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListClientGatewaysResponseClientGateway` | A pageable asynchronous sequence of [ClientGateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGateway.md.txt) resources. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListClientGatewaysResponse, ClientGateway> response = clientGatewaysServiceClient.ListClientGatewaysAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ClientGateway item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClientGatewaysResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ClientGateway 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<ClientGateway> 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 (ClientGateway 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;
```

### ListClientGatewaysAsync(ListClientGatewaysRequest, CallSettings)

    public virtual PagedAsyncEnumerable<ListClientGatewaysResponse, ClientGateway> ListClientGatewaysAsync(ListClientGatewaysRequest request, CallSettings callSettings = null)

Lists ClientGateways in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `ListClientGatewaysRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListClientGatewaysResponseClientGateway` | A pageable asynchronous sequence of [ClientGateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGateway.md.txt) resources. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
ListClientGatewaysRequest request = new ListClientGatewaysRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListClientGatewaysResponse, ClientGateway> response = clientGatewaysServiceClient.ListClientGatewaysAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ClientGateway item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClientGatewaysResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ClientGateway 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<ClientGateway> 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 (ClientGateway 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;
```

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

    public virtual PagedAsyncEnumerable<ListClientGatewaysResponse, ClientGateway> ListClientGatewaysAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists ClientGateways in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `string` Required. Parent value for ListClientGatewaysRequest. |
| `pageToken` | `string` The token returned from the previous request. A value of `null` or an empty string retrieves the first page. |
| `pageSize` | `int` 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` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `PagedAsyncEnumerableListClientGatewaysResponseClientGateway` | A pageable asynchronous sequence of [ClientGateway](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGateway.md.txt) resources. |

**Example**

```cs
// Create client
ClientGatewaysServiceClient clientGatewaysServiceClient = await ClientGatewaysServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListClientGatewaysResponse, ClientGateway> response = clientGatewaysServiceClient.ListClientGatewaysAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ClientGateway item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListClientGatewaysResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ClientGateway 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<ClientGateway> 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 (ClientGateway 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;
```

### PollOnceCreateClientGateway(string, CallSettings)

    public virtual Operation<ClientGateway, ClientGatewayOperationMetadata> PollOnceCreateClientGateway(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationClientGatewayClientGatewayOperationMetadata` | The result of polling the operation. |

### PollOnceCreateClientGatewayAsync(string, CallSettings)

    public virtual Task<Operation<ClientGateway, ClientGatewayOperationMetadata>> PollOnceCreateClientGatewayAsync(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationClientGatewayClientGatewayOperationMetadata` | A task representing the result of polling the operation. |

### PollOnceDeleteClientGateway(string, CallSettings)

    public virtual Operation<Empty, ClientGatewayOperationMetadata> PollOnceDeleteClientGateway(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationEmptyClientGatewayOperationMetadata` | The result of polling the operation. |

### PollOnceDeleteClientGatewayAsync(string, CallSettings)

    public virtual Task<Operation<Empty, ClientGatewayOperationMetadata>> PollOnceDeleteClientGatewayAsync(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationEmptyClientGatewayOperationMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt#Google_Cloud_BeyondCorp_ClientGateways_V1_ClientGatewaysServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt#Google_Cloud_BeyondCorp_ClientGateways_V1_ClientGatewaysServiceClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `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.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt#Google_Cloud_BeyondCorp_ClientGateways_V1_ClientGatewaysServiceClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.BeyondCorp.ClientGateways.V1/latest/Google.Cloud.BeyondCorp.ClientGateways.V1.ClientGatewaysServiceClient.md.txt#Google_Cloud_BeyondCorp_ClientGateways_V1_ClientGatewaysServiceClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.