Class HubServiceClient (1.2.0)

public abstract class HubServiceClient

HubService client wrapper, for convenient use.

Inheritance

Object > HubServiceClient

Derived Types

Namespace

Google.Cloud.NetworkConnectivity.V1

Assembly

Google.Cloud.NetworkConnectivity.V1.dll

Remarks

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

Properties

CreateHubOperationsClient

public virtual OperationsClient CreateHubOperationsClient { get; }

The long-running operations client for CreateHub.

Property Value
TypeDescription
OperationsClient

CreateSpokeOperationsClient

public virtual OperationsClient CreateSpokeOperationsClient { get; }

The long-running operations client for CreateSpoke.

Property Value
TypeDescription
OperationsClient

DefaultEndpoint

public static string DefaultEndpoint { get; }

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

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default HubService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default HubService scopes are:

DeleteHubOperationsClient

public virtual OperationsClient DeleteHubOperationsClient { get; }

The long-running operations client for DeleteHub.

Property Value
TypeDescription
OperationsClient

DeleteSpokeOperationsClient

public virtual OperationsClient DeleteSpokeOperationsClient { get; }

The long-running operations client for DeleteSpoke.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual HubService.HubServiceClient GrpcClient { get; }

The underlying gRPC HubService client

Property Value
TypeDescription
HubService.HubServiceClient

UpdateHubOperationsClient

public virtual OperationsClient UpdateHubOperationsClient { get; }

The long-running operations client for UpdateHub.

Property Value
TypeDescription
OperationsClient

UpdateSpokeOperationsClient

public virtual OperationsClient UpdateSpokeOperationsClient { get; }

The long-running operations client for UpdateSpoke.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static HubServiceClient Create()

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

Returns
TypeDescription
HubServiceClient

The created HubServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<HubServiceClient>

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 the specified project.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdString

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Hub, OperationMetadata>

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 the specified project.

Parameters
NameDescription
requestCreateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Hub, OperationMetadata>

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 the specified project.

Parameters
NameDescription
parentString

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdString

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Hub, OperationMetadata>

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 the specified project.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdString

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

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 the specified project.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdString

Required. A unique identifier for the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

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 the specified project.

Parameters
NameDescription
requestCreateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

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 the specified project.

Parameters
NameDescription
requestCreateHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

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 the specified project.

Parameters
NameDescription
parentString

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdString

Required. A unique identifier for the hub.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

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 the specified project.

Parameters
NameDescription
parentString

Required. The parent resource.

hubHub

Required. The initial values for a new hub.

hubIdString

Required. A unique identifier for the hub.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

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 spoke in the specified project and location.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdString

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Spoke, OperationMetadata>

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 spoke in the specified project and location.

Parameters
NameDescription
requestCreateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Spoke, OperationMetadata>

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 spoke in the specified project and location.

Parameters
NameDescription
parentString

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdString

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Spoke, OperationMetadata>

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 spoke in the specified project and location.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdString

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 spoke in the specified project and location.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdString

Required. Unique id for the spoke to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 spoke in the specified project and location.

Parameters
NameDescription
requestCreateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 spoke in the specified project and location.

Parameters
NameDescription
requestCreateSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 spoke in the specified project and location.

Parameters
NameDescription
parentString

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdString

Required. Unique id for the spoke to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 spoke in the specified project and location.

Parameters
NameDescription
parentString

Required. The parent resource.

spokeSpoke

Required. The initial values for a new spoke.

spokeIdString

Required. Unique id for the spoke to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 the specified hub.

Parameters
NameDescription
requestDeleteHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

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 the specified hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

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 the specified hub.

Parameters
NameDescription
nameString

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

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 the specified hub.

Parameters
NameDescription
requestDeleteHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified hub.

Parameters
NameDescription
requestDeleteHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified hub.

Parameters
NameDescription
nameString

Required. The name of the hub to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified hub.

Parameters
NameDescription
nameString

Required. The name of the hub to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
requestDeleteSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

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 the specified spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

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 the specified spoke.

Parameters
NameDescription
nameString

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

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 the specified spoke.

Parameters
NameDescription
requestDeleteSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
requestDeleteSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
nameString

Required. The name of the spoke to delete.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
nameString

Required. The name of the spoke to delete.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

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 about the specified hub.

Parameters
NameDescription
requestGetHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Hub

The RPC response.

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

GetHub(HubName, CallSettings)

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

Gets details about the specified hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Hub

The RPC response.

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

GetHub(String, CallSettings)

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

Gets details about the specified hub.

Parameters
NameDescription
nameString

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Hub

The RPC response.

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

GetHubAsync(GetHubRequest, CallSettings)

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

Gets details about the specified hub.

Parameters
NameDescription
requestGetHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Hub>

A Task containing the RPC response.

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

GetHubAsync(GetHubRequest, CancellationToken)

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

Gets details about the specified hub.

Parameters
NameDescription
requestGetHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Hub>

A Task containing the RPC response.

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

GetHubAsync(HubName, CallSettings)

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

Gets details about the specified hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Hub>

A Task containing the RPC response.

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

GetHubAsync(HubName, CancellationToken)

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

Gets details about the specified hub.

Parameters
NameDescription
nameHubName

Required. The name of the hub resource to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Hub>

A Task containing the RPC response.

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

GetHubAsync(String, CallSettings)

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

Gets details about the specified hub.

Parameters
NameDescription
nameString

Required. The name of the hub resource to get.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Hub>

A Task containing the RPC response.

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

GetHubAsync(String, CancellationToken)

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

Gets details about the specified hub.

Parameters
NameDescription
nameString

Required. The name of the hub resource to get.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Hub>

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 about the specified spoke.

Parameters
NameDescription
requestGetSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Spoke

The RPC response.

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

GetSpoke(SpokeName, CallSettings)

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

Gets details about the specified spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Spoke

The RPC response.

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

GetSpoke(String, CallSettings)

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

Gets details about the specified spoke.

Parameters
NameDescription
nameString

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Spoke

The RPC response.

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

GetSpokeAsync(GetSpokeRequest, CallSettings)

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

Gets details about the specified spoke.

Parameters
NameDescription
requestGetSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Spoke>

A Task containing the RPC response.

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

GetSpokeAsync(GetSpokeRequest, CancellationToken)

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

Gets details about the specified spoke.

Parameters
NameDescription
requestGetSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Spoke>

A Task containing the RPC response.

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

GetSpokeAsync(SpokeName, CallSettings)

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

Gets details about the specified spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Spoke>

A Task containing the RPC response.

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

GetSpokeAsync(SpokeName, CancellationToken)

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

Gets details about the specified spoke.

Parameters
NameDescription
nameSpokeName

Required. The name of the spoke resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Spoke>

A Task containing the RPC response.

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

GetSpokeAsync(String, CallSettings)

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

Gets details about the specified spoke.

Parameters
NameDescription
nameString

Required. The name of the spoke resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Spoke>

A Task containing the RPC response.

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

GetSpokeAsync(String, CancellationToken)

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

Gets details about the specified spoke.

Parameters
NameDescription
nameString

Required. The name of the spoke resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Spoke>

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, Nullable<Int32>, CallSettings)

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

Lists hubs in a given project.

Parameters
NameDescription
parentLocationName

Required. The parent resource's name.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListHubsResponse, Hub>

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.

Parameters
NameDescription
requestListHubsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListHubsResponse, Hub>

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, Nullable<Int32>, CallSettings)

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

Lists hubs in a given project.

Parameters
NameDescription
parentString

Required. The parent resource's name.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListHubsResponse, Hub>

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, Nullable<Int32>, CallSettings)

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

Lists hubs in a given project.

Parameters
NameDescription
parentLocationName

Required. The parent resource's name.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListHubsResponse, Hub>

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.

Parameters
NameDescription
requestListHubsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListHubsResponse, Hub>

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, Nullable<Int32>, CallSettings)

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

Lists hubs in a given project.

Parameters
NameDescription
parentString

Required. The parent resource's name.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListHubsResponse, Hub>

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, Nullable<Int32>, CallSettings)

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

Lists the spokes in the specified project and location.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListSpokesResponse, Spoke>

A pageable sequence of Spoke resources.

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

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

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListSpokesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Spoke item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Spoke> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Spoke item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListSpokes(ListSpokesRequest, CallSettings)

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

Lists the spokes in the specified project and location.

Parameters
NameDescription
requestListSpokesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListSpokesResponse, Spoke>

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, Nullable<Int32>, CallSettings)

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

Lists the spokes in the specified project and location.

Parameters
NameDescription
parentString

Required. The parent resource.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListSpokesResponse, Spoke>

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, Nullable<Int32>, CallSettings)

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

Lists the spokes in the specified project and location.

Parameters
NameDescription
parentLocationName

Required. The parent resource.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListSpokesResponse, Spoke>

A pageable asynchronous sequence of Spoke resources.

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

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

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

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Spoke> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Spoke item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListSpokesAsync(ListSpokesRequest, CallSettings)

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

Lists the spokes in the specified project and location.

Parameters
NameDescription
requestListSpokesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListSpokesResponse, Spoke>

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, Nullable<Int32>, CallSettings)

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

Lists the spokes in the specified project and location.

Parameters
NameDescription
parentString

Required. The parent resource.

pageTokenString

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

pageSizeNullable<Int32>

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListSpokesResponse, Spoke>

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
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Hub, OperationMetadata>

The result of polling the operation.

PollOnceCreateHubAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceCreateSpoke(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Spoke, OperationMetadata>

The result of polling the operation.

PollOnceCreateSpokeAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteHub(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The result of polling the operation.

PollOnceDeleteHubAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceDeleteSpoke(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, OperationMetadata>

The result of polling the operation.

PollOnceDeleteSpokeAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpdateHub(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Hub, OperationMetadata>

The result of polling the operation.

PollOnceUpdateHubAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

A task representing the result of polling the operation.

PollOnceUpdateSpoke(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Spoke, OperationMetadata>

The result of polling the operation.

PollOnceUpdateSpokeAsync(String, CallSettings)

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

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

Parameters
NameDescription
operationNameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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

UpdateHub(Hub, FieldMask, CallSettings)

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

Updates the description and/or labels of the specified hub.

Parameters
NameDescription
hubHub

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

updateMaskFieldMask

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Hub, OperationMetadata>

The RPC response.

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

// Poll until the returned long-running operation is complete
Operation<Hub, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Hub result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Hub, OperationMetadata> retrievedResponse = hubServiceClient.PollOnceUpdateHub(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Hub retrievedResult = retrievedResponse.Result;
}

UpdateHub(UpdateHubRequest, CallSettings)

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

Updates the description and/or labels of the specified hub.

Parameters
NameDescription
requestUpdateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Hub, OperationMetadata>

The RPC response.

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

// Poll until the returned long-running operation is complete
Operation<Hub, OperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Hub result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Hub, OperationMetadata> retrievedResponse = hubServiceClient.PollOnceUpdateHub(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Hub retrievedResult = retrievedResponse.Result;
}

UpdateHubAsync(Hub, FieldMask, CallSettings)

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

Updates the description and/or labels of the specified hub.

Parameters
NameDescription
hubHub

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

updateMaskFieldMask

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

A Task containing the RPC response.

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

// Poll until the returned long-running operation is complete
Operation<Hub, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Hub result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Hub, OperationMetadata> retrievedResponse = await hubServiceClient.PollOnceUpdateHubAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Hub retrievedResult = retrievedResponse.Result;
}

UpdateHubAsync(Hub, FieldMask, CancellationToken)

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

Updates the description and/or labels of the specified hub.

Parameters
NameDescription
hubHub

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

updateMaskFieldMask

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

A Task containing the RPC response.

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

// Poll until the returned long-running operation is complete
Operation<Hub, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Hub result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Hub, OperationMetadata> retrievedResponse = await hubServiceClient.PollOnceUpdateHubAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Hub retrievedResult = retrievedResponse.Result;
}

UpdateHubAsync(UpdateHubRequest, CallSettings)

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

Updates the description and/or labels of the specified hub.

Parameters
NameDescription
requestUpdateHubRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

A Task containing the RPC response.

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

// Poll until the returned long-running operation is complete
Operation<Hub, OperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Hub result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Hub, OperationMetadata> retrievedResponse = await hubServiceClient.PollOnceUpdateHubAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Hub retrievedResult = retrievedResponse.Result;
}

UpdateHubAsync(UpdateHubRequest, CancellationToken)

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

Updates the description and/or labels of the specified hub.

Parameters
NameDescription
requestUpdateHubRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Hub, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
spokeSpoke

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

updateMaskFieldMask

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Spoke, OperationMetadata>

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 the specified spoke.

Parameters
NameDescription
requestUpdateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Spoke, OperationMetadata>

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 the specified spoke.

Parameters
NameDescription
spokeSpoke

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

updateMaskFieldMask

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
spokeSpoke

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

updateMaskFieldMask

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
requestUpdateSpokeRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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 the specified spoke.

Parameters
NameDescription
requestUpdateSpokeRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Spoke, OperationMetadata>>

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;
}