# Class v1.AnalyticsHubServiceClient (2.4.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [2.4.0 (latest)](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/v1.analyticshubserviceclient)
- [2.2.0](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/2.2.0/bigquery-analyticshub/v1.analyticshubserviceclient)
- [1.6.0](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/1.6.0/bigquery-analyticshub/v1.analyticshubserviceclient)
- [1.1.0](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/1.1.0/bigquery-analyticshub/v1.analyticshubserviceclient)
- [0.2.2](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/0.2.2/bigquery-analyticshub/v1.analyticshubserviceclient)
- [0.1.2](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/0.1.2/bigquery-analyticshub/v1.analyticshubserviceclient)
The `AnalyticsHubService` API facilitates data sharing within and across organizations. It allows data providers to publish listings that reference shared datasets. With Analytics Hub, users can discover and search for listings that they have access to. Subscribers can view and subscribe to listings. When you subscribe to a listing, Analytics Hub creates a linked dataset in your project. v1

## Package

[@google-cloud/bigquery-analyticshub](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html)

## Constructors

### (constructor)(opts, gaxInstance)

    constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of AnalyticsHubServiceClient.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `opts` | `ClientOptions` |
| `gaxInstance` | `typeof gax | typeof fallback` : loaded instance of `google-gax`. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: \`\`\` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new AnalyticsHubServiceClient({fallback: true}, gax); \`\`\` |

## Properties

### analyticsHubServiceStub

    analyticsHubServiceStub?: Promise<{
            [name: string]: Function;
        }>;

### apiEndpoint

    get apiEndpoint(): string;

The DNS address for this API service.

### apiEndpoint

    static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

### auth

    auth: gax.GoogleAuth;

### descriptors

    descriptors: Descriptors;

### innerApiCalls

    innerApiCalls: {
            [name: string]: Function;
        };

### operationsClient

    operationsClient: gax.OperationsClient;

### pathTemplates

    pathTemplates: {
            [name: string]: gax.PathTemplate;
        };

### port

    static get port(): number;

The port for this API service.

### scopes

    static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

### servicePath

    static get servicePath(): string;

The DNS address for this API service.

### universeDomain

    get universeDomain(): string;

### warn

    warn: (code: string, message: string, warnType?: string) => void;

## Methods

### approveQueryTemplate(request, options)

    approveQueryTemplate(request?: protos.google.cloud.bigquery.analyticshub.v1.IApproveQueryTemplateRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate,
            protos.google.cloud.bigquery.analyticshub.v1.IApproveQueryTemplateRequest | undefined,
            {} | undefined
        ]>;

Approves a query template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iapprovequerytemplaterequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iapprovequerytemplaterequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The resource path of the QueryTemplate.
       *  e.g.
       *  `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callApproveQueryTemplate() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.approveQueryTemplate(request);
        console.log(response);
      }

      callApproveQueryTemplate();

### approveQueryTemplate(request, options, callback)

    approveQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IApproveQueryTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.IApproveQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iapprovequerytemplaterequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iapprovequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### approveQueryTemplate(request, callback)

    approveQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IApproveQueryTemplateRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.IApproveQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iapprovequerytemplaterequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iapprovequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### cancelOperation(request, optionsOrCallback, callback)

    cancelOperation(request: protos.google.longrunning.CancelOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to `Code.CANCELLED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.canceloperationrequest` The request object that will be sent. |
| `optionsOrCallback` | `CallOptions | Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.canceloperationrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty, {} | undefined | null>` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.canceloperationrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty, {} | undefined | null>` The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty>` |   |

**Example**


    const client = longrunning.operationsClient();
    await client.cancelOperation({name: ''});

### checkDeleteSubscriptionProgress(name)

    checkDeleteSubscriptionProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.bigquery.analyticshub.v1.OperationMetadata>>;

Check the status of the long running operation returned by `deleteSubscription()`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` The operation name that will be passed. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.operationmetadata>>` | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the subscription to delete.
       *  e.g. projects/123/locations/us/subscriptions/456
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callDeleteSubscription() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const [operation] = await analyticshubClient.deleteSubscription(request);
        const [response] = await operation.promise();
        console.log(response);
      }

      callDeleteSubscription();

### checkRefreshSubscriptionProgress(name)

    checkRefreshSubscriptionProgress(name: string): Promise<LROperation<protos.google.cloud.bigquery.analyticshub.v1.RefreshSubscriptionResponse, protos.google.cloud.bigquery.analyticshub.v1.OperationMetadata>>;

Check the status of the long running operation returned by `refreshSubscription()`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` The operation name that will be passed. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.refreshsubscriptionresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.operationmetadata>>` | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the Subscription to refresh.
       *  e.g. `projects/subscriberproject/locations/us/subscriptions/123`
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callRefreshSubscription() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const [operation] = await analyticshubClient.refreshSubscription(request);
        const [response] = await operation.promise();
        console.log(response);
      }

      callRefreshSubscription();

### checkSubscribeDataExchangeProgress(name)

    checkSubscribeDataExchangeProgress(name: string): Promise<LROperation<protos.google.cloud.bigquery.analyticshub.v1.SubscribeDataExchangeResponse, protos.google.cloud.bigquery.analyticshub.v1.OperationMetadata>>;

Check the status of the long running operation returned by `subscribeDataExchange()`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `string` The operation name that will be passed. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.subscribedataexchangeresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.operationmetadata>>` | {Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the Data Exchange.
       *  e.g. `projects/publisherproject/locations/us/dataExchanges/123`
       */
      // const name = 'abc123'
      /**
       *  Required. The parent resource path of the Subscription.
       *  e.g. `projects/subscriberproject/locations/us`
       */
      // const destination = 'abc123'
      /**
       *  Optional. BigQuery destination dataset to create for the subscriber.
       */
      // const destinationDataset = {}
      /**
       *  Required. Name of the subscription to create.
       *  e.g. `subscription1`
       */
      // const subscription = 'abc123'
      /**
       *  Email of the subscriber.
       */
      // const subscriberContact = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callSubscribeDataExchange() {
        // Construct request
        const request = {
          name,
          destination,
          subscription,
        };

        // Run request
        const [operation] = await analyticshubClient.subscribeDataExchange(request);
        const [response] = await operation.promise();
        console.log(response);
      }

      callSubscribeDataExchange();

### close()

    close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<void>` | {Promise} A promise that resolves when the client is closed. |

### createDataExchange(request, options)

    createDataExchange(request?: protos.google.cloud.bigquery.analyticshub.v1.ICreateDataExchangeRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IDataExchange,
            protos.google.cloud.bigquery.analyticshub.v1.ICreateDataExchangeRequest | undefined,
            {} | undefined
        ]>;

Creates a new data exchange.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatedataexchangerequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatedataexchangerequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the data exchange.
       *  e.g. `projects/myproject/locations/us`.
       */
      // const parent = 'abc123'
      /**
       *  Required. The ID of the data exchange.
       *  Must contain only Unicode letters, numbers (0-9), underscores (_).
       *  Max length: 100 bytes.
       */
      // const dataExchangeId = 'abc123'
      /**
       *  Required. The data exchange to create.
       */
      // const dataExchange = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callCreateDataExchange() {
        // Construct request
        const request = {
          parent,
          dataExchangeId,
          dataExchange,
        };

        // Run request
        const response = await analyticshubClient.createDataExchange(request);
        console.log(response);
      }

      callCreateDataExchange();

### createDataExchange(request, options, callback)

    createDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.ICreateDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange, protos.google.cloud.bigquery.analyticshub.v1.ICreateDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatedataexchangerequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatedataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### createDataExchange(request, callback)

    createDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.ICreateDataExchangeRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange, protos.google.cloud.bigquery.analyticshub.v1.ICreateDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatedataexchangerequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatedataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### createListing(request, options)

    createListing(request?: protos.google.cloud.bigquery.analyticshub.v1.ICreateListingRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IListing,
            protos.google.cloud.bigquery.analyticshub.v1.ICreateListingRequest | undefined,
            {} | undefined
        ]>;

Creates a new listing.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatelistingrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatelistingrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the listing.
       *  e.g. `projects/myproject/locations/us/dataExchanges/123`.
       */
      // const parent = 'abc123'
      /**
       *  Required. The ID of the listing to create.
       *  Must contain only Unicode letters, numbers (0-9), underscores (_).
       *  Max length: 100 bytes.
       */
      // const listingId = 'abc123'
      /**
       *  Required. The listing to create.
       */
      // const listing = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callCreateListing() {
        // Construct request
        const request = {
          parent,
          listingId,
          listing,
        };

        // Run request
        const response = await analyticshubClient.createListing(request);
        console.log(response);
      }

      callCreateListing();

### createListing(request, options, callback)

    createListing(request: protos.google.cloud.bigquery.analyticshub.v1.ICreateListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IListing, protos.google.cloud.bigquery.analyticshub.v1.ICreateListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatelistingrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### createListing(request, callback)

    createListing(request: protos.google.cloud.bigquery.analyticshub.v1.ICreateListingRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IListing, protos.google.cloud.bigquery.analyticshub.v1.ICreateListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatelistingrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### createQueryTemplate(request, options)

    createQueryTemplate(request?: protos.google.cloud.bigquery.analyticshub.v1.ICreateQueryTemplateRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate,
            protos.google.cloud.bigquery.analyticshub.v1.ICreateQueryTemplateRequest | undefined,
            {} | undefined
        ]>;

Creates a new QueryTemplate

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatequerytemplaterequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatequerytemplaterequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the QueryTemplate.
       *  e.g.
       *  `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`.
       */
      // const parent = 'abc123'
      /**
       *  Required. The ID of the QueryTemplate to create.
       *  Must contain only Unicode letters, numbers (0-9), underscores (_).
       *  Max length: 100 bytes.
       */
      // const queryTemplateId = 'abc123'
      /**
       *  Required. The QueryTemplate to create.
       */
      // const queryTemplate = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callCreateQueryTemplate() {
        // Construct request
        const request = {
          parent,
          queryTemplateId,
          queryTemplate,
        };

        // Run request
        const response = await analyticshubClient.createQueryTemplate(request);
        console.log(response);
      }

      callCreateQueryTemplate();

### createQueryTemplate(request, options, callback)

    createQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.ICreateQueryTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.ICreateQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatequerytemplaterequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### createQueryTemplate(request, callback)

    createQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.ICreateQueryTemplateRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.ICreateQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatequerytemplaterequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.icreatequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### dataExchangePath(project, location, dataExchange)

    dataExchangePath(project: string, location: string, dataExchange: string): string;

Return a fully-qualified dataExchange resource name string.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `dataExchange` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | {string} Resource name string. |

### deleteDataExchange(request, options)

    deleteDataExchange(request?: protos.google.cloud.bigquery.analyticshub.v1.IDeleteDataExchangeRequest, options?: CallOptions): Promise<[
            protos.google.protobuf.IEmpty,
            protos.google.cloud.bigquery.analyticshub.v1.IDeleteDataExchangeRequest | undefined,
            {} | undefined
        ]>;

Deletes an existing data exchange.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletedataexchangerequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletedataexchangerequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The full name of the data exchange resource that you want to
       *  delete. For example, `projects/myproject/locations/us/dataExchanges/123`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callDeleteDataExchange() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.deleteDataExchange(request);
        console.log(response);
      }

      callDeleteDataExchange();

### deleteDataExchange(request, options, callback)

    deleteDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IDeleteDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletedataexchangerequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletedataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### deleteDataExchange(request, callback)

    deleteDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteDataExchangeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IDeleteDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletedataexchangerequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletedataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### deleteListing(request, options)

    deleteListing(request?: protos.google.cloud.bigquery.analyticshub.v1.IDeleteListingRequest, options?: CallOptions): Promise<[
            protos.google.protobuf.IEmpty,
            protos.google.cloud.bigquery.analyticshub.v1.IDeleteListingRequest | undefined,
            {} | undefined
        ]>;

Deletes a listing.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletelistingrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletelistingrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the listing to delete.
       *  e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.
       */
      // const name = 'abc123'
      /**
       *  Optional. If the listing is commercial then this field must be set to true,
       *  otherwise a failure is thrown. This acts as a safety guard to avoid
       *  deleting commercial listings accidentally.
       */
      // const deleteCommercial = true

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callDeleteListing() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.deleteListing(request);
        console.log(response);
      }

      callDeleteListing();

### deleteListing(request, options, callback)

    deleteListing(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteListingRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IDeleteListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletelistingrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### deleteListing(request, callback)

    deleteListing(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteListingRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IDeleteListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletelistingrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### deleteOperation(request, optionsOrCallback, callback)

    deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.deleteoperationrequest` The request object that will be sent. |
| `optionsOrCallback` | `CallOptions | Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.deleteoperationrequest, {} | null | undefined>` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.deleteoperationrequest, {} | null | undefined>` The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty>` |   |

**Example**


    const client = longrunning.operationsClient();
    await client.deleteOperation({name: ''});

### deleteQueryTemplate(request, options)

    deleteQueryTemplate(request?: protos.google.cloud.bigquery.analyticshub.v1.IDeleteQueryTemplateRequest, options?: CallOptions): Promise<[
            protos.google.protobuf.IEmpty,
            protos.google.cloud.bigquery.analyticshub.v1.IDeleteQueryTemplateRequest | undefined,
            {} | undefined
        ]>;

Deletes a query template.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletequerytemplaterequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletequerytemplaterequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Empty](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.empty). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The resource path of the QueryTemplate.
       *  e.g.
       *  `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callDeleteQueryTemplate() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.deleteQueryTemplate(request);
        console.log(response);
      }

      callDeleteQueryTemplate();

### deleteQueryTemplate(request, options, callback)

    deleteQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteQueryTemplateRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IDeleteQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletequerytemplaterequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### deleteQueryTemplate(request, callback)

    deleteQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteQueryTemplateRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IDeleteQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletequerytemplaterequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### deleteSubscription(request, options)

    deleteSubscription(request?: protos.google.cloud.bigquery.analyticshub.v1.IDeleteSubscriptionRequest, options?: CallOptions): Promise<[
            LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>,
            protos.google.longrunning.IOperation | undefined,
            {} | undefined
        ]>;

Deletes a subscription.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletesubscriptionrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its `promise()` method returns a promise you can `await` for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the subscription to delete.
       *  e.g. projects/123/locations/us/subscriptions/456
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callDeleteSubscription() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const [operation] = await analyticshubClient.deleteSubscription(request);
        const [response] = await operation.promise();
        console.log(response);
      }

      callDeleteSubscription();

### deleteSubscription(request, options, callback)

    deleteSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteSubscriptionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletesubscriptionrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### deleteSubscription(request, callback)

    deleteSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IDeleteSubscriptionRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ideletesubscriptionrequest` |
| `callback` | `Callback<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.protobuf.iempty, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getDataExchange(request, options)

    getDataExchange(request?: protos.google.cloud.bigquery.analyticshub.v1.IGetDataExchangeRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IDataExchange,
            protos.google.cloud.bigquery.analyticshub.v1.IGetDataExchangeRequest | undefined,
            {} | undefined
        ]>;

Gets the details of a data exchange.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetdataexchangerequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetdataexchangerequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The resource name of the data exchange.
       *  e.g. `projects/myproject/locations/us/dataExchanges/123`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callGetDataExchange() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.getDataExchange(request);
        console.log(response);
      }

      callGetDataExchange();

### getDataExchange(request, options, callback)

    getDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.IGetDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange, protos.google.cloud.bigquery.analyticshub.v1.IGetDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetdataexchangerequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetdataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getDataExchange(request, callback)

    getDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.IGetDataExchangeRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange, protos.google.cloud.bigquery.analyticshub.v1.IGetDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetdataexchangerequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetdataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getIamPolicy(request, options)

    getIamPolicy(request?: protos.google.iam.v1.IGetIamPolicyRequest, options?: CallOptions): Promise<[
            protos.google.iam.v1.IPolicy,
            protos.google.iam.v1.IGetIamPolicyRequest | undefined,
            {} | undefined
        ]>;

Gets the IAM policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.igetiampolicyrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.ipolicy, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.igetiampolicyrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.policy). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  REQUIRED: The resource for which the policy is being requested.
       *  See the operation documentation for the appropriate value for this field.
       */
      // const resource = 'abc123'
      /**
       *  OPTIONAL: A `GetPolicyOptions` object for specifying options to
       *  `GetIamPolicy`.
       */
      // const options = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callGetIamPolicy() {
        // Construct request
        const request = {
          resource,
        };

        // Run request
        const response = await analyticshubClient.getIamPolicy(request);
        console.log(response);
      }

      callGetIamPolicy();

### getIamPolicy(request, options, callback)

    getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.igetiampolicyrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.ipolicy, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.igetiampolicyrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getIamPolicy(request, callback)

    getIamPolicy(request: protos.google.iam.v1.IGetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.IGetIamPolicyRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.igetiampolicyrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.ipolicy, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.igetiampolicyrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getListing(request, options)

    getListing(request?: protos.google.cloud.bigquery.analyticshub.v1.IGetListingRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IListing,
            protos.google.cloud.bigquery.analyticshub.v1.IGetListingRequest | undefined,
            {} | undefined
        ]>;

Gets the details of a listing.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetlistingrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetlistingrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The resource name of the listing.
       *  e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callGetListing() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.getListing(request);
        console.log(response);
      }

      callGetListing();

### getListing(request, options, callback)

    getListing(request: protos.google.cloud.bigquery.analyticshub.v1.IGetListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IListing, protos.google.cloud.bigquery.analyticshub.v1.IGetListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetlistingrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetlistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getListing(request, callback)

    getListing(request: protos.google.cloud.bigquery.analyticshub.v1.IGetListingRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IListing, protos.google.cloud.bigquery.analyticshub.v1.IGetListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetlistingrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetlistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getOperation(request, optionsOrCallback, callback)

    getOperation(request: protos.google.longrunning.GetOperationRequest, optionsOrCallback?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.getoperationrequest` The request object that will be sent. |
| `optionsOrCallback` | `CallOptions | Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.operation, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.getoperationrequest, {} | null | undefined>` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.operation, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.getoperationrequest, {} | null | undefined>` The function which will be called with the result of the API call. The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.operation]>` |   |

**Example**


    const client = longrunning.operationsClient();
    const name = '';
    const [response] = await client.getOperation({name});
    // doThingsWith(response)

### getProjectId()

    getProjectId(): Promise<string>;

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<string>` |   |

### getProjectId(callback)

    getProjectId(callback: Callback<string, undefined, undefined>): void;

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `callback` | `Callback<string, undefined, undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getQueryTemplate(request, options)

    getQueryTemplate(request?: protos.google.cloud.bigquery.analyticshub.v1.IGetQueryTemplateRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate,
            protos.google.cloud.bigquery.analyticshub.v1.IGetQueryTemplateRequest | undefined,
            {} | undefined
        ]>;

Gets a QueryTemplate

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetquerytemplaterequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetquerytemplaterequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the QueryTemplate.
       *  e.g.
       *  `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callGetQueryTemplate() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.getQueryTemplate(request);
        console.log(response);
      }

      callGetQueryTemplate();

### getQueryTemplate(request, options, callback)

    getQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IGetQueryTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.IGetQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetquerytemplaterequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetquerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getQueryTemplate(request, callback)

    getQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IGetQueryTemplateRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.IGetQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetquerytemplaterequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetquerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getSubscription(request, options)

    getSubscription(request?: protos.google.cloud.bigquery.analyticshub.v1.IGetSubscriptionRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.ISubscription,
            protos.google.cloud.bigquery.analyticshub.v1.IGetSubscriptionRequest | undefined,
            {} | undefined
        ]>;

Gets the details of a Subscription.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetsubscriptionrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetsubscriptionrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the subscription.
       *  e.g. projects/123/locations/us/subscriptions/456
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callGetSubscription() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.getSubscription(request);
        console.log(response);
      }

      callGetSubscription();

### getSubscription(request, options, callback)

    getSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IGetSubscriptionRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.ISubscription, protos.google.cloud.bigquery.analyticshub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetsubscriptionrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetsubscriptionrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### getSubscription(request, callback)

    getSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IGetSubscriptionRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.ISubscription, protos.google.cloud.bigquery.analyticshub.v1.IGetSubscriptionRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetsubscriptionrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.igetsubscriptionrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### initialize()

    initialize(): Promise<{
            [name: string]: Function;
        }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<{ [name: string]: Function; }>` | {Promise} A promise that resolves to an authenticated service stub. |

### listDataExchanges(request, options)

    listDataExchanges(request?: protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IDataExchange[],
            protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest | null,
            protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesResponse
        ]>;

Lists all data exchanges in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange[], https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest | null, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesresponse ]>` | {Promise} - The promise which resolves to an array. The first element of the array is Array of [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange). The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using `listDataExchangesAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listDataExchanges(request, options, callback)

    listDataExchanges(request: protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IDataExchange>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest` |
| `options` | `CallOptions` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listDataExchanges(request, callback)

    listDataExchanges(request: protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IDataExchange>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listDataExchangesAsync(request, options)

    listDataExchangesAsync(request?: protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange>;

Equivalent to `listDataExchanges`, but returns an iterable object.

`for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncIterable<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange>` | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange). The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the data exchanges.
       *  e.g. `projects/myproject/locations/us`.
       */
      // const parent = 'abc123'
      /**
       *  The maximum number of results to return in a single response page. Leverage
       *  the page tokens to iterate through the entire collection.
       */
      // const pageSize = 1234
      /**
       *  Page token, returned by a previous call, to request the next page of
       *  results.
       */
      // const pageToken = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callListDataExchanges() {
        // Construct request
        const request = {
          parent,
        };

        // Run request
        const iterable = analyticshubClient.https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/v1.analyticshubserviceclient.html(request);
        for await (const response of iterable) {
            console.log(response);
        }
      }

      callListDataExchanges();

### listDataExchangesStream(request, options)

    listDataExchangesStream(request?: protos.google.cloud.bigquery.analyticshub.v1.IListDataExchangesRequest, options?: CallOptions): Transform;

Equivalent to `listDataExchanges`, but returns a NodeJS Stream object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistdataexchangesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Transform` | {Stream} An object stream which emits an object representing [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange) on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using `listDataExchangesAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listingPath(project, location, dataExchange, listing)

    listingPath(project: string, location: string, dataExchange: string, listing: string): string;

Return a fully-qualified listing resource name string.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `dataExchange` | `string` |
| `listing` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | {string} Resource name string. |

### listListings(request, options)

    listListings(request?: protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IListing[],
            protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest | null,
            protos.google.cloud.bigquery.analyticshub.v1.IListListingsResponse
        ]>;

Lists all listings in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting[], https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest | null, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsresponse ]>` | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using `listListingsAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listListings(request, options, callback)

    listListings(request: protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, protos.google.cloud.bigquery.analyticshub.v1.IListListingsResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IListing>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest` |
| `options` | `CallOptions` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listListings(request, callback)

    listListings(request: protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, protos.google.cloud.bigquery.analyticshub.v1.IListListingsResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IListing>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listListingsAsync(request, options)

    listListingsAsync(request?: protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.analyticshub.v1.IListing>;

Equivalent to `listListings`, but returns an iterable object.

`for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncIterable<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting>` | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the listing.
       *  e.g. `projects/myproject/locations/us/dataExchanges/123`.
       */
      // const parent = 'abc123'
      /**
       *  The maximum number of results to return in a single response page. Leverage
       *  the page tokens to iterate through the entire collection.
       */
      // const pageSize = 1234
      /**
       *  Page token, returned by a previous call, to request the next page of
       *  results.
       */
      // const pageToken = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callListListings() {
        // Construct request
        const request = {
          parent,
        };

        // Run request
        const iterable = analyticshubClient.https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/v1.analyticshubserviceclient.html(request);
        for await (const response of iterable) {
            console.log(response);
        }
      }

      callListListings();

### listListingsStream(request, options)

    listListingsStream(request?: protos.google.cloud.bigquery.analyticshub.v1.IListListingsRequest, options?: CallOptions): Transform;

Equivalent to `listListings`, but returns a NodeJS Stream object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistlistingsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Transform` | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using `listListingsAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listOperationsAsync(request, options)

    listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.listoperationsrequest` The request object that will be sent. |
| `options` | `CallOptions` Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See [gax.CallOptions](https://googleapis.github.io/gax-nodejs/global.html#CallOptions) for the details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncIterable<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation>` | {Object} An iterable Object that conforms to [iteration protocols](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). |

**Example**


    const client = longrunning.operationsClient();
    for await (const response of client.listOperationsAsync(request));
    // doThingsWith(response)

### listOrgDataExchanges(request, options)

    listOrgDataExchanges(request?: protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IDataExchange[],
            protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest | null,
            protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesResponse
        ]>;

Lists all data exchanges from projects in a given organization and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange[], https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest | null, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesresponse ]>` | {Promise} - The promise which resolves to an array. The first element of the array is Array of [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange). The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using `listOrgDataExchangesAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listOrgDataExchanges(request, options, callback)

    listOrgDataExchanges(request: protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IDataExchange>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest` |
| `options` | `CallOptions` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listOrgDataExchanges(request, callback)

    listOrgDataExchanges(request: protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IDataExchange>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listOrgDataExchangesAsync(request, options)

    listOrgDataExchangesAsync(request?: protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange>;

Equivalent to `listOrgDataExchanges`, but returns an iterable object.

`for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncIterable<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange>` | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange). The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The organization resource path of the projects containing
       *  DataExchanges. e.g. `organizations/myorg/locations/us`.
       */
      // const organization = 'abc123'
      /**
       *  The maximum number of results to return in a single response page. Leverage
       *  the page tokens to iterate through the entire collection.
       */
      // const pageSize = 1234
      /**
       *  Page token, returned by a previous call, to request the next page of
       *  results.
       */
      // const pageToken = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callListOrgDataExchanges() {
        // Construct request
        const request = {
          organization,
        };

        // Run request
        const iterable = analyticshubClient.https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/v1.analyticshubserviceclient.html(request);
        for await (const response of iterable) {
            console.log(response);
        }
      }

      callListOrgDataExchanges();

### listOrgDataExchangesStream(request, options)

    listOrgDataExchangesStream(request?: protos.google.cloud.bigquery.analyticshub.v1.IListOrgDataExchangesRequest, options?: CallOptions): Transform;

Equivalent to `listOrgDataExchanges`, but returns a NodeJS Stream object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistorgdataexchangesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Transform` | {Stream} An object stream which emits an object representing [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange) on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using `listOrgDataExchangesAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listQueryTemplates(request, options)

    listQueryTemplates(request?: protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate[],
            protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest | null,
            protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesResponse
        ]>;

Lists all QueryTemplates in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate[], https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest | null, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesresponse ]>` | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using `listQueryTemplatesAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listQueryTemplates(request, options, callback)

    listQueryTemplates(request: protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest, protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest` |
| `options` | `CallOptions` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listQueryTemplates(request, callback)

    listQueryTemplates(request: protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest, protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listQueryTemplatesAsync(request, options)

    listQueryTemplatesAsync(request?: protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate>;

Equivalent to `listQueryTemplates`, but returns an iterable object.

`for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncIterable<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate>` | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the QueryTemplates.
       *  e.g. `projects/myproject/locations/us/dataExchanges/123`.
       */
      // const parent = 'abc123'
      /**
       *  Optional. The maximum number of results to return in a single response
       *  page. Leverage the page tokens to iterate through the entire collection.
       */
      // const pageSize = 1234
      /**
       *  Optional. Page token, returned by a previous call, to request the next page
       *  of results.
       */
      // const pageToken = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callListQueryTemplates() {
        // Construct request
        const request = {
          parent,
        };

        // Run request
        const iterable = analyticshubClient.https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/v1.analyticshubserviceclient.html(request);
        for await (const response of iterable) {
            console.log(response);
        }
      }

      callListQueryTemplates();

### listQueryTemplatesStream(request, options)

    listQueryTemplatesStream(request?: protos.google.cloud.bigquery.analyticshub.v1.IListQueryTemplatesRequest, options?: CallOptions): Transform;

Equivalent to `listQueryTemplates`, but returns a NodeJS Stream object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistquerytemplatesrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Transform` | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using `listQueryTemplatesAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listSharedResourceSubscriptions(request, options)

    listSharedResourceSubscriptions(request?: protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.ISubscription[],
            protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest | null,
            protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsResponse
        ]>;

Lists all subscriptions on a given Data Exchange or Listing.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription[], https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest | null, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsresponse ]>` | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using `listSharedResourceSubscriptionsAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listSharedResourceSubscriptions(request, options, callback)

    listSharedResourceSubscriptions(request: protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.ISubscription>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest` |
| `options` | `CallOptions` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listSharedResourceSubscriptions(request, callback)

    listSharedResourceSubscriptions(request: protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.ISubscription>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listSharedResourceSubscriptionsAsync(request, options)

    listSharedResourceSubscriptionsAsync(request?: protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.analyticshub.v1.ISubscription>;

Equivalent to `listSharedResourceSubscriptions`, but returns an iterable object.

`for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncIterable<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription>` | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the requested target. This resource may be
       *  either a Listing or a DataExchange. e.g.
       *  projects/123/locations/us/dataExchanges/456 OR e.g.
       *  projects/123/locations/us/dataExchanges/456/listings/789
       */
      // const resource = 'abc123'
      /**
       *  If selected, includes deleted subscriptions in the response
       *  (up to 63 days after deletion).
       */
      // const includeDeletedSubscriptions = true
      /**
       *  The maximum number of results to return in a single response page.
       */
      // const pageSize = 1234
      /**
       *  Page token, returned by a previous call.
       */
      // const pageToken = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callListSharedResourceSubscriptions() {
        // Construct request
        const request = {
          resource,
        };

        // Run request
        const iterable = analyticshubClient.https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/v1.analyticshubserviceclient.html(request);
        for await (const response of iterable) {
            console.log(response);
        }
      }

      callListSharedResourceSubscriptions();

### listSharedResourceSubscriptionsStream(request, options)

    listSharedResourceSubscriptionsStream(request?: protos.google.cloud.bigquery.analyticshub.v1.IListSharedResourceSubscriptionsRequest, options?: CallOptions): Transform;

Equivalent to `listSharedResourceSubscriptions`, but returns a NodeJS Stream object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsharedresourcesubscriptionsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Transform` | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using `listSharedResourceSubscriptionsAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listSubscriptions(request, options)

    listSubscriptions(request?: protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.ISubscription[],
            protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest | null,
            protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsResponse
        ]>;

Lists all subscriptions in a given project and location.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription[], https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest | null, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsresponse ]>` | {Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using `listSubscriptionsAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### listSubscriptions(request, options, callback)

    listSubscriptions(request: protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.ISubscription>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest` |
| `options` | `CallOptions` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listSubscriptions(request, callback)

    listSubscriptions(request: protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, callback: PaginationCallback<protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsResponse | null | undefined, protos.google.cloud.bigquery.analyticshub.v1.ISubscription>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest` |
| `callback` | `PaginationCallback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsresponse | null | undefined, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### listSubscriptionsAsync(request, options)

    listSubscriptionsAsync(request?: protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.bigquery.analyticshub.v1.ISubscription>;

Equivalent to `listSubscriptions`, but returns an iterable object.

`for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `AsyncIterable<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscription>` | {Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The parent resource path of the subscription.
       *  e.g. projects/myproject/locations/us
       */
      // const parent = 'abc123'
      /**
       *  An expression for filtering the results of the request. Eligible
       *  fields for filtering are:
       *   + `listing`
       *   + `data_exchange`
       *  Alternatively, a literal wrapped in double quotes may be provided.
       *  This will be checked for an exact match against both fields above.
       *  In all cases, the full Data Exchange or Listing resource name must
       *  be provided. Some example of using filters:
       *   + data_exchange="projects/myproject/locations/us/dataExchanges/123"
       *   + listing="projects/123/locations/us/dataExchanges/456/listings/789"
       *   + "projects/myproject/locations/us/dataExchanges/123"
       */
      // const filter = 'abc123'
      /**
       *  The maximum number of results to return in a single response page.
       */
      // const pageSize = 1234
      /**
       *  Page token, returned by a previous call.
       */
      // const pageToken = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callListSubscriptions() {
        // Construct request
        const request = {
          parent,
        };

        // Run request
        const iterable = analyticshubClient.https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/v1.analyticshubserviceclient.html(request);
        for await (const response of iterable) {
            console.log(response);
        }
      }

      callListSubscriptions();

### listSubscriptionsStream(request, options)

    listSubscriptionsStream(request?: protos.google.cloud.bigquery.analyticshub.v1.IListSubscriptionsRequest, options?: CallOptions): Transform;

Equivalent to `listSubscriptions`, but returns a NodeJS Stream object.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilistsubscriptionsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Transform` | {Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using `listSubscriptionsAsync()` method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples. |

### locationPath(project, location)

    locationPath(project: string, location: string): string;

Return a fully-qualified location resource name string.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | {string} Resource name string. |

### matchDataExchangeFromDataExchangeName(dataExchangeName)

    matchDataExchangeFromDataExchangeName(dataExchangeName: string): string | number;

Parse the data_exchange from DataExchange resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `dataExchangeName` | `string` A fully-qualified path representing DataExchange resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the data_exchange. |

### matchDataExchangeFromListingName(listingName)

    matchDataExchangeFromListingName(listingName: string): string | number;

Parse the data_exchange from Listing resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `listingName` | `string` A fully-qualified path representing Listing resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the data_exchange. |

### matchDataExchangeFromQueryTemplateName(queryTemplateName)

    matchDataExchangeFromQueryTemplateName(queryTemplateName: string): string | number;

Parse the data_exchange from QueryTemplate resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `queryTemplateName` | `string` A fully-qualified path representing QueryTemplate resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the data_exchange. |

### matchListingFromListingName(listingName)

    matchListingFromListingName(listingName: string): string | number;

Parse the listing from Listing resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `listingName` | `string` A fully-qualified path representing Listing resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the listing. |

### matchLocationFromDataExchangeName(dataExchangeName)

    matchLocationFromDataExchangeName(dataExchangeName: string): string | number;

Parse the location from DataExchange resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `dataExchangeName` | `string` A fully-qualified path representing DataExchange resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the location. |

### matchLocationFromListingName(listingName)

    matchLocationFromListingName(listingName: string): string | number;

Parse the location from Listing resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `listingName` | `string` A fully-qualified path representing Listing resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the location. |

### matchLocationFromLocationName(locationName)

    matchLocationFromLocationName(locationName: string): string | number;

Parse the location from Location resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `locationName` | `string` A fully-qualified path representing Location resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the location. |

### matchLocationFromQueryTemplateName(queryTemplateName)

    matchLocationFromQueryTemplateName(queryTemplateName: string): string | number;

Parse the location from QueryTemplate resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `queryTemplateName` | `string` A fully-qualified path representing QueryTemplate resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the location. |

### matchLocationFromSubscriptionName(subscriptionName)

    matchLocationFromSubscriptionName(subscriptionName: string): string | number;

Parse the location from Subscription resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `subscriptionName` | `string` A fully-qualified path representing Subscription resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the location. |

### matchProjectFromDataExchangeName(dataExchangeName)

    matchProjectFromDataExchangeName(dataExchangeName: string): string | number;

Parse the project from DataExchange resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `dataExchangeName` | `string` A fully-qualified path representing DataExchange resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the project. |

### matchProjectFromListingName(listingName)

    matchProjectFromListingName(listingName: string): string | number;

Parse the project from Listing resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `listingName` | `string` A fully-qualified path representing Listing resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the project. |

### matchProjectFromLocationName(locationName)

    matchProjectFromLocationName(locationName: string): string | number;

Parse the project from Location resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `locationName` | `string` A fully-qualified path representing Location resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the project. |

### matchProjectFromProjectName(projectName)

    matchProjectFromProjectName(projectName: string): string | number;

Parse the project from Project resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `projectName` | `string` A fully-qualified path representing Project resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the project. |

### matchProjectFromQueryTemplateName(queryTemplateName)

    matchProjectFromQueryTemplateName(queryTemplateName: string): string | number;

Parse the project from QueryTemplate resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `queryTemplateName` | `string` A fully-qualified path representing QueryTemplate resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the project. |

### matchProjectFromSubscriptionName(subscriptionName)

    matchProjectFromSubscriptionName(subscriptionName: string): string | number;

Parse the project from Subscription resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `subscriptionName` | `string` A fully-qualified path representing Subscription resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the project. |

### matchQueryTemplateFromQueryTemplateName(queryTemplateName)

    matchQueryTemplateFromQueryTemplateName(queryTemplateName: string): string | number;

Parse the query_template from QueryTemplate resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `queryTemplateName` | `string` A fully-qualified path representing QueryTemplate resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the query_template. |

### matchSubscriptionFromSubscriptionName(subscriptionName)

    matchSubscriptionFromSubscriptionName(subscriptionName: string): string | number;

Parse the subscription from Subscription resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `subscriptionName` | `string` A fully-qualified path representing Subscription resource. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string | number` | {string} A string representing the subscription. |

### projectPath(project)

    projectPath(project: string): string;

Return a fully-qualified project resource name string.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | {string} Resource name string. |

### queryTemplatePath(project, location, dataExchange, queryTemplate)

    queryTemplatePath(project: string, location: string, dataExchange: string, queryTemplate: string): string;

Return a fully-qualified queryTemplate resource name string.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `dataExchange` | `string` |
| `queryTemplate` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | {string} Resource name string. |

### refreshSubscription(request, options)

    refreshSubscription(request?: protos.google.cloud.bigquery.analyticshub.v1.IRefreshSubscriptionRequest, options?: CallOptions): Promise<[
            LROperation<protos.google.cloud.bigquery.analyticshub.v1.IRefreshSubscriptionResponse, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>,
            protos.google.longrunning.IOperation | undefined,
            {} | undefined
        ]>;

Refreshes a Subscription to a Data Exchange. A Data Exchange can become stale when a publisher adds or removes data. This is a long-running operation as it may create many linked datasets.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irefreshsubscriptionrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irefreshsubscriptionresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its `promise()` method returns a promise you can `await` for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the Subscription to refresh.
       *  e.g. `projects/subscriberproject/locations/us/subscriptions/123`
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callRefreshSubscription() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const [operation] = await analyticshubClient.refreshSubscription(request);
        const [response] = await operation.promise();
        console.log(response);
      }

      callRefreshSubscription();

### refreshSubscription(request, options, callback)

    refreshSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IRefreshSubscriptionRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.bigquery.analyticshub.v1.IRefreshSubscriptionResponse, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irefreshsubscriptionrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irefreshsubscriptionresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### refreshSubscription(request, callback)

    refreshSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IRefreshSubscriptionRequest, callback: Callback<LROperation<protos.google.cloud.bigquery.analyticshub.v1.IRefreshSubscriptionResponse, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irefreshsubscriptionrequest` |
| `callback` | `Callback<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irefreshsubscriptionresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### revokeSubscription(request, options)

    revokeSubscription(request?: protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionResponse,
            protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionRequest | undefined,
            {} | undefined
        ]>;

Revokes a given subscription.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [RevokeSubscriptionResponse](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.revokesubscriptionresponse). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the subscription to revoke.
       *  e.g. projects/123/locations/us/subscriptions/456
       */
      // const name = 'abc123'
      /**
       *  Optional. If the subscription is commercial then this field must be set to
       *  true, otherwise a failure is thrown. This acts as a safety guard to avoid
       *  revoking commercial subscriptions accidentally.
       */
      // const revokeCommercial = true

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callRevokeSubscription() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.revokeSubscription(request);
        console.log(response);
      }

      callRevokeSubscription();

### revokeSubscription(request, options, callback)

    revokeSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionResponse, protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### revokeSubscription(request, callback)

    revokeSubscription(request: protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionResponse, protos.google.cloud.bigquery.analyticshub.v1.IRevokeSubscriptionRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.irevokesubscriptionrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### setIamPolicy(request, options)

    setIamPolicy(request?: protos.google.iam.v1.ISetIamPolicyRequest, options?: CallOptions): Promise<[
            protos.google.iam.v1.IPolicy,
            protos.google.iam.v1.ISetIamPolicyRequest | undefined,
            {} | undefined
        ]>;

Sets the IAM policy.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.isetiampolicyrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.ipolicy, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.isetiampolicyrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [Policy](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.policy). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  REQUIRED: The resource for which the policy is being specified.
       *  See the operation documentation for the appropriate value for this field.
       */
      // const resource = 'abc123'
      /**
       *  REQUIRED: The complete policy to be applied to the `resource`. The size of
       *  the policy is limited to a few 10s of KB. An empty policy is a
       *  valid policy but certain Cloud Platform services (such as Projects)
       *  might reject them.
       */
      // const policy = {}
      /**
       *  OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
       *  the fields in the mask will be modified. If no mask is provided, the
       *  following default mask is used:
       *  `paths: "bindings, etag"`
       */
      // const updateMask = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callSetIamPolicy() {
        // Construct request
        const request = {
          resource,
          policy,
        };

        // Run request
        const response = await analyticshubClient.setIamPolicy(request);
        console.log(response);
      }

      callSetIamPolicy();

### setIamPolicy(request, options, callback)

    setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.isetiampolicyrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.ipolicy, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.isetiampolicyrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### setIamPolicy(request, callback)

    setIamPolicy(request: protos.google.iam.v1.ISetIamPolicyRequest, callback: Callback<protos.google.iam.v1.IPolicy, protos.google.iam.v1.ISetIamPolicyRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.isetiampolicyrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.ipolicy, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.isetiampolicyrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### submitQueryTemplate(request, options)

    submitQueryTemplate(request?: protos.google.cloud.bigquery.analyticshub.v1.ISubmitQueryTemplateRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate,
            protos.google.cloud.bigquery.analyticshub.v1.ISubmitQueryTemplateRequest | undefined,
            {} | undefined
        ]>;

Submits a query template for approval.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubmitquerytemplaterequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubmitquerytemplaterequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. The resource path of the QueryTemplate.
       *  e.g.
       *  `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callSubmitQueryTemplate() {
        // Construct request
        const request = {
          name,
        };

        // Run request
        const response = await analyticshubClient.submitQueryTemplate(request);
        console.log(response);
      }

      callSubmitQueryTemplate();

### submitQueryTemplate(request, options, callback)

    submitQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.ISubmitQueryTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.ISubmitQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubmitquerytemplaterequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubmitquerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### submitQueryTemplate(request, callback)

    submitQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.ISubmitQueryTemplateRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.ISubmitQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubmitquerytemplaterequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubmitquerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### subscribeDataExchange(request, options)

    subscribeDataExchange(request?: protos.google.cloud.bigquery.analyticshub.v1.ISubscribeDataExchangeRequest, options?: CallOptions): Promise<[
            LROperation<protos.google.cloud.bigquery.analyticshub.v1.ISubscribeDataExchangeResponse, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>,
            protos.google.longrunning.IOperation | undefined,
            {} | undefined
        ]>;

Creates a Subscription to a Data Clean Room. This is a long-running operation as it will create one or more linked datasets. Throws a Bad Request error if the Data Exchange does not contain any listings.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribedataexchangerequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribedataexchangeresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its `promise()` method returns a promise you can `await` for. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Resource name of the Data Exchange.
       *  e.g. `projects/publisherproject/locations/us/dataExchanges/123`
       */
      // const name = 'abc123'
      /**
       *  Required. The parent resource path of the Subscription.
       *  e.g. `projects/subscriberproject/locations/us`
       */
      // const destination = 'abc123'
      /**
       *  Optional. BigQuery destination dataset to create for the subscriber.
       */
      // const destinationDataset = {}
      /**
       *  Required. Name of the subscription to create.
       *  e.g. `subscription1`
       */
      // const subscription = 'abc123'
      /**
       *  Email of the subscriber.
       */
      // const subscriberContact = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callSubscribeDataExchange() {
        // Construct request
        const request = {
          name,
          destination,
          subscription,
        };

        // Run request
        const [operation] = await analyticshubClient.subscribeDataExchange(request);
        const [response] = await operation.promise();
        console.log(response);
      }

      callSubscribeDataExchange();

### subscribeDataExchange(request, options, callback)

    subscribeDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.ISubscribeDataExchangeRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.bigquery.analyticshub.v1.ISubscribeDataExchangeResponse, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribedataexchangerequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribedataexchangeresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### subscribeDataExchange(request, callback)

    subscribeDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.ISubscribeDataExchangeRequest, callback: Callback<LROperation<protos.google.cloud.bigquery.analyticshub.v1.ISubscribeDataExchangeResponse, protos.google.cloud.bigquery.analyticshub.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribedataexchangerequest` |
| `callback` | `Callback<LROperation<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribedataexchangeresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ioperationmetadata>, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.longrunning.ioperation | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### subscribeListing(request, options)

    subscribeListing(request?: protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingResponse,
            protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingRequest | undefined,
            {} | undefined
        ]>;

Subscribes to a listing.

Currently, with Analytics Hub, you can create listings that reference only BigQuery datasets. Upon subscription to a listing for a BigQuery dataset, Analytics Hub creates a linked dataset in the subscriber's project.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [SubscribeListingResponse](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.subscribelistingresponse). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Input only. BigQuery destination dataset to create for the subscriber.
       */
      // const destinationDataset = {}
      /**
       *  Input only. Destination Pub/Sub subscription to create for the
       *  subscriber.
       */
      // const destinationPubsubSubscription = {}
      /**
       *  Required. Resource name of the listing that you want to subscribe to.
       *  e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.
       */
      // const name = 'abc123'

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callSubscribeListing() {
        // Construct request
        const request = {
          destinationDataset,
          destinationPubsubSubscription,
          name,
        };

        // Run request
        const response = await analyticshubClient.subscribeListing(request);
        console.log(response);
      }

      callSubscribeListing();

### subscribeListing(request, options, callback)

    subscribeListing(request: protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingResponse, protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### subscribeListing(request, callback)

    subscribeListing(request: protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingResponse, protos.google.cloud.bigquery.analyticshub.v1.ISubscribeListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.isubscribelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### subscriptionPath(project, location, subscription)

    subscriptionPath(project: string, location: string, subscription: string): string;

Return a fully-qualified subscription resource name string.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `project` | `string` |
| `location` | `string` |
| `subscription` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` | {string} Resource name string. |

### testIamPermissions(request, options)

    testIamPermissions(request?: protos.google.iam.v1.ITestIamPermissionsRequest, options?: CallOptions): Promise<[
            protos.google.iam.v1.ITestIamPermissionsResponse,
            protos.google.iam.v1.ITestIamPermissionsRequest | undefined,
            {} | undefined
        ]>;

Returns the permissions that a caller has.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [TestIamPermissionsResponse](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.testiampermissionsresponse). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  REQUIRED: The resource for which the policy detail is being requested.
       *  See the operation documentation for the appropriate value for this field.
       */
      // const resource = 'abc123'
      /**
       *  The set of permissions to check for the `resource`. Permissions with
       *  wildcards (such as '*' or 'storage.*') are not allowed. For more
       *  information see
       *  IAM Overview (https://cloud.google.com/iam/docs/overview#permissions).
       */
      // const permissions = ['abc','def']

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callTestIamPermissions() {
        // Construct request
        const request = {
          resource,
          permissions,
        };

        // Run request
        const response = await analyticshubClient.testIamPermissions(request);
        console.log(response);
      }

      callTestIamPermissions();

### testIamPermissions(request, options, callback)

    testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, options: CallOptions, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### testIamPermissions(request, callback)

    testIamPermissions(request: protos.google.iam.v1.ITestIamPermissionsRequest, callback: Callback<protos.google.iam.v1.ITestIamPermissionsResponse, protos.google.iam.v1.ITestIamPermissionsRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsresponse, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.iam.v1.itestiampermissionsrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### updateDataExchange(request, options)

    updateDataExchange(request?: protos.google.cloud.bigquery.analyticshub.v1.IUpdateDataExchangeRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IDataExchange,
            protos.google.cloud.bigquery.analyticshub.v1.IUpdateDataExchangeRequest | undefined,
            {} | undefined
        ]>;

Updates an existing data exchange.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatedataexchangerequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatedataexchangerequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing [DataExchange](https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.dataexchange). Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Field mask specifies the fields to update in the data exchange
       *  resource. The fields specified in the
       *  `updateMask` are relative to the resource and are not a full request.
       */
      // const updateMask = {}
      /**
       *  Required. The data exchange to update.
       */
      // const dataExchange = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callUpdateDataExchange() {
        // Construct request
        const request = {
          updateMask,
          dataExchange,
        };

        // Run request
        const response = await analyticshubClient.updateDataExchange(request);
        console.log(response);
      }

      callUpdateDataExchange();

### updateDataExchange(request, options, callback)

    updateDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.IUpdateDataExchangeRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange, protos.google.cloud.bigquery.analyticshub.v1.IUpdateDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatedataexchangerequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatedataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### updateDataExchange(request, callback)

    updateDataExchange(request: protos.google.cloud.bigquery.analyticshub.v1.IUpdateDataExchangeRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IDataExchange, protos.google.cloud.bigquery.analyticshub.v1.IUpdateDataExchangeRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatedataexchangerequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.idataexchange, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatedataexchangerequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### updateListing(request, options)

    updateListing(request?: protos.google.cloud.bigquery.analyticshub.v1.IUpdateListingRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IListing,
            protos.google.cloud.bigquery.analyticshub.v1.IUpdateListingRequest | undefined,
            {} | undefined
        ]>;

Updates an existing listing.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatelistingrequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatelistingrequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Required. Field mask specifies the fields to update in the listing
       *  resource. The fields specified in the `updateMask` are relative to the
       *  resource and are not a full request.
       */
      // const updateMask = {}
      /**
       *  Required. The listing to update.
       */
      // const listing = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callUpdateListing() {
        // Construct request
        const request = {
          updateMask,
          listing,
        };

        // Run request
        const response = await analyticshubClient.updateListing(request);
        console.log(response);
      }

      callUpdateListing();

### updateListing(request, options, callback)

    updateListing(request: protos.google.cloud.bigquery.analyticshub.v1.IUpdateListingRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IListing, protos.google.cloud.bigquery.analyticshub.v1.IUpdateListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatelistingrequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### updateListing(request, callback)

    updateListing(request: protos.google.cloud.bigquery.analyticshub.v1.IUpdateListingRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IListing, protos.google.cloud.bigquery.analyticshub.v1.IUpdateListingRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatelistingrequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.ilisting, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatelistingrequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### updateQueryTemplate(request, options)

    updateQueryTemplate(request?: protos.google.cloud.bigquery.analyticshub.v1.IUpdateQueryTemplateRequest, options?: CallOptions): Promise<[
            protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate,
            protos.google.cloud.bigquery.analyticshub.v1.IUpdateQueryTemplateRequest | undefined,
            {} | undefined
        ]>;

Updates an existing QueryTemplate

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatequerytemplaterequest` The request object that will be sent. |
| `options` | `CallOptions` Call options. See [CallOptions](https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html) for more details. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Promise<[ https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatequerytemplaterequest | undefined, {} | undefined ]>` | {Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples. |

**Example**


      /**
       * This snippet has been automatically generated and should be regarded as a code template only.
       * It will require modifications to work.
       * It may require correct/in-range values for request initialization.
       * TODO(developer): Uncomment these variables before running the sample.
       */
      /**
       *  Optional. Field mask specifies the fields to update in the query template
       *  resource. The fields specified in the `updateMask` are relative to the
       *  resource and are not a full request.
       */
      // const updateMask = {}
      /**
       *  Required. The QueryTemplate to update.
       */
      // const queryTemplate = {}

      // Imports the Analyticshub library
      const {AnalyticsHubServiceClient} = require('https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html').v1;

      // Instantiates a client
      const analyticshubClient = new https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/overview.html();

      async function callUpdateQueryTemplate() {
        // Construct request
        const request = {
          queryTemplate,
        };

        // Run request
        const response = await analyticshubClient.updateQueryTemplate(request);
        console.log(response);
      }

      callUpdateQueryTemplate();

### updateQueryTemplate(request, options, callback)

    updateQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IUpdateQueryTemplateRequest, options: CallOptions, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.IUpdateQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatequerytemplaterequest` |
| `options` | `CallOptions` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |

### updateQueryTemplate(request, callback)

    updateQueryTemplate(request: protos.google.cloud.bigquery.analyticshub.v1.IUpdateQueryTemplateRequest, callback: Callback<protos.google.cloud.bigquery.analyticshub.v1.IQueryTemplate, protos.google.cloud.bigquery.analyticshub.v1.IUpdateQueryTemplateRequest | null | undefined, {} | null | undefined>): void;

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatequerytemplaterequest` |
| `callback` | `Callback<https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iquerytemplate, https://docs.cloud.google.com/nodejs/docs/reference/bigquery-analyticshub/latest/bigquery-analyticshub/protos.google.cloud.bigquery.analyticshub.v1.iupdatequerytemplaterequest | null | undefined, {} | null | undefined>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `void` |   |