Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + * DatasetVersion datasetVersion = DatasetVersion.newBuilder().build(); + * DatasetVersion response = + * datasetServiceClient.createDatasetVersionAsync(parent, datasetVersion).get(); + * } + * }+ * + * @param parent Required. The name of the Dataset resource. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}` + * @param datasetVersion Required. The version to be created. The same CMEK policies with the + * original Dataset will be applied the dataset version. So here we don't need to specify the + * EncryptionSpecType here. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString(); + * DatasetVersion datasetVersion = DatasetVersion.newBuilder().build(); + * DatasetVersion response = + * datasetServiceClient.createDatasetVersionAsync(parent, datasetVersion).get(); + * } + * }+ * + * @param parent Required. The name of the Dataset resource. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}` + * @param datasetVersion Required. The version to be created. The same CMEK policies with the + * original Dataset will be applied the dataset version. So here we don't need to specify the + * EncryptionSpecType here. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * CreateDatasetVersionRequest request = + * CreateDatasetVersionRequest.newBuilder() + * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + * .setDatasetVersion(DatasetVersion.newBuilder().build()) + * .build(); + * DatasetVersion response = datasetServiceClient.createDatasetVersionAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * CreateDatasetVersionRequest request = + * CreateDatasetVersionRequest.newBuilder() + * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + * .setDatasetVersion(DatasetVersion.newBuilder().build()) + * .build(); + * OperationFuture+ */ + public final OperationCallable< + CreateDatasetVersionRequest, DatasetVersion, CreateDatasetVersionOperationMetadata> + createDatasetVersionOperationCallable() { + return stub.createDatasetVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Create a version from a Dataset. + * + *future = + * datasetServiceClient.createDatasetVersionOperationCallable().futureCall(request); + * // Do something. + * DatasetVersion response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * CreateDatasetVersionRequest request = + * CreateDatasetVersionRequest.newBuilder() + * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + * .setDatasetVersion(DatasetVersion.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * datasetServiceClient.createDatasetVersionCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DatasetVersionName name = + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]"); + * datasetServiceClient.deleteDatasetVersionAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the Dataset version to delete. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * String name = + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString(); + * datasetServiceClient.deleteDatasetVersionAsync(name).get(); + * } + * }+ * + * @param name Required. The resource name of the Dataset version to delete. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DeleteDatasetVersionRequest request = + * DeleteDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .build(); + * datasetServiceClient.deleteDatasetVersionAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DeleteDatasetVersionRequest request = + * DeleteDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .build(); + * OperationFuture+ */ + public final OperationCallablefuture = + * datasetServiceClient.deleteDatasetVersionOperationCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DeleteDatasetVersionRequest request = + * DeleteDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * datasetServiceClient.deleteDatasetVersionCallable().futureCall(request); + * // Do something. + * future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DatasetVersionName name = + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]"); + * DatasetVersion response = datasetServiceClient.getDatasetVersion(name); + * } + * }+ * + * @param name Required. The resource name of the Dataset version to delete. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DatasetVersion getDatasetVersion(DatasetVersionName name) { + GetDatasetVersionRequest request = + GetDatasetVersionRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getDatasetVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Dataset version. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * String name = + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString(); + * DatasetVersion response = datasetServiceClient.getDatasetVersion(name); + * } + * }+ * + * @param name Required. The resource name of the Dataset version to delete. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DatasetVersion getDatasetVersion(String name) { + GetDatasetVersionRequest request = GetDatasetVersionRequest.newBuilder().setName(name).build(); + return getDatasetVersion(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Dataset version. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * GetDatasetVersionRequest request = + * GetDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .setReadMask(FieldMask.newBuilder().build()) + * .build(); + * DatasetVersion response = datasetServiceClient.getDatasetVersion(request); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final DatasetVersion getDatasetVersion(GetDatasetVersionRequest request) { + return getDatasetVersionCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a Dataset version. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * GetDatasetVersionRequest request = + * GetDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .setReadMask(FieldMask.newBuilder().build()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * datasetServiceClient.getDatasetVersionCallable().futureCall(request); + * // Do something. + * DatasetVersion response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]"); + * for (DatasetVersion element : datasetServiceClient.listDatasetVersions(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the Dataset to list DatasetVersions from. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetVersionsPagedResponse listDatasetVersions(DatasetName parent) { + ListDatasetVersionsRequest request = + ListDatasetVersionsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listDatasetVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DatasetVersions in a Dataset. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString(); + * for (DatasetVersion element : datasetServiceClient.listDatasetVersions(parent).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param parent Required. The resource name of the Dataset to list DatasetVersions from. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetVersionsPagedResponse listDatasetVersions(String parent) { + ListDatasetVersionsRequest request = + ListDatasetVersionsRequest.newBuilder().setParent(parent).build(); + return listDatasetVersions(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DatasetVersions in a Dataset. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * ListDatasetVersionsRequest request = + * ListDatasetVersionsRequest.newBuilder() + * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setReadMask(FieldMask.newBuilder().build()) + * .setOrderBy("orderBy-1207110587") + * .build(); + * for (DatasetVersion element : + * datasetServiceClient.listDatasetVersions(request).iterateAll()) { + * // doThingsWith(element); + * } + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListDatasetVersionsPagedResponse listDatasetVersions( + ListDatasetVersionsRequest request) { + return listDatasetVersionsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists DatasetVersions in a Dataset. + * + *
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * ListDatasetVersionsRequest request = + * ListDatasetVersionsRequest.newBuilder() + * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString()) + * .setFilter("filter-1274492040") + * .setPageSize(883849137) + * .setPageToken("pageToken873572522") + * .setReadMask(FieldMask.newBuilder().build()) + * .setOrderBy("orderBy-1207110587") + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * datasetServiceClient.listDatasetVersionsPagedCallable().futureCall(request); + * // Do something. + * for (DatasetVersion element : future.get().iterateAll()) { + * // doThingsWith(element); + * } + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * ListDatasetVersionsRequest request = + * ListDatasetVersionsRequest.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) { + * ListDatasetVersionsResponse response = + * datasetServiceClient.listDatasetVersionsCallable().call(request); + * for (DatasetVersion element : response.getDatasetVersionsList()) { + * // doThingsWith(element); + * } + * String nextPageToken = response.getNextPageToken(); + * if (!Strings.isNullOrEmpty(nextPageToken)) { + * request = request.toBuilder().setPageToken(nextPageToken).build(); + * } else { + * break; + * } + * } + * } + * }+ */ + public final UnaryCallable
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * DatasetVersionName name = + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]"); + * DatasetVersion response = datasetServiceClient.restoreDatasetVersionAsync(name).get(); + * } + * }+ * + * @param name Required. The name of the DatasetVersion resource. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * String name = + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString(); + * DatasetVersion response = datasetServiceClient.restoreDatasetVersionAsync(name).get(); + * } + * }+ * + * @param name Required. The name of the DatasetVersion resource. Format: + * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * RestoreDatasetVersionRequest request = + * RestoreDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .build(); + * DatasetVersion response = datasetServiceClient.restoreDatasetVersionAsync(request).get(); + * } + * }+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * RestoreDatasetVersionRequest request = + * RestoreDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .build(); + * OperationFuture+ */ + public final OperationCallable< + RestoreDatasetVersionRequest, DatasetVersion, RestoreDatasetVersionOperationMetadata> + restoreDatasetVersionOperationCallable() { + return stub.restoreDatasetVersionOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Restores a dataset version. + * + *future = + * datasetServiceClient.restoreDatasetVersionOperationCallable().futureCall(request); + * // Do something. + * DatasetVersion response = future.get(); + * } + * }
Sample code: + * + *
{@code + * // This snippet has been automatically generated and should be regarded as a code template only. + * // It will require modifications to work: + * // - It may require correct/in-range values for request initialization. + * // - It may require specifying regional endpoints when creating the service client as shown in + * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library + * try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) { + * RestoreDatasetVersionRequest request = + * RestoreDatasetVersionRequest.newBuilder() + * .setName( + * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]") + * .toString()) + * .build(); + * ApiFuture+ */ + public final UnaryCallablefuture = + * datasetServiceClient.restoreDatasetVersionCallable().futureCall(request); + * // Do something. + * Operation response = future.get(); + * } + * }
This value should be less than 128 characters, and valid characters are /[a-z][0-9]-/. + *
This value should be less than 128 characters, and valid characters are `/[a-z][0-9]-/`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PipelineJob createPipelineJob( @@ -998,7 +998,7 @@ public final PipelineJob createPipelineJob( * @param pipelineJob Required. The PipelineJob to create. * @param pipelineJobId The ID to use for the PipelineJob, which will become the final component * of the PipelineJob name. If not provided, an ID will be automatically generated. - *
This value should be less than 128 characters, and valid characters are /[a-z][0-9]-/. + *
This value should be less than 128 characters, and valid characters are `/[a-z][0-9]-/`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final PipelineJob createPipelineJob( diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/TensorboardServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/TensorboardServiceClient.java index 9f25b53d725c..a69a32f6e187 100644 --- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/TensorboardServiceClient.java +++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/TensorboardServiceClient.java @@ -1174,7 +1174,7 @@ public final ReadTensorboardSizeResponse readTensorboardSize(ReadTensorboardSize * @param tensorboardExperiment The TensorboardExperiment to create. * @param tensorboardExperimentId Required. The ID to use for the Tensorboard experiment, which * becomes the final component of the Tensorboard experiment's resource name. - *
This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/. + *
This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final TensorboardExperiment createTensorboardExperiment( @@ -1220,7 +1220,7 @@ public final TensorboardExperiment createTensorboardExperiment( * @param tensorboardExperiment The TensorboardExperiment to create. * @param tensorboardExperimentId Required. The ID to use for the Tensorboard experiment, which * becomes the final component of the Tensorboard experiment's resource name. - *
This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/. + *
This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final TensorboardExperiment createTensorboardExperiment(
@@ -1901,7 +1901,7 @@ public final OperationFuture This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final TensorboardRun createTensorboardRun(
@@ -1944,7 +1944,7 @@ public final TensorboardRun createTensorboardRun(
* @param tensorboardRun Required. The TensorboardRun to create.
* @param tensorboardRunId Required. The ID to use for the Tensorboard run, which becomes the
* final component of the Tensorboard run's resource name.
- * This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final TensorboardRun createTensorboardRun(
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json
index a74127fe79f0..dce7c4dc6698 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/gapic_metadata.json
@@ -13,9 +13,15 @@
"CreateDataset": {
"methods": ["createDatasetAsync", "createDatasetAsync", "createDatasetAsync", "createDatasetOperationCallable", "createDatasetCallable"]
},
+ "CreateDatasetVersion": {
+ "methods": ["createDatasetVersionAsync", "createDatasetVersionAsync", "createDatasetVersionAsync", "createDatasetVersionOperationCallable", "createDatasetVersionCallable"]
+ },
"DeleteDataset": {
"methods": ["deleteDatasetAsync", "deleteDatasetAsync", "deleteDatasetAsync", "deleteDatasetOperationCallable", "deleteDatasetCallable"]
},
+ "DeleteDatasetVersion": {
+ "methods": ["deleteDatasetVersionAsync", "deleteDatasetVersionAsync", "deleteDatasetVersionAsync", "deleteDatasetVersionOperationCallable", "deleteDatasetVersionCallable"]
+ },
"DeleteSavedQuery": {
"methods": ["deleteSavedQueryAsync", "deleteSavedQueryAsync", "deleteSavedQueryAsync", "deleteSavedQueryOperationCallable", "deleteSavedQueryCallable"]
},
@@ -28,6 +34,9 @@
"GetDataset": {
"methods": ["getDataset", "getDataset", "getDataset", "getDatasetCallable"]
},
+ "GetDatasetVersion": {
+ "methods": ["getDatasetVersion", "getDatasetVersion", "getDatasetVersion", "getDatasetVersionCallable"]
+ },
"GetIamPolicy": {
"methods": ["getIamPolicy", "getIamPolicyCallable"]
},
@@ -43,6 +52,9 @@
"ListDataItems": {
"methods": ["listDataItems", "listDataItems", "listDataItems", "listDataItemsPagedCallable", "listDataItemsCallable"]
},
+ "ListDatasetVersions": {
+ "methods": ["listDatasetVersions", "listDatasetVersions", "listDatasetVersions", "listDatasetVersionsPagedCallable", "listDatasetVersionsCallable"]
+ },
"ListDatasets": {
"methods": ["listDatasets", "listDatasets", "listDatasets", "listDatasetsPagedCallable", "listDatasetsCallable"]
},
@@ -52,6 +64,9 @@
"ListSavedQueries": {
"methods": ["listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueriesPagedCallable", "listSavedQueriesCallable"]
},
+ "RestoreDatasetVersion": {
+ "methods": ["restoreDatasetVersionAsync", "restoreDatasetVersionAsync", "restoreDatasetVersionAsync", "restoreDatasetVersionOperationCallable", "restoreDatasetVersionCallable"]
+ },
"SearchDataItems": {
"methods": ["searchDataItems", "searchDataItemsPagedCallable", "searchDataItemsCallable"]
},
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStub.java
index d5a795b870d0..57fdc4e2a294 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStub.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/stub/DatasetServiceStub.java
@@ -18,6 +18,7 @@
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListAnnotationsPagedResponse;
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDataItemsPagedResponse;
+import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetVersionsPagedResponse;
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetsPagedResponse;
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListSavedQueriesPagedResponse;
@@ -29,8 +30,12 @@
import com.google.cloud.aiplatform.v1.AnnotationSpec;
import com.google.cloud.aiplatform.v1.CreateDatasetOperationMetadata;
import com.google.cloud.aiplatform.v1.CreateDatasetRequest;
+import com.google.cloud.aiplatform.v1.CreateDatasetVersionOperationMetadata;
+import com.google.cloud.aiplatform.v1.CreateDatasetVersionRequest;
import com.google.cloud.aiplatform.v1.Dataset;
+import com.google.cloud.aiplatform.v1.DatasetVersion;
import com.google.cloud.aiplatform.v1.DeleteDatasetRequest;
+import com.google.cloud.aiplatform.v1.DeleteDatasetVersionRequest;
import com.google.cloud.aiplatform.v1.DeleteOperationMetadata;
import com.google.cloud.aiplatform.v1.DeleteSavedQueryRequest;
import com.google.cloud.aiplatform.v1.ExportDataOperationMetadata;
@@ -38,6 +43,7 @@
import com.google.cloud.aiplatform.v1.ExportDataResponse;
import com.google.cloud.aiplatform.v1.GetAnnotationSpecRequest;
import com.google.cloud.aiplatform.v1.GetDatasetRequest;
+import com.google.cloud.aiplatform.v1.GetDatasetVersionRequest;
import com.google.cloud.aiplatform.v1.ImportDataOperationMetadata;
import com.google.cloud.aiplatform.v1.ImportDataRequest;
import com.google.cloud.aiplatform.v1.ImportDataResponse;
@@ -45,10 +51,14 @@
import com.google.cloud.aiplatform.v1.ListAnnotationsResponse;
import com.google.cloud.aiplatform.v1.ListDataItemsRequest;
import com.google.cloud.aiplatform.v1.ListDataItemsResponse;
+import com.google.cloud.aiplatform.v1.ListDatasetVersionsRequest;
+import com.google.cloud.aiplatform.v1.ListDatasetVersionsResponse;
import com.google.cloud.aiplatform.v1.ListDatasetsRequest;
import com.google.cloud.aiplatform.v1.ListDatasetsResponse;
import com.google.cloud.aiplatform.v1.ListSavedQueriesRequest;
import com.google.cloud.aiplatform.v1.ListSavedQueriesResponse;
+import com.google.cloud.aiplatform.v1.RestoreDatasetVersionOperationMetadata;
+import com.google.cloud.aiplatform.v1.RestoreDatasetVersionRequest;
import com.google.cloud.aiplatform.v1.SearchDataItemsRequest;
import com.google.cloud.aiplatform.v1.SearchDataItemsResponse;
import com.google.cloud.aiplatform.v1.UpdateDatasetRequest;
@@ -131,6 +141,52 @@ public UnaryCallable Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The maximum length is 63 characters, and valid characters are
- * /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.
+ * `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture The maximum length is 63 characters, and valid characters are
- * /^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/.
+ * `/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final OperationFuture This value should be less than 128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be less than 128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final PipelineJob createPipelineJob(
@@ -1000,7 +1000,7 @@ public final PipelineJob createPipelineJob(
* @param pipelineJob Required. The PipelineJob to create.
* @param pipelineJobId The ID to use for the PipelineJob, which will become the final component
* of the PipelineJob name. If not provided, an ID will be automatically generated.
- * This value should be less than 128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be less than 128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final PipelineJob createPipelineJob(
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/TensorboardServiceClient.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/TensorboardServiceClient.java
index 8762262ff116..a60944dca297 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/TensorboardServiceClient.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/TensorboardServiceClient.java
@@ -1176,7 +1176,7 @@ public final ReadTensorboardSizeResponse readTensorboardSize(ReadTensorboardSize
* @param tensorboardExperiment The TensorboardExperiment to create.
* @param tensorboardExperimentId Required. The ID to use for the Tensorboard experiment, which
* becomes the final component of the Tensorboard experiment's resource name.
- * This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final TensorboardExperiment createTensorboardExperiment(
@@ -1222,7 +1222,7 @@ public final TensorboardExperiment createTensorboardExperiment(
* @param tensorboardExperiment The TensorboardExperiment to create.
* @param tensorboardExperimentId Required. The ID to use for the Tensorboard experiment, which
* becomes the final component of the Tensorboard experiment's resource name.
- * This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final TensorboardExperiment createTensorboardExperiment(
@@ -1903,7 +1903,7 @@ public final OperationFuture This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final TensorboardRun createTensorboardRun(
@@ -1946,7 +1946,7 @@ public final TensorboardRun createTensorboardRun(
* @param tensorboardRun Required. The TensorboardRun to create.
* @param tensorboardRunId Required. The ID to use for the Tensorboard run, which becomes the
* final component of the Tensorboard run's resource name.
- * This value should be 1-128 characters, and valid characters are /[a-z][0-9]-/.
+ * This value should be 1-128 characters, and valid characters are `/[a-z][0-9]-/`.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final TensorboardRun createTensorboardRun(
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json
index 8a8b2d9f9c5f..7a5b59754197 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/gapic_metadata.json
@@ -13,9 +13,15 @@
"CreateDataset": {
"methods": ["createDatasetAsync", "createDatasetAsync", "createDatasetAsync", "createDatasetOperationCallable", "createDatasetCallable"]
},
+ "CreateDatasetVersion": {
+ "methods": ["createDatasetVersionAsync", "createDatasetVersionAsync", "createDatasetVersionAsync", "createDatasetVersionOperationCallable", "createDatasetVersionCallable"]
+ },
"DeleteDataset": {
"methods": ["deleteDatasetAsync", "deleteDatasetAsync", "deleteDatasetAsync", "deleteDatasetOperationCallable", "deleteDatasetCallable"]
},
+ "DeleteDatasetVersion": {
+ "methods": ["deleteDatasetVersionAsync", "deleteDatasetVersionAsync", "deleteDatasetVersionAsync", "deleteDatasetVersionOperationCallable", "deleteDatasetVersionCallable"]
+ },
"DeleteSavedQuery": {
"methods": ["deleteSavedQueryAsync", "deleteSavedQueryAsync", "deleteSavedQueryAsync", "deleteSavedQueryOperationCallable", "deleteSavedQueryCallable"]
},
@@ -28,6 +34,9 @@
"GetDataset": {
"methods": ["getDataset", "getDataset", "getDataset", "getDatasetCallable"]
},
+ "GetDatasetVersion": {
+ "methods": ["getDatasetVersion", "getDatasetVersion", "getDatasetVersion", "getDatasetVersionCallable"]
+ },
"GetIamPolicy": {
"methods": ["getIamPolicy", "getIamPolicyCallable"]
},
@@ -43,6 +52,9 @@
"ListDataItems": {
"methods": ["listDataItems", "listDataItems", "listDataItems", "listDataItemsPagedCallable", "listDataItemsCallable"]
},
+ "ListDatasetVersions": {
+ "methods": ["listDatasetVersions", "listDatasetVersions", "listDatasetVersions", "listDatasetVersionsPagedCallable", "listDatasetVersionsCallable"]
+ },
"ListDatasets": {
"methods": ["listDatasets", "listDatasets", "listDatasets", "listDatasetsPagedCallable", "listDatasetsCallable"]
},
@@ -52,6 +64,9 @@
"ListSavedQueries": {
"methods": ["listSavedQueries", "listSavedQueries", "listSavedQueries", "listSavedQueriesPagedCallable", "listSavedQueriesCallable"]
},
+ "RestoreDatasetVersion": {
+ "methods": ["restoreDatasetVersionAsync", "restoreDatasetVersionAsync", "restoreDatasetVersionAsync", "restoreDatasetVersionOperationCallable", "restoreDatasetVersionCallable"]
+ },
"SearchDataItems": {
"methods": ["searchDataItems", "searchDataItemsPagedCallable", "searchDataItemsCallable"]
},
@@ -841,6 +856,9 @@
"ListLocations": {
"methods": ["listLocations", "listLocationsPagedCallable", "listLocationsCallable"]
},
+ "ListPublisherModels": {
+ "methods": ["listPublisherModels", "listPublisherModels", "listPublisherModelsPagedCallable", "listPublisherModelsCallable"]
+ },
"SetIamPolicy": {
"methods": ["setIamPolicy", "setIamPolicyCallable"]
},
diff --git a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java
index d3ad98130d9f..c13a6bfab9c7 100644
--- a/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java
+++ b/java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1beta1/stub/DatasetServiceStub.java
@@ -18,6 +18,7 @@
import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListAnnotationsPagedResponse;
import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListDataItemsPagedResponse;
+import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListDatasetVersionsPagedResponse;
import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListDatasetsPagedResponse;
import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListLocationsPagedResponse;
import static com.google.cloud.aiplatform.v1beta1.DatasetServiceClient.ListSavedQueriesPagedResponse;
@@ -30,8 +31,12 @@
import com.google.cloud.aiplatform.v1beta1.AnnotationSpec;
import com.google.cloud.aiplatform.v1beta1.CreateDatasetOperationMetadata;
import com.google.cloud.aiplatform.v1beta1.CreateDatasetRequest;
+import com.google.cloud.aiplatform.v1beta1.CreateDatasetVersionOperationMetadata;
+import com.google.cloud.aiplatform.v1beta1.CreateDatasetVersionRequest;
import com.google.cloud.aiplatform.v1beta1.Dataset;
+import com.google.cloud.aiplatform.v1beta1.DatasetVersion;
import com.google.cloud.aiplatform.v1beta1.DeleteDatasetRequest;
+import com.google.cloud.aiplatform.v1beta1.DeleteDatasetVersionRequest;
import com.google.cloud.aiplatform.v1beta1.DeleteOperationMetadata;
import com.google.cloud.aiplatform.v1beta1.DeleteSavedQueryRequest;
import com.google.cloud.aiplatform.v1beta1.ExportDataOperationMetadata;
@@ -39,6 +44,7 @@
import com.google.cloud.aiplatform.v1beta1.ExportDataResponse;
import com.google.cloud.aiplatform.v1beta1.GetAnnotationSpecRequest;
import com.google.cloud.aiplatform.v1beta1.GetDatasetRequest;
+import com.google.cloud.aiplatform.v1beta1.GetDatasetVersionRequest;
import com.google.cloud.aiplatform.v1beta1.ImportDataOperationMetadata;
import com.google.cloud.aiplatform.v1beta1.ImportDataRequest;
import com.google.cloud.aiplatform.v1beta1.ImportDataResponse;
@@ -46,10 +52,14 @@
import com.google.cloud.aiplatform.v1beta1.ListAnnotationsResponse;
import com.google.cloud.aiplatform.v1beta1.ListDataItemsRequest;
import com.google.cloud.aiplatform.v1beta1.ListDataItemsResponse;
+import com.google.cloud.aiplatform.v1beta1.ListDatasetVersionsRequest;
+import com.google.cloud.aiplatform.v1beta1.ListDatasetVersionsResponse;
import com.google.cloud.aiplatform.v1beta1.ListDatasetsRequest;
import com.google.cloud.aiplatform.v1beta1.ListDatasetsResponse;
import com.google.cloud.aiplatform.v1beta1.ListSavedQueriesRequest;
import com.google.cloud.aiplatform.v1beta1.ListSavedQueriesResponse;
+import com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionOperationMetadata;
+import com.google.cloud.aiplatform.v1beta1.RestoreDatasetVersionRequest;
import com.google.cloud.aiplatform.v1beta1.SearchDataItemsRequest;
import com.google.cloud.aiplatform.v1beta1.SearchDataItemsResponse;
import com.google.cloud.aiplatform.v1beta1.UpdateDatasetRequest;
@@ -133,6 +143,52 @@ public UnaryCallable{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+ * DatasetVersion datasetVersion = DatasetVersion.newBuilder().build();
+ * DatasetVersion response =
+ * datasetServiceClient.createDatasetVersionAsync(parent, datasetVersion).get();
+ * }
+ * }
+ *
+ * @param parent Required. The name of the Dataset resource. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @param datasetVersion Required. The version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need to specify the
+ * EncryptionSpecType here.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
+ * DatasetVersion datasetVersion = DatasetVersion.newBuilder().build();
+ * DatasetVersion response =
+ * datasetServiceClient.createDatasetVersionAsync(parent, datasetVersion).get();
+ * }
+ * }
+ *
+ * @param parent Required. The name of the Dataset resource. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @param datasetVersion Required. The version to be created. The same CMEK policies with the
+ * original Dataset will be applied the dataset version. So here we don't need to specify the
+ * EncryptionSpecType here.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * CreateDatasetVersionRequest request =
+ * CreateDatasetVersionRequest.newBuilder()
+ * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+ * .setDatasetVersion(DatasetVersion.newBuilder().build())
+ * .build();
+ * DatasetVersion response = datasetServiceClient.createDatasetVersionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * CreateDatasetVersionRequest request =
+ * CreateDatasetVersionRequest.newBuilder()
+ * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+ * .setDatasetVersion(DatasetVersion.newBuilder().build())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ CreateDatasetVersionRequest, DatasetVersion, CreateDatasetVersionOperationMetadata>
+ createDatasetVersionOperationCallable() {
+ return stub.createDatasetVersionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Create a version from a Dataset.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * CreateDatasetVersionRequest request =
+ * CreateDatasetVersionRequest.newBuilder()
+ * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+ * .setDatasetVersion(DatasetVersion.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DatasetVersionName name =
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]");
+ * datasetServiceClient.deleteDatasetVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Dataset version to delete. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * String name =
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString();
+ * datasetServiceClient.deleteDatasetVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Dataset version to delete. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DeleteDatasetVersionRequest request =
+ * DeleteDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .build();
+ * datasetServiceClient.deleteDatasetVersionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DeleteDatasetVersionRequest request =
+ * DeleteDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DeleteDatasetVersionRequest request =
+ * DeleteDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DatasetVersionName name =
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]");
+ * DatasetVersion response = datasetServiceClient.getDatasetVersion(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Dataset version to delete. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DatasetVersion getDatasetVersion(DatasetVersionName name) {
+ GetDatasetVersionRequest request =
+ GetDatasetVersionRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getDatasetVersion(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Dataset version.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * String name =
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString();
+ * DatasetVersion response = datasetServiceClient.getDatasetVersion(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Dataset version to delete. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DatasetVersion getDatasetVersion(String name) {
+ GetDatasetVersionRequest request = GetDatasetVersionRequest.newBuilder().setName(name).build();
+ return getDatasetVersion(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Dataset version.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * GetDatasetVersionRequest request =
+ * GetDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * DatasetVersion response = datasetServiceClient.getDatasetVersion(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final DatasetVersion getDatasetVersion(GetDatasetVersionRequest request) {
+ return getDatasetVersionCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Dataset version.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * GetDatasetVersionRequest request =
+ * GetDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+ * for (DatasetVersion element : datasetServiceClient.listDatasetVersions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Dataset to list DatasetVersions from. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDatasetVersionsPagedResponse listDatasetVersions(DatasetName parent) {
+ ListDatasetVersionsRequest request =
+ ListDatasetVersionsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listDatasetVersions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists DatasetVersions in a Dataset.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * String parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString();
+ * for (DatasetVersion element : datasetServiceClient.listDatasetVersions(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the Dataset to list DatasetVersions from. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDatasetVersionsPagedResponse listDatasetVersions(String parent) {
+ ListDatasetVersionsRequest request =
+ ListDatasetVersionsRequest.newBuilder().setParent(parent).build();
+ return listDatasetVersions(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists DatasetVersions in a Dataset.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * ListDatasetVersionsRequest request =
+ * ListDatasetVersionsRequest.newBuilder()
+ * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (DatasetVersion element :
+ * datasetServiceClient.listDatasetVersions(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListDatasetVersionsPagedResponse listDatasetVersions(
+ ListDatasetVersionsRequest request) {
+ return listDatasetVersionsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists DatasetVersions in a Dataset.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * ListDatasetVersionsRequest request =
+ * ListDatasetVersionsRequest.newBuilder()
+ * .setParent(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setReadMask(FieldMask.newBuilder().build())
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * ListDatasetVersionsRequest request =
+ * ListDatasetVersionsRequest.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) {
+ * ListDatasetVersionsResponse response =
+ * datasetServiceClient.listDatasetVersionsCallable().call(request);
+ * for (DatasetVersion element : response.getDatasetVersionsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * DatasetVersionName name =
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]");
+ * DatasetVersion response = datasetServiceClient.restoreDatasetVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the DatasetVersion resource. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * String name =
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString();
+ * DatasetVersion response = datasetServiceClient.restoreDatasetVersionAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the DatasetVersion resource. Format:
+ * `projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * RestoreDatasetVersionRequest request =
+ * RestoreDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .build();
+ * DatasetVersion response = datasetServiceClient.restoreDatasetVersionAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFuture{@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * RestoreDatasetVersionRequest request =
+ * RestoreDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .build();
+ * OperationFuture
+ */
+ public final OperationCallable<
+ RestoreDatasetVersionRequest, DatasetVersion, RestoreDatasetVersionOperationMetadata>
+ restoreDatasetVersionOperationCallable() {
+ return stub.restoreDatasetVersionOperationCallable();
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Restores a dataset version.
+ *
+ * {@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 (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
+ * RestoreDatasetVersionRequest request =
+ * RestoreDatasetVersionRequest.newBuilder()
+ * .setName(
+ * DatasetVersionName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[DATASET_VERSION]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * String parent = "parent-995424086";
+ * for (PublisherModel element :
+ * modelGardenServiceClient.listPublisherModels(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The name of the Publisher from which to list the PublisherModels.
+ * Format: `publishers/{publisher}`
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPublisherModelsPagedResponse listPublisherModels(String parent) {
+ ListPublisherModelsRequest request =
+ ListPublisherModelsRequest.newBuilder().setParent(parent).build();
+ return listPublisherModels(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists publisher models in Model Garden.
+ *
+ * {@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 (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * ListPublisherModelsRequest request =
+ * ListPublisherModelsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(PublisherModelView.forNumber(0))
+ * .setOrderBy("orderBy-1207110587")
+ * .setLanguageCode("languageCode-2092349083")
+ * .build();
+ * for (PublisherModel element :
+ * modelGardenServiceClient.listPublisherModels(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListPublisherModelsPagedResponse listPublisherModels(
+ ListPublisherModelsRequest request) {
+ return listPublisherModelsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists publisher models in Model Garden.
+ *
+ * {@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 (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * ListPublisherModelsRequest request =
+ * ListPublisherModelsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(PublisherModelView.forNumber(0))
+ * .setOrderBy("orderBy-1207110587")
+ * .setLanguageCode("languageCode-2092349083")
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@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 (ModelGardenServiceClient modelGardenServiceClient = ModelGardenServiceClient.create()) {
+ * ListPublisherModelsRequest request =
+ * ListPublisherModelsRequest.newBuilder()
+ * .setParent("parent-995424086")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setView(PublisherModelView.forNumber(0))
+ * .setOrderBy("orderBy-1207110587")
+ * .setLanguageCode("languageCode-2092349083")
+ * .build();
+ * while (true) {
+ * ListPublisherModelsResponse response =
+ * modelGardenServiceClient.listPublisherModelsCallable().call(request);
+ * for (PublisherModel element : response.getPublisherModelsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallable