diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 14a85c7bf028..0860f0c1877e 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -6,6 +6,7 @@
"java-aiplatform": "3.4.0",
"java-analytics-admin": "0.13.4",
"java-analytics-data": "0.14.7",
+ "java-analyticshub": "0.0.0",
"java-api-gateway": "2.3.6",
"java-apigee-connect": "2.3.7",
"java-apigee-registry": "0.3.1",
diff --git a/java-analyticshub/.OwlBot.yaml b/java-analyticshub/.OwlBot.yaml
new file mode 100644
index 000000000000..caae4e406a8d
--- /dev/null
+++ b/java-analyticshub/.OwlBot.yaml
@@ -0,0 +1,30 @@
+# Copyright 2022 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+deep-remove-regex:
+- "/java-analyticshub/grpc-google-.*/src"
+- "/java-analyticshub/proto-google-.*/src"
+- "/java-analyticshub/google-.*/src"
+
+deep-preserve-regex:
+- "/java-analyticshub/google-.*/src/test/java/com/google/cloud/.*/v.*/it/IT.*Test.java"
+
+deep-copy-regex:
+- source: "/google/cloud/bigquery/analyticshub/(v.*)/.*-java/proto-google-.*/src"
+ dest: "/owl-bot-staging/java-analyticshub/$1/proto-google-cloud-analyticshub-$1/src"
+- source: "/google/cloud/bigquery/analyticshub/(v.*)/.*-java/grpc-google-.*/src"
+ dest: "/owl-bot-staging/java-analyticshub/$1/grpc-google-cloud-analyticshub-$1/src"
+- source: "/google/cloud/bigquery/analyticshub/(v.*)/.*-java/gapic-google-.*/src"
+ dest: "/owl-bot-staging/java-analyticshub/$1/google-cloud-analyticshub/src"
diff --git a/java-analyticshub/.repo-metadata.json b/java-analyticshub/.repo-metadata.json
new file mode 100644
index 000000000000..ac00fde0a916
--- /dev/null
+++ b/java-analyticshub/.repo-metadata.json
@@ -0,0 +1,16 @@
+{
+ "api_shortname": "analyticshub",
+ "name_pretty": "Analytics Hub API",
+ "product_documentation": "https://cloud.google.com/bigquery/TBD",
+ "api_description": "TBD",
+ "client_documentation": "https://cloud.google.com/java/docs/reference/google-cloud-analyticshub/latest/overview",
+ "release_level": "preview",
+ "transport": "grpc",
+ "language": "java",
+ "repo": "googleapis/java-analyticshub",
+ "repo_short": "java-analyticshub",
+ "distribution_name": "com.google.cloud:google-cloud-analyticshub",
+ "api_id": "analyticshub.googleapis.com",
+ "library_type": "GAPIC_AUTO",
+ "requires_billing": true
+}
\ No newline at end of file
diff --git a/java-analyticshub/README.md b/java-analyticshub/README.md
new file mode 100644
index 000000000000..8e947bb8cf61
--- /dev/null
+++ b/java-analyticshub/README.md
@@ -0,0 +1,201 @@
+# Google Analytics Hub API Client for Java
+
+Java idiomatic client for [Analytics Hub API][product-docs].
+
+[![Maven][maven-version-image]][maven-version-link]
+![Stability][stability-image]
+
+- [Product Documentation][product-docs]
+- [Client Library Documentation][javadocs]
+
+> Note: This client is a work-in-progress, and may occasionally
+> make backwards-incompatible changes.
+
+
+## Quickstart
+
+
+If you are using Maven, add this to your pom.xml file:
+
+
+```xml
+
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); + * DataExchange response = analyticsHubServiceClient.getDataExchange(name); + * } + * }+ * + *
Note: close() needs to be called on the AnalyticsHubServiceClient object to clean up resources + * such as threads. In the example above, try-with-resources is used, which automatically calls + * close(). + * + *
The surface of this class includes several types of Java methods for each of the API's + * methods: + * + *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of AnalyticsHubServiceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AnalyticsHubServiceSettings analyticsHubServiceSettings = + * AnalyticsHubServiceSettings.newBuilder() + * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials)) + * .build(); + * AnalyticsHubServiceClient analyticsHubServiceClient = + * AnalyticsHubServiceClient.create(analyticsHubServiceSettings); + * }+ * + *
To customize the endpoint: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AnalyticsHubServiceSettings analyticsHubServiceSettings = + * AnalyticsHubServiceSettings.newBuilder().setEndpoint(myEndpoint).build(); + * AnalyticsHubServiceClient analyticsHubServiceClient = + * AnalyticsHubServiceClient.create(analyticsHubServiceSettings); + * }+ * + *
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AnalyticsHubServiceSettings analyticsHubServiceSettings = + * AnalyticsHubServiceSettings.newBuilder() + * .setTransportChannelProvider( + * AnalyticsHubServiceSettings.defaultHttpJsonTransportProviderBuilder().build()) + * .build(); + * AnalyticsHubServiceClient analyticsHubServiceClient = + * AnalyticsHubServiceClient.create(analyticsHubServiceSettings); + * }+ * + *
Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class AnalyticsHubServiceClient implements BackgroundResource { + private final AnalyticsHubServiceSettings settings; + private final AnalyticsHubServiceStub stub; + + /** Constructs an instance of AnalyticsHubServiceClient with default settings. */ + public static final AnalyticsHubServiceClient create() throws IOException { + return create(AnalyticsHubServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of AnalyticsHubServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final AnalyticsHubServiceClient create(AnalyticsHubServiceSettings settings) + throws IOException { + return new AnalyticsHubServiceClient(settings); + } + + /** + * Constructs an instance of AnalyticsHubServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(AnalyticsHubServiceSettings). + */ + public static final AnalyticsHubServiceClient create(AnalyticsHubServiceStub stub) { + return new AnalyticsHubServiceClient(stub); + } + + /** + * Constructs an instance of AnalyticsHubServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected AnalyticsHubServiceClient(AnalyticsHubServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((AnalyticsHubServiceStubSettings) settings.getStubSettings()).createStub(); + } + + protected AnalyticsHubServiceClient(AnalyticsHubServiceStub stub) { + this.settings = null; + this.stub = stub; + } + + public final AnalyticsHubServiceSettings getSettings() { + return settings; + } + + public AnalyticsHubServiceStub getStub() { + return stub; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all data exchanges in a given project and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * for (DataExchange element : + * analyticsHubServiceClient.listDataExchanges(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent resource path of the data exchanges. e.g. + * `projects/myproject/locations/US`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataExchangesPagedResponse listDataExchanges(LocationName parent) { + ListDataExchangesRequest request = + ListDataExchangesRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDataExchanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all data exchanges in a given project and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * for (DataExchange element : + * analyticsHubServiceClient.listDataExchanges(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent resource path of the data exchanges. e.g. + * `projects/myproject/locations/US`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataExchangesPagedResponse listDataExchanges(String parent) { + ListDataExchangesRequest request = + ListDataExchangesRequest.newBuilder().setParent(parent).build(); + return listDataExchanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all data exchanges in a given project and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListDataExchangesRequest request = + * ListDataExchangesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (DataExchange element : + * analyticsHubServiceClient.listDataExchanges(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDataExchangesPagedResponse listDataExchanges(ListDataExchangesRequest request) { + return listDataExchangesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all data exchanges in a given project and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListDataExchangesRequest request = + * ListDataExchangesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.listDataExchangesPagedCallable().futureCall(request); + * // Do something. + * for (DataExchange element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListDataExchangesRequest request = + * ListDataExchangesRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListDataExchangesResponse response = + * analyticsHubServiceClient.listDataExchangesCallable().call(request); + * for (DataExchange element : response.getDataExchangesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String organization = "organization1178922291"; + * for (DataExchange element : + * analyticsHubServiceClient.listOrgDataExchanges(organization).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param organization Required. The organization resource path of the projects containing + * DataExchanges. e.g. `organizations/myorg/locations/US`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrgDataExchangesPagedResponse listOrgDataExchanges(String organization) { + ListOrgDataExchangesRequest request = + ListOrgDataExchangesRequest.newBuilder().setOrganization(organization).build(); + return listOrgDataExchanges(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all data exchanges from projects in a given organization and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListOrgDataExchangesRequest request = + * ListOrgDataExchangesRequest.newBuilder() + * .setOrganization("organization1178922291") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (DataExchange element : + * analyticsHubServiceClient.listOrgDataExchanges(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListOrgDataExchangesPagedResponse listOrgDataExchanges( + ListOrgDataExchangesRequest request) { + return listOrgDataExchangesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all data exchanges from projects in a given organization and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListOrgDataExchangesRequest request = + * ListOrgDataExchangesRequest.newBuilder() + * .setOrganization("organization1178922291") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.listOrgDataExchangesPagedCallable().futureCall(request); + * // Do something. + * for (DataExchange element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListOrgDataExchangesRequest request = + * ListOrgDataExchangesRequest.newBuilder() + * .setOrganization("organization1178922291") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListOrgDataExchangesResponse response = + * analyticsHubServiceClient.listOrgDataExchangesCallable().call(request); + * for (DataExchange element : response.getDataExchangesList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); + * DataExchange response = analyticsHubServiceClient.getDataExchange(name); + * } + * }+ * + * @param name Required. The resource name of the data exchange. e.g. + * `projects/myproject/locations/US/dataExchanges/123`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange getDataExchange(DataExchangeName name) { + GetDataExchangeRequest request = + GetDataExchangeRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getDataExchange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString(); + * DataExchange response = analyticsHubServiceClient.getDataExchange(name); + * } + * }+ * + * @param name Required. The resource name of the data exchange. e.g. + * `projects/myproject/locations/US/dataExchanges/123`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange getDataExchange(String name) { + GetDataExchangeRequest request = GetDataExchangeRequest.newBuilder().setName(name).build(); + return getDataExchange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * GetDataExchangeRequest request = + * GetDataExchangeRequest.newBuilder() + * .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .build(); + * DataExchange response = analyticsHubServiceClient.getDataExchange(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange getDataExchange(GetDataExchangeRequest request) { + return getDataExchangeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * GetDataExchangeRequest request = + * GetDataExchangeRequest.newBuilder() + * .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.getDataExchangeCallable().futureCall(request); + * // Do something. + * DataExchange response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); + * DataExchange dataExchange = DataExchange.newBuilder().build(); + * DataExchange response = analyticsHubServiceClient.createDataExchange(parent, dataExchange); + * } + * }+ * + * @param parent Required. The parent resource path of the data exchange. e.g. + * `projects/myproject/locations/US`. + * @param dataExchange Required. The data exchange to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange createDataExchange(LocationName parent, DataExchange dataExchange) { + CreateDataExchangeRequest request = + CreateDataExchangeRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setDataExchange(dataExchange) + .build(); + return createDataExchange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); + * DataExchange dataExchange = DataExchange.newBuilder().build(); + * DataExchange response = analyticsHubServiceClient.createDataExchange(parent, dataExchange); + * } + * }+ * + * @param parent Required. The parent resource path of the data exchange. e.g. + * `projects/myproject/locations/US`. + * @param dataExchange Required. The data exchange to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange createDataExchange(String parent, DataExchange dataExchange) { + CreateDataExchangeRequest request = + CreateDataExchangeRequest.newBuilder() + .setParent(parent) + .setDataExchange(dataExchange) + .build(); + return createDataExchange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * CreateDataExchangeRequest request = + * CreateDataExchangeRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setDataExchangeId("dataExchangeId783243752") + * .setDataExchange(DataExchange.newBuilder().build()) + * .build(); + * DataExchange response = analyticsHubServiceClient.createDataExchange(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange createDataExchange(CreateDataExchangeRequest request) { + return createDataExchangeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * CreateDataExchangeRequest request = + * CreateDataExchangeRequest.newBuilder() + * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) + * .setDataExchangeId("dataExchangeId783243752") + * .setDataExchange(DataExchange.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.createDataExchangeCallable().futureCall(request); + * // Do something. + * DataExchange response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DataExchange dataExchange = DataExchange.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * DataExchange response = + * analyticsHubServiceClient.updateDataExchange(dataExchange, updateMask); + * } + * }+ * + * @param dataExchange Required. The data exchange to update. + * @param updateMask 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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange updateDataExchange(DataExchange dataExchange, FieldMask updateMask) { + UpdateDataExchangeRequest request = + UpdateDataExchangeRequest.newBuilder() + .setDataExchange(dataExchange) + .setUpdateMask(updateMask) + .build(); + return updateDataExchange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * UpdateDataExchangeRequest request = + * UpdateDataExchangeRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setDataExchange(DataExchange.newBuilder().build()) + * .build(); + * DataExchange response = analyticsHubServiceClient.updateDataExchange(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DataExchange updateDataExchange(UpdateDataExchangeRequest request) { + return updateDataExchangeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * UpdateDataExchangeRequest request = + * UpdateDataExchangeRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setDataExchange(DataExchange.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.updateDataExchangeCallable().futureCall(request); + * // Do something. + * DataExchange response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); + * analyticsHubServiceClient.deleteDataExchange(name); + * } + * }+ * + * @param name Required. The full name of the data exchange resource that you want to delete. For + * example, `projects/myproject/locations/US/dataExchanges/123`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataExchange(DataExchangeName name) { + DeleteDataExchangeRequest request = + DeleteDataExchangeRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + deleteDataExchange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString(); + * analyticsHubServiceClient.deleteDataExchange(name); + * } + * }+ * + * @param name Required. The full name of the data exchange resource that you want to delete. For + * example, `projects/myproject/locations/US/dataExchanges/123`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataExchange(String name) { + DeleteDataExchangeRequest request = + DeleteDataExchangeRequest.newBuilder().setName(name).build(); + deleteDataExchange(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DeleteDataExchangeRequest request = + * DeleteDataExchangeRequest.newBuilder() + * .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .build(); + * analyticsHubServiceClient.deleteDataExchange(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteDataExchange(DeleteDataExchangeRequest request) { + deleteDataExchangeCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing data exchange. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DeleteDataExchangeRequest request = + * DeleteDataExchangeRequest.newBuilder() + * .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.deleteDataExchangeCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); + * for (Listing element : analyticsHubServiceClient.listListings(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent resource path of the listing. e.g. + * `projects/myproject/locations/US/dataExchanges/123`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListListingsPagedResponse listListings(DataExchangeName parent) { + ListListingsRequest request = + ListListingsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listListings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all listings in a given project and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString(); + * for (Listing element : analyticsHubServiceClient.listListings(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The parent resource path of the listing. e.g. + * `projects/myproject/locations/US/dataExchanges/123`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListListingsPagedResponse listListings(String parent) { + ListListingsRequest request = ListListingsRequest.newBuilder().setParent(parent).build(); + return listListings(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all listings in a given project and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListListingsRequest request = + * ListListingsRequest.newBuilder() + * .setParent( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * for (Listing element : analyticsHubServiceClient.listListings(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListListingsPagedResponse listListings(ListListingsRequest request) { + return listListingsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all listings in a given project and location. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListListingsRequest request = + * ListListingsRequest.newBuilder() + * .setParent( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.listListingsPagedCallable().futureCall(request); + * // Do something. + * for (Listing element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListListingsRequest request = + * ListListingsRequest.newBuilder() + * .setParent( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .build(); + * while (true) { + * ListListingsResponse response = + * analyticsHubServiceClient.listListingsCallable().call(request); + * for (Listing element : response.getListingsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); + * Listing response = analyticsHubServiceClient.getListing(name); + * } + * }+ * + * @param name Required. The resource name of the listing. e.g. + * `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing getListing(ListingName name) { + GetListingRequest request = + GetListingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String name = + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]").toString(); + * Listing response = analyticsHubServiceClient.getListing(name); + * } + * }+ * + * @param name Required. The resource name of the listing. e.g. + * `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing getListing(String name) { + GetListingRequest request = GetListingRequest.newBuilder().setName(name).build(); + return getListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * GetListingRequest request = + * GetListingRequest.newBuilder() + * .setName( + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") + * .toString()) + * .build(); + * Listing response = analyticsHubServiceClient.getListing(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing getListing(GetListingRequest request) { + return getListingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the details of a listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * GetListingRequest request = + * GetListingRequest.newBuilder() + * .setName( + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.getListingCallable().futureCall(request); + * // Do something. + * Listing response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DataExchangeName parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]"); + * Listing listing = Listing.newBuilder().build(); + * Listing response = analyticsHubServiceClient.createListing(parent, listing); + * } + * }+ * + * @param parent Required. The parent resource path of the listing. e.g. + * `projects/myproject/locations/US/dataExchanges/123`. + * @param listing Required. The listing to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing createListing(DataExchangeName parent, Listing listing) { + CreateListingRequest request = + CreateListingRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setListing(listing) + .build(); + return createListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String parent = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString(); + * Listing listing = Listing.newBuilder().build(); + * Listing response = analyticsHubServiceClient.createListing(parent, listing); + * } + * }+ * + * @param parent Required. The parent resource path of the listing. e.g. + * `projects/myproject/locations/US/dataExchanges/123`. + * @param listing Required. The listing to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing createListing(String parent, Listing listing) { + CreateListingRequest request = + CreateListingRequest.newBuilder().setParent(parent).setListing(listing).build(); + return createListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * CreateListingRequest request = + * CreateListingRequest.newBuilder() + * .setParent( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setListingId("listingId-1215024449") + * .setListing(Listing.newBuilder().build()) + * .build(); + * Listing response = analyticsHubServiceClient.createListing(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing createListing(CreateListingRequest request) { + return createListingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * CreateListingRequest request = + * CreateListingRequest.newBuilder() + * .setParent( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setListingId("listingId-1215024449") + * .setListing(Listing.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.createListingCallable().futureCall(request); + * // Do something. + * Listing response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * Listing listing = Listing.newBuilder().build(); + * FieldMask updateMask = FieldMask.newBuilder().build(); + * Listing response = analyticsHubServiceClient.updateListing(listing, updateMask); + * } + * }+ * + * @param listing Required. The listing to update. + * @param updateMask 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. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing updateListing(Listing listing, FieldMask updateMask) { + UpdateListingRequest request = + UpdateListingRequest.newBuilder().setListing(listing).setUpdateMask(updateMask).build(); + return updateListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * UpdateListingRequest request = + * UpdateListingRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setListing(Listing.newBuilder().build()) + * .build(); + * Listing response = analyticsHubServiceClient.updateListing(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Listing updateListing(UpdateListingRequest request) { + return updateListingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * UpdateListingRequest request = + * UpdateListingRequest.newBuilder() + * .setUpdateMask(FieldMask.newBuilder().build()) + * .setListing(Listing.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.updateListingCallable().futureCall(request); + * // Do something. + * Listing response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); + * analyticsHubServiceClient.deleteListing(name); + * } + * }+ * + * @param name Required. Resource name of the listing to delete. e.g. + * `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteListing(ListingName name) { + DeleteListingRequest request = + DeleteListingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String name = + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]").toString(); + * analyticsHubServiceClient.deleteListing(name); + * } + * }+ * + * @param name Required. Resource name of the listing to delete. e.g. + * `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteListing(String name) { + DeleteListingRequest request = DeleteListingRequest.newBuilder().setName(name).build(); + deleteListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DeleteListingRequest request = + * DeleteListingRequest.newBuilder() + * .setName( + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") + * .toString()) + * .build(); + * analyticsHubServiceClient.deleteListing(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteListing(DeleteListingRequest request) { + deleteListingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a listing. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * DeleteListingRequest request = + * DeleteListingRequest.newBuilder() + * .setName( + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.deleteListingCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
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. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * ListingName name = ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]"); + * SubscribeListingResponse response = analyticsHubServiceClient.subscribeListing(name); + * } + * }+ * + * @param name Required. Resource name of the listing that you want to subscribe to. e.g. + * `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SubscribeListingResponse subscribeListing(ListingName name) { + SubscribeListingRequest request = + SubscribeListingRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return subscribeListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * String name = + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]").toString(); + * SubscribeListingResponse response = analyticsHubServiceClient.subscribeListing(name); + * } + * }+ * + * @param name Required. Resource name of the listing that you want to subscribe to. e.g. + * `projects/myproject/locations/US/dataExchanges/123/listings/456`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SubscribeListingResponse subscribeListing(String name) { + SubscribeListingRequest request = SubscribeListingRequest.newBuilder().setName(name).build(); + return subscribeListing(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * SubscribeListingRequest request = + * SubscribeListingRequest.newBuilder() + * .setName( + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") + * .toString()) + * .build(); + * SubscribeListingResponse response = analyticsHubServiceClient.subscribeListing(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final SubscribeListingResponse subscribeListing(SubscribeListingRequest request) { + return subscribeListingCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * 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. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * SubscribeListingRequest request = + * SubscribeListingRequest.newBuilder() + * .setName( + * ListingName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[LISTING]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.subscribeListingCallable().futureCall(request); + * // Do something. + * SubscribeListingResponse response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * Policy response = analyticsHubServiceClient.getIamPolicy(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy getIamPolicy(GetIamPolicyRequest request) { + return getIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets the IAM policy. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * GetIamPolicyRequest request = + * GetIamPolicyRequest.newBuilder() + * .setResource( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setOptions(GetPolicyOptions.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.getIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * Policy response = analyticsHubServiceClient.setIamPolicy(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Policy setIamPolicy(SetIamPolicyRequest request) { + return setIamPolicyCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Sets the IAM policy. + * + *
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * SetIamPolicyRequest request = + * SetIamPolicyRequest.newBuilder() + * .setResource( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .setPolicy(Policy.newBuilder().build()) + * .setUpdateMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * analyticsHubServiceClient.setIamPolicyCallable().futureCall(request); + * // Do something. + * Policy response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .addAllPermissions(new ArrayList+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) { + return testIamPermissionsCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns the permissions that a caller has. + * + *()) + * .build(); + * TestIamPermissionsResponse response = analyticsHubServiceClient.testIamPermissions(request); + * } + * }
Sample code: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) { + * TestIamPermissionsRequest request = + * TestIamPermissionsRequest.newBuilder() + * .setResource( + * DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) + * .addAllPermissions(new ArrayList+ */ + public final UnaryCallable()) + * .build(); + * ApiFuture future = + * analyticsHubServiceClient.testIamPermissionsCallable().futureCall(request); + * // Do something. + * TestIamPermissionsResponse response = future.get(); + * } + * }
The default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getDataExchange to 30 seconds: + * + *
{@code + * // 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. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * AnalyticsHubServiceSettings.Builder analyticsHubServiceSettingsBuilder = + * AnalyticsHubServiceSettings.newBuilder(); + * analyticsHubServiceSettingsBuilder + * .getDataExchangeSettings() + * .setRetrySettings( + * analyticsHubServiceSettingsBuilder + * .getDataExchangeSettings() + * .getRetrySettings() + * .toBuilder() + * .setTotalTimeout(Duration.ofSeconds(30)) + * .build()); + * AnalyticsHubServiceSettings analyticsHubServiceSettings = + * analyticsHubServiceSettingsBuilder.build(); + * }+ */ +@Generated("by gapic-generator-java") +public class AnalyticsHubServiceSettings extends ClientSettings
Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction The interfaces provided are listed below, along with usage samples.
+ *
+ * ======================= AnalyticsHubServiceClient =======================
+ *
+ * Service Description: 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.
+ *
+ * Sample for AnalyticsHubServiceClient:
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class AnalyticsHubServiceStub implements BackgroundResource {
+
+ public UnaryCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getDataExchange to 30 seconds:
+ *
+ * Note: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class is for advanced usage.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcAnalyticsHubServiceCallableFactory implements GrpcStubCallableFactory {
+
+ @Override
+ public This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public class GrpcAnalyticsHubServiceStub extends AnalyticsHubServiceStub {
+ private static final MethodDescriptor{@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (AnalyticsHubServiceClient analyticsHubServiceClient = AnalyticsHubServiceClient.create()) {
+ * DataExchangeName name = DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]");
+ * DataExchange response = analyticsHubServiceClient.getDataExchange(name);
+ * }
+ * }
+ */
+@Generated("by gapic-generator-java")
+package com.google.cloud.bigquery.analyticshub.v1;
+
+import javax.annotation.Generated;
diff --git a/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStub.java b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStub.java
new file mode 100644
index 000000000000..732de2b8a2ee
--- /dev/null
+++ b/java-analyticshub/google-cloud-analyticshub/src/main/java/com/google/cloud/bigquery/analyticshub/v1/stub/AnalyticsHubServiceStub.java
@@ -0,0 +1,140 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.bigquery.analyticshub.v1.stub;
+
+import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListDataExchangesPagedResponse;
+import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListListingsPagedResponse;
+import static com.google.cloud.bigquery.analyticshub.v1.AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.bigquery.analyticshub.v1.CreateDataExchangeRequest;
+import com.google.cloud.bigquery.analyticshub.v1.CreateListingRequest;
+import com.google.cloud.bigquery.analyticshub.v1.DataExchange;
+import com.google.cloud.bigquery.analyticshub.v1.DeleteDataExchangeRequest;
+import com.google.cloud.bigquery.analyticshub.v1.DeleteListingRequest;
+import com.google.cloud.bigquery.analyticshub.v1.GetDataExchangeRequest;
+import com.google.cloud.bigquery.analyticshub.v1.GetListingRequest;
+import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesRequest;
+import com.google.cloud.bigquery.analyticshub.v1.ListDataExchangesResponse;
+import com.google.cloud.bigquery.analyticshub.v1.ListListingsRequest;
+import com.google.cloud.bigquery.analyticshub.v1.ListListingsResponse;
+import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesRequest;
+import com.google.cloud.bigquery.analyticshub.v1.ListOrgDataExchangesResponse;
+import com.google.cloud.bigquery.analyticshub.v1.Listing;
+import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingRequest;
+import com.google.cloud.bigquery.analyticshub.v1.SubscribeListingResponse;
+import com.google.cloud.bigquery.analyticshub.v1.UpdateDataExchangeRequest;
+import com.google.cloud.bigquery.analyticshub.v1.UpdateListingRequest;
+import com.google.iam.v1.GetIamPolicyRequest;
+import com.google.iam.v1.Policy;
+import com.google.iam.v1.SetIamPolicyRequest;
+import com.google.iam.v1.TestIamPermissionsRequest;
+import com.google.iam.v1.TestIamPermissionsResponse;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the AnalyticsHubService service API.
+ *
+ *
+ *
+ *
+ * {@code
+ * // 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.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * AnalyticsHubServiceStubSettings.Builder analyticsHubServiceSettingsBuilder =
+ * AnalyticsHubServiceStubSettings.newBuilder();
+ * analyticsHubServiceSettingsBuilder
+ * .getDataExchangeSettings()
+ * .setRetrySettings(
+ * analyticsHubServiceSettingsBuilder
+ * .getDataExchangeSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * AnalyticsHubServiceStubSettings analyticsHubServiceSettings =
+ * analyticsHubServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class AnalyticsHubServiceStubSettings extends StubSettings