Network Connectivity v1alpha1 API - Class HubServiceClient (2.0.0-alpha04)

public abstract class HubServiceClient

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

HubService client wrapper, for convenient use.

Inheritance

object > HubServiceClient

Derived Types

Namespace

Google.Cloud.NetworkConnectivity.V1Alpha1

Assembly

Google.Cloud.NetworkConnectivity.V1Alpha1.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

CreateHubOperationsClient

public virtual OperationsClient CreateHubOperationsClient { get; }

The long-running operations client for CreateHub.

Property Value
Type Description
OperationsClient

CreateSpokeOperationsClient

public virtual OperationsClient CreateSpokeOperationsClient { get; }

The long-running operations client for CreateSpoke.

Property Value
Type Description
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
Type Description
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default HubService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default HubService scopes are:

DeleteHubOperationsClient

public virtual OperationsClient DeleteHubOperationsClient { get; }

The long-running operations client for DeleteHub.

Property Value
Type Description
OperationsClient

DeleteSpokeOperationsClient

public virtual OperationsClient DeleteSpokeOperationsClient { get; }

The long-running operations client for DeleteSpoke.

Property Value
Type Description
OperationsClient

GrpcClient

public virtual HubService.HubServiceClient GrpcClient { get; }

The underlying gRPC HubService client

Property Value
Type Description
HubServiceHubServiceClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

UpdateHubOperationsClient

public virtual OperationsClient UpdateHubOperationsClient { get; }

The long-running operations client for UpdateHub.

Property Value
Type Description
OperationsClient

UpdateSpokeOperationsClient

public virtual OperationsClient UpdateSpokeOperationsClient { get; }

The long-running operations client for UpdateSpoke.

Property Value
Type Description
OperationsClient

Methods

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
Type Description
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
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource's name of the Hub.

hub Hub

Required. Initial values for a new Hub.

hubId string

Optional. Unique id for the Hub to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
request CreateHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource's name of the Hub.

hub Hub

Required. Initial values for a new Hub.

hubId string

Optional. Unique id for the Hub to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource's name of the Hub.

hub Hub

Required. Initial values for a new Hub.

hubId string

Optional. Unique id for the Hub to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource's name of the Hub.

hub Hub

Required. Initial values for a new Hub.

hubId string

Optional. Unique id for the Hub to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
request CreateHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
request CreateHubRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource's name of the Hub.

hub Hub

Required. Initial values for a new Hub.

hubId string

Optional. Unique id for the Hub to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hub in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource's name of the Hub.

hub Hub

Required. Initial values for a new Hub.

hubId string

Optional. Unique id for the Hub to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent's resource name of the Spoke.

spoke Spoke

Required. Initial values for a new Hub.

spokeId string

Optional. Unique id for the Spoke to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
request CreateSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
parent string

Required. The parent's resource name of the Spoke.

spoke Spoke

Required. Initial values for a new Hub.

spokeId string

Optional. Unique id for the Spoke to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent's resource name of the Spoke.

spoke Spoke

Required. Initial values for a new Hub.

spokeId string

Optional. Unique id for the Spoke to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent's resource name of the Spoke.

spoke Spoke

Required. Initial values for a new Hub.

spokeId string

Optional. Unique id for the Spoke to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
request CreateSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
request CreateSpokeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
parent string

Required. The parent's resource name of the Spoke.

spoke Spoke

Required. Initial values for a new Hub.

spokeId string

Optional. Unique id for the Spoke to create.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 new Spoke in a given project and location.

Parameters
Name Description
parent string

Required. The parent's resource name of the Spoke.

spoke Spoke

Required. Initial values for a new Hub.

spokeId string

Optional. Unique id for the Spoke to create.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 single Hub.

Parameters
Name Description
request DeleteHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
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 single Hub.

Parameters
Name Description
name HubName

Required. The name of the Hub to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Hub.

Parameters
Name Description
name string

Required. The name of the Hub to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Hub.

Parameters
Name Description
request DeleteHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
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 single Hub.

Parameters
Name Description
request DeleteHubRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
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 single Hub.

Parameters
Name Description
name HubName

Required. The name of the Hub to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Hub.

Parameters
Name Description
name HubName

Required. The name of the Hub to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 single Hub.

Parameters
Name Description
name string

Required. The name of the Hub to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Hub.

Parameters
Name Description
name string

Required. The name of the Hub to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
request DeleteSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The RPC response.

Example
// Create client
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 single Spoke.

Parameters
Name Description
name SpokeName

Required. The name of the Spoke to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
name string

Required. The name of the Spoke to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
request DeleteSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
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 single Spoke.

Parameters
Name Description
request DeleteSpokeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A Task containing the RPC response.

Example
// Create client
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 single Spoke.

Parameters
Name Description
name SpokeName

Required. The name of the Spoke to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
name SpokeName

Required. The name of the Spoke to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
name string

Required. The name of the Spoke to delete.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
name string

Required. The name of the Spoke to delete.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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;
}

GetHub(GetHubRequest, CallSettings)

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

Gets details of a single Hub.

Parameters
Name Description
request GetHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
name HubName

Required. Name of the Hub resource to get.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
name string

Required. Name of the Hub resource to get.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
request GetHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
request GetHubRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
name HubName

Required. Name of the Hub resource to get.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
name HubName

Required. Name of the Hub resource to get.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
name string

Required. Name of the Hub resource to get.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Hub.

Parameters
Name Description
name string

Required. Name of the Hub resource to get.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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);

GetSpoke(GetSpokeRequest, CallSettings)

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

Gets details of a single Spoke.

Parameters
Name Description
request GetSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
name SpokeName

Required. The name of Spoke resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
name string

Required. The name of Spoke resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
request GetSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
request GetSpokeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
name SpokeName

Required. The name of Spoke resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
name SpokeName

Required. The name of Spoke resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
name string

Required. The name of Spoke resource.

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 of a single Spoke.

Parameters
Name Description
name string

Required. The name of Spoke resource.

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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);

ListHubs(LocationName, string, int?, CallSettings)

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

Lists Hubs in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource's name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hubs in a given project and location.

Parameters
Name Description
request ListHubsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hubs in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource's name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hubs in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent resource's name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hubs in a given project and location.

Parameters
Name Description
request ListHubsRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Hubs in a given project and location.

Parameters
Name Description
parent string

Required. The parent resource's name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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;

ListSpokes(LocationName, string, int?, CallSettings)

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

Lists Spokes in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent's resource name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Spokes in a given project and location.

Parameters
Name Description
request ListSpokesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Spokes in a given project and location.

Parameters
Name Description
parent string

Required. The parent's resource name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Spokes in a given project and location.

Parameters
Name Description
parent LocationName

Required. The parent's resource name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Spokes in a given project and location.

Parameters
Name Description
request ListSpokesRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 Spokes in a given project and location.

Parameters
Name Description
parent string

Required. The parent's resource name.

pageToken string

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

pageSize int

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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;

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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
OperationEmptyOperationMetadata

The result of polling the operation.

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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationEmptyOperationMetadata

A task representing the result of polling the operation.

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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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
Name Description
operationName string

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
TaskOperationSpokeOperationMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
Type Description
Task

A task representing the asynchronous shutdown operation.

Remarks

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

UpdateHub(Hub, FieldMask, CallSettings)

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

Updates the parameters of a single Hub.

Parameters
Name Description
hub Hub

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

updateMask FieldMask

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 parameters of a single Hub.

Parameters
Name Description
request UpdateHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 parameters of a single Hub.

Parameters
Name Description
hub Hub

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

updateMask FieldMask

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 parameters of a single Hub.

Parameters
Name Description
hub Hub

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

updateMask FieldMask

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 parameters of a single Hub.

Parameters
Name Description
request UpdateHubRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 parameters of a single Hub.

Parameters
Name Description
request UpdateHubRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
spoke Spoke

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

updateMask FieldMask

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
request UpdateSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
spoke Spoke

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

updateMask FieldMask

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
spoke Spoke

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

updateMask FieldMask

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
request UpdateSpokeRequest

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

callSettings CallSettings

If not null, applies overrides to this RPC call.

Returns
Type Description
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 single Spoke.

Parameters
Name Description
request UpdateSpokeRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
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;
}