BeyondCorp Client Gateways v1 API - Class ClientGatewaysServiceClient (1.3.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 > ClientGatewaysServiceClient

Namespace

Google.Cloud.BeyondCorp.ClientGateways.V1

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:

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 associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient 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 using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ClientGatewaysServiceClientBuilder.

Returns
Type Description
ClientGatewaysServiceClient

The created ClientGatewaysServiceClient.

CreateAsync(CancellationToken)

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

Asynchronously creates a ClientGatewaysServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ClientGatewaysServiceClientBuilder.

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskClientGatewaysServiceClient

The task representing the created ClientGatewaysServiceClient.

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
// 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
// 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
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskOperationClientGatewayClientGatewayOperationMetadata

A Task containing the RPC response.

Example
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskOperationClientGatewayClientGatewayOperationMetadata

A Task containing the RPC response.

Example
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskOperationClientGatewayClientGatewayOperationMetadata

A Task containing the RPC response.

Example
// 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
// 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
// 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
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskOperationEmptyClientGatewayOperationMetadata

A Task containing the RPC response.

Example
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskOperationEmptyClientGatewayOperationMetadata

A Task containing the RPC response.

Example
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskOperationEmptyClientGatewayOperationMetadata

A Task containing the RPC response.

Example
// 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
// 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
// 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
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskClientGateway

A Task containing the RPC response.

Example
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskClientGateway

A Task containing the RPC response.

Example
// 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
// 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 to use for this RPC.

Returns
Type Description
TaskClientGateway

A Task containing the RPC response.

Example
// 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 resources.

Example
// 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 resources.

Example
// 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 resources.

Example
// 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 resources.

Example
// 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 resources.

Example
// 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 resources.

Example
// 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() and CreateAsync(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() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.