@Generated(value="by gapic-generator-java") public class DataTaxonomyServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name);
}
Note: close() needs to be called on the DataTaxonomyServiceClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().
The surface of this class includes several types of Java methods for each of the API's methods:
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of DataTaxonomyServiceSettings 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
DataTaxonomyServiceSettings dataTaxonomyServiceSettings =
DataTaxonomyServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DataTaxonomyServiceClient dataTaxonomyServiceClient =
DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings);
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
DataTaxonomyServiceSettings dataTaxonomyServiceSettings =
DataTaxonomyServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DataTaxonomyServiceClient dataTaxonomyServiceClient =
DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings);
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
DataTaxonomyServiceSettings dataTaxonomyServiceSettings =
DataTaxonomyServiceSettings.newHttpJsonBuilder().build();
DataTaxonomyServiceClient dataTaxonomyServiceClient =
DataTaxonomyServiceClient.create(dataTaxonomyServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
DataTaxonomyServiceClient.ListDataAttributeBindingsFixedSizeCollection |
static class |
DataTaxonomyServiceClient.ListDataAttributeBindingsPage |
static class |
DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse |
static class |
DataTaxonomyServiceClient.ListDataAttributesFixedSizeCollection |
static class |
DataTaxonomyServiceClient.ListDataAttributesPage |
static class |
DataTaxonomyServiceClient.ListDataAttributesPagedResponse |
static class |
DataTaxonomyServiceClient.ListDataTaxonomiesFixedSizeCollection |
static class |
DataTaxonomyServiceClient.ListDataTaxonomiesPage |
static class |
DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse |
static class |
DataTaxonomyServiceClient.ListLocationsFixedSizeCollection |
static class |
DataTaxonomyServiceClient.ListLocationsPage |
static class |
DataTaxonomyServiceClient.ListLocationsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
DataTaxonomyServiceClient(DataTaxonomyServiceSettings settings)
Constructs an instance of DataTaxonomyServiceClient, using the given settings.
|
protected |
DataTaxonomyServiceClient(DataTaxonomyServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static DataTaxonomyServiceClient |
create()
Constructs an instance of DataTaxonomyServiceClient with default settings.
|
static DataTaxonomyServiceClient |
create(DataTaxonomyServiceSettings settings)
Constructs an instance of DataTaxonomyServiceClient, using the given settings.
|
static DataTaxonomyServiceClient |
create(DataTaxonomyServiceStub stub)
Constructs an instance of DataTaxonomyServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> |
createDataAttributeAsync(CreateDataAttributeRequest request)
Create a DataAttribute resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> |
createDataAttributeAsync(DataTaxonomyName parent,
DataAttribute dataAttribute,
String dataAttributeId)
Create a DataAttribute resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> |
createDataAttributeAsync(String parent,
DataAttribute dataAttribute,
String dataAttributeId)
Create a DataAttribute resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> |
createDataAttributeBindingAsync(CreateDataAttributeBindingRequest request)
Create a DataAttributeBinding resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> |
createDataAttributeBindingAsync(LocationName parent,
DataAttributeBinding dataAttributeBinding,
String dataAttributeBindingId)
Create a DataAttributeBinding resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> |
createDataAttributeBindingAsync(String parent,
DataAttributeBinding dataAttributeBinding,
String dataAttributeBindingId)
Create a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<CreateDataAttributeBindingRequest,com.google.longrunning.Operation> |
createDataAttributeBindingCallable()
Create a DataAttributeBinding resource.
|
com.google.api.gax.rpc.OperationCallable<CreateDataAttributeBindingRequest,DataAttributeBinding,OperationMetadata> |
createDataAttributeBindingOperationCallable()
Create a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<CreateDataAttributeRequest,com.google.longrunning.Operation> |
createDataAttributeCallable()
Create a DataAttribute resource.
|
com.google.api.gax.rpc.OperationCallable<CreateDataAttributeRequest,DataAttribute,OperationMetadata> |
createDataAttributeOperationCallable()
Create a DataAttribute resource.
|
com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> |
createDataTaxonomyAsync(CreateDataTaxonomyRequest request)
Create a DataTaxonomy resource.
|
com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> |
createDataTaxonomyAsync(LocationName parent,
DataTaxonomy dataTaxonomy,
String dataTaxonomyId)
Create a DataTaxonomy resource.
|
com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> |
createDataTaxonomyAsync(String parent,
DataTaxonomy dataTaxonomy,
String dataTaxonomyId)
Create a DataTaxonomy resource.
|
com.google.api.gax.rpc.UnaryCallable<CreateDataTaxonomyRequest,com.google.longrunning.Operation> |
createDataTaxonomyCallable()
Create a DataTaxonomy resource.
|
com.google.api.gax.rpc.OperationCallable<CreateDataTaxonomyRequest,DataTaxonomy,OperationMetadata> |
createDataTaxonomyOperationCallable()
Create a DataTaxonomy resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeAsync(DataAttributeName name)
Deletes a Data Attribute resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeAsync(DeleteDataAttributeRequest request)
Deletes a Data Attribute resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeAsync(String name)
Deletes a Data Attribute resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeBindingAsync(DataAttributeBindingName name)
Deletes a DataAttributeBinding resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeBindingAsync(DeleteDataAttributeBindingRequest request)
Deletes a DataAttributeBinding resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeBindingAsync(String name)
Deletes a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteDataAttributeBindingRequest,com.google.longrunning.Operation> |
deleteDataAttributeBindingCallable()
Deletes a DataAttributeBinding resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteDataAttributeBindingRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeBindingOperationCallable()
Deletes a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteDataAttributeRequest,com.google.longrunning.Operation> |
deleteDataAttributeCallable()
Deletes a Data Attribute resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteDataAttributeRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteDataAttributeOperationCallable()
Deletes a Data Attribute resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataTaxonomyAsync(DataTaxonomyName name)
Deletes a DataTaxonomy resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataTaxonomyAsync(DeleteDataTaxonomyRequest request)
Deletes a DataTaxonomy resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteDataTaxonomyAsync(String name)
Deletes a DataTaxonomy resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteDataTaxonomyRequest,com.google.longrunning.Operation> |
deleteDataTaxonomyCallable()
Deletes a DataTaxonomy resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteDataTaxonomyRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteDataTaxonomyOperationCallable()
Deletes a DataTaxonomy resource.
|
DataAttribute |
getDataAttribute(DataAttributeName name)
Retrieves a Data Attribute resource.
|
DataAttribute |
getDataAttribute(GetDataAttributeRequest request)
Retrieves a Data Attribute resource.
|
DataAttribute |
getDataAttribute(String name)
Retrieves a Data Attribute resource.
|
DataAttributeBinding |
getDataAttributeBinding(DataAttributeBindingName name)
Retrieves a DataAttributeBinding resource.
|
DataAttributeBinding |
getDataAttributeBinding(GetDataAttributeBindingRequest request)
Retrieves a DataAttributeBinding resource.
|
DataAttributeBinding |
getDataAttributeBinding(String name)
Retrieves a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<GetDataAttributeBindingRequest,DataAttributeBinding> |
getDataAttributeBindingCallable()
Retrieves a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<GetDataAttributeRequest,DataAttribute> |
getDataAttributeCallable()
Retrieves a Data Attribute resource.
|
DataTaxonomy |
getDataTaxonomy(DataTaxonomyName name)
Retrieves a DataTaxonomy resource.
|
DataTaxonomy |
getDataTaxonomy(GetDataTaxonomyRequest request)
Retrieves a DataTaxonomy resource.
|
DataTaxonomy |
getDataTaxonomy(String name)
Retrieves a DataTaxonomy resource.
|
com.google.api.gax.rpc.UnaryCallable<GetDataTaxonomyRequest,DataTaxonomy> |
getDataTaxonomyCallable()
Retrieves a DataTaxonomy resource.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
DataTaxonomyServiceSettings |
getSettings() |
DataTaxonomyServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse |
listDataAttributeBindings(ListDataAttributeBindingsRequest request)
Lists DataAttributeBinding resources in a project and location.
|
DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse |
listDataAttributeBindings(LocationName parent)
Lists DataAttributeBinding resources in a project and location.
|
DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse |
listDataAttributeBindings(String parent)
Lists DataAttributeBinding resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListDataAttributeBindingsRequest,ListDataAttributeBindingsResponse> |
listDataAttributeBindingsCallable()
Lists DataAttributeBinding resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListDataAttributeBindingsRequest,DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse> |
listDataAttributeBindingsPagedCallable()
Lists DataAttributeBinding resources in a project and location.
|
DataTaxonomyServiceClient.ListDataAttributesPagedResponse |
listDataAttributes(DataTaxonomyName parent)
Lists Data Attribute resources in a DataTaxonomy.
|
DataTaxonomyServiceClient.ListDataAttributesPagedResponse |
listDataAttributes(ListDataAttributesRequest request)
Lists Data Attribute resources in a DataTaxonomy.
|
DataTaxonomyServiceClient.ListDataAttributesPagedResponse |
listDataAttributes(String parent)
Lists Data Attribute resources in a DataTaxonomy.
|
com.google.api.gax.rpc.UnaryCallable<ListDataAttributesRequest,ListDataAttributesResponse> |
listDataAttributesCallable()
Lists Data Attribute resources in a DataTaxonomy.
|
com.google.api.gax.rpc.UnaryCallable<ListDataAttributesRequest,DataTaxonomyServiceClient.ListDataAttributesPagedResponse> |
listDataAttributesPagedCallable()
Lists Data Attribute resources in a DataTaxonomy.
|
DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse |
listDataTaxonomies(ListDataTaxonomiesRequest request)
Lists DataTaxonomy resources in a project and location.
|
DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse |
listDataTaxonomies(LocationName parent)
Lists DataTaxonomy resources in a project and location.
|
DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse |
listDataTaxonomies(String parent)
Lists DataTaxonomy resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListDataTaxonomiesRequest,ListDataTaxonomiesResponse> |
listDataTaxonomiesCallable()
Lists DataTaxonomy resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListDataTaxonomiesRequest,DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse> |
listDataTaxonomiesPagedCallable()
Lists DataTaxonomy resources in a project and location.
|
DataTaxonomyServiceClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,DataTaxonomyServiceClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> |
updateDataAttributeAsync(DataAttribute dataAttribute,
com.google.protobuf.FieldMask updateMask)
Updates a DataAttribute resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> |
updateDataAttributeAsync(UpdateDataAttributeRequest request)
Updates a DataAttribute resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> |
updateDataAttributeBindingAsync(DataAttributeBinding dataAttributeBinding,
com.google.protobuf.FieldMask updateMask)
Updates a DataAttributeBinding resource.
|
com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> |
updateDataAttributeBindingAsync(UpdateDataAttributeBindingRequest request)
Updates a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateDataAttributeBindingRequest,com.google.longrunning.Operation> |
updateDataAttributeBindingCallable()
Updates a DataAttributeBinding resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateDataAttributeBindingRequest,DataAttributeBinding,OperationMetadata> |
updateDataAttributeBindingOperationCallable()
Updates a DataAttributeBinding resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateDataAttributeRequest,com.google.longrunning.Operation> |
updateDataAttributeCallable()
Updates a DataAttribute resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateDataAttributeRequest,DataAttribute,OperationMetadata> |
updateDataAttributeOperationCallable()
Updates a DataAttribute resource.
|
com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> |
updateDataTaxonomyAsync(DataTaxonomy dataTaxonomy,
com.google.protobuf.FieldMask updateMask)
Updates a DataTaxonomy resource.
|
com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> |
updateDataTaxonomyAsync(UpdateDataTaxonomyRequest request)
Updates a DataTaxonomy resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateDataTaxonomyRequest,com.google.longrunning.Operation> |
updateDataTaxonomyCallable()
Updates a DataTaxonomy resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateDataTaxonomyRequest,DataTaxonomy,OperationMetadata> |
updateDataTaxonomyOperationCallable()
Updates a DataTaxonomy resource.
|
protected DataTaxonomyServiceClient(DataTaxonomyServiceSettings settings) throws IOException
IOExceptionprotected DataTaxonomyServiceClient(DataTaxonomyServiceStub stub)
public static final DataTaxonomyServiceClient create() throws IOException
IOExceptionpublic static final DataTaxonomyServiceClient create(DataTaxonomyServiceSettings settings) throws IOException
IOExceptionpublic static final DataTaxonomyServiceClient create(DataTaxonomyServiceStub stub)
public final DataTaxonomyServiceSettings getSettings()
public DataTaxonomyServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> createDataTaxonomyAsync(LocationName parent, DataTaxonomy dataTaxonomy, String dataTaxonomyId)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build();
String dataTaxonomyId = "dataTaxonomyId987458454";
DataTaxonomy response =
dataTaxonomyServiceClient
.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId)
.get();
}
parent - Required. The resource name of the data taxonomy location, of the form:
projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
region.dataTaxonomy - Required. DataTaxonomy resource.dataTaxonomyId - Required. DataTaxonomy identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> createDataTaxonomyAsync(String parent, DataTaxonomy dataTaxonomy, String dataTaxonomyId)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build();
String dataTaxonomyId = "dataTaxonomyId987458454";
DataTaxonomy response =
dataTaxonomyServiceClient
.createDataTaxonomyAsync(parent, dataTaxonomy, dataTaxonomyId)
.get();
}
parent - Required. The resource name of the data taxonomy location, of the form:
projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
region.dataTaxonomy - Required. DataTaxonomy resource.dataTaxonomyId - Required. DataTaxonomy identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> createDataTaxonomyAsync(CreateDataTaxonomyRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataTaxonomyRequest request =
CreateDataTaxonomyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataTaxonomyId("dataTaxonomyId987458454")
.setDataTaxonomy(DataTaxonomy.newBuilder().build())
.setValidateOnly(true)
.build();
DataTaxonomy response = dataTaxonomyServiceClient.createDataTaxonomyAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateDataTaxonomyRequest,DataTaxonomy,OperationMetadata> createDataTaxonomyOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataTaxonomyRequest request =
CreateDataTaxonomyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataTaxonomyId("dataTaxonomyId987458454")
.setDataTaxonomy(DataTaxonomy.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<DataTaxonomy, OperationMetadata> future =
dataTaxonomyServiceClient.createDataTaxonomyOperationCallable().futureCall(request);
// Do something.
DataTaxonomy response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateDataTaxonomyRequest,com.google.longrunning.Operation> createDataTaxonomyCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataTaxonomyRequest request =
CreateDataTaxonomyRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataTaxonomyId("dataTaxonomyId987458454")
.setDataTaxonomy(DataTaxonomy.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.createDataTaxonomyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> updateDataTaxonomyAsync(DataTaxonomy dataTaxonomy, com.google.protobuf.FieldMask updateMask)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataTaxonomy dataTaxonomy = DataTaxonomy.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DataTaxonomy response =
dataTaxonomyServiceClient.updateDataTaxonomyAsync(dataTaxonomy, updateMask).get();
}
dataTaxonomy - Required. Only fields specified in `update_mask` are updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataTaxonomy,OperationMetadata> updateDataTaxonomyAsync(UpdateDataTaxonomyRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataTaxonomyRequest request =
UpdateDataTaxonomyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataTaxonomy(DataTaxonomy.newBuilder().build())
.setValidateOnly(true)
.build();
DataTaxonomy response = dataTaxonomyServiceClient.updateDataTaxonomyAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateDataTaxonomyRequest,DataTaxonomy,OperationMetadata> updateDataTaxonomyOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataTaxonomyRequest request =
UpdateDataTaxonomyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataTaxonomy(DataTaxonomy.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<DataTaxonomy, OperationMetadata> future =
dataTaxonomyServiceClient.updateDataTaxonomyOperationCallable().futureCall(request);
// Do something.
DataTaxonomy response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateDataTaxonomyRequest,com.google.longrunning.Operation> updateDataTaxonomyCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataTaxonomyRequest request =
UpdateDataTaxonomyRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataTaxonomy(DataTaxonomy.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.updateDataTaxonomyCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataTaxonomyAsync(DataTaxonomyName name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
dataTaxonomyServiceClient.deleteDataTaxonomyAsync(name).get();
}
name - Required. The resource name of the DataTaxonomy:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataTaxonomyAsync(String name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
dataTaxonomyServiceClient.deleteDataTaxonomyAsync(name).get();
}
name - Required. The resource name of the DataTaxonomy:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataTaxonomyAsync(DeleteDataTaxonomyRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataTaxonomyRequest request =
DeleteDataTaxonomyRequest.newBuilder()
.setName(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setEtag("etag3123477")
.build();
dataTaxonomyServiceClient.deleteDataTaxonomyAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteDataTaxonomyRequest,com.google.protobuf.Empty,OperationMetadata> deleteDataTaxonomyOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataTaxonomyRequest request =
DeleteDataTaxonomyRequest.newBuilder()
.setName(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
dataTaxonomyServiceClient.deleteDataTaxonomyOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteDataTaxonomyRequest,com.google.longrunning.Operation> deleteDataTaxonomyCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataTaxonomyRequest request =
DeleteDataTaxonomyRequest.newBuilder()
.setName(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.deleteDataTaxonomyCallable().futureCall(request);
// Do something.
future.get();
}
public final DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse listDataTaxonomies(LocationName parent)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (DataTaxonomy element :
dataTaxonomyServiceClient.listDataTaxonomies(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the DataTaxonomy location, of the form:
projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
region.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse listDataTaxonomies(String parent)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (DataTaxonomy element :
dataTaxonomyServiceClient.listDataTaxonomies(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the DataTaxonomy location, of the form:
projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
region.com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse listDataTaxonomies(ListDataTaxonomiesRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataTaxonomiesRequest request =
ListDataTaxonomiesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (DataTaxonomy element :
dataTaxonomyServiceClient.listDataTaxonomies(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDataTaxonomiesRequest,DataTaxonomyServiceClient.ListDataTaxonomiesPagedResponse> listDataTaxonomiesPagedCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataTaxonomiesRequest request =
ListDataTaxonomiesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DataTaxonomy> future =
dataTaxonomyServiceClient.listDataTaxonomiesPagedCallable().futureCall(request);
// Do something.
for (DataTaxonomy element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDataTaxonomiesRequest,ListDataTaxonomiesResponse> listDataTaxonomiesCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataTaxonomiesRequest request =
ListDataTaxonomiesRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDataTaxonomiesResponse response =
dataTaxonomyServiceClient.listDataTaxonomiesCallable().call(request);
for (DataTaxonomy element : response.getDataTaxonomiesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final DataTaxonomy getDataTaxonomy(DataTaxonomyName name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataTaxonomyName name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name);
}
name - Required. The resource name of the DataTaxonomy:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomy getDataTaxonomy(String name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String name = DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(name);
}
name - Required. The resource name of the DataTaxonomy:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomy getDataTaxonomy(GetDataTaxonomyRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetDataTaxonomyRequest request =
GetDataTaxonomyRequest.newBuilder()
.setName(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.build();
DataTaxonomy response = dataTaxonomyServiceClient.getDataTaxonomy(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataTaxonomyRequest,DataTaxonomy> getDataTaxonomyCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetDataTaxonomyRequest request =
GetDataTaxonomyRequest.newBuilder()
.setName(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.build();
ApiFuture<DataTaxonomy> future =
dataTaxonomyServiceClient.getDataTaxonomyCallable().futureCall(request);
// Do something.
DataTaxonomy response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> createDataAttributeBindingAsync(LocationName parent, DataAttributeBinding dataAttributeBinding, String dataAttributeBindingId)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build();
String dataAttributeBindingId = "dataAttributeBindingId1952425102";
DataAttributeBinding response =
dataTaxonomyServiceClient
.createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId)
.get();
}
parent - Required. The resource name of the parent data taxonomy
projects/{project_number}/locations/{location_id}dataAttributeBinding - Required. DataAttributeBinding resource.dataAttributeBindingId - Required. DataAttributeBinding identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> createDataAttributeBindingAsync(String parent, DataAttributeBinding dataAttributeBinding, String dataAttributeBindingId)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build();
String dataAttributeBindingId = "dataAttributeBindingId1952425102";
DataAttributeBinding response =
dataTaxonomyServiceClient
.createDataAttributeBindingAsync(parent, dataAttributeBinding, dataAttributeBindingId)
.get();
}
parent - Required. The resource name of the parent data taxonomy
projects/{project_number}/locations/{location_id}dataAttributeBinding - Required. DataAttributeBinding resource.dataAttributeBindingId - Required. DataAttributeBinding identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> createDataAttributeBindingAsync(CreateDataAttributeBindingRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataAttributeBindingRequest request =
CreateDataAttributeBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataAttributeBindingId("dataAttributeBindingId1952425102")
.setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
.setValidateOnly(true)
.build();
DataAttributeBinding response =
dataTaxonomyServiceClient.createDataAttributeBindingAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateDataAttributeBindingRequest,DataAttributeBinding,OperationMetadata> createDataAttributeBindingOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataAttributeBindingRequest request =
CreateDataAttributeBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataAttributeBindingId("dataAttributeBindingId1952425102")
.setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<DataAttributeBinding, OperationMetadata> future =
dataTaxonomyServiceClient
.createDataAttributeBindingOperationCallable()
.futureCall(request);
// Do something.
DataAttributeBinding response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateDataAttributeBindingRequest,com.google.longrunning.Operation> createDataAttributeBindingCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataAttributeBindingRequest request =
CreateDataAttributeBindingRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataAttributeBindingId("dataAttributeBindingId1952425102")
.setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.createDataAttributeBindingCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> updateDataAttributeBindingAsync(DataAttributeBinding dataAttributeBinding, com.google.protobuf.FieldMask updateMask)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataAttributeBinding dataAttributeBinding = DataAttributeBinding.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DataAttributeBinding response =
dataTaxonomyServiceClient
.updateDataAttributeBindingAsync(dataAttributeBinding, updateMask)
.get();
}
dataAttributeBinding - Required. Only fields specified in `update_mask` are updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataAttributeBinding,OperationMetadata> updateDataAttributeBindingAsync(UpdateDataAttributeBindingRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataAttributeBindingRequest request =
UpdateDataAttributeBindingRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
.setValidateOnly(true)
.build();
DataAttributeBinding response =
dataTaxonomyServiceClient.updateDataAttributeBindingAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateDataAttributeBindingRequest,DataAttributeBinding,OperationMetadata> updateDataAttributeBindingOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataAttributeBindingRequest request =
UpdateDataAttributeBindingRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<DataAttributeBinding, OperationMetadata> future =
dataTaxonomyServiceClient
.updateDataAttributeBindingOperationCallable()
.futureCall(request);
// Do something.
DataAttributeBinding response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateDataAttributeBindingRequest,com.google.longrunning.Operation> updateDataAttributeBindingCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataAttributeBindingRequest request =
UpdateDataAttributeBindingRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataAttributeBinding(DataAttributeBinding.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.updateDataAttributeBindingCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeBindingAsync(DataAttributeBindingName name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataAttributeBindingName name =
DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]");
dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(name).get();
}
name - Required. The resource name of the DataAttributeBinding:
projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeBindingAsync(String name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String name =
DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
.toString();
dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(name).get();
}
name - Required. The resource name of the DataAttributeBinding:
projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeBindingAsync(DeleteDataAttributeBindingRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataAttributeBindingRequest request =
DeleteDataAttributeBindingRequest.newBuilder()
.setName(
DataAttributeBindingName.of(
"[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
.toString())
.setEtag("etag3123477")
.build();
dataTaxonomyServiceClient.deleteDataAttributeBindingAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteDataAttributeBindingRequest,com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeBindingOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataAttributeBindingRequest request =
DeleteDataAttributeBindingRequest.newBuilder()
.setName(
DataAttributeBindingName.of(
"[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
.toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
dataTaxonomyServiceClient
.deleteDataAttributeBindingOperationCallable()
.futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteDataAttributeBindingRequest,com.google.longrunning.Operation> deleteDataAttributeBindingCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataAttributeBindingRequest request =
DeleteDataAttributeBindingRequest.newBuilder()
.setName(
DataAttributeBindingName.of(
"[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.deleteDataAttributeBindingCallable().futureCall(request);
// Do something.
future.get();
}
public final DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse listDataAttributeBindings(LocationName parent)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (DataAttributeBinding element :
dataTaxonomyServiceClient.listDataAttributeBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the Location:
projects/{project_number}/locations/{location_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse listDataAttributeBindings(String parent)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (DataAttributeBinding element :
dataTaxonomyServiceClient.listDataAttributeBindings(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the Location:
projects/{project_number}/locations/{location_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse listDataAttributeBindings(ListDataAttributeBindingsRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataAttributeBindingsRequest request =
ListDataAttributeBindingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (DataAttributeBinding element :
dataTaxonomyServiceClient.listDataAttributeBindings(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDataAttributeBindingsRequest,DataTaxonomyServiceClient.ListDataAttributeBindingsPagedResponse> listDataAttributeBindingsPagedCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataAttributeBindingsRequest request =
ListDataAttributeBindingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DataAttributeBinding> future =
dataTaxonomyServiceClient.listDataAttributeBindingsPagedCallable().futureCall(request);
// Do something.
for (DataAttributeBinding element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDataAttributeBindingsRequest,ListDataAttributeBindingsResponse> listDataAttributeBindingsCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataAttributeBindingsRequest request =
ListDataAttributeBindingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDataAttributeBindingsResponse response =
dataTaxonomyServiceClient.listDataAttributeBindingsCallable().call(request);
for (DataAttributeBinding element : response.getDataAttributeBindingsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final DataAttributeBinding getDataAttributeBinding(DataAttributeBindingName name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataAttributeBindingName name =
DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]");
DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(name);
}
name - Required. The resource name of the DataAttributeBinding:
projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataAttributeBinding getDataAttributeBinding(String name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String name =
DataAttributeBindingName.of("[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
.toString();
DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(name);
}
name - Required. The resource name of the DataAttributeBinding:
projects/{project_number}/locations/{location_id}/dataAttributeBindings/{data_attribute_binding_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataAttributeBinding getDataAttributeBinding(GetDataAttributeBindingRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetDataAttributeBindingRequest request =
GetDataAttributeBindingRequest.newBuilder()
.setName(
DataAttributeBindingName.of(
"[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
.toString())
.build();
DataAttributeBinding response = dataTaxonomyServiceClient.getDataAttributeBinding(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataAttributeBindingRequest,DataAttributeBinding> getDataAttributeBindingCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetDataAttributeBindingRequest request =
GetDataAttributeBindingRequest.newBuilder()
.setName(
DataAttributeBindingName.of(
"[PROJECT]", "[LOCATION]", "[DATA_ATTRIBUTE_BINDING_ID]")
.toString())
.build();
ApiFuture<DataAttributeBinding> future =
dataTaxonomyServiceClient.getDataAttributeBindingCallable().futureCall(request);
// Do something.
DataAttributeBinding response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> createDataAttributeAsync(DataTaxonomyName parent, DataAttribute dataAttribute, String dataAttributeId)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataTaxonomyName parent =
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
DataAttribute dataAttribute = DataAttribute.newBuilder().build();
String dataAttributeId = "dataAttributeId-44128563";
DataAttribute response =
dataTaxonomyServiceClient
.createDataAttributeAsync(parent, dataAttribute, dataAttributeId)
.get();
}
parent - Required. The resource name of the parent data taxonomy
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}dataAttribute - Required. DataAttribute resource.dataAttributeId - Required. DataAttribute identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> createDataAttributeAsync(String parent, DataAttribute dataAttribute, String dataAttributeId)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String parent =
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
DataAttribute dataAttribute = DataAttribute.newBuilder().build();
String dataAttributeId = "dataAttributeId-44128563";
DataAttribute response =
dataTaxonomyServiceClient
.createDataAttributeAsync(parent, dataAttribute, dataAttributeId)
.get();
}
parent - Required. The resource name of the parent data taxonomy
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}dataAttribute - Required. DataAttribute resource.dataAttributeId - Required. DataAttribute identifier.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> createDataAttributeAsync(CreateDataAttributeRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataAttributeRequest request =
CreateDataAttributeRequest.newBuilder()
.setParent(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setDataAttributeId("dataAttributeId-44128563")
.setDataAttribute(DataAttribute.newBuilder().build())
.setValidateOnly(true)
.build();
DataAttribute response = dataTaxonomyServiceClient.createDataAttributeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateDataAttributeRequest,DataAttribute,OperationMetadata> createDataAttributeOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataAttributeRequest request =
CreateDataAttributeRequest.newBuilder()
.setParent(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setDataAttributeId("dataAttributeId-44128563")
.setDataAttribute(DataAttribute.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<DataAttribute, OperationMetadata> future =
dataTaxonomyServiceClient.createDataAttributeOperationCallable().futureCall(request);
// Do something.
DataAttribute response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateDataAttributeRequest,com.google.longrunning.Operation> createDataAttributeCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
CreateDataAttributeRequest request =
CreateDataAttributeRequest.newBuilder()
.setParent(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setDataAttributeId("dataAttributeId-44128563")
.setDataAttribute(DataAttribute.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.createDataAttributeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> updateDataAttributeAsync(DataAttribute dataAttribute, com.google.protobuf.FieldMask updateMask)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataAttribute dataAttribute = DataAttribute.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
DataAttribute response =
dataTaxonomyServiceClient.updateDataAttributeAsync(dataAttribute, updateMask).get();
}
dataAttribute - Required. Only fields specified in `update_mask` are updated.updateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<DataAttribute,OperationMetadata> updateDataAttributeAsync(UpdateDataAttributeRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataAttributeRequest request =
UpdateDataAttributeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataAttribute(DataAttribute.newBuilder().build())
.setValidateOnly(true)
.build();
DataAttribute response = dataTaxonomyServiceClient.updateDataAttributeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateDataAttributeRequest,DataAttribute,OperationMetadata> updateDataAttributeOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataAttributeRequest request =
UpdateDataAttributeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataAttribute(DataAttribute.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<DataAttribute, OperationMetadata> future =
dataTaxonomyServiceClient.updateDataAttributeOperationCallable().futureCall(request);
// Do something.
DataAttribute response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateDataAttributeRequest,com.google.longrunning.Operation> updateDataAttributeCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
UpdateDataAttributeRequest request =
UpdateDataAttributeRequest.newBuilder()
.setUpdateMask(FieldMask.newBuilder().build())
.setDataAttribute(DataAttribute.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.updateDataAttributeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeAsync(DataAttributeName name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataAttributeName name =
DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]");
dataTaxonomyServiceClient.deleteDataAttributeAsync(name).get();
}
name - Required. The resource name of the DataAttribute:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeAsync(String name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String name =
DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
.toString();
dataTaxonomyServiceClient.deleteDataAttributeAsync(name).get();
}
name - Required. The resource name of the DataAttribute:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeAsync(DeleteDataAttributeRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataAttributeRequest request =
DeleteDataAttributeRequest.newBuilder()
.setName(
DataAttributeName.of(
"[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
.toString())
.setEtag("etag3123477")
.build();
dataTaxonomyServiceClient.deleteDataAttributeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteDataAttributeRequest,com.google.protobuf.Empty,OperationMetadata> deleteDataAttributeOperationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataAttributeRequest request =
DeleteDataAttributeRequest.newBuilder()
.setName(
DataAttributeName.of(
"[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
.toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
dataTaxonomyServiceClient.deleteDataAttributeOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteDataAttributeRequest,com.google.longrunning.Operation> deleteDataAttributeCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DeleteDataAttributeRequest request =
DeleteDataAttributeRequest.newBuilder()
.setName(
DataAttributeName.of(
"[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
.toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
dataTaxonomyServiceClient.deleteDataAttributeCallable().futureCall(request);
// Do something.
future.get();
}
public final DataTaxonomyServiceClient.ListDataAttributesPagedResponse listDataAttributes(DataTaxonomyName parent)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataTaxonomyName parent =
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]");
for (DataAttribute element :
dataTaxonomyServiceClient.listDataAttributes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the DataTaxonomy:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomyServiceClient.ListDataAttributesPagedResponse listDataAttributes(String parent)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String parent =
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString();
for (DataAttribute element :
dataTaxonomyServiceClient.listDataAttributes(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the DataTaxonomy:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{data_taxonomy_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataTaxonomyServiceClient.ListDataAttributesPagedResponse listDataAttributes(ListDataAttributesRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataAttributesRequest request =
ListDataAttributesRequest.newBuilder()
.setParent(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
for (DataAttribute element :
dataTaxonomyServiceClient.listDataAttributes(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListDataAttributesRequest,DataTaxonomyServiceClient.ListDataAttributesPagedResponse> listDataAttributesPagedCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataAttributesRequest request =
ListDataAttributesRequest.newBuilder()
.setParent(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DataAttribute> future =
dataTaxonomyServiceClient.listDataAttributesPagedCallable().futureCall(request);
// Do something.
for (DataAttribute element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListDataAttributesRequest,ListDataAttributesResponse> listDataAttributesCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListDataAttributesRequest request =
ListDataAttributesRequest.newBuilder()
.setParent(
DataTaxonomyName.of("[PROJECT]", "[LOCATION]", "[DATA_TAXONOMY_ID]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setFilter("filter-1274492040")
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDataAttributesResponse response =
dataTaxonomyServiceClient.listDataAttributesCallable().call(request);
for (DataAttribute element : response.getDataAttributesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final DataAttribute getDataAttribute(DataAttributeName name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
DataAttributeName name =
DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]");
DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(name);
}
name - Required. The resource name of the dataAttribute:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataAttribute getDataAttribute(String name)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
String name =
DataAttributeName.of("[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
.toString();
DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(name);
}
name - Required. The resource name of the dataAttribute:
projects/{project_number}/locations/{location_id}/dataTaxonomies/{dataTaxonomy}/attributes/{data_attribute_id}com.google.api.gax.rpc.ApiException - if the remote call failspublic final DataAttribute getDataAttribute(GetDataAttributeRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetDataAttributeRequest request =
GetDataAttributeRequest.newBuilder()
.setName(
DataAttributeName.of(
"[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
.toString())
.build();
DataAttribute response = dataTaxonomyServiceClient.getDataAttribute(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetDataAttributeRequest,DataAttribute> getDataAttributeCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetDataAttributeRequest request =
GetDataAttributeRequest.newBuilder()
.setName(
DataAttributeName.of(
"[PROJECT]", "[LOCATION]", "[DATATAXONOMY]", "[DATA_ATTRIBUTE_ID]")
.toString())
.build();
ApiFuture<DataAttribute> future =
dataTaxonomyServiceClient.getDataAttributeCallable().futureCall(request);
// Do something.
DataAttribute response = future.get();
}
public final DataTaxonomyServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : dataTaxonomyServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,DataTaxonomyServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
dataTaxonomyServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
dataTaxonomyServiceClient.listLocationsCallable().call(request);
for (Location element : response.getLocationsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = dataTaxonomyServiceClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
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 (DataTaxonomyServiceClient dataTaxonomyServiceClient = DataTaxonomyServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
dataTaxonomyServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2023 Google LLC. All rights reserved.