Network Connectivity v1 API - Class HubServiceClient (2.7.0)

public abstract class HubServiceClient

Reference documentation and code samples for the Network Connectivity v1 API class HubServiceClient.

HubService client wrapper, for convenient use.

Inheritance

object > HubServiceClient

Derived Types

Namespace

Google.Cloud.NetworkConnectivity.V1

Assembly

Google.Cloud.NetworkConnectivity.V1.dll

Remarks

Network Connectivity Center is a hub-and-spoke abstraction for network connectivity management in Google Cloud. It reduces operational complexity through a simple, centralized connectivity management model.

Properties

AcceptHubSpokeOperationsClient

public virtual OperationsClient AcceptHubSpokeOperationsClient { get; }

The long-running operations client for AcceptHubSpoke.

Property Value
TypeDescription
OperationsClient

CreateHubOperationsClient

public virtual OperationsClient CreateHubOperationsClient { get; }

The long-running operations client for CreateHub.

Property Value
TypeDescription
OperationsClient

CreateSpokeOperationsClient

public virtual OperationsClient CreateSpokeOperationsClient { get; }

The long-running operations client for CreateSpoke.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default HubService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default HubService scopes are:

DeleteHubOperationsClient

public virtual OperationsClient DeleteHubOperationsClient { get; }

The long-running operations client for DeleteHub.

Property Value
TypeDescription
OperationsClient

DeleteSpokeOperationsClient

public virtual OperationsClient DeleteSpokeOperationsClient { get; }

The long-running operations client for DeleteSpoke.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual HubService.HubServiceClient GrpcClient { get; }

The underlying gRPC HubService client

Property Value
TypeDescription
HubServiceHubServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

RejectHubSpokeOperationsClient

public virtual OperationsClient RejectHubSpokeOperationsClient { get; }

The long-running operations client for RejectHubSpoke.

Property Value
TypeDescription
OperationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateHubOperationsClient

public virtual OperationsClient UpdateHubOperationsClient { get; }

The long-running operations client for UpdateHub.

Property Value
TypeDescription
OperationsClient

UpdateSpokeOperationsClient

public virtual OperationsClient UpdateSpokeOperationsClient { get; }

The long-running operations client for UpdateSpoke.

Property Value
TypeDescription
OperationsClient

Methods

AcceptHubSpoke(AcceptHubSpokeRequest, CallSettings)

public virtual Operation<AcceptHubSpokeResponse, OperationMetadata> AcceptHubSpoke(AcceptHubSpokeRequest request, CallSettings callSettings = null)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
requestAcceptHubSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationAcceptHubSpokeResponseOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
AcceptHubSpokeRequest request = new AcceptHubSpokeRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeUriAsSpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
};
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = hubServiceClient.AcceptHubSpoke(request);

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

AcceptHubSpoke(HubName, SpokeName, CallSettings)

public virtual Operation<AcceptHubSpokeResponse, OperationMetadata> AcceptHubSpoke(HubName name, SpokeName spokeUri, CallSettings callSettings = null)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub into which to accept the spoke.

spokeUriSpokeName

Required. The URI of the spoke to accept into the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationAcceptHubSpokeResponseOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = hubServiceClient.AcceptHubSpoke(name, spokeUri);

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

AcceptHubSpoke(string, string, CallSettings)

public virtual Operation<AcceptHubSpokeResponse, OperationMetadata> AcceptHubSpoke(string name, string spokeUri, CallSettings callSettings = null)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
namestring

Required. The name of the hub into which to accept the spoke.

spokeUristring

Required. The URI of the spoke to accept into the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationAcceptHubSpokeResponseOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
string spokeUri = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = hubServiceClient.AcceptHubSpoke(name, spokeUri);

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

AcceptHubSpokeAsync(AcceptHubSpokeRequest, CallSettings)

public virtual Task<Operation<AcceptHubSpokeResponse, OperationMetadata>> AcceptHubSpokeAsync(AcceptHubSpokeRequest request, CallSettings callSettings = null)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
requestAcceptHubSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationAcceptHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
AcceptHubSpokeRequest request = new AcceptHubSpokeRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeUriAsSpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
};
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = await hubServiceClient.AcceptHubSpokeAsync(request);

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

AcceptHubSpokeAsync(AcceptHubSpokeRequest, CancellationToken)

public virtual Task<Operation<AcceptHubSpokeResponse, OperationMetadata>> AcceptHubSpokeAsync(AcceptHubSpokeRequest request, CancellationToken cancellationToken)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
requestAcceptHubSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationAcceptHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
AcceptHubSpokeRequest request = new AcceptHubSpokeRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeUriAsSpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
};
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = await hubServiceClient.AcceptHubSpokeAsync(request);

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

AcceptHubSpokeAsync(HubName, SpokeName, CallSettings)

public virtual Task<Operation<AcceptHubSpokeResponse, OperationMetadata>> AcceptHubSpokeAsync(HubName name, SpokeName spokeUri, CallSettings callSettings = null)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub into which to accept the spoke.

spokeUriSpokeName

Required. The URI of the spoke to accept into the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationAcceptHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = await hubServiceClient.AcceptHubSpokeAsync(name, spokeUri);

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

AcceptHubSpokeAsync(HubName, SpokeName, CancellationToken)

public virtual Task<Operation<AcceptHubSpokeResponse, OperationMetadata>> AcceptHubSpokeAsync(HubName name, SpokeName spokeUri, CancellationToken cancellationToken)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub into which to accept the spoke.

spokeUriSpokeName

Required. The URI of the spoke to accept into the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationAcceptHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = await hubServiceClient.AcceptHubSpokeAsync(name, spokeUri);

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

AcceptHubSpokeAsync(string, string, CallSettings)

public virtual Task<Operation<AcceptHubSpokeResponse, OperationMetadata>> AcceptHubSpokeAsync(string name, string spokeUri, CallSettings callSettings = null)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
namestring

Required. The name of the hub into which to accept the spoke.

spokeUristring

Required. The URI of the spoke to accept into the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationAcceptHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
string spokeUri = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = await hubServiceClient.AcceptHubSpokeAsync(name, spokeUri);

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

AcceptHubSpokeAsync(string, string, CancellationToken)

public virtual Task<Operation<AcceptHubSpokeResponse, OperationMetadata>> AcceptHubSpokeAsync(string name, string spokeUri, CancellationToken cancellationToken)

Accepts a proposal to attach a Network Connectivity Center spoke to a hub.

Parameters
NameDescription
namestring

Required. The name of the hub into which to accept the spoke.

spokeUristring

Required. The URI of the spoke to accept into the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationAcceptHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
string spokeUri = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<AcceptHubSpokeResponse, OperationMetadata> response = await hubServiceClient.AcceptHubSpokeAsync(name, spokeUri);

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

Create()

public static HubServiceClient Create()

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

Returns
TypeDescription
HubServiceClient

The created HubServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskHubServiceClient

The task representing the created HubServiceClient.

CreateHub(LocationName, Hub, string, CallSettings)

public virtual Operation<Hub, OperationMetadata> CreateHub(LocationName parent, Hub hub, string hubId, CallSettings callSettings = null)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdstring

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationHubOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Hub hub = new Hub();
string hubId = "";
// Make the request
Operation<Hub, OperationMetadata> response = hubServiceClient.CreateHub(parent, hub, hubId);

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

CreateHub(CreateHubRequest, CallSettings)

public virtual Operation<Hub, OperationMetadata> CreateHub(CreateHubRequest request, CallSettings callSettings = null)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
requestCreateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationHubOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
CreateHubRequest request = new CreateHubRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    HubId = "",
    Hub = new Hub(),
    RequestId = "",
};
// Make the request
Operation<Hub, OperationMetadata> response = hubServiceClient.CreateHub(request);

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

CreateHub(string, Hub, string, CallSettings)

public virtual Operation<Hub, OperationMetadata> CreateHub(string parent, Hub hub, string hubId, CallSettings callSettings = null)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
parentstring

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdstring

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationHubOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Hub hub = new Hub();
string hubId = "";
// Make the request
Operation<Hub, OperationMetadata> response = hubServiceClient.CreateHub(parent, hub, hubId);

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

CreateHubAsync(LocationName, Hub, string, CallSettings)

public virtual Task<Operation<Hub, OperationMetadata>> CreateHubAsync(LocationName parent, Hub hub, string hubId, CallSettings callSettings = null)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdstring

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Hub hub = new Hub();
string hubId = "";
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.CreateHubAsync(parent, hub, hubId);

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

CreateHubAsync(LocationName, Hub, string, CancellationToken)

public virtual Task<Operation<Hub, OperationMetadata>> CreateHubAsync(LocationName parent, Hub hub, string hubId, CancellationToken cancellationToken)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdstring

Required. A unique identifier for the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Hub hub = new Hub();
string hubId = "";
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.CreateHubAsync(parent, hub, hubId);

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

CreateHubAsync(CreateHubRequest, CallSettings)

public virtual Task<Operation<Hub, OperationMetadata>> CreateHubAsync(CreateHubRequest request, CallSettings callSettings = null)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
requestCreateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
CreateHubRequest request = new CreateHubRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    HubId = "",
    Hub = new Hub(),
    RequestId = "",
};
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.CreateHubAsync(request);

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

CreateHubAsync(CreateHubRequest, CancellationToken)

public virtual Task<Operation<Hub, OperationMetadata>> CreateHubAsync(CreateHubRequest request, CancellationToken cancellationToken)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
requestCreateHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
CreateHubRequest request = new CreateHubRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    HubId = "",
    Hub = new Hub(),
    RequestId = "",
};
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.CreateHubAsync(request);

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

CreateHubAsync(string, Hub, string, CallSettings)

public virtual Task<Operation<Hub, OperationMetadata>> CreateHubAsync(string parent, Hub hub, string hubId, CallSettings callSettings = null)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
parentstring

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdstring

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Hub hub = new Hub();
string hubId = "";
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.CreateHubAsync(parent, hub, hubId);

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

CreateHubAsync(string, Hub, string, CancellationToken)

public virtual Task<Operation<Hub, OperationMetadata>> CreateHubAsync(string parent, Hub hub, string hubId, CancellationToken cancellationToken)

Creates a new Network Connectivity Center hub in the specified project.

Parameters
NameDescription
parentstring

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdstring

Required. A unique identifier for the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Hub hub = new Hub();
string hubId = "";
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.CreateHubAsync(parent, hub, hubId);

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

CreateSpoke(LocationName, Spoke, string, CallSettings)

public virtual Operation<Spoke, OperationMetadata> CreateSpoke(LocationName parent, Spoke spoke, string spokeId, CallSettings callSettings = null)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdstring

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSpokeOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Spoke spoke = new Spoke();
string spokeId = "";
// Make the request
Operation<Spoke, OperationMetadata> response = hubServiceClient.CreateSpoke(parent, spoke, spokeId);

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

CreateSpoke(CreateSpokeRequest, CallSettings)

public virtual Operation<Spoke, OperationMetadata> CreateSpoke(CreateSpokeRequest request, CallSettings callSettings = null)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
requestCreateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSpokeOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
CreateSpokeRequest request = new CreateSpokeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SpokeId = "",
    Spoke = new Spoke(),
    RequestId = "",
};
// Make the request
Operation<Spoke, OperationMetadata> response = hubServiceClient.CreateSpoke(request);

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

CreateSpoke(string, Spoke, string, CallSettings)

public virtual Operation<Spoke, OperationMetadata> CreateSpoke(string parent, Spoke spoke, string spokeId, CallSettings callSettings = null)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
parentstring

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdstring

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSpokeOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Spoke spoke = new Spoke();
string spokeId = "";
// Make the request
Operation<Spoke, OperationMetadata> response = hubServiceClient.CreateSpoke(parent, spoke, spokeId);

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

CreateSpokeAsync(LocationName, Spoke, string, CallSettings)

public virtual Task<Operation<Spoke, OperationMetadata>> CreateSpokeAsync(LocationName parent, Spoke spoke, string spokeId, CallSettings callSettings = null)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdstring

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Spoke spoke = new Spoke();
string spokeId = "";
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.CreateSpokeAsync(parent, spoke, spokeId);

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

CreateSpokeAsync(LocationName, Spoke, string, CancellationToken)

public virtual Task<Operation<Spoke, OperationMetadata>> CreateSpokeAsync(LocationName parent, Spoke spoke, string spokeId, CancellationToken cancellationToken)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdstring

Required. Unique id for the spoke to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Spoke spoke = new Spoke();
string spokeId = "";
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.CreateSpokeAsync(parent, spoke, spokeId);

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

CreateSpokeAsync(CreateSpokeRequest, CallSettings)

public virtual Task<Operation<Spoke, OperationMetadata>> CreateSpokeAsync(CreateSpokeRequest request, CallSettings callSettings = null)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
requestCreateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSpokeRequest request = new CreateSpokeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SpokeId = "",
    Spoke = new Spoke(),
    RequestId = "",
};
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.CreateSpokeAsync(request);

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

CreateSpokeAsync(CreateSpokeRequest, CancellationToken)

public virtual Task<Operation<Spoke, OperationMetadata>> CreateSpokeAsync(CreateSpokeRequest request, CancellationToken cancellationToken)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
requestCreateSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
CreateSpokeRequest request = new CreateSpokeRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SpokeId = "",
    Spoke = new Spoke(),
    RequestId = "",
};
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.CreateSpokeAsync(request);

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

CreateSpokeAsync(string, Spoke, string, CallSettings)

public virtual Task<Operation<Spoke, OperationMetadata>> CreateSpokeAsync(string parent, Spoke spoke, string spokeId, CallSettings callSettings = null)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
parentstring

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdstring

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Spoke spoke = new Spoke();
string spokeId = "";
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.CreateSpokeAsync(parent, spoke, spokeId);

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

CreateSpokeAsync(string, Spoke, string, CancellationToken)

public virtual Task<Operation<Spoke, OperationMetadata>> CreateSpokeAsync(string parent, Spoke spoke, string spokeId, CancellationToken cancellationToken)

Creates a Network Connectivity Center spoke.

Parameters
NameDescription
parentstring

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdstring

Required. Unique id for the spoke to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Spoke spoke = new Spoke();
string spokeId = "";
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.CreateSpokeAsync(parent, spoke, spokeId);

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

DeleteHub(DeleteHubRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteHub(DeleteHubRequest request, CallSettings callSettings = null)

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
requestDeleteHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
DeleteHubRequest request = new DeleteHubRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = hubServiceClient.DeleteHub(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 = hubServiceClient.PollOnceDeleteHub(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;
}

DeleteHub(HubName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteHub(HubName name, CallSettings callSettings = null)

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
Operation<Empty, OperationMetadata> response = hubServiceClient.DeleteHub(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 = hubServiceClient.PollOnceDeleteHub(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;
}

DeleteHub(string, CallSettings)

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

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
namestring

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
Operation<Empty, OperationMetadata> response = hubServiceClient.DeleteHub(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 = hubServiceClient.PollOnceDeleteHub(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;
}

DeleteHubAsync(DeleteHubRequest, CallSettings)

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

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
requestDeleteHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteHubRequest request = new DeleteHubRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteHubAsync(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 hubServiceClient.PollOnceDeleteHubAsync(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;
}

DeleteHubAsync(DeleteHubRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteHubAsync(DeleteHubRequest request, CancellationToken cancellationToken)

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
requestDeleteHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteHubRequest request = new DeleteHubRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteHubAsync(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 hubServiceClient.PollOnceDeleteHubAsync(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;
}

DeleteHubAsync(HubName, CallSettings)

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

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteHubAsync(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 hubServiceClient.PollOnceDeleteHubAsync(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;
}

DeleteHubAsync(HubName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteHubAsync(HubName name, CancellationToken cancellationToken)

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteHubAsync(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 hubServiceClient.PollOnceDeleteHubAsync(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;
}

DeleteHubAsync(string, CallSettings)

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

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
namestring

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteHubAsync(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 hubServiceClient.PollOnceDeleteHubAsync(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;
}

DeleteHubAsync(string, CancellationToken)

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

Deletes a Network Connectivity Center hub.

Parameters
NameDescription
namestring

Required. The name of the hub to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteHubAsync(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 hubServiceClient.PollOnceDeleteHubAsync(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;
}

DeleteSpoke(DeleteSpokeRequest, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteSpoke(DeleteSpokeRequest request, CallSettings callSettings = null)

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
requestDeleteSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
DeleteSpokeRequest request = new DeleteSpokeRequest
{
    SpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = hubServiceClient.DeleteSpoke(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 = hubServiceClient.PollOnceDeleteSpoke(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;
}

DeleteSpoke(SpokeName, CallSettings)

public virtual Operation<Empty, OperationMetadata> DeleteSpoke(SpokeName name, CallSettings callSettings = null)

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
SpokeName name = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<Empty, OperationMetadata> response = hubServiceClient.DeleteSpoke(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 = hubServiceClient.PollOnceDeleteSpoke(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;
}

DeleteSpoke(string, CallSettings)

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

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
namestring

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<Empty, OperationMetadata> response = hubServiceClient.DeleteSpoke(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 = hubServiceClient.PollOnceDeleteSpoke(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;
}

DeleteSpokeAsync(DeleteSpokeRequest, CallSettings)

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

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
requestDeleteSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSpokeRequest request = new DeleteSpokeRequest
{
    SpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteSpokeAsync(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 hubServiceClient.PollOnceDeleteSpokeAsync(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;
}

DeleteSpokeAsync(DeleteSpokeRequest, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteSpokeAsync(DeleteSpokeRequest request, CancellationToken cancellationToken)

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
requestDeleteSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteSpokeRequest request = new DeleteSpokeRequest
{
    SpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
};
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteSpokeAsync(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 hubServiceClient.PollOnceDeleteSpokeAsync(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;
}

DeleteSpokeAsync(SpokeName, CallSettings)

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

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
SpokeName name = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteSpokeAsync(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 hubServiceClient.PollOnceDeleteSpokeAsync(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;
}

DeleteSpokeAsync(SpokeName, CancellationToken)

public virtual Task<Operation<Empty, OperationMetadata>> DeleteSpokeAsync(SpokeName name, CancellationToken cancellationToken)

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
SpokeName name = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteSpokeAsync(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 hubServiceClient.PollOnceDeleteSpokeAsync(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;
}

DeleteSpokeAsync(string, CallSettings)

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

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
namestring

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteSpokeAsync(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 hubServiceClient.PollOnceDeleteSpokeAsync(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;
}

DeleteSpokeAsync(string, CancellationToken)

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

Deletes a Network Connectivity Center spoke.

Parameters
NameDescription
namestring

Required. The name of the spoke to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<Empty, OperationMetadata> response = await hubServiceClient.DeleteSpokeAsync(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 hubServiceClient.PollOnceDeleteSpokeAsync(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;
}

GetGroup(GetGroupRequest, CallSettings)

public virtual Group GetGroup(GetGroupRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
requestGetGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
GetGroupRequest request = new GetGroupRequest
{
    GroupName = GroupName.FromProjectHubGroup("[PROJECT]", "[HUB]", "[GROUP]"),
};
// Make the request
Group response = hubServiceClient.GetGroup(request);

GetGroup(GroupName, CallSettings)

public virtual Group GetGroup(GroupName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
nameGroupName

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectHubGroup("[PROJECT]", "[HUB]", "[GROUP]");
// Make the request
Group response = hubServiceClient.GetGroup(name);

GetGroup(string, CallSettings)

public virtual Group GetGroup(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
namestring

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Group

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/groups/[GROUP]";
// Make the request
Group response = hubServiceClient.GetGroup(name);

GetGroupAsync(GetGroupRequest, CallSettings)

public virtual Task<Group> GetGroupAsync(GetGroupRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
requestGetGroupRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetGroupRequest request = new GetGroupRequest
{
    GroupName = GroupName.FromProjectHubGroup("[PROJECT]", "[HUB]", "[GROUP]"),
};
// Make the request
Group response = await hubServiceClient.GetGroupAsync(request);

GetGroupAsync(GetGroupRequest, CancellationToken)

public virtual Task<Group> GetGroupAsync(GetGroupRequest request, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
requestGetGroupRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetGroupRequest request = new GetGroupRequest
{
    GroupName = GroupName.FromProjectHubGroup("[PROJECT]", "[HUB]", "[GROUP]"),
};
// Make the request
Group response = await hubServiceClient.GetGroupAsync(request);

GetGroupAsync(GroupName, CallSettings)

public virtual Task<Group> GetGroupAsync(GroupName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
nameGroupName

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectHubGroup("[PROJECT]", "[HUB]", "[GROUP]");
// Make the request
Group response = await hubServiceClient.GetGroupAsync(name);

GetGroupAsync(GroupName, CancellationToken)

public virtual Task<Group> GetGroupAsync(GroupName name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
nameGroupName

Required. The name of the route table resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GroupName name = GroupName.FromProjectHubGroup("[PROJECT]", "[HUB]", "[GROUP]");
// Make the request
Group response = await hubServiceClient.GetGroupAsync(name);

GetGroupAsync(string, CallSettings)

public virtual Task<Group> GetGroupAsync(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
namestring

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/groups/[GROUP]";
// Make the request
Group response = await hubServiceClient.GetGroupAsync(name);

GetGroupAsync(string, CancellationToken)

public virtual Task<Group> GetGroupAsync(string name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center group.

Parameters
NameDescription
namestring

Required. The name of the route table resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskGroup

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/groups/[GROUP]";
// Make the request
Group response = await hubServiceClient.GetGroupAsync(name);

GetHub(GetHubRequest, CallSettings)

public virtual Hub GetHub(GetHubRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
requestGetHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Hub

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
GetHubRequest request = new GetHubRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
};
// Make the request
Hub response = hubServiceClient.GetHub(request);

GetHub(HubName, CallSettings)

public virtual Hub GetHub(HubName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Hub

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
Hub response = hubServiceClient.GetHub(name);

GetHub(string, CallSettings)

public virtual Hub GetHub(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
namestring

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Hub

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
Hub response = hubServiceClient.GetHub(name);

GetHubAsync(GetHubRequest, CallSettings)

public virtual Task<Hub> GetHubAsync(GetHubRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
requestGetHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskHub

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetHubRequest request = new GetHubRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
};
// Make the request
Hub response = await hubServiceClient.GetHubAsync(request);

GetHubAsync(GetHubRequest, CancellationToken)

public virtual Task<Hub> GetHubAsync(GetHubRequest request, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
requestGetHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskHub

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetHubRequest request = new GetHubRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
};
// Make the request
Hub response = await hubServiceClient.GetHubAsync(request);

GetHubAsync(HubName, CallSettings)

public virtual Task<Hub> GetHubAsync(HubName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskHub

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
Hub response = await hubServiceClient.GetHubAsync(name);

GetHubAsync(HubName, CancellationToken)

public virtual Task<Hub> GetHubAsync(HubName name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub resource to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskHub

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
Hub response = await hubServiceClient.GetHubAsync(name);

GetHubAsync(string, CallSettings)

public virtual Task<Hub> GetHubAsync(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
namestring

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskHub

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
Hub response = await hubServiceClient.GetHubAsync(name);

GetHubAsync(string, CancellationToken)

public virtual Task<Hub> GetHubAsync(string name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center hub.

Parameters
NameDescription
namestring

Required. The name of the hub resource to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskHub

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
Hub response = await hubServiceClient.GetHubAsync(name);

GetRoute(GetRouteRequest, CallSettings)

public virtual Route GetRoute(GetRouteRequest request, CallSettings callSettings = null)

Gets details about the specified route.

Parameters
NameDescription
requestGetRouteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Route

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
GetRouteRequest request = new GetRouteRequest
{
    HubRouteName = HubRouteName.FromProjectHubRouteTableRoute("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"),
};
// Make the request
Route response = hubServiceClient.GetRoute(request);

GetRoute(HubRouteName, CallSettings)

public virtual Route GetRoute(HubRouteName name, CallSettings callSettings = null)

Gets details about the specified route.

Parameters
NameDescription
nameHubRouteName

Required. The name of the route resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Route

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubRouteName name = HubRouteName.FromProjectHubRouteTableRoute("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]");
// Make the request
Route response = hubServiceClient.GetRoute(name);

GetRoute(string, CallSettings)

public virtual Route GetRoute(string name, CallSettings callSettings = null)

Gets details about the specified route.

Parameters
NameDescription
namestring

Required. The name of the route resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Route

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]/routes/[ROUTE]";
// Make the request
Route response = hubServiceClient.GetRoute(name);

GetRouteAsync(GetRouteRequest, CallSettings)

public virtual Task<Route> GetRouteAsync(GetRouteRequest request, CallSettings callSettings = null)

Gets details about the specified route.

Parameters
NameDescription
requestGetRouteRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRoute

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetRouteRequest request = new GetRouteRequest
{
    HubRouteName = HubRouteName.FromProjectHubRouteTableRoute("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"),
};
// Make the request
Route response = await hubServiceClient.GetRouteAsync(request);

GetRouteAsync(GetRouteRequest, CancellationToken)

public virtual Task<Route> GetRouteAsync(GetRouteRequest request, CancellationToken cancellationToken)

Gets details about the specified route.

Parameters
NameDescription
requestGetRouteRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRoute

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetRouteRequest request = new GetRouteRequest
{
    HubRouteName = HubRouteName.FromProjectHubRouteTableRoute("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]"),
};
// Make the request
Route response = await hubServiceClient.GetRouteAsync(request);

GetRouteAsync(HubRouteName, CallSettings)

public virtual Task<Route> GetRouteAsync(HubRouteName name, CallSettings callSettings = null)

Gets details about the specified route.

Parameters
NameDescription
nameHubRouteName

Required. The name of the route resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRoute

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubRouteName name = HubRouteName.FromProjectHubRouteTableRoute("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]");
// Make the request
Route response = await hubServiceClient.GetRouteAsync(name);

GetRouteAsync(HubRouteName, CancellationToken)

public virtual Task<Route> GetRouteAsync(HubRouteName name, CancellationToken cancellationToken)

Gets details about the specified route.

Parameters
NameDescription
nameHubRouteName

Required. The name of the route resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRoute

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubRouteName name = HubRouteName.FromProjectHubRouteTableRoute("[PROJECT]", "[HUB]", "[ROUTE_TABLE]", "[ROUTE]");
// Make the request
Route response = await hubServiceClient.GetRouteAsync(name);

GetRouteAsync(string, CallSettings)

public virtual Task<Route> GetRouteAsync(string name, CallSettings callSettings = null)

Gets details about the specified route.

Parameters
NameDescription
namestring

Required. The name of the route resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRoute

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]/routes/[ROUTE]";
// Make the request
Route response = await hubServiceClient.GetRouteAsync(name);

GetRouteAsync(string, CancellationToken)

public virtual Task<Route> GetRouteAsync(string name, CancellationToken cancellationToken)

Gets details about the specified route.

Parameters
NameDescription
namestring

Required. The name of the route resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRoute

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]/routes/[ROUTE]";
// Make the request
Route response = await hubServiceClient.GetRouteAsync(name);

GetRouteTable(GetRouteTableRequest, CallSettings)

public virtual RouteTable GetRouteTable(GetRouteTableRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
requestGetRouteTableRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RouteTable

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
GetRouteTableRequest request = new GetRouteTableRequest
{
    RouteTableName = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"),
};
// Make the request
RouteTable response = hubServiceClient.GetRouteTable(request);

GetRouteTable(RouteTableName, CallSettings)

public virtual RouteTable GetRouteTable(RouteTableName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
nameRouteTableName

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RouteTable

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
RouteTableName name = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
// Make the request
RouteTable response = hubServiceClient.GetRouteTable(name);

GetRouteTable(string, CallSettings)

public virtual RouteTable GetRouteTable(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
namestring

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
RouteTable

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]";
// Make the request
RouteTable response = hubServiceClient.GetRouteTable(name);

GetRouteTableAsync(GetRouteTableRequest, CallSettings)

public virtual Task<RouteTable> GetRouteTableAsync(GetRouteTableRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
requestGetRouteTableRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRouteTable

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetRouteTableRequest request = new GetRouteTableRequest
{
    RouteTableName = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"),
};
// Make the request
RouteTable response = await hubServiceClient.GetRouteTableAsync(request);

GetRouteTableAsync(GetRouteTableRequest, CancellationToken)

public virtual Task<RouteTable> GetRouteTableAsync(GetRouteTableRequest request, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
requestGetRouteTableRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRouteTable

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetRouteTableRequest request = new GetRouteTableRequest
{
    RouteTableName = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"),
};
// Make the request
RouteTable response = await hubServiceClient.GetRouteTableAsync(request);

GetRouteTableAsync(RouteTableName, CallSettings)

public virtual Task<RouteTable> GetRouteTableAsync(RouteTableName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
nameRouteTableName

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRouteTable

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
RouteTableName name = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
// Make the request
RouteTable response = await hubServiceClient.GetRouteTableAsync(name);

GetRouteTableAsync(RouteTableName, CancellationToken)

public virtual Task<RouteTable> GetRouteTableAsync(RouteTableName name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
nameRouteTableName

Required. The name of the route table resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRouteTable

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
RouteTableName name = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
// Make the request
RouteTable response = await hubServiceClient.GetRouteTableAsync(name);

GetRouteTableAsync(string, CallSettings)

public virtual Task<RouteTable> GetRouteTableAsync(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
namestring

Required. The name of the route table resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskRouteTable

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]";
// Make the request
RouteTable response = await hubServiceClient.GetRouteTableAsync(name);

GetRouteTableAsync(string, CancellationToken)

public virtual Task<RouteTable> GetRouteTableAsync(string name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center route table.

Parameters
NameDescription
namestring

Required. The name of the route table resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskRouteTable

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]";
// Make the request
RouteTable response = await hubServiceClient.GetRouteTableAsync(name);

GetSpoke(GetSpokeRequest, CallSettings)

public virtual Spoke GetSpoke(GetSpokeRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
requestGetSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Spoke

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
GetSpokeRequest request = new GetSpokeRequest
{
    SpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
};
// Make the request
Spoke response = hubServiceClient.GetSpoke(request);

GetSpoke(SpokeName, CallSettings)

public virtual Spoke GetSpoke(SpokeName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Spoke

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
SpokeName name = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Spoke response = hubServiceClient.GetSpoke(name);

GetSpoke(string, CallSettings)

public virtual Spoke GetSpoke(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
namestring

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Spoke

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Spoke response = hubServiceClient.GetSpoke(name);

GetSpokeAsync(GetSpokeRequest, CallSettings)

public virtual Task<Spoke> GetSpokeAsync(GetSpokeRequest request, CallSettings callSettings = null)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
requestGetSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskSpoke

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetSpokeRequest request = new GetSpokeRequest
{
    SpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
};
// Make the request
Spoke response = await hubServiceClient.GetSpokeAsync(request);

GetSpokeAsync(GetSpokeRequest, CancellationToken)

public virtual Task<Spoke> GetSpokeAsync(GetSpokeRequest request, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
requestGetSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskSpoke

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
GetSpokeRequest request = new GetSpokeRequest
{
    SpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
};
// Make the request
Spoke response = await hubServiceClient.GetSpokeAsync(request);

GetSpokeAsync(SpokeName, CallSettings)

public virtual Task<Spoke> GetSpokeAsync(SpokeName name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskSpoke

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
SpokeName name = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Spoke response = await hubServiceClient.GetSpokeAsync(name);

GetSpokeAsync(SpokeName, CancellationToken)

public virtual Task<Spoke> GetSpokeAsync(SpokeName name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskSpoke

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
SpokeName name = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Spoke response = await hubServiceClient.GetSpokeAsync(name);

GetSpokeAsync(string, CallSettings)

public virtual Task<Spoke> GetSpokeAsync(string name, CallSettings callSettings = null)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
namestring

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskSpoke

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Spoke response = await hubServiceClient.GetSpokeAsync(name);

GetSpokeAsync(string, CancellationToken)

public virtual Task<Spoke> GetSpokeAsync(string name, CancellationToken cancellationToken)

Gets details about a Network Connectivity Center spoke.

Parameters
NameDescription
namestring

Required. The name of the spoke resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskSpoke

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Spoke response = await hubServiceClient.GetSpokeAsync(name);

ListGroups(HubName, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(HubName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists groups in a given hub.

Parameters
NameDescription
parentHubName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubName parent = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = hubServiceClient.ListGroups(parent);

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

ListGroups(ListGroupsRequest, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(ListGroupsRequest request, CallSettings callSettings = null)

Lists groups in a given hub.

Parameters
NameDescription
requestListGroupsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
ListGroupsRequest request = new ListGroupsRequest
{
    ParentAsHubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = hubServiceClient.ListGroups(request);

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

ListGroups(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListGroupsResponse, Group> ListGroups(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists groups in a given hub.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListGroupsResponseGroup

A pageable sequence of Group resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
PagedEnumerable<ListGroupsResponse, Group> response = hubServiceClient.ListGroups(parent);

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

ListGroupsAsync(HubName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(HubName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists groups in a given hub.

Parameters
NameDescription
parentHubName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName parent = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = hubServiceClient.ListGroupsAsync(parent);

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

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

ListGroupsAsync(ListGroupsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(ListGroupsRequest request, CallSettings callSettings = null)

Lists groups in a given hub.

Parameters
NameDescription
requestListGroupsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
ListGroupsRequest request = new ListGroupsRequest
{
    ParentAsHubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = hubServiceClient.ListGroupsAsync(request);

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

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

ListGroupsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListGroupsResponse, Group> ListGroupsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists groups in a given hub.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListGroupsResponseGroup

A pageable asynchronous sequence of Group resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
PagedAsyncEnumerable<ListGroupsResponse, Group> response = hubServiceClient.ListGroupsAsync(parent);

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

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

ListHubSpokes(HubName, string, int?, CallSettings)

public virtual PagedEnumerable<ListHubSpokesResponse, Spoke> ListHubSpokes(HubName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

Parameters
NameDescription
nameHubName

Required. The name of the hub.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListHubSpokesResponseSpoke

A pageable sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
PagedEnumerable<ListHubSpokesResponse, Spoke> response = hubServiceClient.ListHubSpokes(name);

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

ListHubSpokes(ListHubSpokesRequest, CallSettings)

public virtual PagedEnumerable<ListHubSpokesResponse, Spoke> ListHubSpokes(ListHubSpokesRequest request, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

Parameters
NameDescription
requestListHubSpokesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListHubSpokesResponseSpoke

A pageable sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
ListHubSpokesRequest request = new ListHubSpokesRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeLocations = { "", },
    Filter = "",
    OrderBy = "",
    View = ListHubSpokesRequest.Types.SpokeView.Unspecified,
};
// Make the request
PagedEnumerable<ListHubSpokesResponse, Spoke> response = hubServiceClient.ListHubSpokes(request);

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

ListHubSpokes(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListHubSpokesResponse, Spoke> ListHubSpokes(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

Parameters
NameDescription
namestring

Required. The name of the hub.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListHubSpokesResponseSpoke

A pageable sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
PagedEnumerable<ListHubSpokesResponse, Spoke> response = hubServiceClient.ListHubSpokes(name);

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

ListHubSpokesAsync(HubName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListHubSpokesResponse, Spoke> ListHubSpokesAsync(HubName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

Parameters
NameDescription
nameHubName

Required. The name of the hub.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListHubSpokesResponseSpoke

A pageable asynchronous sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
PagedAsyncEnumerable<ListHubSpokesResponse, Spoke> response = hubServiceClient.ListHubSpokesAsync(name);

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

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

ListHubSpokesAsync(ListHubSpokesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListHubSpokesResponse, Spoke> ListHubSpokesAsync(ListHubSpokesRequest request, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

Parameters
NameDescription
requestListHubSpokesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListHubSpokesResponseSpoke

A pageable asynchronous sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
ListHubSpokesRequest request = new ListHubSpokesRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeLocations = { "", },
    Filter = "",
    OrderBy = "",
    View = ListHubSpokesRequest.Types.SpokeView.Unspecified,
};
// Make the request
PagedAsyncEnumerable<ListHubSpokesResponse, Spoke> response = hubServiceClient.ListHubSpokesAsync(request);

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

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

ListHubSpokesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListHubSpokesResponse, Spoke> ListHubSpokesAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes associated with a specified hub and location. The list includes both spokes that are attached to the hub and spokes that have been proposed but not yet accepted.

Parameters
NameDescription
namestring

Required. The name of the hub.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListHubSpokesResponseSpoke

A pageable asynchronous sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
PagedAsyncEnumerable<ListHubSpokesResponse, Spoke> response = hubServiceClient.ListHubSpokesAsync(name);

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

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

ListHubs(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListHubsResponse, Hub> ListHubs(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center hubs associated with a given project.

Parameters
NameDescription
parentLocationName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListHubsResponseHub

A pageable sequence of Hub resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListHubsResponse, Hub> response = hubServiceClient.ListHubs(parent);

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

ListHubs(ListHubsRequest, CallSettings)

public virtual PagedEnumerable<ListHubsResponse, Hub> ListHubs(ListHubsRequest request, CallSettings callSettings = null)

Lists the Network Connectivity Center hubs associated with a given project.

Parameters
NameDescription
requestListHubsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListHubsResponseHub

A pageable sequence of Hub resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
ListHubsRequest request = new ListHubsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListHubsResponse, Hub> response = hubServiceClient.ListHubs(request);

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

ListHubs(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListHubsResponse, Hub> ListHubs(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center hubs associated with a given project.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListHubsResponseHub

A pageable sequence of Hub resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListHubsResponse, Hub> response = hubServiceClient.ListHubs(parent);

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

ListHubsAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListHubsResponse, Hub> ListHubsAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center hubs associated with a given project.

Parameters
NameDescription
parentLocationName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListHubsResponseHub

A pageable asynchronous sequence of Hub resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListHubsResponse, Hub> response = hubServiceClient.ListHubsAsync(parent);

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

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

ListHubsAsync(ListHubsRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListHubsResponse, Hub> ListHubsAsync(ListHubsRequest request, CallSettings callSettings = null)

Lists the Network Connectivity Center hubs associated with a given project.

Parameters
NameDescription
requestListHubsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListHubsResponseHub

A pageable asynchronous sequence of Hub resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
ListHubsRequest request = new ListHubsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListHubsResponse, Hub> response = hubServiceClient.ListHubsAsync(request);

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

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

ListHubsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListHubsResponse, Hub> ListHubsAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center hubs associated with a given project.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListHubsResponseHub

A pageable asynchronous sequence of Hub resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListHubsResponse, Hub> response = hubServiceClient.ListHubsAsync(parent);

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

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

ListRouteTables(HubName, string, int?, CallSettings)

public virtual PagedEnumerable<ListRouteTablesResponse, RouteTable> ListRouteTables(HubName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists route tables in a given project.

Parameters
NameDescription
parentHubName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRouteTablesResponseRouteTable

A pageable sequence of RouteTable resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubName parent = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
PagedEnumerable<ListRouteTablesResponse, RouteTable> response = hubServiceClient.ListRouteTables(parent);

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

ListRouteTables(ListRouteTablesRequest, CallSettings)

public virtual PagedEnumerable<ListRouteTablesResponse, RouteTable> ListRouteTables(ListRouteTablesRequest request, CallSettings callSettings = null)

Lists route tables in a given project.

Parameters
NameDescription
requestListRouteTablesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRouteTablesResponseRouteTable

A pageable sequence of RouteTable resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
ListRouteTablesRequest request = new ListRouteTablesRequest
{
    ParentAsHubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListRouteTablesResponse, RouteTable> response = hubServiceClient.ListRouteTables(request);

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

ListRouteTables(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListRouteTablesResponse, RouteTable> ListRouteTables(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists route tables in a given project.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRouteTablesResponseRouteTable

A pageable sequence of RouteTable resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
PagedEnumerable<ListRouteTablesResponse, RouteTable> response = hubServiceClient.ListRouteTables(parent);

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

ListRouteTablesAsync(HubName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRouteTablesResponse, RouteTable> ListRouteTablesAsync(HubName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists route tables in a given project.

Parameters
NameDescription
parentHubName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRouteTablesResponseRouteTable

A pageable asynchronous sequence of RouteTable resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName parent = HubName.FromProjectHub("[PROJECT]", "[HUB]");
// Make the request
PagedAsyncEnumerable<ListRouteTablesResponse, RouteTable> response = hubServiceClient.ListRouteTablesAsync(parent);

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

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

ListRouteTablesAsync(ListRouteTablesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListRouteTablesResponse, RouteTable> ListRouteTablesAsync(ListRouteTablesRequest request, CallSettings callSettings = null)

Lists route tables in a given project.

Parameters
NameDescription
requestListRouteTablesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRouteTablesResponseRouteTable

A pageable asynchronous sequence of RouteTable resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
ListRouteTablesRequest request = new ListRouteTablesRequest
{
    ParentAsHubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListRouteTablesResponse, RouteTable> response = hubServiceClient.ListRouteTablesAsync(request);

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

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

ListRouteTablesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRouteTablesResponse, RouteTable> ListRouteTablesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists route tables in a given project.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRouteTablesResponseRouteTable

A pageable asynchronous sequence of RouteTable resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/global/hubs/[HUB]";
// Make the request
PagedAsyncEnumerable<ListRouteTablesResponse, RouteTable> response = hubServiceClient.ListRouteTablesAsync(parent);

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

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

ListRoutes(ListRoutesRequest, CallSettings)

public virtual PagedEnumerable<ListRoutesResponse, Route> ListRoutes(ListRoutesRequest request, CallSettings callSettings = null)

Lists routes in a given project.

Parameters
NameDescription
requestListRoutesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRoutesResponseRoute

A pageable sequence of Route resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
ListRoutesRequest request = new ListRoutesRequest
{
    ParentAsRouteTableName = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListRoutesResponse, Route> response = hubServiceClient.ListRoutes(request);

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

ListRoutes(RouteTableName, string, int?, CallSettings)

public virtual PagedEnumerable<ListRoutesResponse, Route> ListRoutes(RouteTableName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists routes in a given project.

Parameters
NameDescription
parentRouteTableName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRoutesResponseRoute

A pageable sequence of Route resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
RouteTableName parent = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
// Make the request
PagedEnumerable<ListRoutesResponse, Route> response = hubServiceClient.ListRoutes(parent);

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

ListRoutes(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListRoutesResponse, Route> ListRoutes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists routes in a given project.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListRoutesResponseRoute

A pageable sequence of Route resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]";
// Make the request
PagedEnumerable<ListRoutesResponse, Route> response = hubServiceClient.ListRoutes(parent);

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

ListRoutesAsync(ListRoutesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListRoutesResponse, Route> ListRoutesAsync(ListRoutesRequest request, CallSettings callSettings = null)

Lists routes in a given project.

Parameters
NameDescription
requestListRoutesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRoutesResponseRoute

A pageable asynchronous sequence of Route resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
ListRoutesRequest request = new ListRoutesRequest
{
    ParentAsRouteTableName = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListRoutesResponse, Route> response = hubServiceClient.ListRoutesAsync(request);

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

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

ListRoutesAsync(RouteTableName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRoutesResponse, Route> ListRoutesAsync(RouteTableName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists routes in a given project.

Parameters
NameDescription
parentRouteTableName

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRoutesResponseRoute

A pageable asynchronous sequence of Route resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
RouteTableName parent = RouteTableName.FromProjectHubRouteTable("[PROJECT]", "[HUB]", "[ROUTE_TABLE]");
// Make the request
PagedAsyncEnumerable<ListRoutesResponse, Route> response = hubServiceClient.ListRoutesAsync(parent);

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

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

ListRoutesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListRoutesResponse, Route> ListRoutesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists routes in a given project.

Parameters
NameDescription
parentstring

Required. The parent resource's name.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListRoutesResponseRoute

A pageable asynchronous sequence of Route resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/global/hubs/[HUB]/routeTables/[ROUTE_TABLE]";
// Make the request
PagedAsyncEnumerable<ListRoutesResponse, Route> response = hubServiceClient.ListRoutesAsync(parent);

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

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

ListSpokes(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListSpokesResponse, Spoke> ListSpokes(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes in a specified project and location.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListSpokesResponseSpoke

A pageable sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListSpokesResponse, Spoke> response = hubServiceClient.ListSpokes(parent);

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

ListSpokes(ListSpokesRequest, CallSettings)

public virtual PagedEnumerable<ListSpokesResponse, Spoke> ListSpokes(ListSpokesRequest request, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes in a specified project and location.

Parameters
NameDescription
requestListSpokesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListSpokesResponseSpoke

A pageable sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
ListSpokesRequest request = new ListSpokesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListSpokesResponse, Spoke> response = hubServiceClient.ListSpokes(request);

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

ListSpokes(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListSpokesResponse, Spoke> ListSpokes(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes in a specified project and location.

Parameters
NameDescription
parentstring

Required. The parent resource.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListSpokesResponseSpoke

A pageable sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListSpokesResponse, Spoke> response = hubServiceClient.ListSpokes(parent);

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

ListSpokesAsync(LocationName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListSpokesResponse, Spoke> ListSpokesAsync(LocationName parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes in a specified project and location.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListSpokesResponseSpoke

A pageable asynchronous sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListSpokesResponse, Spoke> response = hubServiceClient.ListSpokesAsync(parent);

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

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

ListSpokesAsync(ListSpokesRequest, CallSettings)

public virtual PagedAsyncEnumerable<ListSpokesResponse, Spoke> ListSpokesAsync(ListSpokesRequest request, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes in a specified project and location.

Parameters
NameDescription
requestListSpokesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListSpokesResponseSpoke

A pageable asynchronous sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
ListSpokesRequest request = new ListSpokesRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListSpokesResponse, Spoke> response = hubServiceClient.ListSpokesAsync(request);

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

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

ListSpokesAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListSpokesResponse, Spoke> ListSpokesAsync(string parent, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists the Network Connectivity Center spokes in a specified project and location.

Parameters
NameDescription
parentstring

Required. The parent resource.

pageTokenstring

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

pageSizeint

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListSpokesResponseSpoke

A pageable asynchronous sequence of Spoke resources.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListSpokesResponse, Spoke> response = hubServiceClient.ListSpokesAsync(parent);

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

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

PollOnceAcceptHubSpoke(string, CallSettings)

public virtual Operation<AcceptHubSpokeResponse, OperationMetadata> PollOnceAcceptHubSpoke(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationAcceptHubSpokeResponseOperationMetadata

The result of polling the operation.

PollOnceAcceptHubSpokeAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationAcceptHubSpokeResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateHub(string, CallSettings)

public virtual Operation<Hub, OperationMetadata> PollOnceCreateHub(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationHubOperationMetadata

The result of polling the operation.

PollOnceCreateHubAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A task representing the result of polling the operation.

PollOnceCreateSpoke(string, CallSettings)

public virtual Operation<Spoke, OperationMetadata> PollOnceCreateSpoke(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSpokeOperationMetadata

The result of polling the operation.

PollOnceCreateSpokeAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteHub(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteHubAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteSpoke(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyOperationMetadata

The result of polling the operation.

PollOnceDeleteSpokeAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

PollOnceRejectHubSpoke(string, CallSettings)

public virtual Operation<RejectHubSpokeResponse, OperationMetadata> PollOnceRejectHubSpoke(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRejectHubSpokeResponseOperationMetadata

The result of polling the operation.

PollOnceRejectHubSpokeAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRejectHubSpokeResponseOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateHub(string, CallSettings)

public virtual Operation<Hub, OperationMetadata> PollOnceUpdateHub(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationHubOperationMetadata

The result of polling the operation.

PollOnceUpdateHubAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateSpoke(string, CallSettings)

public virtual Operation<Spoke, OperationMetadata> PollOnceUpdateSpoke(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSpokeOperationMetadata

The result of polling the operation.

PollOnceUpdateSpokeAsync(string, CallSettings)

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

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A task representing the result of polling the operation.

RejectHubSpoke(HubName, SpokeName, CallSettings)

public virtual Operation<RejectHubSpokeResponse, OperationMetadata> RejectHubSpoke(HubName name, SpokeName spokeUri, CallSettings callSettings = null)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub from which to reject the spoke.

spokeUriSpokeName

Required. The URI of the spoke to reject from the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRejectHubSpokeResponseOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = hubServiceClient.RejectHubSpoke(name, spokeUri);

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

RejectHubSpoke(RejectHubSpokeRequest, CallSettings)

public virtual Operation<RejectHubSpokeResponse, OperationMetadata> RejectHubSpoke(RejectHubSpokeRequest request, CallSettings callSettings = null)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
requestRejectHubSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRejectHubSpokeResponseOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
RejectHubSpokeRequest request = new RejectHubSpokeRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeUriAsSpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
    Details = "",
};
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = hubServiceClient.RejectHubSpoke(request);

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

RejectHubSpoke(string, string, CallSettings)

public virtual Operation<RejectHubSpokeResponse, OperationMetadata> RejectHubSpoke(string name, string spokeUri, CallSettings callSettings = null)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
namestring

Required. The name of the hub from which to reject the spoke.

spokeUristring

Required. The URI of the spoke to reject from the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationRejectHubSpokeResponseOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
string spokeUri = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = hubServiceClient.RejectHubSpoke(name, spokeUri);

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

RejectHubSpokeAsync(HubName, SpokeName, CallSettings)

public virtual Task<Operation<RejectHubSpokeResponse, OperationMetadata>> RejectHubSpokeAsync(HubName name, SpokeName spokeUri, CallSettings callSettings = null)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub from which to reject the spoke.

spokeUriSpokeName

Required. The URI of the spoke to reject from the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRejectHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = await hubServiceClient.RejectHubSpokeAsync(name, spokeUri);

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

RejectHubSpokeAsync(HubName, SpokeName, CancellationToken)

public virtual Task<Operation<RejectHubSpokeResponse, OperationMetadata>> RejectHubSpokeAsync(HubName name, SpokeName spokeUri, CancellationToken cancellationToken)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub from which to reject the spoke.

spokeUriSpokeName

Required. The URI of the spoke to reject from the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRejectHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
HubName name = HubName.FromProjectHub("[PROJECT]", "[HUB]");
SpokeName spokeUri = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]");
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = await hubServiceClient.RejectHubSpokeAsync(name, spokeUri);

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

RejectHubSpokeAsync(RejectHubSpokeRequest, CallSettings)

public virtual Task<Operation<RejectHubSpokeResponse, OperationMetadata>> RejectHubSpokeAsync(RejectHubSpokeRequest request, CallSettings callSettings = null)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
requestRejectHubSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRejectHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
RejectHubSpokeRequest request = new RejectHubSpokeRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeUriAsSpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
    Details = "",
};
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = await hubServiceClient.RejectHubSpokeAsync(request);

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

RejectHubSpokeAsync(RejectHubSpokeRequest, CancellationToken)

public virtual Task<Operation<RejectHubSpokeResponse, OperationMetadata>> RejectHubSpokeAsync(RejectHubSpokeRequest request, CancellationToken cancellationToken)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
requestRejectHubSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRejectHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
RejectHubSpokeRequest request = new RejectHubSpokeRequest
{
    HubName = HubName.FromProjectHub("[PROJECT]", "[HUB]"),
    SpokeUriAsSpokeName = SpokeName.FromProjectLocationSpoke("[PROJECT]", "[LOCATION]", "[SPOKE]"),
    RequestId = "",
    Details = "",
};
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = await hubServiceClient.RejectHubSpokeAsync(request);

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

RejectHubSpokeAsync(string, string, CallSettings)

public virtual Task<Operation<RejectHubSpokeResponse, OperationMetadata>> RejectHubSpokeAsync(string name, string spokeUri, CallSettings callSettings = null)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
namestring

Required. The name of the hub from which to reject the spoke.

spokeUristring

Required. The URI of the spoke to reject from the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationRejectHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
string spokeUri = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = await hubServiceClient.RejectHubSpokeAsync(name, spokeUri);

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

RejectHubSpokeAsync(string, string, CancellationToken)

public virtual Task<Operation<RejectHubSpokeResponse, OperationMetadata>> RejectHubSpokeAsync(string name, string spokeUri, CancellationToken cancellationToken)

Rejects a Network Connectivity Center spoke from being attached to a hub. If the spoke was previously in the ACTIVE state, it transitions to the INACTIVE state and is no longer able to connect to other spokes that are attached to the hub.

Parameters
NameDescription
namestring

Required. The name of the hub from which to reject the spoke.

spokeUristring

Required. The URI of the spoke to reject from the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationRejectHubSpokeResponseOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/global/hubs/[HUB]";
string spokeUri = "projects/[PROJECT]/locations/[LOCATION]/spokes/[SPOKE]";
// Make the request
Operation<RejectHubSpokeResponse, OperationMetadata> response = await hubServiceClient.RejectHubSpokeAsync(name, spokeUri);

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

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateHub(Hub, FieldMask, CallSettings)

public virtual Operation<Hub, OperationMetadata> UpdateHub(Hub hub, FieldMask updateMask, CallSettings callSettings = null)

Updates the description and/or labels of a Network Connectivity Center hub.

Parameters
NameDescription
hubHub

Required. The state that the hub should be in after the update.

updateMaskFieldMask

Optional. In the case of an update to an existing hub, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationHubOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
Hub hub = new Hub();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Hub, OperationMetadata> response = hubServiceClient.UpdateHub(hub, updateMask);

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

UpdateHub(UpdateHubRequest, CallSettings)

public virtual Operation<Hub, OperationMetadata> UpdateHub(UpdateHubRequest request, CallSettings callSettings = null)

Updates the description and/or labels of a Network Connectivity Center hub.

Parameters
NameDescription
requestUpdateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationHubOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
UpdateHubRequest request = new UpdateHubRequest
{
    UpdateMask = new FieldMask(),
    Hub = new Hub(),
    RequestId = "",
};
// Make the request
Operation<Hub, OperationMetadata> response = hubServiceClient.UpdateHub(request);

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

UpdateHubAsync(Hub, FieldMask, CallSettings)

public virtual Task<Operation<Hub, OperationMetadata>> UpdateHubAsync(Hub hub, FieldMask updateMask, CallSettings callSettings = null)

Updates the description and/or labels of a Network Connectivity Center hub.

Parameters
NameDescription
hubHub

Required. The state that the hub should be in after the update.

updateMaskFieldMask

Optional. In the case of an update to an existing hub, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
Hub hub = new Hub();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.UpdateHubAsync(hub, updateMask);

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

UpdateHubAsync(Hub, FieldMask, CancellationToken)

public virtual Task<Operation<Hub, OperationMetadata>> UpdateHubAsync(Hub hub, FieldMask updateMask, CancellationToken cancellationToken)

Updates the description and/or labels of a Network Connectivity Center hub.

Parameters
NameDescription
hubHub

Required. The state that the hub should be in after the update.

updateMaskFieldMask

Optional. In the case of an update to an existing hub, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
Hub hub = new Hub();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.UpdateHubAsync(hub, updateMask);

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

UpdateHubAsync(UpdateHubRequest, CallSettings)

public virtual Task<Operation<Hub, OperationMetadata>> UpdateHubAsync(UpdateHubRequest request, CallSettings callSettings = null)

Updates the description and/or labels of a Network Connectivity Center hub.

Parameters
NameDescription
requestUpdateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateHubRequest request = new UpdateHubRequest
{
    UpdateMask = new FieldMask(),
    Hub = new Hub(),
    RequestId = "",
};
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.UpdateHubAsync(request);

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

UpdateHubAsync(UpdateHubRequest, CancellationToken)

public virtual Task<Operation<Hub, OperationMetadata>> UpdateHubAsync(UpdateHubRequest request, CancellationToken cancellationToken)

Updates the description and/or labels of a Network Connectivity Center hub.

Parameters
NameDescription
requestUpdateHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationHubOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateHubRequest request = new UpdateHubRequest
{
    UpdateMask = new FieldMask(),
    Hub = new Hub(),
    RequestId = "",
};
// Make the request
Operation<Hub, OperationMetadata> response = await hubServiceClient.UpdateHubAsync(request);

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

UpdateSpoke(Spoke, FieldMask, CallSettings)

public virtual Operation<Spoke, OperationMetadata> UpdateSpoke(Spoke spoke, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a Network Connectivity Center spoke.

Parameters
NameDescription
spokeSpoke

Required. The state that the spoke should be in after the update.

updateMaskFieldMask

Optional. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSpokeOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
Spoke spoke = new Spoke();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Spoke, OperationMetadata> response = hubServiceClient.UpdateSpoke(spoke, updateMask);

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

UpdateSpoke(UpdateSpokeRequest, CallSettings)

public virtual Operation<Spoke, OperationMetadata> UpdateSpoke(UpdateSpokeRequest request, CallSettings callSettings = null)

Updates the parameters of a Network Connectivity Center spoke.

Parameters
NameDescription
requestUpdateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationSpokeOperationMetadata

The RPC response.

Example
// Create client
HubServiceClient hubServiceClient = HubServiceClient.Create();
// Initialize request argument(s)
UpdateSpokeRequest request = new UpdateSpokeRequest
{
    UpdateMask = new FieldMask(),
    Spoke = new Spoke(),
    RequestId = "",
};
// Make the request
Operation<Spoke, OperationMetadata> response = hubServiceClient.UpdateSpoke(request);

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

UpdateSpokeAsync(Spoke, FieldMask, CallSettings)

public virtual Task<Operation<Spoke, OperationMetadata>> UpdateSpokeAsync(Spoke spoke, FieldMask updateMask, CallSettings callSettings = null)

Updates the parameters of a Network Connectivity Center spoke.

Parameters
NameDescription
spokeSpoke

Required. The state that the spoke should be in after the update.

updateMaskFieldMask

Optional. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
Spoke spoke = new Spoke();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.UpdateSpokeAsync(spoke, updateMask);

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

UpdateSpokeAsync(Spoke, FieldMask, CancellationToken)

public virtual Task<Operation<Spoke, OperationMetadata>> UpdateSpokeAsync(Spoke spoke, FieldMask updateMask, CancellationToken cancellationToken)

Updates the parameters of a Network Connectivity Center spoke.

Parameters
NameDescription
spokeSpoke

Required. The state that the spoke should be in after the update.

updateMaskFieldMask

Optional. In the case of an update to an existing spoke, field mask is used to specify the fields to be overwritten. The fields specified in the update_mask are relative to the resource, not the full request. A field is overwritten if it is in the mask. If the user does not provide a mask, then all fields are overwritten.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
Spoke spoke = new Spoke();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.UpdateSpokeAsync(spoke, updateMask);

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

UpdateSpokeAsync(UpdateSpokeRequest, CallSettings)

public virtual Task<Operation<Spoke, OperationMetadata>> UpdateSpokeAsync(UpdateSpokeRequest request, CallSettings callSettings = null)

Updates the parameters of a Network Connectivity Center spoke.

Parameters
NameDescription
requestUpdateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSpokeRequest request = new UpdateSpokeRequest
{
    UpdateMask = new FieldMask(),
    Spoke = new Spoke(),
    RequestId = "",
};
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.UpdateSpokeAsync(request);

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

UpdateSpokeAsync(UpdateSpokeRequest, CancellationToken)

public virtual Task<Operation<Spoke, OperationMetadata>> UpdateSpokeAsync(UpdateSpokeRequest request, CancellationToken cancellationToken)

Updates the parameters of a Network Connectivity Center spoke.

Parameters
NameDescription
requestUpdateSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationSpokeOperationMetadata

A Task containing the RPC response.

Example
// Create client
HubServiceClient hubServiceClient = await HubServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateSpokeRequest request = new UpdateSpokeRequest
{
    UpdateMask = new FieldMask(),
    Spoke = new Spoke(),
    RequestId = "",
};
// Make the request
Operation<Spoke, OperationMetadata> response = await hubServiceClient.UpdateSpokeAsync(request);

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