Class AnalyticsHubServiceClient
- All Implemented Interfaces:
BackgroundResource,AutoCloseable
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:
// 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().
| Method | Description | Method Variants |
|---|---|---|
ListDataExchanges |
Lists all data exchanges in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListOrgDataExchanges |
Lists all data exchanges from projects in a given organization and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetDataExchange |
Gets the details of a data exchange. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateDataExchange |
Creates a new data exchange. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateDataExchange |
Updates an existing data exchange. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteDataExchange |
Deletes an existing data exchange. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListListings |
Lists all listings in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetListing |
Gets the details of a listing. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateListing |
Creates a new listing. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateListing |
Updates an existing listing. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteListing |
Deletes a listing. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SubscribeListing |
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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SubscribeDataExchange |
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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RefreshSubscription |
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. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSubscription |
Gets the details of a Subscription. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSubscriptions |
Lists all subscriptions in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSharedResourceSubscriptions |
Lists all subscriptions on a given Data Exchange or Listing. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
RevokeSubscription |
Revokes a given subscription. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSubscription |
Deletes a subscription. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetIamPolicy |
Gets the IAM policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SetIamPolicy |
Sets the IAM policy. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
TestIamPermissions |
Returns the permissions that a caller has. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
CreateQueryTemplate |
Creates a new QueryTemplate |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetQueryTemplate |
Gets a QueryTemplate |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListQueryTemplates |
Lists all QueryTemplates in a given project and location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateQueryTemplate |
Updates an existing QueryTemplate |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteQueryTemplate |
Deletes a query template. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
SubmitQueryTemplate |
Submits a query template for approval. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ApproveQueryTemplate |
Approves a query template. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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:
// 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:
// 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:
// 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.newHttpJsonBuilder().build();
AnalyticsHubServiceClient analyticsHubServiceClient =
AnalyticsHubServiceClient.create(analyticsHubServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic classstatic class -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs an instance of AnalyticsHubServiceClient, using the given settings.protected -
Method Summary
Modifier and TypeMethodDescriptionfinal QueryTemplateApproves a query template.final QueryTemplateApproves a query template.final QueryTemplateapproveQueryTemplate(String name) Approves a query template.Approves a query template.booleanawaitTermination(long duration, TimeUnit unit) final voidclose()static final AnalyticsHubServiceClientcreate()Constructs an instance of AnalyticsHubServiceClient with default settings.static final AnalyticsHubServiceClientcreate(AnalyticsHubServiceSettings settings) Constructs an instance of AnalyticsHubServiceClient, using the given settings.static final AnalyticsHubServiceClientConstructs an instance of AnalyticsHubServiceClient, using the given stub for making calls.final DataExchangeCreates a new data exchange.final DataExchangecreateDataExchange(LocationName parent, DataExchange dataExchange) Creates a new data exchange.final DataExchangecreateDataExchange(String parent, DataExchange dataExchange) Creates a new data exchange.Creates a new data exchange.final ListingcreateListing(CreateListingRequest request) Creates a new listing.final ListingcreateListing(DataExchangeName parent, Listing listing) Creates a new listing.final ListingcreateListing(String parent, Listing listing) Creates a new listing.Creates a new listing.final QueryTemplateCreates a new QueryTemplatefinal QueryTemplatecreateQueryTemplate(DataExchangeName parent, QueryTemplate queryTemplate, String queryTemplateId) Creates a new QueryTemplatefinal QueryTemplatecreateQueryTemplate(String parent, QueryTemplate queryTemplate, String queryTemplateId) Creates a new QueryTemplateCreates a new QueryTemplatefinal voidDeletes an existing data exchange.final voidDeletes an existing data exchange.final voiddeleteDataExchange(String name) Deletes an existing data exchange.final UnaryCallable<DeleteDataExchangeRequest,com.google.protobuf.Empty> Deletes an existing data exchange.final voiddeleteListing(DeleteListingRequest request) Deletes a listing.final voiddeleteListing(ListingName name) Deletes a listing.final voiddeleteListing(String name) Deletes a listing.final UnaryCallable<DeleteListingRequest,com.google.protobuf.Empty> Deletes a listing.final voidDeletes a query template.final voidDeletes a query template.final voiddeleteQueryTemplate(String name) Deletes a query template.final UnaryCallable<DeleteQueryTemplateRequest,com.google.protobuf.Empty> Deletes a query template.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a subscription.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a subscription.final OperationFuture<com.google.protobuf.Empty,OperationMetadata> Deletes a subscription.Deletes a subscription.final OperationCallable<DeleteSubscriptionRequest,com.google.protobuf.Empty, OperationMetadata> Deletes a subscription.final DataExchangeGets the details of a data exchange.final DataExchangegetDataExchange(GetDataExchangeRequest request) Gets the details of a data exchange.final DataExchangegetDataExchange(String name) Gets the details of a data exchange.Gets the details of a data exchange.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final PolicygetIamPolicy(GetIamPolicyRequest request) Gets the IAM policy.Gets the IAM policy.final ListinggetListing(GetListingRequest request) Gets the details of a listing.final ListinggetListing(ListingName name) Gets the details of a listing.final ListinggetListing(String name) Gets the details of a listing.Gets the details of a listing.final OperationsClientReturns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.final QueryTemplategetQueryTemplate(GetQueryTemplateRequest request) Gets a QueryTemplatefinal QueryTemplateGets a QueryTemplatefinal QueryTemplategetQueryTemplate(String name) Gets a QueryTemplateGets a QueryTemplategetStub()final SubscriptiongetSubscription(GetSubscriptionRequest request) Gets the details of a Subscription.final SubscriptionGets the details of a Subscription.final SubscriptiongetSubscription(String name) Gets the details of a Subscription.Gets the details of a Subscription.booleanbooleanLists all data exchanges in a given project and location.listDataExchanges(LocationName parent) Lists all data exchanges in a given project and location.listDataExchanges(String parent) Lists all data exchanges in a given project and location.Lists all data exchanges in a given project and location.final UnaryCallable<ListDataExchangesRequest,AnalyticsHubServiceClient.ListDataExchangesPagedResponse> Lists all data exchanges in a given project and location.listListings(DataExchangeName parent) Lists all listings in a given project and location.listListings(ListListingsRequest request) Lists all listings in a given project and location.listListings(String parent) Lists all listings in a given project and location.Lists all listings in a given project and location.Lists all listings in a given project and location.Lists all data exchanges from projects in a given organization and location.listOrgDataExchanges(String organization) Lists all data exchanges from projects in a given organization and location.Lists all data exchanges from projects in a given organization and location.final UnaryCallable<ListOrgDataExchangesRequest,AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse> Lists all data exchanges from projects in a given organization and location.listQueryTemplates(DataExchangeName parent) Lists all QueryTemplates in a given project and location.Lists all QueryTemplates in a given project and location.listQueryTemplates(String parent) Lists all QueryTemplates in a given project and location.Lists all QueryTemplates in a given project and location.final UnaryCallable<ListQueryTemplatesRequest,AnalyticsHubServiceClient.ListQueryTemplatesPagedResponse> Lists all QueryTemplates in a given project and location.listSharedResourceSubscriptions(ResourceName resource) Lists all subscriptions on a given Data Exchange or Listing.Lists all subscriptions on a given Data Exchange or Listing.listSharedResourceSubscriptions(String resource) Lists all subscriptions on a given Data Exchange or Listing.Lists all subscriptions on a given Data Exchange or Listing.final UnaryCallable<ListSharedResourceSubscriptionsRequest,AnalyticsHubServiceClient.ListSharedResourceSubscriptionsPagedResponse> Lists all subscriptions on a given Data Exchange or Listing.Lists all subscriptions in a given project and location.listSubscriptions(LocationName parent) Lists all subscriptions in a given project and location.listSubscriptions(String parent) Lists all subscriptions in a given project and location.Lists all subscriptions in a given project and location.final UnaryCallable<ListSubscriptionsRequest,AnalyticsHubServiceClient.ListSubscriptionsPagedResponse> Lists all subscriptions in a given project and location.Refreshes a Subscription to a Data Exchange.Refreshes a Subscription to a Data Exchange.Refreshes a Subscription to a Data Exchange.Refreshes a Subscription to a Data Exchange.Refreshes a Subscription to a Data Exchange.Revokes a given subscription.Revokes a given subscription.revokeSubscription(String name) Revokes a given subscription.Revokes a given subscription.final PolicysetIamPolicy(SetIamPolicyRequest request) Sets the IAM policy.Sets the IAM policy.voidshutdown()voidfinal QueryTemplateSubmits a query template for approval.final QueryTemplateSubmits a query template for approval.final QueryTemplatesubmitQueryTemplate(String name) Submits a query template for approval.Submits a query template for approval.Creates a Subscription to a Data Clean Room.Creates a Subscription to a Data Clean Room.Creates a Subscription to a Data Clean Room.Creates a Subscription to a Data Clean Room.final OperationCallable<SubscribeDataExchangeRequest,SubscribeDataExchangeResponse, OperationMetadata> Creates a Subscription to a Data Clean Room.final SubscribeListingResponsesubscribeListing(ListingName name) Subscribes to a listing.final SubscribeListingResponsesubscribeListing(SubscribeListingRequest request) Subscribes to a listing.final SubscribeListingResponsesubscribeListing(String name) Subscribes to a listing.Subscribes to a listing.Returns the permissions that a caller has.Returns the permissions that a caller has.final DataExchangeupdateDataExchange(DataExchange dataExchange, com.google.protobuf.FieldMask updateMask) Updates an existing data exchange.final DataExchangeUpdates an existing data exchange.Updates an existing data exchange.final ListingupdateListing(Listing listing, com.google.protobuf.FieldMask updateMask) Updates an existing listing.final ListingupdateListing(UpdateListingRequest request) Updates an existing listing.Updates an existing listing.final QueryTemplateupdateQueryTemplate(QueryTemplate queryTemplate, com.google.protobuf.FieldMask updateMask) Updates an existing QueryTemplatefinal QueryTemplateUpdates an existing QueryTemplateUpdates an existing QueryTemplate
-
Constructor Details
-
AnalyticsHubServiceClient
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.- Throws:
IOException
-
AnalyticsHubServiceClient
-
-
Method Details
-
create
Constructs an instance of AnalyticsHubServiceClient with default settings.- Throws:
IOException
-
create
public static final AnalyticsHubServiceClient create(AnalyticsHubServiceSettings settings) throws IOException 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.- Throws:
IOException
-
create
Constructs an instance of AnalyticsHubServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(AnalyticsHubServiceSettings). -
getSettings
-
getStub
-
getOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
getHttpJsonOperationsClient
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call. -
listDataExchanges
public final AnalyticsHubServiceClient.ListDataExchangesPagedResponse listDataExchanges(LocationName parent) Lists all data exchanges in a given project and location.Sample 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); } }- Parameters:
parent- Required. The parent resource path of the data exchanges. e.g. `projects/myproject/locations/us`.- Throws:
ApiException- if the remote call fails
-
listDataExchanges
public final AnalyticsHubServiceClient.ListDataExchangesPagedResponse listDataExchanges(String parent) Lists all data exchanges in a given project and location.Sample 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); } }- Parameters:
parent- Required. The parent resource path of the data exchanges. e.g. `projects/myproject/locations/us`.- Throws:
ApiException- if the remote call fails
-
listDataExchanges
public final AnalyticsHubServiceClient.ListDataExchangesPagedResponse listDataExchanges(ListDataExchangesRequest request) Lists all data exchanges in a given project and location.Sample 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listDataExchangesPagedCallable
public final UnaryCallable<ListDataExchangesRequest,AnalyticsHubServiceClient.ListDataExchangesPagedResponse> listDataExchangesPagedCallable()Lists all data exchanges in a given project and location.Sample 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<DataExchange> future = analyticsHubServiceClient.listDataExchangesPagedCallable().futureCall(request); // Do something. for (DataExchange element : future.get().iterateAll()) { // doThingsWith(element); } } -
listDataExchangesCallable
public final UnaryCallable<ListDataExchangesRequest,ListDataExchangesResponse> listDataExchangesCallable()Lists all data exchanges in a given project and location.Sample 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; } } } -
listOrgDataExchanges
public final AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse listOrgDataExchanges(String organization) Lists all data exchanges from projects in a given organization and location.Sample 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); } }- Parameters:
organization- Required. The organization resource path of the projects containing DataExchanges. e.g. `organizations/myorg/locations/us`.- Throws:
ApiException- if the remote call fails
-
listOrgDataExchanges
public final AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse listOrgDataExchanges(ListOrgDataExchangesRequest request) Lists all data exchanges from projects in a given organization and location.Sample 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listOrgDataExchangesPagedCallable
public final UnaryCallable<ListOrgDataExchangesRequest,AnalyticsHubServiceClient.ListOrgDataExchangesPagedResponse> listOrgDataExchangesPagedCallable()Lists all data exchanges from projects in a given organization and location.Sample 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<DataExchange> future = analyticsHubServiceClient.listOrgDataExchangesPagedCallable().futureCall(request); // Do something. for (DataExchange element : future.get().iterateAll()) { // doThingsWith(element); } } -
listOrgDataExchangesCallable
public final UnaryCallable<ListOrgDataExchangesRequest,ListOrgDataExchangesResponse> listOrgDataExchangesCallable()Lists all data exchanges from projects in a given organization and location.Sample 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; } } } -
getDataExchange
Gets the details of a data exchange.Sample 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); }- Parameters:
name- Required. The resource name of the data exchange. e.g. `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
getDataExchange
Gets the details of a data exchange.Sample 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); }- Parameters:
name- Required. The resource name of the data exchange. e.g. `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
getDataExchange
Gets the details of a data exchange.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getDataExchangeCallable
Gets the details of a data exchange.Sample 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<DataExchange> future = analyticsHubServiceClient.getDataExchangeCallable().futureCall(request); // Do something. DataExchange response = future.get(); } -
createDataExchange
Creates a new data exchange.Sample 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); }- Parameters:
parent- Required. The parent resource path of the data exchange. e.g. `projects/myproject/locations/us`.dataExchange- Required. The data exchange to create.- Throws:
ApiException- if the remote call fails
-
createDataExchange
Creates a new data exchange.Sample 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); }- Parameters:
parent- Required. The parent resource path of the data exchange. e.g. `projects/myproject/locations/us`.dataExchange- Required. The data exchange to create.- Throws:
ApiException- if the remote call fails
-
createDataExchange
Creates a new data exchange.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createDataExchangeCallable
Creates a new data exchange.Sample 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<DataExchange> future = analyticsHubServiceClient.createDataExchangeCallable().futureCall(request); // Do something. DataExchange response = future.get(); } -
updateDataExchange
public final DataExchange updateDataExchange(DataExchange dataExchange, com.google.protobuf.FieldMask updateMask) Updates an existing data exchange.Sample 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); }- Parameters:
dataExchange- Required. The data exchange to update.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:
ApiException- if the remote call fails
-
updateDataExchange
Updates an existing data exchange.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateDataExchangeCallable
Updates an existing data exchange.Sample 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<DataExchange> future = analyticsHubServiceClient.updateDataExchangeCallable().futureCall(request); // Do something. DataExchange response = future.get(); } -
deleteDataExchange
Deletes an existing data exchange.Sample 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); }- Parameters:
name- Required. The full name of the data exchange resource that you want to delete. For example, `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
deleteDataExchange
Deletes an existing data exchange.Sample 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); }- Parameters:
name- Required. The full name of the data exchange resource that you want to delete. For example, `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
deleteDataExchange
Deletes an existing data exchange.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteDataExchangeCallable
public final UnaryCallable<DeleteDataExchangeRequest,com.google.protobuf.Empty> deleteDataExchangeCallable()Deletes an existing data exchange.Sample 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<Empty> future = analyticsHubServiceClient.deleteDataExchangeCallable().futureCall(request); // Do something. future.get(); } -
listListings
public final AnalyticsHubServiceClient.ListListingsPagedResponse listListings(DataExchangeName parent) Lists all listings in a given project and location.Sample 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); } }- Parameters:
parent- Required. The parent resource path of the listing. e.g. `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
listListings
Lists all listings in a given project and location.Sample 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); } }- Parameters:
parent- Required. The parent resource path of the listing. e.g. `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
listListings
public final AnalyticsHubServiceClient.ListListingsPagedResponse listListings(ListListingsRequest request) Lists all listings in a given project and location.Sample 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); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listListingsPagedCallable
public final UnaryCallable<ListListingsRequest,AnalyticsHubServiceClient.ListListingsPagedResponse> listListingsPagedCallable()Lists all listings in a given project and location.Sample 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<Listing> future = analyticsHubServiceClient.listListingsPagedCallable().futureCall(request); // Do something. for (Listing element : future.get().iterateAll()) { // doThingsWith(element); } } -
listListingsCallable
Lists all listings in a given project and location.Sample 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; } } } -
getListing
Gets the details of a listing.Sample 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); }- Parameters:
name- Required. The resource name of the listing. e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.- Throws:
ApiException- if the remote call fails
-
getListing
Gets the details of a listing.Sample 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); }- Parameters:
name- Required. The resource name of the listing. e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.- Throws:
ApiException- if the remote call fails
-
getListing
Gets the details of a listing.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getListingCallable
Gets the details of a listing.Sample 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<Listing> future = analyticsHubServiceClient.getListingCallable().futureCall(request); // Do something. Listing response = future.get(); } -
createListing
Creates a new listing.Sample 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); }- Parameters:
parent- Required. The parent resource path of the listing. e.g. `projects/myproject/locations/us/dataExchanges/123`.listing- Required. The listing to create.- Throws:
ApiException- if the remote call fails
-
createListing
Creates a new listing.Sample 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); }- Parameters:
parent- Required. The parent resource path of the listing. e.g. `projects/myproject/locations/us/dataExchanges/123`.listing- Required. The listing to create.- Throws:
ApiException- if the remote call fails
-
createListing
Creates a new listing.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createListingCallable
Creates a new listing.Sample 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<Listing> future = analyticsHubServiceClient.createListingCallable().futureCall(request); // Do something. Listing response = future.get(); } -
updateListing
Updates an existing listing.Sample 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); }- Parameters:
listing- Required. The listing to update.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:
ApiException- if the remote call fails
-
updateListing
Updates an existing listing.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateListingCallable
Updates an existing listing.Sample 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<Listing> future = analyticsHubServiceClient.updateListingCallable().futureCall(request); // Do something. Listing response = future.get(); } -
deleteListing
Deletes a listing.Sample 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); }- Parameters:
name- Required. Resource name of the listing to delete. e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.- Throws:
ApiException- if the remote call fails
-
deleteListing
Deletes a listing.Sample 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); }- Parameters:
name- Required. Resource name of the listing to delete. e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.- Throws:
ApiException- if the remote call fails
-
deleteListing
Deletes a listing.Sample 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()) .setDeleteCommercial(true) .build(); analyticsHubServiceClient.deleteListing(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteListingCallable
Deletes a listing.Sample 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()) .setDeleteCommercial(true) .build(); ApiFuture<Empty> future = analyticsHubServiceClient.deleteListingCallable().futureCall(request); // Do something. future.get(); } -
subscribeListing
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:
// 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); }- Parameters:
name- Required. Resource name of the listing that you want to subscribe to. e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.- Throws:
ApiException- if the remote call fails
-
subscribeListing
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:
// 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); }- Parameters:
name- Required. Resource name of the listing that you want to subscribe to. e.g. `projects/myproject/locations/us/dataExchanges/123/listings/456`.- Throws:
ApiException- if the remote call fails
-
subscribeListing
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:
// 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
subscribeListingCallable
public final UnaryCallable<SubscribeListingRequest,SubscribeListingResponse> subscribeListingCallable()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:
// 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<SubscribeListingResponse> future = analyticsHubServiceClient.subscribeListingCallable().futureCall(request); // Do something. SubscribeListingResponse response = future.get(); } -
subscribeDataExchangeAsync
public final OperationFuture<SubscribeDataExchangeResponse,OperationMetadata> subscribeDataExchangeAsync(DataExchangeName name) 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.Sample 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]"); SubscribeDataExchangeResponse response = analyticsHubServiceClient.subscribeDataExchangeAsync(name).get(); }- Parameters:
name- Required. Resource name of the Data Exchange. e.g. `projects/publisherproject/locations/us/dataExchanges/123`- Throws:
ApiException- if the remote call fails
-
subscribeDataExchangeAsync
public final OperationFuture<SubscribeDataExchangeResponse,OperationMetadata> subscribeDataExchangeAsync(String name) 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.Sample 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(); SubscribeDataExchangeResponse response = analyticsHubServiceClient.subscribeDataExchangeAsync(name).get(); }- Parameters:
name- Required. Resource name of the Data Exchange. e.g. `projects/publisherproject/locations/us/dataExchanges/123`- Throws:
ApiException- if the remote call fails
-
subscribeDataExchangeAsync
public final OperationFuture<SubscribeDataExchangeResponse,OperationMetadata> subscribeDataExchangeAsync(SubscribeDataExchangeRequest request) 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.Sample 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()) { SubscribeDataExchangeRequest request = SubscribeDataExchangeRequest.newBuilder() .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setDestination(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDestinationDataset(DestinationDataset.newBuilder().build()) .setSubscription("subscription341203229") .setSubscriberContact("subscriberContact-847205736") .build(); SubscribeDataExchangeResponse response = analyticsHubServiceClient.subscribeDataExchangeAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
subscribeDataExchangeOperationCallable
public final OperationCallable<SubscribeDataExchangeRequest,SubscribeDataExchangeResponse, subscribeDataExchangeOperationCallable()OperationMetadata> 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.Sample 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()) { SubscribeDataExchangeRequest request = SubscribeDataExchangeRequest.newBuilder() .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setDestination(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDestinationDataset(DestinationDataset.newBuilder().build()) .setSubscription("subscription341203229") .setSubscriberContact("subscriberContact-847205736") .build(); OperationFuture<SubscribeDataExchangeResponse, OperationMetadata> future = analyticsHubServiceClient.subscribeDataExchangeOperationCallable().futureCall(request); // Do something. SubscribeDataExchangeResponse response = future.get(); } -
subscribeDataExchangeCallable
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.Sample 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()) { SubscribeDataExchangeRequest request = SubscribeDataExchangeRequest.newBuilder() .setName(DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setDestination(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setDestinationDataset(DestinationDataset.newBuilder().build()) .setSubscription("subscription341203229") .setSubscriberContact("subscriberContact-847205736") .build(); ApiFuture<Operation> future = analyticsHubServiceClient.subscribeDataExchangeCallable().futureCall(request); // Do something. Operation response = future.get(); } -
refreshSubscriptionAsync
public final OperationFuture<RefreshSubscriptionResponse,OperationMetadata> refreshSubscriptionAsync(SubscriptionName name) 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.Sample 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()) { SubscriptionName name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]"); RefreshSubscriptionResponse response = analyticsHubServiceClient.refreshSubscriptionAsync(name).get(); }- Parameters:
name- Required. Resource name of the Subscription to refresh. e.g. `projects/subscriberproject/locations/us/subscriptions/123`- Throws:
ApiException- if the remote call fails
-
refreshSubscriptionAsync
public final OperationFuture<RefreshSubscriptionResponse,OperationMetadata> refreshSubscriptionAsync(String name) 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.Sample 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 = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString(); RefreshSubscriptionResponse response = analyticsHubServiceClient.refreshSubscriptionAsync(name).get(); }- Parameters:
name- Required. Resource name of the Subscription to refresh. e.g. `projects/subscriberproject/locations/us/subscriptions/123`- Throws:
ApiException- if the remote call fails
-
refreshSubscriptionAsync
public final OperationFuture<RefreshSubscriptionResponse,OperationMetadata> refreshSubscriptionAsync(RefreshSubscriptionRequest request) 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.Sample 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()) { RefreshSubscriptionRequest request = RefreshSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); RefreshSubscriptionResponse response = analyticsHubServiceClient.refreshSubscriptionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
refreshSubscriptionOperationCallable
public final OperationCallable<RefreshSubscriptionRequest,RefreshSubscriptionResponse, refreshSubscriptionOperationCallable()OperationMetadata> 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.Sample 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()) { RefreshSubscriptionRequest request = RefreshSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); OperationFuture<RefreshSubscriptionResponse, OperationMetadata> future = analyticsHubServiceClient.refreshSubscriptionOperationCallable().futureCall(request); // Do something. RefreshSubscriptionResponse response = future.get(); } -
refreshSubscriptionCallable
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.Sample 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()) { RefreshSubscriptionRequest request = RefreshSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); ApiFuture<Operation> future = analyticsHubServiceClient.refreshSubscriptionCallable().futureCall(request); // Do something. Operation response = future.get(); } -
getSubscription
Gets the details of a Subscription.Sample 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()) { SubscriptionName name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]"); Subscription response = analyticsHubServiceClient.getSubscription(name); }- Parameters:
name- Required. Resource name of the subscription. e.g. projects/123/locations/us/subscriptions/456- Throws:
ApiException- if the remote call fails
-
getSubscription
Gets the details of a Subscription.Sample 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 = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString(); Subscription response = analyticsHubServiceClient.getSubscription(name); }- Parameters:
name- Required. Resource name of the subscription. e.g. projects/123/locations/us/subscriptions/456- Throws:
ApiException- if the remote call fails
-
getSubscription
Gets the details of a Subscription.Sample 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()) { GetSubscriptionRequest request = GetSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); Subscription response = analyticsHubServiceClient.getSubscription(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getSubscriptionCallable
Gets the details of a Subscription.Sample 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()) { GetSubscriptionRequest request = GetSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); ApiFuture<Subscription> future = analyticsHubServiceClient.getSubscriptionCallable().futureCall(request); // Do something. Subscription response = future.get(); } -
listSubscriptions
public final AnalyticsHubServiceClient.ListSubscriptionsPagedResponse listSubscriptions(LocationName parent) Lists all subscriptions in a given project and location.Sample 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 (Subscription element : analyticsHubServiceClient.listSubscriptions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource path of the subscription. e.g. projects/myproject/locations/us- Throws:
ApiException- if the remote call fails
-
listSubscriptions
public final AnalyticsHubServiceClient.ListSubscriptionsPagedResponse listSubscriptions(String parent) Lists all subscriptions in a given project and location.Sample 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 (Subscription element : analyticsHubServiceClient.listSubscriptions(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource path of the subscription. e.g. projects/myproject/locations/us- Throws:
ApiException- if the remote call fails
-
listSubscriptions
public final AnalyticsHubServiceClient.ListSubscriptionsPagedResponse listSubscriptions(ListSubscriptionsRequest request) Lists all subscriptions in a given project and location.Sample 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()) { ListSubscriptionsRequest request = ListSubscriptionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (Subscription element : analyticsHubServiceClient.listSubscriptions(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listSubscriptionsPagedCallable
public final UnaryCallable<ListSubscriptionsRequest,AnalyticsHubServiceClient.ListSubscriptionsPagedResponse> listSubscriptionsPagedCallable()Lists all subscriptions in a given project and location.Sample 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()) { ListSubscriptionsRequest request = ListSubscriptionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<Subscription> future = analyticsHubServiceClient.listSubscriptionsPagedCallable().futureCall(request); // Do something. for (Subscription element : future.get().iterateAll()) { // doThingsWith(element); } } -
listSubscriptionsCallable
public final UnaryCallable<ListSubscriptionsRequest,ListSubscriptionsResponse> listSubscriptionsCallable()Lists all subscriptions in a given project and location.Sample 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()) { ListSubscriptionsRequest request = ListSubscriptionsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setFilter("filter-1274492040") .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListSubscriptionsResponse response = analyticsHubServiceClient.listSubscriptionsCallable().call(request); for (Subscription element : response.getSubscriptionsList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
revokeSubscription
Revokes a given subscription.Sample 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()) { SubscriptionName name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]"); RevokeSubscriptionResponse response = analyticsHubServiceClient.revokeSubscription(name); }- Parameters:
name- Required. Resource name of the subscription to revoke. e.g. projects/123/locations/us/subscriptions/456- Throws:
ApiException- if the remote call fails
-
revokeSubscription
Revokes a given subscription.Sample 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 = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString(); RevokeSubscriptionResponse response = analyticsHubServiceClient.revokeSubscription(name); }- Parameters:
name- Required. Resource name of the subscription to revoke. e.g. projects/123/locations/us/subscriptions/456- Throws:
ApiException- if the remote call fails
-
revokeSubscription
Revokes a given subscription.Sample 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()) { RevokeSubscriptionRequest request = RevokeSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .setRevokeCommercial(true) .build(); RevokeSubscriptionResponse response = analyticsHubServiceClient.revokeSubscription(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
revokeSubscriptionCallable
public final UnaryCallable<RevokeSubscriptionRequest,RevokeSubscriptionResponse> revokeSubscriptionCallable()Revokes a given subscription.Sample 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()) { RevokeSubscriptionRequest request = RevokeSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .setRevokeCommercial(true) .build(); ApiFuture<RevokeSubscriptionResponse> future = analyticsHubServiceClient.revokeSubscriptionCallable().futureCall(request); // Do something. RevokeSubscriptionResponse response = future.get(); } -
deleteSubscriptionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubscriptionAsync(SubscriptionName name) Deletes a subscription.Sample 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()) { SubscriptionName name = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]"); analyticsHubServiceClient.deleteSubscriptionAsync(name).get(); }- Parameters:
name- Required. Resource name of the subscription to delete. e.g. projects/123/locations/us/subscriptions/456- Throws:
ApiException- if the remote call fails
-
deleteSubscriptionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubscriptionAsync(String name) Deletes a subscription.Sample 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 = SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString(); analyticsHubServiceClient.deleteSubscriptionAsync(name).get(); }- Parameters:
name- Required. Resource name of the subscription to delete. e.g. projects/123/locations/us/subscriptions/456- Throws:
ApiException- if the remote call fails
-
deleteSubscriptionAsync
public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSubscriptionAsync(DeleteSubscriptionRequest request) Deletes a subscription.Sample 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()) { DeleteSubscriptionRequest request = DeleteSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); analyticsHubServiceClient.deleteSubscriptionAsync(request).get(); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteSubscriptionOperationCallable
public final OperationCallable<DeleteSubscriptionRequest,com.google.protobuf.Empty, deleteSubscriptionOperationCallable()OperationMetadata> Deletes a subscription.Sample 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()) { DeleteSubscriptionRequest request = DeleteSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); OperationFuture<Empty, OperationMetadata> future = analyticsHubServiceClient.deleteSubscriptionOperationCallable().futureCall(request); // Do something. future.get(); } -
deleteSubscriptionCallable
Deletes a subscription.Sample 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()) { DeleteSubscriptionRequest request = DeleteSubscriptionRequest.newBuilder() .setName(SubscriptionName.of("[PROJECT]", "[LOCATION]", "[SUBSCRIPTION]").toString()) .build(); ApiFuture<Operation> future = analyticsHubServiceClient.deleteSubscriptionCallable().futureCall(request); // Do something. future.get(); } -
getIamPolicy
Gets the IAM policy.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getIamPolicyCallable
Gets the IAM policy.Sample 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<Policy> future = analyticsHubServiceClient.getIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
setIamPolicy
Sets the IAM policy.Sample 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); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
setIamPolicyCallable
Sets the IAM policy.Sample 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<Policy> future = analyticsHubServiceClient.setIamPolicyCallable().futureCall(request); // Do something. Policy response = future.get(); } -
testIamPermissions
Returns the permissions that a caller has.Sample 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<String>()) .build(); TestIamPermissionsResponse response = analyticsHubServiceClient.testIamPermissions(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
testIamPermissionsCallable
public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()Returns the permissions that a caller has.Sample 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<String>()) .build(); ApiFuture<TestIamPermissionsResponse> future = analyticsHubServiceClient.testIamPermissionsCallable().futureCall(request); // Do something. TestIamPermissionsResponse response = future.get(); } -
createQueryTemplate
public final QueryTemplate createQueryTemplate(DataExchangeName parent, QueryTemplate queryTemplate, String queryTemplateId) Creates a new QueryTemplateSample 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]"); QueryTemplate queryTemplate = QueryTemplate.newBuilder().build(); String queryTemplateId = "queryTemplateId-1884800483"; QueryTemplate response = analyticsHubServiceClient.createQueryTemplate(parent, queryTemplate, queryTemplateId); }- Parameters:
parent- Required. The parent resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`.queryTemplate- Required. The QueryTemplate to create.queryTemplateId- Required. The ID of the QueryTemplate to create. Must contain only Unicode letters, numbers (0-9), underscores (_). Max length: 100 bytes.- Throws:
ApiException- if the remote call fails
-
createQueryTemplate
public final QueryTemplate createQueryTemplate(String parent, QueryTemplate queryTemplate, String queryTemplateId) Creates a new QueryTemplateSample 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(); QueryTemplate queryTemplate = QueryTemplate.newBuilder().build(); String queryTemplateId = "queryTemplateId-1884800483"; QueryTemplate response = analyticsHubServiceClient.createQueryTemplate(parent, queryTemplate, queryTemplateId); }- Parameters:
parent- Required. The parent resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myQueryTemplate`.queryTemplate- Required. The QueryTemplate to create.queryTemplateId- Required. The ID of the QueryTemplate to create. Must contain only Unicode letters, numbers (0-9), underscores (_). Max length: 100 bytes.- Throws:
ApiException- if the remote call fails
-
createQueryTemplate
Creates a new QueryTemplateSample 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()) { CreateQueryTemplateRequest request = CreateQueryTemplateRequest.newBuilder() .setParent( DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setQueryTemplateId("queryTemplateId-1884800483") .setQueryTemplate(QueryTemplate.newBuilder().build()) .build(); QueryTemplate response = analyticsHubServiceClient.createQueryTemplate(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
createQueryTemplateCallable
Creates a new QueryTemplateSample 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()) { CreateQueryTemplateRequest request = CreateQueryTemplateRequest.newBuilder() .setParent( DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setQueryTemplateId("queryTemplateId-1884800483") .setQueryTemplate(QueryTemplate.newBuilder().build()) .build(); ApiFuture<QueryTemplate> future = analyticsHubServiceClient.createQueryTemplateCallable().futureCall(request); // Do something. QueryTemplate response = future.get(); } -
getQueryTemplate
Gets a QueryTemplateSample 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()) { QueryTemplateName name = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]"); QueryTemplate response = analyticsHubServiceClient.getQueryTemplate(name); }- Parameters:
name- Required. The parent resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
getQueryTemplate
Gets a QueryTemplateSample 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 = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString(); QueryTemplate response = analyticsHubServiceClient.getQueryTemplate(name); }- Parameters:
name- Required. The parent resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
getQueryTemplate
Gets a QueryTemplateSample 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()) { GetQueryTemplateRequest request = GetQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); QueryTemplate response = analyticsHubServiceClient.getQueryTemplate(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
getQueryTemplateCallable
Gets a QueryTemplateSample 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()) { GetQueryTemplateRequest request = GetQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); ApiFuture<QueryTemplate> future = analyticsHubServiceClient.getQueryTemplateCallable().futureCall(request); // Do something. QueryTemplate response = future.get(); } -
listQueryTemplates
public final AnalyticsHubServiceClient.ListQueryTemplatesPagedResponse listQueryTemplates(DataExchangeName parent) Lists all QueryTemplates in a given project and location.Sample 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 (QueryTemplate element : analyticsHubServiceClient.listQueryTemplates(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource path of the QueryTemplates. e.g. `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
listQueryTemplates
public final AnalyticsHubServiceClient.ListQueryTemplatesPagedResponse listQueryTemplates(String parent) Lists all QueryTemplates in a given project and location.Sample 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 (QueryTemplate element : analyticsHubServiceClient.listQueryTemplates(parent).iterateAll()) { // doThingsWith(element); } }- Parameters:
parent- Required. The parent resource path of the QueryTemplates. e.g. `projects/myproject/locations/us/dataExchanges/123`.- Throws:
ApiException- if the remote call fails
-
listQueryTemplates
public final AnalyticsHubServiceClient.ListQueryTemplatesPagedResponse listQueryTemplates(ListQueryTemplatesRequest request) Lists all QueryTemplates in a given project and location.Sample 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()) { ListQueryTemplatesRequest request = ListQueryTemplatesRequest.newBuilder() .setParent( DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); for (QueryTemplate element : analyticsHubServiceClient.listQueryTemplates(request).iterateAll()) { // doThingsWith(element); } }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
listQueryTemplatesPagedCallable
public final UnaryCallable<ListQueryTemplatesRequest,AnalyticsHubServiceClient.ListQueryTemplatesPagedResponse> listQueryTemplatesPagedCallable()Lists all QueryTemplates in a given project and location.Sample 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()) { ListQueryTemplatesRequest request = ListQueryTemplatesRequest.newBuilder() .setParent( DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); ApiFuture<QueryTemplate> future = analyticsHubServiceClient.listQueryTemplatesPagedCallable().futureCall(request); // Do something. for (QueryTemplate element : future.get().iterateAll()) { // doThingsWith(element); } } -
listQueryTemplatesCallable
public final UnaryCallable<ListQueryTemplatesRequest,ListQueryTemplatesResponse> listQueryTemplatesCallable()Lists all QueryTemplates in a given project and location.Sample 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()) { ListQueryTemplatesRequest request = ListQueryTemplatesRequest.newBuilder() .setParent( DataExchangeName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]").toString()) .setPageSize(883849137) .setPageToken("pageToken873572522") .build(); while (true) { ListQueryTemplatesResponse response = analyticsHubServiceClient.listQueryTemplatesCallable().call(request); for (QueryTemplate element : response.getQueryTemplatesList()) { // doThingsWith(element); } String nextPageToken = response.getNextPageToken(); if (!Strings.isNullOrEmpty(nextPageToken)) { request = request.toBuilder().setPageToken(nextPageToken).build(); } else { break; } } } -
updateQueryTemplate
public final QueryTemplate updateQueryTemplate(QueryTemplate queryTemplate, com.google.protobuf.FieldMask updateMask) Updates an existing QueryTemplateSample 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()) { QueryTemplate queryTemplate = QueryTemplate.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); QueryTemplate response = analyticsHubServiceClient.updateQueryTemplate(queryTemplate, updateMask); }- Parameters:
queryTemplate- Required. The QueryTemplate to update.updateMask- 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.- Throws:
ApiException- if the remote call fails
-
updateQueryTemplate
Updates an existing QueryTemplateSample 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()) { UpdateQueryTemplateRequest request = UpdateQueryTemplateRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setQueryTemplate(QueryTemplate.newBuilder().build()) .build(); QueryTemplate response = analyticsHubServiceClient.updateQueryTemplate(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
updateQueryTemplateCallable
Updates an existing QueryTemplateSample 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()) { UpdateQueryTemplateRequest request = UpdateQueryTemplateRequest.newBuilder() .setUpdateMask(FieldMask.newBuilder().build()) .setQueryTemplate(QueryTemplate.newBuilder().build()) .build(); ApiFuture<QueryTemplate> future = analyticsHubServiceClient.updateQueryTemplateCallable().futureCall(request); // Do something. QueryTemplate response = future.get(); } -
deleteQueryTemplate
Deletes a query template.Sample 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()) { QueryTemplateName name = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]"); analyticsHubServiceClient.deleteQueryTemplate(name); }- Parameters:
name- Required. The resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
deleteQueryTemplate
Deletes a query template.Sample 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 = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString(); analyticsHubServiceClient.deleteQueryTemplate(name); }- Parameters:
name- Required. The resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
deleteQueryTemplate
Deletes a query template.Sample 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()) { DeleteQueryTemplateRequest request = DeleteQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); analyticsHubServiceClient.deleteQueryTemplate(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
deleteQueryTemplateCallable
public final UnaryCallable<DeleteQueryTemplateRequest,com.google.protobuf.Empty> deleteQueryTemplateCallable()Deletes a query template.Sample 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()) { DeleteQueryTemplateRequest request = DeleteQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); ApiFuture<Empty> future = analyticsHubServiceClient.deleteQueryTemplateCallable().futureCall(request); // Do something. future.get(); } -
submitQueryTemplate
Submits a query template for approval.Sample 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()) { QueryTemplateName name = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]"); QueryTemplate response = analyticsHubServiceClient.submitQueryTemplate(name); }- Parameters:
name- Required. The resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
submitQueryTemplate
Submits a query template for approval.Sample 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 = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString(); QueryTemplate response = analyticsHubServiceClient.submitQueryTemplate(name); }- Parameters:
name- Required. The resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
submitQueryTemplate
Submits a query template for approval.Sample 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()) { SubmitQueryTemplateRequest request = SubmitQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); QueryTemplate response = analyticsHubServiceClient.submitQueryTemplate(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
submitQueryTemplateCallable
Submits a query template for approval.Sample 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()) { SubmitQueryTemplateRequest request = SubmitQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); ApiFuture<QueryTemplate> future = analyticsHubServiceClient.submitQueryTemplateCallable().futureCall(request); // Do something. QueryTemplate response = future.get(); } -
approveQueryTemplate
Approves a query template.Sample 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()) { QueryTemplateName name = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]"); QueryTemplate response = analyticsHubServiceClient.approveQueryTemplate(name); }- Parameters:
name- Required. The resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
approveQueryTemplate
Approves a query template.Sample 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 = QueryTemplateName.of("[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString(); QueryTemplate response = analyticsHubServiceClient.approveQueryTemplate(name); }- Parameters:
name- Required. The resource path of the QueryTemplate. e.g. `projects/myproject/locations/us/dataExchanges/123/queryTemplates/myqueryTemplate`.- Throws:
ApiException- if the remote call fails
-
approveQueryTemplate
Approves a query template.Sample 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()) { ApproveQueryTemplateRequest request = ApproveQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); QueryTemplate response = analyticsHubServiceClient.approveQueryTemplate(request); }- Parameters:
request- The request object containing all of the parameters for the API call.- Throws:
ApiException- if the remote call fails
-
approveQueryTemplateCallable
public final UnaryCallable<ApproveQueryTemplateRequest,QueryTemplate> approveQueryTemplateCallable()Approves a query template.Sample 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()) { ApproveQueryTemplateRequest request = ApproveQueryTemplateRequest.newBuilder() .setName( QueryTemplateName.of( "[PROJECT]", "[LOCATION]", "[DATA_EXCHANGE]", "[QUERY_TEMPLATE]") .toString()) .build(); ApiFuture<QueryTemplate> future = analyticsHubServiceClient.approveQueryTemplateCallable().futureCall(request); // Do something. QueryTemplate response = future.get(); } -
close
public final void close()- Specified by:
closein interfaceAutoCloseable
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceBackgroundResource
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceBackgroundResource
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminatedin interfaceBackgroundResource
-
shutdownNow
public void shutdownNow()- Specified by:
shutdownNowin interfaceBackgroundResource
-
awaitTermination
- Specified by:
awaitTerminationin interfaceBackgroundResource- Throws:
InterruptedException
-