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

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ClientGatewaysService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default ClientGatewaysService scopes are:

DeleteClientGatewayOperationsClient

public virtual OperationsClient DeleteClientGatewayOperationsClient { get; }

The long-running operations client for DeleteClientGateway.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual ClientGatewaysService.ClientGatewaysServiceClient GrpcClient { get; }

The underlying gRPC ClientGatewaysService client

Property Value
TypeDescription
ClientGatewaysServiceClientGatewaysServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
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
TypeDescription
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
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Value for parent.

clientGatewayClientGateway

Required. The resource being created.

clientGatewayIdstring

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

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateClientGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Value for parent.

clientGatewayClientGateway

Required. The resource being created.

clientGatewayIdstring

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

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Value for parent.

clientGatewayClientGateway

Required. The resource being created.

clientGatewayIdstring

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

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Value for parent.

clientGatewayClientGateway

Required. The resource being created.

clientGatewayIdstring

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

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestCreateClientGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestCreateClientGatewayRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Value for parent.

clientGatewayClientGateway

Required. The resource being created.

clientGatewayIdstring

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

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Value for parent.

clientGatewayClientGateway

Required. The resource being created.

clientGatewayIdstring

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

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameClientGatewayName

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDeleteClientGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameClientGatewayName

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameClientGatewayName

Required. Name of the resource

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestDeleteClientGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestDeleteClientGatewayRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
namestring

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

Required. Name of the resource

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
nameClientGatewayName

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetClientGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameClientGatewayName

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
nameClientGatewayName

Required. Name of the resource

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
requestGetClientGatewayRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestGetClientGatewayRequest

The request object containing all of the parameters for the API call.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
namestring

Required. Name of the resource

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
namestring

Required. Name of the resource

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Parent value for ListClientGatewaysRequest.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListClientGatewaysRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Parent value for ListClientGatewaysRequest.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentLocationName

Required. Parent value for ListClientGatewaysRequest.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
requestListClientGatewaysRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
parentstring

Required. Parent value for ListClientGatewaysRequest.

pageTokenstring

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeint

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.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
NameDescription
operationNamestring

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
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
TypeDescription
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.