1.2.0 (latest) 1.1.0 1.0.0

    public abstract class ApiHubCollectClient

Reference documentation and code samples for the API hub v1 API class ApiHubCollectClient.

ApiHubCollect client wrapper, for convenient use.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ApiHubCollectClient

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Derived Types

[ApiHubCollectClientImpl](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClientImpl.md.txt)

## Namespace

[Google.Cloud.ApiHub.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.md.txt)

## Assembly

Google.Cloud.ApiHub.V1.dll

## Remarks

This service exposes methods used for collecting various types of data from
different first party and third party sources and push it to Hub's collect
layer.

## Properties

### CollectApiDataOperationsClient

    public virtual OperationsClient CollectApiDataOperationsClient { get; }

The long-running operations client for `CollectApiData`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OperationsClient` |   |

### DefaultEndpoint

    public static string DefaultEndpoint { get; }

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

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### DefaultScopes

    public static IReadOnlyList<string> DefaultScopes { get; }

The default ApiHubCollect scopes.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `IReadOnlyListstring` |   |

**Remarks** The default ApiHubCollect scopes are:

- <https://www.googleapis.com/auth/cloud-platform>

<br />

### GrpcClient

    public virtual ApiHubCollect.ApiHubCollectClient GrpcClient { get; }

The underlying gRPC ApiHubCollect client

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ApiHubCollectApiHubCollectClient` |   |

### LocationsClient

    public virtual LocationsClient LocationsClient { get; }

The [LocationsClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.Location/latest/Google.Cloud.Location.LocationsClient.md.txt) associated with this client.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `LocationsClient` |   |

### ServiceMetadata

    public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ServiceMetadata` |   |

## Methods

### CollectApiData(LocationName, CollectionType, ApiData, CallSettings)

    public virtual Operation<CollectApiDataResponse, OperationMetadata> CollectApiData(LocationName location, CollectionType collectionType, ApiData apiData, CallSettings callSettings = null)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `location` | `LocationName` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` |
| `collectionType` | `CollectionType` Required. The type of collection. Applies to all entries in \[api_data\]\[google.cloud.apihub.v1.CollectApiDataRequest.api_data\]. |
| `apiData` | `ApiData` Required. The API data to be collected. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationCollectApiDataResponseOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.Create();
// Initialize request argument(s)
LocationName location = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CollectionType collectionType = CollectionType.Unspecified;
ApiData apiData = new ApiData();
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = apiHubCollectClient.CollectApiData(location, collectionType, apiData);

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

### CollectApiData(CollectApiDataRequest, CallSettings)

    public virtual Operation<CollectApiDataResponse, OperationMetadata> CollectApiData(CollectApiDataRequest request, CallSettings callSettings = null)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CollectApiDataRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationCollectApiDataResponseOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.Create();
// Initialize request argument(s)
CollectApiDataRequest request = new CollectApiDataRequest
{
    LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CollectionType = CollectionType.Unspecified,
    PluginInstanceAsPluginInstanceName = PluginInstanceName.FromProjectLocationPluginInstance("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"),
    ActionId = "",
    ApiData = new ApiData(),
};
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = apiHubCollectClient.CollectApiData(request);

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

### CollectApiData(string, CollectionType, ApiData, CallSettings)

    public virtual Operation<CollectApiDataResponse, OperationMetadata> CollectApiData(string location, CollectionType collectionType, ApiData apiData, CallSettings callSettings = null)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `location` | `string` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` |
| `collectionType` | `CollectionType` Required. The type of collection. Applies to all entries in \[api_data\]\[google.cloud.apihub.v1.CollectApiDataRequest.api_data\]. |
| `apiData` | `ApiData` Required. The API data to be collected. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationCollectApiDataResponseOperationMetadata` | The RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = ApiHubCollectClient.Create();
// Initialize request argument(s)
string location = "projects/[PROJECT]/locations/[LOCATION]";
CollectionType collectionType = CollectionType.Unspecified;
ApiData apiData = new ApiData();
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = apiHubCollectClient.CollectApiData(location, collectionType, apiData);

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

### CollectApiDataAsync(LocationName, CollectionType, ApiData, CallSettings)

    public virtual Task<Operation<CollectApiDataResponse, OperationMetadata>> CollectApiDataAsync(LocationName location, CollectionType collectionType, ApiData apiData, CallSettings callSettings = null)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `location` | `LocationName` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` |
| `collectionType` | `CollectionType` Required. The type of collection. Applies to all entries in \[api_data\]\[google.cloud.apihub.v1.CollectApiDataRequest.api_data\]. |
| `apiData` | `ApiData` Required. The API data to be collected. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationCollectApiDataResponseOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = await ApiHubCollectClient.CreateAsync();
// Initialize request argument(s)
LocationName location = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CollectionType collectionType = CollectionType.Unspecified;
ApiData apiData = new ApiData();
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = await apiHubCollectClient.CollectApiDataAsync(location, collectionType, apiData);

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

### CollectApiDataAsync(LocationName, CollectionType, ApiData, CancellationToken)

    public virtual Task<Operation<CollectApiDataResponse, OperationMetadata>> CollectApiDataAsync(LocationName location, CollectionType collectionType, ApiData apiData, CancellationToken cancellationToken)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `location` | `LocationName` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` |
| `collectionType` | `CollectionType` Required. The type of collection. Applies to all entries in \[api_data\]\[google.cloud.apihub.v1.CollectApiDataRequest.api_data\]. |
| `apiData` | `ApiData` Required. The API data to be collected. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationCollectApiDataResponseOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = await ApiHubCollectClient.CreateAsync();
// Initialize request argument(s)
LocationName location = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
CollectionType collectionType = CollectionType.Unspecified;
ApiData apiData = new ApiData();
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = await apiHubCollectClient.CollectApiDataAsync(location, collectionType, apiData);

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

### CollectApiDataAsync(CollectApiDataRequest, CallSettings)

    public virtual Task<Operation<CollectApiDataResponse, OperationMetadata>> CollectApiDataAsync(CollectApiDataRequest request, CallSettings callSettings = null)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CollectApiDataRequest` The request object containing all of the parameters for the API call. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationCollectApiDataResponseOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = await ApiHubCollectClient.CreateAsync();
// Initialize request argument(s)
CollectApiDataRequest request = new CollectApiDataRequest
{
    LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CollectionType = CollectionType.Unspecified,
    PluginInstanceAsPluginInstanceName = PluginInstanceName.FromProjectLocationPluginInstance("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"),
    ActionId = "",
    ApiData = new ApiData(),
};
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = await apiHubCollectClient.CollectApiDataAsync(request);

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

### CollectApiDataAsync(CollectApiDataRequest, CancellationToken)

    public virtual Task<Operation<CollectApiDataResponse, OperationMetadata>> CollectApiDataAsync(CollectApiDataRequest request, CancellationToken cancellationToken)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `CollectApiDataRequest` The request object containing all of the parameters for the API call. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationCollectApiDataResponseOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = await ApiHubCollectClient.CreateAsync();
// Initialize request argument(s)
CollectApiDataRequest request = new CollectApiDataRequest
{
    LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    CollectionType = CollectionType.Unspecified,
    PluginInstanceAsPluginInstanceName = PluginInstanceName.FromProjectLocationPluginInstance("[PROJECT]", "[LOCATION]", "[PLUGIN]", "[INSTANCE]"),
    ActionId = "",
    ApiData = new ApiData(),
};
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = await apiHubCollectClient.CollectApiDataAsync(request);

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

### CollectApiDataAsync(string, CollectionType, ApiData, CallSettings)

    public virtual Task<Operation<CollectApiDataResponse, OperationMetadata>> CollectApiDataAsync(string location, CollectionType collectionType, ApiData apiData, CallSettings callSettings = null)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `location` | `string` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` |
| `collectionType` | `CollectionType` Required. The type of collection. Applies to all entries in \[api_data\]\[google.cloud.apihub.v1.CollectApiDataRequest.api_data\]. |
| `apiData` | `ApiData` Required. The API data to be collected. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationCollectApiDataResponseOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = await ApiHubCollectClient.CreateAsync();
// Initialize request argument(s)
string location = "projects/[PROJECT]/locations/[LOCATION]";
CollectionType collectionType = CollectionType.Unspecified;
ApiData apiData = new ApiData();
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = await apiHubCollectClient.CollectApiDataAsync(location, collectionType, apiData);

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

### CollectApiDataAsync(string, CollectionType, ApiData, CancellationToken)

    public virtual Task<Operation<CollectApiDataResponse, OperationMetadata>> CollectApiDataAsync(string location, CollectionType collectionType, ApiData apiData, CancellationToken cancellationToken)

Collect API data from a source and push it to Hub's collect layer.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `location` | `string` Required. The regional location of the API hub instance and its resources. Format: `projects/{project}/locations/{location}` |
| `collectionType` | `CollectionType` Required. The type of collection. Applies to all entries in \[api_data\]\[google.cloud.apihub.v1.CollectApiDataRequest.api_data\]. |
| `apiData` | `ApiData` Required. The API data to be collected. |
| `cancellationToken` | `CancellationToken` A [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use for this RPC. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationCollectApiDataResponseOperationMetadata` | A Task containing the RPC response. |

**Example**

```cs
// Create client
ApiHubCollectClient apiHubCollectClient = await ApiHubCollectClient.CreateAsync();
// Initialize request argument(s)
string location = "projects/[PROJECT]/locations/[LOCATION]";
CollectionType collectionType = CollectionType.Unspecified;
ApiData apiData = new ApiData();
// Make the request
Operation<CollectApiDataResponse, OperationMetadata> response = await apiHubCollectClient.CollectApiDataAsync(location, collectionType, apiData);

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

### Create()

    public static ApiHubCollectClient Create()

Synchronously creates a [ApiHubCollectClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ApiHubCollectClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClientBuilder.md.txt).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `ApiHubCollectClient` | The created [ApiHubCollectClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt). |

### CreateAsync(CancellationToken)

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

Asynchronously creates a [ApiHubCollectClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt) using the default credentials, endpoint and
settings. To specify custom credentials or other settings, use [ApiHubCollectClientBuilder](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClientBuilder.md.txt).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `cancellationToken` | `CancellationToken` The [CancellationToken](https://learn.microsoft.com/dotnet/api/system.threading.cancellationtoken) to use while creating the client. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskApiHubCollectClient` | The task representing the created [ApiHubCollectClient](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt). |

### PollOnceCollectApiData(string, CallSettings)

    public virtual Operation<CollectApiDataResponse, OperationMetadata> PollOnceCollectApiData(string operationName, CallSettings callSettings = null)

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `OperationCollectApiDataResponseOperationMetadata` | The result of polling the operation. |

### PollOnceCollectApiDataAsync(string, CallSettings)

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

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

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `operationName` | `string` The name of a previously invoked operation. Must not be `null` or empty. |
| `callSettings` | `CallSettings` If not null, applies overrides to this RPC call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `TaskOperationCollectApiDataResponseOperationMetadata` | A task representing the result of polling the operation. |

### ShutdownDefaultChannelsAsync()

    public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt#Google_Cloud_ApiHub_V1_ApiHubCollectClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt#Google_Cloud_ApiHub_V1_ApiHubCollectClient_CreateAsync_System_Threading_CancellationToken_). Channels which weren't automatically created are not
affected.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Task` | A task representing the asynchronous shutdown operation. |

**Remarks** After calling this method, further calls to [Create()](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt#Google_Cloud_ApiHub_V1_ApiHubCollectClient_Create) and
[CreateAsync(CancellationToken)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.ApiHub.V1/latest/Google.Cloud.ApiHub.V1.ApiHubCollectClient.md.txt#Google_Cloud_ApiHub_V1_ApiHubCollectClient_CreateAsync_System_Threading_CancellationToken_) will create new channels, which could in turn be shut down
by another call to this method.