Network Connectivity v1beta API - Class TransportManagerClient (1.0.0-beta01)

public abstract class TransportManagerClient

Reference documentation and code samples for the Network Connectivity v1beta API class TransportManagerClient.

TransportManager client wrapper, for convenient use.

Inheritance

object > TransportManagerClient

Namespace

Google.Cloud.NetworkConnectivity.V1Beta

Assembly

Google.Cloud.NetworkConnectivity.V1Beta.dll

Remarks

The CLH based service for managing RemoteTransportProfiles and Transports.

Properties

CreateTransportOperationsClient

public virtual OperationsClient CreateTransportOperationsClient { get; }

The long-running operations client for CreateTransport.

Property Value
Type Description
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default TransportManager scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default TransportManager scopes are:

DeleteTransportOperationsClient

public virtual OperationsClient DeleteTransportOperationsClient { get; }

The long-running operations client for DeleteTransport.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual TransportManager.TransportManagerClient GrpcClient { get; }

The underlying gRPC TransportManager client

Property Value
Type Description
TransportManagerTransportManagerClient

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

UpdateTransportOperationsClient

public virtual OperationsClient UpdateTransportOperationsClient { get; }

The long-running operations client for UpdateTransport.

Property Value
Type Description
OperationsClient

Methods

Create()

public static TransportManagerClient Create()

Synchronously creates a TransportManagerClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use TransportManagerClientBuilder.

Returns
Type Description
TransportManagerClient

The created TransportManagerClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskTransportManagerClient

The task representing the created TransportManagerClient.

CreateTransport(LocationName, Transport, string, CallSettings)

public virtual Operation<Transport, OperationMetadata> CreateTransport(LocationName parent, Transport transport, string transportId, CallSettings callSettings = null)

Creates a new Transport in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

transport Transport

Required. The resource being created

transportId string

Required. Id of the requesting object

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTransportOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Transport transport = new Transport();
string transportId = "";
// Make the request
Operation<Transport, OperationMetadata> response = transportManagerClient.CreateTransport(parent, transport, transportId);

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

CreateTransport(CreateTransportRequest, CallSettings)

public virtual Operation<Transport, OperationMetadata> CreateTransport(CreateTransportRequest request, CallSettings callSettings = null)

Creates a new Transport in a given project and location.

Parameters
Name Description
request CreateTransportRequest

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
OperationTransportOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
CreateTransportRequest request = new CreateTransportRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    TransportId = "",
    Transport = new Transport(),
    RequestId = "",
};
// Make the request
Operation<Transport, OperationMetadata> response = transportManagerClient.CreateTransport(request);

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

CreateTransport(string, Transport, string, CallSettings)

public virtual Operation<Transport, OperationMetadata> CreateTransport(string parent, Transport transport, string transportId, CallSettings callSettings = null)

Creates a new Transport in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

transport Transport

Required. The resource being created

transportId string

Required. Id of the requesting object

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTransportOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Transport transport = new Transport();
string transportId = "";
// Make the request
Operation<Transport, OperationMetadata> response = transportManagerClient.CreateTransport(parent, transport, transportId);

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

CreateTransportAsync(LocationName, Transport, string, CallSettings)

public virtual Task<Operation<Transport, OperationMetadata>> CreateTransportAsync(LocationName parent, Transport transport, string transportId, CallSettings callSettings = null)

Creates a new Transport in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

transport Transport

Required. The resource being created

transportId string

Required. Id of the requesting object

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Transport transport = new Transport();
string transportId = "";
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.CreateTransportAsync(parent, transport, transportId);

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

CreateTransportAsync(LocationName, Transport, string, CancellationToken)

public virtual Task<Operation<Transport, OperationMetadata>> CreateTransportAsync(LocationName parent, Transport transport, string transportId, CancellationToken cancellationToken)

Creates a new Transport in a given project and location.

Parameters
Name Description
parent LocationName

Required. Value for parent.

transport Transport

Required. The resource being created

transportId string

Required. Id of the requesting object

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Transport transport = new Transport();
string transportId = "";
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.CreateTransportAsync(parent, transport, transportId);

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

CreateTransportAsync(CreateTransportRequest, CallSettings)

public virtual Task<Operation<Transport, OperationMetadata>> CreateTransportAsync(CreateTransportRequest request, CallSettings callSettings = null)

Creates a new Transport in a given project and location.

Parameters
Name Description
request CreateTransportRequest

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
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
CreateTransportRequest request = new CreateTransportRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    TransportId = "",
    Transport = new Transport(),
    RequestId = "",
};
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.CreateTransportAsync(request);

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

CreateTransportAsync(CreateTransportRequest, CancellationToken)

public virtual Task<Operation<Transport, OperationMetadata>> CreateTransportAsync(CreateTransportRequest request, CancellationToken cancellationToken)

Creates a new Transport in a given project and location.

Parameters
Name Description
request CreateTransportRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
CreateTransportRequest request = new CreateTransportRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    TransportId = "",
    Transport = new Transport(),
    RequestId = "",
};
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.CreateTransportAsync(request);

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

CreateTransportAsync(string, Transport, string, CallSettings)

public virtual Task<Operation<Transport, OperationMetadata>> CreateTransportAsync(string parent, Transport transport, string transportId, CallSettings callSettings = null)

Creates a new Transport in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

transport Transport

Required. The resource being created

transportId string

Required. Id of the requesting object

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Transport transport = new Transport();
string transportId = "";
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.CreateTransportAsync(parent, transport, transportId);

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

CreateTransportAsync(string, Transport, string, CancellationToken)

public virtual Task<Operation<Transport, OperationMetadata>> CreateTransportAsync(string parent, Transport transport, string transportId, CancellationToken cancellationToken)

Creates a new Transport in a given project and location.

Parameters
Name Description
parent string

Required. Value for parent.

transport Transport

Required. The resource being created

transportId string

Required. Id of the requesting object

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Transport transport = new Transport();
string transportId = "";
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.CreateTransportAsync(parent, transport, transportId);

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

DeleteTransport(DeleteTransportRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteTransport(DeleteTransportRequest request, CallSettings callSettings = null)

Deletes a single Transport.

Parameters
Name Description
request DeleteTransportRequest

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
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
DeleteTransportRequest request = new DeleteTransportRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = transportManagerClient.DeleteTransport(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = transportManagerClient.PollOnceDeleteTransport(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;
}

DeleteTransport(TransportName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteTransport(TransportName name, CallSettings callSettings = null)

Deletes a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
Operation<Empty, OperationMetadata> response = transportManagerClient.DeleteTransport(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = transportManagerClient.PollOnceDeleteTransport(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;
}

DeleteTransport(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteTransport(string name, CallSettings callSettings = null)

Deletes a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
Operation<Empty, OperationMetadata> response = transportManagerClient.DeleteTransport(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = transportManagerClient.PollOnceDeleteTransport(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;
}

DeleteTransportAsync(DeleteTransportRequest, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteTransportAsync(DeleteTransportRequest request, CallSettings callSettings = null)

Deletes a single Transport.

Parameters
Name Description
request DeleteTransportRequest

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
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteTransportRequest request = new DeleteTransportRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await transportManagerClient.DeleteTransportAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await transportManagerClient.PollOnceDeleteTransportAsync(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;
}

DeleteTransportAsync(DeleteTransportRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteTransportAsync(DeleteTransportRequest request, CancellationToken cancellationToken)

Deletes a single Transport.

Parameters
Name Description
request DeleteTransportRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
DeleteTransportRequest request = new DeleteTransportRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await transportManagerClient.DeleteTransportAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await transportManagerClient.PollOnceDeleteTransportAsync(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;
}

DeleteTransportAsync(TransportName, CallSettings)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteTransportAsync(TransportName name, CallSettings callSettings = null)

Deletes a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
Operation<Empty, OperationMetadata> response = await transportManagerClient.DeleteTransportAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await transportManagerClient.PollOnceDeleteTransportAsync(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;
}

DeleteTransportAsync(TransportName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteTransportAsync(TransportName name, CancellationToken cancellationToken)

Deletes a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
Operation<Empty, OperationMetadata> response = await transportManagerClient.DeleteTransportAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await transportManagerClient.PollOnceDeleteTransportAsync(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;
}

DeleteTransportAsync(string, CallSettings)

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

Deletes a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
Operation<Empty, OperationMetadata> response = await transportManagerClient.DeleteTransportAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await transportManagerClient.PollOnceDeleteTransportAsync(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;
}

DeleteTransportAsync(string, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteTransportAsync(string name, CancellationToken cancellationToken)

Deletes a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
Operation<Empty, OperationMetadata> response = await transportManagerClient.DeleteTransportAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, OperationMetadata> 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, OperationMetadata> retrievedResponse = await transportManagerClient.PollOnceDeleteTransportAsync(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;
}

GetRemoteTransportProfile(GetRemoteTransportProfileRequest, CallSettings)

public virtual RemoteTransportProfile GetRemoteTransportProfile(GetRemoteTransportProfileRequest request, CallSettings callSettings = null)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
request GetRemoteTransportProfileRequest

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
RemoteTransportProfile

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
GetRemoteTransportProfileRequest request = new GetRemoteTransportProfileRequest
{
    RemoteTransportProfileName = RemoteTransportProfileName.FromProjectLocationRemoteTransportProfile("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]"),
};
// Make the request
RemoteTransportProfile response = transportManagerClient.GetRemoteTransportProfile(request);

GetRemoteTransportProfile(RemoteTransportProfileName, CallSettings)

public virtual RemoteTransportProfile GetRemoteTransportProfile(RemoteTransportProfileName name, CallSettings callSettings = null)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
name RemoteTransportProfileName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RemoteTransportProfile

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
RemoteTransportProfileName name = RemoteTransportProfileName.FromProjectLocationRemoteTransportProfile("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]");
// Make the request
RemoteTransportProfile response = transportManagerClient.GetRemoteTransportProfile(name);

GetRemoteTransportProfile(string, CallSettings)

public virtual RemoteTransportProfile GetRemoteTransportProfile(string name, CallSettings callSettings = null)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
RemoteTransportProfile

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/remoteTransportProfiles/[REMOTE_TRANSPORT_PROFILE]";
// Make the request
RemoteTransportProfile response = transportManagerClient.GetRemoteTransportProfile(name);

GetRemoteTransportProfileAsync(GetRemoteTransportProfileRequest, CallSettings)

public virtual Task<RemoteTransportProfile> GetRemoteTransportProfileAsync(GetRemoteTransportProfileRequest request, CallSettings callSettings = null)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
request GetRemoteTransportProfileRequest

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
TaskRemoteTransportProfile

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
GetRemoteTransportProfileRequest request = new GetRemoteTransportProfileRequest
{
    RemoteTransportProfileName = RemoteTransportProfileName.FromProjectLocationRemoteTransportProfile("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]"),
};
// Make the request
RemoteTransportProfile response = await transportManagerClient.GetRemoteTransportProfileAsync(request);

GetRemoteTransportProfileAsync(GetRemoteTransportProfileRequest, CancellationToken)

public virtual Task<RemoteTransportProfile> GetRemoteTransportProfileAsync(GetRemoteTransportProfileRequest request, CancellationToken cancellationToken)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
request GetRemoteTransportProfileRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRemoteTransportProfile

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
GetRemoteTransportProfileRequest request = new GetRemoteTransportProfileRequest
{
    RemoteTransportProfileName = RemoteTransportProfileName.FromProjectLocationRemoteTransportProfile("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]"),
};
// Make the request
RemoteTransportProfile response = await transportManagerClient.GetRemoteTransportProfileAsync(request);

GetRemoteTransportProfileAsync(RemoteTransportProfileName, CallSettings)

public virtual Task<RemoteTransportProfile> GetRemoteTransportProfileAsync(RemoteTransportProfileName name, CallSettings callSettings = null)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
name RemoteTransportProfileName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRemoteTransportProfile

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
RemoteTransportProfileName name = RemoteTransportProfileName.FromProjectLocationRemoteTransportProfile("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]");
// Make the request
RemoteTransportProfile response = await transportManagerClient.GetRemoteTransportProfileAsync(name);

GetRemoteTransportProfileAsync(RemoteTransportProfileName, CancellationToken)

public virtual Task<RemoteTransportProfile> GetRemoteTransportProfileAsync(RemoteTransportProfileName name, CancellationToken cancellationToken)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
name RemoteTransportProfileName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRemoteTransportProfile

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
RemoteTransportProfileName name = RemoteTransportProfileName.FromProjectLocationRemoteTransportProfile("[PROJECT]", "[LOCATION]", "[REMOTE_TRANSPORT_PROFILE]");
// Make the request
RemoteTransportProfile response = await transportManagerClient.GetRemoteTransportProfileAsync(name);

GetRemoteTransportProfileAsync(string, CallSettings)

public virtual Task<RemoteTransportProfile> GetRemoteTransportProfileAsync(string name, CallSettings callSettings = null)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskRemoteTransportProfile

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/remoteTransportProfiles/[REMOTE_TRANSPORT_PROFILE]";
// Make the request
RemoteTransportProfile response = await transportManagerClient.GetRemoteTransportProfileAsync(name);

GetRemoteTransportProfileAsync(string, CancellationToken)

public virtual Task<RemoteTransportProfile> GetRemoteTransportProfileAsync(string name, CancellationToken cancellationToken)

Gets details of a single RemoteTransportProfile.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskRemoteTransportProfile

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/remoteTransportProfiles/[REMOTE_TRANSPORT_PROFILE]";
// Make the request
RemoteTransportProfile response = await transportManagerClient.GetRemoteTransportProfileAsync(name);

GetStatus(GetStatusRequest, CallSettings)

public virtual GetStatusResponse GetStatus(GetStatusRequest request, CallSettings callSettings = null)

Gets the operational status of a single Transport.

Parameters
Name Description
request GetStatusRequest

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
GetStatusResponse

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
GetStatusRequest request = new GetStatusRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
};
// Make the request
GetStatusResponse response = transportManagerClient.GetStatus(request);

GetStatus(TransportName, CallSettings)

public virtual GetStatusResponse GetStatus(TransportName name, CallSettings callSettings = null)

Gets the operational status of a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GetStatusResponse

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
GetStatusResponse response = transportManagerClient.GetStatus(name);

GetStatus(string, CallSettings)

public virtual GetStatusResponse GetStatus(string name, CallSettings callSettings = null)

Gets the operational status of a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
GetStatusResponse

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
GetStatusResponse response = transportManagerClient.GetStatus(name);

GetStatusAsync(GetStatusRequest, CallSettings)

public virtual Task<GetStatusResponse> GetStatusAsync(GetStatusRequest request, CallSettings callSettings = null)

Gets the operational status of a single Transport.

Parameters
Name Description
request GetStatusRequest

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
TaskGetStatusResponse

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
GetStatusRequest request = new GetStatusRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
};
// Make the request
GetStatusResponse response = await transportManagerClient.GetStatusAsync(request);

GetStatusAsync(GetStatusRequest, CancellationToken)

public virtual Task<GetStatusResponse> GetStatusAsync(GetStatusRequest request, CancellationToken cancellationToken)

Gets the operational status of a single Transport.

Parameters
Name Description
request GetStatusRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGetStatusResponse

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
GetStatusRequest request = new GetStatusRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
};
// Make the request
GetStatusResponse response = await transportManagerClient.GetStatusAsync(request);

GetStatusAsync(TransportName, CallSettings)

public virtual Task<GetStatusResponse> GetStatusAsync(TransportName name, CallSettings callSettings = null)

Gets the operational status of a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGetStatusResponse

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
GetStatusResponse response = await transportManagerClient.GetStatusAsync(name);

GetStatusAsync(TransportName, CancellationToken)

public virtual Task<GetStatusResponse> GetStatusAsync(TransportName name, CancellationToken cancellationToken)

Gets the operational status of a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGetStatusResponse

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
GetStatusResponse response = await transportManagerClient.GetStatusAsync(name);

GetStatusAsync(string, CallSettings)

public virtual Task<GetStatusResponse> GetStatusAsync(string name, CallSettings callSettings = null)

Gets the operational status of a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskGetStatusResponse

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
GetStatusResponse response = await transportManagerClient.GetStatusAsync(name);

GetStatusAsync(string, CancellationToken)

public virtual Task<GetStatusResponse> GetStatusAsync(string name, CancellationToken cancellationToken)

Gets the operational status of a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGetStatusResponse

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
GetStatusResponse response = await transportManagerClient.GetStatusAsync(name);

GetTransport(GetTransportRequest, CallSettings)

public virtual Transport GetTransport(GetTransportRequest request, CallSettings callSettings = null)

Gets details of a single Transport.

Parameters
Name Description
request GetTransportRequest

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
Transport

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
GetTransportRequest request = new GetTransportRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
};
// Make the request
Transport response = transportManagerClient.GetTransport(request);

GetTransport(TransportName, CallSettings)

public virtual Transport GetTransport(TransportName name, CallSettings callSettings = null)

Gets details of a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Transport

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
Transport response = transportManagerClient.GetTransport(name);

GetTransport(string, CallSettings)

public virtual Transport GetTransport(string name, CallSettings callSettings = null)

Gets details of a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
Transport

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
Transport response = transportManagerClient.GetTransport(name);

GetTransportAsync(GetTransportRequest, CallSettings)

public virtual Task<Transport> GetTransportAsync(GetTransportRequest request, CallSettings callSettings = null)

Gets details of a single Transport.

Parameters
Name Description
request GetTransportRequest

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
TaskTransport

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
GetTransportRequest request = new GetTransportRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
};
// Make the request
Transport response = await transportManagerClient.GetTransportAsync(request);

GetTransportAsync(GetTransportRequest, CancellationToken)

public virtual Task<Transport> GetTransportAsync(GetTransportRequest request, CancellationToken cancellationToken)

Gets details of a single Transport.

Parameters
Name Description
request GetTransportRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTransport

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
GetTransportRequest request = new GetTransportRequest
{
    TransportName = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]"),
};
// Make the request
Transport response = await transportManagerClient.GetTransportAsync(request);

GetTransportAsync(TransportName, CallSettings)

public virtual Task<Transport> GetTransportAsync(TransportName name, CallSettings callSettings = null)

Gets details of a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTransport

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
Transport response = await transportManagerClient.GetTransportAsync(name);

GetTransportAsync(TransportName, CancellationToken)

public virtual Task<Transport> GetTransportAsync(TransportName name, CancellationToken cancellationToken)

Gets details of a single Transport.

Parameters
Name Description
name TransportName

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTransport

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
TransportName name = TransportName.FromProjectLocationTransport("[PROJECT]", "[LOCATION]", "[TRANSPORT]");
// Make the request
Transport response = await transportManagerClient.GetTransportAsync(name);

GetTransportAsync(string, CallSettings)

public virtual Task<Transport> GetTransportAsync(string name, CallSettings callSettings = null)

Gets details of a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskTransport

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
Transport response = await transportManagerClient.GetTransportAsync(name);

GetTransportAsync(string, CancellationToken)

public virtual Task<Transport> GetTransportAsync(string name, CancellationToken cancellationToken)

Gets details of a single Transport.

Parameters
Name Description
name string

Required. Name of the resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskTransport

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/transports/[TRANSPORT]";
// Make the request
Transport response = await transportManagerClient.GetTransportAsync(name);

ListRemoteTransportProfiles(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> ListRemoteTransportProfiles(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists RemoteTransportProfiles in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListRemoteTransportProfilesRequest.

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
PagedEnumerableListRemoteTransportProfilesResponseRemoteTransportProfile

A pageable sequence of RemoteTransportProfile resources.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> response = transportManagerClient.ListRemoteTransportProfiles(parent);

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

ListRemoteTransportProfiles(ListRemoteTransportProfilesRequest, CallSettings)

public virtual PagedEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> ListRemoteTransportProfiles(ListRemoteTransportProfilesRequest request, CallSettings callSettings = null)

Lists RemoteTransportProfiles in a given project and location.

Parameters
Name Description
request ListRemoteTransportProfilesRequest

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
PagedEnumerableListRemoteTransportProfilesResponseRemoteTransportProfile

A pageable sequence of RemoteTransportProfile resources.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
ListRemoteTransportProfilesRequest request = new ListRemoteTransportProfilesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> response = transportManagerClient.ListRemoteTransportProfiles(request);

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

ListRemoteTransportProfiles(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> ListRemoteTransportProfiles(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists RemoteTransportProfiles in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListRemoteTransportProfilesRequest.

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
PagedEnumerableListRemoteTransportProfilesResponseRemoteTransportProfile

A pageable sequence of RemoteTransportProfile resources.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> response = transportManagerClient.ListRemoteTransportProfiles(parent);

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

ListRemoteTransportProfilesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> ListRemoteTransportProfilesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists RemoteTransportProfiles in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListRemoteTransportProfilesRequest.

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
PagedAsyncEnumerableListRemoteTransportProfilesResponseRemoteTransportProfile

A pageable asynchronous sequence of RemoteTransportProfile resources.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> response = transportManagerClient.ListRemoteTransportProfilesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (RemoteTransportProfile item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

ListRemoteTransportProfilesAsync(ListRemoteTransportProfilesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> ListRemoteTransportProfilesAsync(ListRemoteTransportProfilesRequest request, CallSettings callSettings = null)

Lists RemoteTransportProfiles in a given project and location.

Parameters
Name Description
request ListRemoteTransportProfilesRequest

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
PagedAsyncEnumerableListRemoteTransportProfilesResponseRemoteTransportProfile

A pageable asynchronous sequence of RemoteTransportProfile resources.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
ListRemoteTransportProfilesRequest request = new ListRemoteTransportProfilesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> response = transportManagerClient.ListRemoteTransportProfilesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (RemoteTransportProfile item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

ListRemoteTransportProfilesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> ListRemoteTransportProfilesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists RemoteTransportProfiles in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListRemoteTransportProfilesRequest.

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
PagedAsyncEnumerableListRemoteTransportProfilesResponseRemoteTransportProfile

A pageable asynchronous sequence of RemoteTransportProfile resources.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListRemoteTransportProfilesResponse, RemoteTransportProfile> response = transportManagerClient.ListRemoteTransportProfilesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (RemoteTransportProfile item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

ListTransports(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListTransportsResponse, Transport> ListTransports(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Transports in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListTransportsRequest.

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
PagedEnumerableListTransportsResponseTransport

A pageable sequence of Transport resources.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListTransportsResponse, Transport> response = transportManagerClient.ListTransports(parent);

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

ListTransports(ListTransportsRequest, CallSettings)

public virtual PagedEnumerable<ListTransportsResponse, Transport> ListTransports(ListTransportsRequest request, CallSettings callSettings = null)

Lists Transports in a given project and location.

Parameters
Name Description
request ListTransportsRequest

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
PagedEnumerableListTransportsResponseTransport

A pageable sequence of Transport resources.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
ListTransportsRequest request = new ListTransportsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListTransportsResponse, Transport> response = transportManagerClient.ListTransports(request);

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

ListTransports(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListTransportsResponse, Transport> ListTransports(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Transports in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListTransportsRequest.

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
PagedEnumerableListTransportsResponseTransport

A pageable sequence of Transport resources.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListTransportsResponse, Transport> response = transportManagerClient.ListTransports(parent);

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

ListTransportsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTransportsResponse, Transport> ListTransportsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Transports in a given project and location.

Parameters
Name Description
parent LocationName

Required. Parent value for ListTransportsRequest.

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
PagedAsyncEnumerableListTransportsResponseTransport

A pageable asynchronous sequence of Transport resources.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListTransportsResponse, Transport> response = transportManagerClient.ListTransportsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Transport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

ListTransportsAsync(ListTransportsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListTransportsResponse, Transport> ListTransportsAsync(ListTransportsRequest request, CallSettings callSettings = null)

Lists Transports in a given project and location.

Parameters
Name Description
request ListTransportsRequest

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
PagedAsyncEnumerableListTransportsResponseTransport

A pageable asynchronous sequence of Transport resources.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
ListTransportsRequest request = new ListTransportsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListTransportsResponse, Transport> response = transportManagerClient.ListTransportsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Transport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

ListTransportsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListTransportsResponse, Transport> ListTransportsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists Transports in a given project and location.

Parameters
Name Description
parent string

Required. Parent value for ListTransportsRequest.

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
PagedAsyncEnumerableListTransportsResponseTransport

A pageable asynchronous sequence of Transport resources.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListTransportsResponse, Transport> response = transportManagerClient.ListTransportsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await foreach (Transport item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

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

PollOnceCreateTransport(string, CallSettings)

public virtual Operation<Transport, OperationMetadata> PollOnceCreateTransport(string operationName, CallSettings callSettings = null)

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

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
OperationTransportOperationMetadata

The result of polling the operation.

PollOnceCreateTransportAsync(string, CallSettings)

public virtual Task<Operation<Transport, OperationMetadata>> PollOnceCreateTransportAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationTransportOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteTransport(string, CallSettings)

public virtual Operation<Empty, OperationMetadata> PollOnceDeleteTransport(string operationName, CallSettings callSettings = null)

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

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
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteTransportAsync(string, CallSettings)

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

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

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
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateTransport(string, CallSettings)

public virtual Operation<Transport, OperationMetadata> PollOnceUpdateTransport(string operationName, CallSettings callSettings = null)

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

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
OperationTransportOperationMetadata

The result of polling the operation.

PollOnceUpdateTransportAsync(string, CallSettings)

public virtual Task<Operation<Transport, OperationMetadata>> PollOnceUpdateTransportAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationTransportOperationMetadata

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.

UpdateTransport(Transport, FieldMask, CallSettings)

public virtual Operation<Transport, OperationMetadata> UpdateTransport(Transport transport, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Transport.

Parameters
Name Description
transport Transport

Required. The resource being updated.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Transport resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationTransportOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
Transport transport = new Transport();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Transport, OperationMetadata> response = transportManagerClient.UpdateTransport(transport, updateMask);

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

UpdateTransport(UpdateTransportRequest, CallSettings)

public virtual Operation<Transport, OperationMetadata> UpdateTransport(UpdateTransportRequest request, CallSettings callSettings = null)

Updates the parameters of a single Transport.

Parameters
Name Description
request UpdateTransportRequest

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
OperationTransportOperationMetadata

The RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = TransportManagerClient.Create();
// Initialize request argument(s)
UpdateTransportRequest request = new UpdateTransportRequest
{
    UpdateMask = new FieldMask(),
    Transport = new Transport(),
    RequestId = "",
};
// Make the request
Operation<Transport, OperationMetadata> response = transportManagerClient.UpdateTransport(request);

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

UpdateTransportAsync(Transport, FieldMask, CallSettings)

public virtual Task<Operation<Transport, OperationMetadata>> UpdateTransportAsync(Transport transport, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a single Transport.

Parameters
Name Description
transport Transport

Required. The resource being updated.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Transport resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
Transport transport = new Transport();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.UpdateTransportAsync(transport, updateMask);

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

UpdateTransportAsync(Transport, FieldMask, CancellationToken)

public virtual Task<Operation<Transport, OperationMetadata>> UpdateTransportAsync(Transport transport, FieldMask updateMask, CancellationToken cancellationToken)

Updates the parameters of a single Transport.

Parameters
Name Description
transport Transport

Required. The resource being updated.

updateMask FieldMask

Optional. Field mask is used to specify the fields to be overwritten in the Transport resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields present in the request will be overwritten.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
Transport transport = new Transport();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.UpdateTransportAsync(transport, updateMask);

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

UpdateTransportAsync(UpdateTransportRequest, CallSettings)

public virtual Task<Operation<Transport, OperationMetadata>> UpdateTransportAsync(UpdateTransportRequest request, CallSettings callSettings = null)

Updates the parameters of a single Transport.

Parameters
Name Description
request UpdateTransportRequest

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
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateTransportRequest request = new UpdateTransportRequest
{
    UpdateMask = new FieldMask(),
    Transport = new Transport(),
    RequestId = "",
};
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.UpdateTransportAsync(request);

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

UpdateTransportAsync(UpdateTransportRequest, CancellationToken)

public virtual Task<Operation<Transport, OperationMetadata>> UpdateTransportAsync(UpdateTransportRequest request, CancellationToken cancellationToken)

Updates the parameters of a single Transport.

Parameters
Name Description
request UpdateTransportRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationTransportOperationMetadata

A Task containing the RPC response.

Example
// Create client
TransportManagerClient transportManagerClient = await TransportManagerClient.CreateAsync();
// Initialize request argument(s)
UpdateTransportRequest request = new UpdateTransportRequest
{
    UpdateMask = new FieldMask(),
    Transport = new Transport(),
    RequestId = "",
};
// Make the request
Operation<Transport, OperationMetadata> response = await transportManagerClient.UpdateTransportAsync(request);

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