- 3.49.0 (latest)
- 3.48.0
- 3.47.0
- 3.46.0
- 3.45.0
- 3.44.0
- 3.43.0
- 3.42.0
- 3.41.0
- 3.40.0
- 3.38.0
- 3.37.0
- 3.36.0
- 3.35.0
- 3.34.0
- 3.33.0
- 3.32.0
- 3.31.0
- 3.30.0
- 3.29.0
- 3.28.0
- 3.25.0
- 3.24.0
- 3.23.0
- 3.22.0
- 3.21.0
- 3.20.0
- 3.19.0
- 3.18.0
- 3.17.0
- 3.16.0
- 3.15.0
- 3.14.0
- 3.13.0
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.0
- 3.5.0
- 3.4.2
- 3.3.0
- 3.2.0
- 3.0.0
- 2.9.8
- 2.8.9
- 2.7.4
- 2.5.3
- 2.4.0
public class DatasetServiceClient implements BackgroundResource
Service Description: The service that handles the CRUD of Vertex AI Dataset and its child resources.
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:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
Dataset response = datasetServiceClient.getDataset(name);
}
Note: close() needs to be called on the DatasetServiceClient 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:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of DatasetServiceSettings to create(). For example:
To customize credentials:
DatasetServiceSettings datasetServiceSettings =
DatasetServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
DatasetServiceClient datasetServiceClient = DatasetServiceClient.create(datasetServiceSettings);
To customize the endpoint:
DatasetServiceSettings datasetServiceSettings =
DatasetServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
DatasetServiceClient datasetServiceClient = DatasetServiceClient.create(datasetServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Implements
BackgroundResourceStatic Methods
create()
public static final DatasetServiceClient create()
Constructs an instance of DatasetServiceClient with default settings.
Type | Description |
DatasetServiceClient |
Type | Description |
IOException |
create(DatasetServiceSettings settings)
public static final DatasetServiceClient create(DatasetServiceSettings settings)
Constructs an instance of DatasetServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Name | Description |
settings | DatasetServiceSettings |
Type | Description |
DatasetServiceClient |
Type | Description |
IOException |
create(DatasetServiceStub stub)
public static final DatasetServiceClient create(DatasetServiceStub stub)
Constructs an instance of DatasetServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(DatasetServiceSettings).
Name | Description |
stub | DatasetServiceStub |
Type | Description |
DatasetServiceClient |
Constructors
DatasetServiceClient(DatasetServiceSettings settings)
protected DatasetServiceClient(DatasetServiceSettings settings)
Constructs an instance of DatasetServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Name | Description |
settings | DatasetServiceSettings |
DatasetServiceClient(DatasetServiceStub stub)
protected DatasetServiceClient(DatasetServiceStub stub)
Name | Description |
stub | DatasetServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Name | Description |
duration | long |
unit | TimeUnit |
Type | Description |
boolean |
Type | Description |
InterruptedException |
close()
public final void close()
createDatasetAsync(CreateDatasetRequest request)
public final OperationFuture<Dataset,CreateDatasetOperationMetadata> createDatasetAsync(CreateDatasetRequest request)
Creates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
CreateDatasetRequest request =
CreateDatasetRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataset(Dataset.newBuilder().build())
.build();
Dataset response = datasetServiceClient.createDatasetAsync(request).get();
}
Name | Description |
request | CreateDatasetRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Dataset,CreateDatasetOperationMetadata> |
createDatasetAsync(LocationName parent, Dataset dataset)
public final OperationFuture<Dataset,CreateDatasetOperationMetadata> createDatasetAsync(LocationName parent, Dataset dataset)
Creates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
Dataset dataset = Dataset.newBuilder().build();
Dataset response = datasetServiceClient.createDatasetAsync(parent, dataset).get();
}
Name | Description |
parent | LocationName Required. The resource name of the Location to create the Dataset in. Format:
|
dataset | Dataset Required. The Dataset to create. |
Type | Description |
OperationFuture<Dataset,CreateDatasetOperationMetadata> |
createDatasetAsync(String parent, Dataset dataset)
public final OperationFuture<Dataset,CreateDatasetOperationMetadata> createDatasetAsync(String parent, Dataset dataset)
Creates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
Dataset dataset = Dataset.newBuilder().build();
Dataset response = datasetServiceClient.createDatasetAsync(parent, dataset).get();
}
Name | Description |
parent | String Required. The resource name of the Location to create the Dataset in. Format:
|
dataset | Dataset Required. The Dataset to create. |
Type | Description |
OperationFuture<Dataset,CreateDatasetOperationMetadata> |
createDatasetCallable()
public final UnaryCallable<CreateDatasetRequest,Operation> createDatasetCallable()
Creates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
CreateDatasetRequest request =
CreateDatasetRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataset(Dataset.newBuilder().build())
.build();
ApiFuture<Operation> future =
datasetServiceClient.createDatasetCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<CreateDatasetRequest,Operation> |
createDatasetOperationCallable()
public final OperationCallable<CreateDatasetRequest,Dataset,CreateDatasetOperationMetadata> createDatasetOperationCallable()
Creates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
CreateDatasetRequest request =
CreateDatasetRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setDataset(Dataset.newBuilder().build())
.build();
OperationFuture<Dataset, CreateDatasetOperationMetadata> future =
datasetServiceClient.createDatasetOperationCallable().futureCall(request);
// Do something.
Dataset response = future.get();
}
Type | Description |
OperationCallable<CreateDatasetRequest,Dataset,CreateDatasetOperationMetadata> |
deleteDatasetAsync(DatasetName name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteDatasetAsync(DatasetName name)
Deletes a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
datasetServiceClient.deleteDatasetAsync(name).get();
}
Name | Description |
name | DatasetName Required. The resource name of the Dataset to delete. Format:
|
Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
deleteDatasetAsync(DeleteDatasetRequest request)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteDatasetAsync(DeleteDatasetRequest request)
Deletes a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DeleteDatasetRequest request =
DeleteDatasetRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.build();
datasetServiceClient.deleteDatasetAsync(request).get();
}
Name | Description |
request | DeleteDatasetRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
deleteDatasetAsync(String name)
public final OperationFuture<Empty,DeleteOperationMetadata> deleteDatasetAsync(String name)
Deletes a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
datasetServiceClient.deleteDatasetAsync(name).get();
}
Name | Description |
name | String Required. The resource name of the Dataset to delete. Format:
|
Type | Description |
OperationFuture<Empty,DeleteOperationMetadata> |
deleteDatasetCallable()
public final UnaryCallable<DeleteDatasetRequest,Operation> deleteDatasetCallable()
Deletes a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DeleteDatasetRequest request =
DeleteDatasetRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.build();
ApiFuture<Operation> future =
datasetServiceClient.deleteDatasetCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
UnaryCallable<DeleteDatasetRequest,Operation> |
deleteDatasetOperationCallable()
public final OperationCallable<DeleteDatasetRequest,Empty,DeleteOperationMetadata> deleteDatasetOperationCallable()
Deletes a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DeleteDatasetRequest request =
DeleteDatasetRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.build();
OperationFuture<Empty, DeleteOperationMetadata> future =
datasetServiceClient.deleteDatasetOperationCallable().futureCall(request);
// Do something.
future.get();
}
Type | Description |
OperationCallable<DeleteDatasetRequest,Empty,DeleteOperationMetadata> |
exportDataAsync(DatasetName name, ExportDataConfig exportConfig)
public final OperationFuture<ExportDataResponse,ExportDataOperationMetadata> exportDataAsync(DatasetName name, ExportDataConfig exportConfig)
Exports data from a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build();
ExportDataResponse response = datasetServiceClient.exportDataAsync(name, exportConfig).get();
}
Name | Description |
name | DatasetName Required. The name of the Dataset resource. Format:
|
exportConfig | ExportDataConfig Required. The desired output location. |
Type | Description |
OperationFuture<ExportDataResponse,ExportDataOperationMetadata> |
exportDataAsync(ExportDataRequest request)
public final OperationFuture<ExportDataResponse,ExportDataOperationMetadata> exportDataAsync(ExportDataRequest request)
Exports data from a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ExportDataRequest request =
ExportDataRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setExportConfig(ExportDataConfig.newBuilder().build())
.build();
ExportDataResponse response = datasetServiceClient.exportDataAsync(request).get();
}
Name | Description |
request | ExportDataRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<ExportDataResponse,ExportDataOperationMetadata> |
exportDataAsync(String name, ExportDataConfig exportConfig)
public final OperationFuture<ExportDataResponse,ExportDataOperationMetadata> exportDataAsync(String name, ExportDataConfig exportConfig)
Exports data from a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
ExportDataConfig exportConfig = ExportDataConfig.newBuilder().build();
ExportDataResponse response = datasetServiceClient.exportDataAsync(name, exportConfig).get();
}
Name | Description |
name | String Required. The name of the Dataset resource. Format:
|
exportConfig | ExportDataConfig Required. The desired output location. |
Type | Description |
OperationFuture<ExportDataResponse,ExportDataOperationMetadata> |
exportDataCallable()
public final UnaryCallable<ExportDataRequest,Operation> exportDataCallable()
Exports data from a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ExportDataRequest request =
ExportDataRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setExportConfig(ExportDataConfig.newBuilder().build())
.build();
ApiFuture<Operation> future = datasetServiceClient.exportDataCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ExportDataRequest,Operation> |
exportDataOperationCallable()
public final OperationCallable<ExportDataRequest,ExportDataResponse,ExportDataOperationMetadata> exportDataOperationCallable()
Exports data from a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ExportDataRequest request =
ExportDataRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setExportConfig(ExportDataConfig.newBuilder().build())
.build();
OperationFuture<ExportDataResponse, ExportDataOperationMetadata> future =
datasetServiceClient.exportDataOperationCallable().futureCall(request);
// Do something.
ExportDataResponse response = future.get();
}
Type | Description |
OperationCallable<ExportDataRequest,ExportDataResponse,ExportDataOperationMetadata> |
getAnnotationSpec(AnnotationSpecName name)
public final AnnotationSpec getAnnotationSpec(AnnotationSpecName name)
Gets an AnnotationSpec.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
AnnotationSpecName name =
AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
AnnotationSpec response = datasetServiceClient.getAnnotationSpec(name);
}
Name | Description |
name | AnnotationSpecName Required. The name of the AnnotationSpec resource. Format:
|
Type | Description |
AnnotationSpec |
getAnnotationSpec(GetAnnotationSpecRequest request)
public final AnnotationSpec getAnnotationSpec(GetAnnotationSpecRequest request)
Gets an AnnotationSpec.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
GetAnnotationSpecRequest request =
GetAnnotationSpecRequest.newBuilder()
.setName(
AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]")
.toString())
.setReadMask(FieldMask.newBuilder().build())
.build();
AnnotationSpec response = datasetServiceClient.getAnnotationSpec(request);
}
Name | Description |
request | GetAnnotationSpecRequest The request object containing all of the parameters for the API call. |
Type | Description |
AnnotationSpec |
getAnnotationSpec(String name)
public final AnnotationSpec getAnnotationSpec(String name)
Gets an AnnotationSpec.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String name =
AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]")
.toString();
AnnotationSpec response = datasetServiceClient.getAnnotationSpec(name);
}
Name | Description |
name | String Required. The name of the AnnotationSpec resource. Format:
|
Type | Description |
AnnotationSpec |
getAnnotationSpecCallable()
public final UnaryCallable<GetAnnotationSpecRequest,AnnotationSpec> getAnnotationSpecCallable()
Gets an AnnotationSpec.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
GetAnnotationSpecRequest request =
GetAnnotationSpecRequest.newBuilder()
.setName(
AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]")
.toString())
.setReadMask(FieldMask.newBuilder().build())
.build();
ApiFuture<AnnotationSpec> future =
datasetServiceClient.getAnnotationSpecCallable().futureCall(request);
// Do something.
AnnotationSpec response = future.get();
}
Type | Description |
UnaryCallable<GetAnnotationSpecRequest,AnnotationSpec> |
getDataset(DatasetName name)
public final Dataset getDataset(DatasetName name)
Gets a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
Dataset response = datasetServiceClient.getDataset(name);
}
Name | Description |
name | DatasetName Required. The name of the Dataset resource. |
Type | Description |
Dataset |
getDataset(GetDatasetRequest request)
public final Dataset getDataset(GetDatasetRequest request)
Gets a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
GetDatasetRequest request =
GetDatasetRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setReadMask(FieldMask.newBuilder().build())
.build();
Dataset response = datasetServiceClient.getDataset(request);
}
Name | Description |
request | GetDatasetRequest The request object containing all of the parameters for the API call. |
Type | Description |
Dataset |
getDataset(String name)
public final Dataset getDataset(String name)
Gets a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
Dataset response = datasetServiceClient.getDataset(name);
}
Name | Description |
name | String Required. The name of the Dataset resource. |
Type | Description |
Dataset |
getDatasetCallable()
public final UnaryCallable<GetDatasetRequest,Dataset> getDatasetCallable()
Gets a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
GetDatasetRequest request =
GetDatasetRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setReadMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Dataset> future = datasetServiceClient.getDatasetCallable().futureCall(request);
// Do something.
Dataset response = future.get();
}
Type | Description |
UnaryCallable<GetDatasetRequest,Dataset> |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Type | Description |
OperationsClient |
getSettings()
public final DatasetServiceSettings getSettings()
Type | Description |
DatasetServiceSettings |
getStub()
public DatasetServiceStub getStub()
Type | Description |
DatasetServiceStub |
importDataAsync(DatasetName name, List<ImportDataConfig> importConfigs)
public final OperationFuture<ImportDataResponse,ImportDataOperationMetadata> importDataAsync(DatasetName name, List<ImportDataConfig> importConfigs)
Imports data into a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
List<ImportDataConfig> importConfigs = new ArrayList<>();
ImportDataResponse response = datasetServiceClient.importDataAsync(name, importConfigs).get();
}
Name | Description |
name | DatasetName Required. The name of the Dataset resource. Format:
|
importConfigs | List<ImportDataConfig> Required. The desired input locations. The contents of all input locations will be imported in one batch. |
Type | Description |
OperationFuture<ImportDataResponse,ImportDataOperationMetadata> |
importDataAsync(ImportDataRequest request)
public final OperationFuture<ImportDataResponse,ImportDataOperationMetadata> importDataAsync(ImportDataRequest request)
Imports data into a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ImportDataRequest request =
ImportDataRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.addAllImportConfigs(new ArrayList<ImportDataConfig>())
.build();
ImportDataResponse response = datasetServiceClient.importDataAsync(request).get();
}
Name | Description |
request | ImportDataRequest The request object containing all of the parameters for the API call. |
Type | Description |
OperationFuture<ImportDataResponse,ImportDataOperationMetadata> |
importDataAsync(String name, List<ImportDataConfig> importConfigs)
public final OperationFuture<ImportDataResponse,ImportDataOperationMetadata> importDataAsync(String name, List<ImportDataConfig> importConfigs)
Imports data into a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String name = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
List<ImportDataConfig> importConfigs = new ArrayList<>();
ImportDataResponse response = datasetServiceClient.importDataAsync(name, importConfigs).get();
}
Name | Description |
name | String Required. The name of the Dataset resource. Format:
|
importConfigs | List<ImportDataConfig> Required. The desired input locations. The contents of all input locations will be imported in one batch. |
Type | Description |
OperationFuture<ImportDataResponse,ImportDataOperationMetadata> |
importDataCallable()
public final UnaryCallable<ImportDataRequest,Operation> importDataCallable()
Imports data into a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ImportDataRequest request =
ImportDataRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.addAllImportConfigs(new ArrayList<ImportDataConfig>())
.build();
ApiFuture<Operation> future = datasetServiceClient.importDataCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Type | Description |
UnaryCallable<ImportDataRequest,Operation> |
importDataOperationCallable()
public final OperationCallable<ImportDataRequest,ImportDataResponse,ImportDataOperationMetadata> importDataOperationCallable()
Imports data into a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ImportDataRequest request =
ImportDataRequest.newBuilder()
.setName(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.addAllImportConfigs(new ArrayList<ImportDataConfig>())
.build();
OperationFuture<ImportDataResponse, ImportDataOperationMetadata> future =
datasetServiceClient.importDataOperationCallable().futureCall(request);
// Do something.
ImportDataResponse response = future.get();
}
Type | Description |
OperationCallable<ImportDataRequest,ImportDataResponse,ImportDataOperationMetadata> |
isShutdown()
public boolean isShutdown()
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Type | Description |
boolean |
listAnnotations(DataItemName parent)
public final DatasetServiceClient.ListAnnotationsPagedResponse listAnnotations(DataItemName parent)
Lists Annotations belongs to a dataitem
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DataItemName parent = DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]");
for (Annotation element : datasetServiceClient.listAnnotations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | DataItemName Required. The resource name of the DataItem to list Annotations from. Format:
|
Type | Description |
DatasetServiceClient.ListAnnotationsPagedResponse |
listAnnotations(ListAnnotationsRequest request)
public final DatasetServiceClient.ListAnnotationsPagedResponse listAnnotations(ListAnnotationsRequest request)
Lists Annotations belongs to a dataitem
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListAnnotationsRequest request =
ListAnnotationsRequest.newBuilder()
.setParent(
DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
for (Annotation element : datasetServiceClient.listAnnotations(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListAnnotationsRequest The request object containing all of the parameters for the API call. |
Type | Description |
DatasetServiceClient.ListAnnotationsPagedResponse |
listAnnotations(String parent)
public final DatasetServiceClient.ListAnnotationsPagedResponse listAnnotations(String parent)
Lists Annotations belongs to a dataitem
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String parent =
DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]").toString();
for (Annotation element : datasetServiceClient.listAnnotations(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The resource name of the DataItem to list Annotations from. Format:
|
Type | Description |
DatasetServiceClient.ListAnnotationsPagedResponse |
listAnnotationsCallable()
public final UnaryCallable<ListAnnotationsRequest,ListAnnotationsResponse> listAnnotationsCallable()
Lists Annotations belongs to a dataitem
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListAnnotationsRequest request =
ListAnnotationsRequest.newBuilder()
.setParent(
DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListAnnotationsResponse response =
datasetServiceClient.listAnnotationsCallable().call(request);
for (Annotation element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListAnnotationsRequest,ListAnnotationsResponse> |
listAnnotationsPagedCallable()
public final UnaryCallable<ListAnnotationsRequest,DatasetServiceClient.ListAnnotationsPagedResponse> listAnnotationsPagedCallable()
Lists Annotations belongs to a dataitem
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListAnnotationsRequest request =
ListAnnotationsRequest.newBuilder()
.setParent(
DataItemName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATA_ITEM]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Annotation> future =
datasetServiceClient.listAnnotationsPagedCallable().futureCall(request);
// Do something.
for (Annotation element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListAnnotationsRequest,ListAnnotationsPagedResponse> |
listDataItems(DatasetName parent)
public final DatasetServiceClient.ListDataItemsPagedResponse listDataItems(DatasetName parent)
Lists DataItems in a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
for (DataItem element : datasetServiceClient.listDataItems(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | DatasetName Required. The resource name of the Dataset to list DataItems from. Format:
|
Type | Description |
DatasetServiceClient.ListDataItemsPagedResponse |
listDataItems(ListDataItemsRequest request)
public final DatasetServiceClient.ListDataItemsPagedResponse listDataItems(ListDataItemsRequest request)
Lists DataItems in a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListDataItemsRequest request =
ListDataItemsRequest.newBuilder()
.setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
for (DataItem element : datasetServiceClient.listDataItems(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListDataItemsRequest The request object containing all of the parameters for the API call. |
Type | Description |
DatasetServiceClient.ListDataItemsPagedResponse |
listDataItems(String parent)
public final DatasetServiceClient.ListDataItemsPagedResponse listDataItems(String parent)
Lists DataItems in a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
for (DataItem element : datasetServiceClient.listDataItems(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The resource name of the Dataset to list DataItems from. Format:
|
Type | Description |
DatasetServiceClient.ListDataItemsPagedResponse |
listDataItemsCallable()
public final UnaryCallable<ListDataItemsRequest,ListDataItemsResponse> listDataItemsCallable()
Lists DataItems in a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListDataItemsRequest request =
ListDataItemsRequest.newBuilder()
.setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDataItemsResponse response = datasetServiceClient.listDataItemsCallable().call(request);
for (DataItem element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListDataItemsRequest,ListDataItemsResponse> |
listDataItemsPagedCallable()
public final UnaryCallable<ListDataItemsRequest,DatasetServiceClient.ListDataItemsPagedResponse> listDataItemsPagedCallable()
Lists DataItems in a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListDataItemsRequest request =
ListDataItemsRequest.newBuilder()
.setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<DataItem> future =
datasetServiceClient.listDataItemsPagedCallable().futureCall(request);
// Do something.
for (DataItem element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListDataItemsRequest,ListDataItemsPagedResponse> |
listDatasets(ListDatasetsRequest request)
public final DatasetServiceClient.ListDatasetsPagedResponse listDatasets(ListDatasetsRequest request)
Lists Datasets in a Location.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListDatasetsRequest request =
ListDatasetsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
for (Dataset element : datasetServiceClient.listDatasets(request).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
request | ListDatasetsRequest The request object containing all of the parameters for the API call. |
Type | Description |
DatasetServiceClient.ListDatasetsPagedResponse |
listDatasets(LocationName parent)
public final DatasetServiceClient.ListDatasetsPagedResponse listDatasets(LocationName parent)
Lists Datasets in a Location.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (Dataset element : datasetServiceClient.listDatasets(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | LocationName Required. The name of the Dataset's parent resource. Format:
|
Type | Description |
DatasetServiceClient.ListDatasetsPagedResponse |
listDatasets(String parent)
public final DatasetServiceClient.ListDatasetsPagedResponse listDatasets(String parent)
Lists Datasets in a Location.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (Dataset element : datasetServiceClient.listDatasets(parent).iterateAll()) {
// doThingsWith(element);
}
}
Name | Description |
parent | String Required. The name of the Dataset's parent resource. Format:
|
Type | Description |
DatasetServiceClient.ListDatasetsPagedResponse |
listDatasetsCallable()
public final UnaryCallable<ListDatasetsRequest,ListDatasetsResponse> listDatasetsCallable()
Lists Datasets in a Location.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListDatasetsRequest request =
ListDatasetsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
while (true) {
ListDatasetsResponse response = datasetServiceClient.listDatasetsCallable().call(request);
for (Dataset element : response.getResponsesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Type | Description |
UnaryCallable<ListDatasetsRequest,ListDatasetsResponse> |
listDatasetsPagedCallable()
public final UnaryCallable<ListDatasetsRequest,DatasetServiceClient.ListDatasetsPagedResponse> listDatasetsPagedCallable()
Lists Datasets in a Location.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
ListDatasetsRequest request =
ListDatasetsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setReadMask(FieldMask.newBuilder().build())
.setOrderBy("orderBy-1207110587")
.build();
ApiFuture<Dataset> future =
datasetServiceClient.listDatasetsPagedCallable().futureCall(request);
// Do something.
for (Dataset element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Type | Description |
UnaryCallable<ListDatasetsRequest,ListDatasetsPagedResponse> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateDataset(Dataset dataset, FieldMask updateMask)
public final Dataset updateDataset(Dataset dataset, FieldMask updateMask)
Updates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
Dataset dataset = Dataset.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Dataset response = datasetServiceClient.updateDataset(dataset, updateMask);
}
Name | Description |
dataset | Dataset Required. The Dataset which replaces the resource on the server. |
updateMask | FieldMask Required. The update mask applies to the resource. For the * |
Type | Description |
Dataset |
updateDataset(UpdateDatasetRequest request)
public final Dataset updateDataset(UpdateDatasetRequest request)
Updates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
UpdateDatasetRequest request =
UpdateDatasetRequest.newBuilder()
.setDataset(Dataset.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
Dataset response = datasetServiceClient.updateDataset(request);
}
Name | Description |
request | UpdateDatasetRequest The request object containing all of the parameters for the API call. |
Type | Description |
Dataset |
updateDatasetCallable()
public final UnaryCallable<UpdateDatasetRequest,Dataset> updateDatasetCallable()
Updates a Dataset.
Sample code:
try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
UpdateDatasetRequest request =
UpdateDatasetRequest.newBuilder()
.setDataset(Dataset.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<Dataset> future = datasetServiceClient.updateDatasetCallable().futureCall(request);
// Do something.
Dataset response = future.get();
}
Type | Description |
UnaryCallable<UpdateDatasetRequest,Dataset> |