Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b68a7c1

Browse files
feat: [aiplatform] add SearchDataItems RPC in aiplatform version v1 and v1beta1 dataset_service.proto (#8859)
* feat: add metadata_artifact to Dataset in aiplatform v1 dataset.proto feat: add WriteFeatureValues rpc to FeaturestoreOnlineServingService in aiplatform v1 featurestore_online_service.proto PiperOrigin-RevId: 491933995 Source-Link: googleapis/googleapis@693430f Source-Link: https://github.com/googleapis/googleapis-gen/commit/0bf52e5172d881d5f7139218a373a38ec7dd51a0 Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiIwYmY1MmU1MTcyZDg4MWQ1ZjcxMzkyMThhMzczYTM4ZWM3ZGQ1MWEwIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add metadata_artifact to Dataset in aiplatform v1beta1 dataset.proto feat: add offline_storage_ttl_days to EntityType in aiplatform v1beta1 entity_type.proto feat: add online_storage_ttl_days to Featurestore in aiplatform v1beta1 featurestore.proto feat: add source_uris to ImportFeatureValuesOperationMetadata in aiplatform v1beta1 featurestore_service.proto PiperOrigin-RevId: 491934619 Source-Link: googleapis/googleapis@572774c Source-Link: https://github.com/googleapis/googleapis-gen/commit/129d37244adee15ef13609a42a64e37fc8005ccd Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiIxMjlkMzcyNDRhZGVlMTVlZjEzNjA5YTQyYTY0ZTM3ZmM4MDA1Y2NkIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add SearchDataItems RPC in aiplatform version v1 and v1beta1 dataset_service.proto PiperOrigin-RevId: 493139921 Source-Link: googleapis/googleapis@268ee4d Source-Link: https://github.com/googleapis/googleapis-gen/commit/f4b424831354c5b56a2a4b1fefd0f6b4d6c6460e Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiJmNGI0MjQ4MzEzNTRjNWI1NmEyYTRiMWZlZmQwZjZiNGQ2YzY0NjBlIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 85770eb commit b68a7c1

File tree

162 files changed

+23309
-1153
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+23309
-1153
lines changed

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceClient.java

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1332,6 +1332,141 @@ public final UnaryCallable<ListDataItemsRequest, ListDataItemsResponse> listData
13321332
return stub.listDataItemsCallable();
13331333
}
13341334

1335+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1336+
/**
1337+
* Searches DataItems in a Dataset.
1338+
*
1339+
* <p>Sample code:
1340+
*
1341+
* <pre>{@code
1342+
* // This snippet has been automatically generated and should be regarded as a code template only.
1343+
* // It will require modifications to work:
1344+
* // - It may require correct/in-range values for request initialization.
1345+
* // - It may require specifying regional endpoints when creating the service client as shown in
1346+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1347+
* try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
1348+
* SearchDataItemsRequest request =
1349+
* SearchDataItemsRequest.newBuilder()
1350+
* .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
1351+
* .setSavedQuery(
1352+
* SavedQueryName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[SAVED_QUERY]")
1353+
* .toString())
1354+
* .setDataLabelingJob("dataLabelingJob951814757")
1355+
* .setDataItemFilter("dataItemFilter1487804341")
1356+
* .setAnnotationsFilter("annotationsFilter-583841860")
1357+
* .addAllAnnotationFilters(new ArrayList<String>())
1358+
* .setFieldMask(FieldMask.newBuilder().build())
1359+
* .setAnnotationsLimit(134561504)
1360+
* .setPageSize(883849137)
1361+
* .setOrderBy("orderBy-1207110587")
1362+
* .setPageToken("pageToken873572522")
1363+
* .build();
1364+
* for (DataItemView element : datasetServiceClient.searchDataItems(request).iterateAll()) {
1365+
* // doThingsWith(element);
1366+
* }
1367+
* }
1368+
* }</pre>
1369+
*
1370+
* @param request The request object containing all of the parameters for the API call.
1371+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1372+
*/
1373+
public final SearchDataItemsPagedResponse searchDataItems(SearchDataItemsRequest request) {
1374+
return searchDataItemsPagedCallable().call(request);
1375+
}
1376+
1377+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1378+
/**
1379+
* Searches DataItems in a Dataset.
1380+
*
1381+
* <p>Sample code:
1382+
*
1383+
* <pre>{@code
1384+
* // This snippet has been automatically generated and should be regarded as a code template only.
1385+
* // It will require modifications to work:
1386+
* // - It may require correct/in-range values for request initialization.
1387+
* // - It may require specifying regional endpoints when creating the service client as shown in
1388+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1389+
* try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
1390+
* SearchDataItemsRequest request =
1391+
* SearchDataItemsRequest.newBuilder()
1392+
* .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
1393+
* .setSavedQuery(
1394+
* SavedQueryName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[SAVED_QUERY]")
1395+
* .toString())
1396+
* .setDataLabelingJob("dataLabelingJob951814757")
1397+
* .setDataItemFilter("dataItemFilter1487804341")
1398+
* .setAnnotationsFilter("annotationsFilter-583841860")
1399+
* .addAllAnnotationFilters(new ArrayList<String>())
1400+
* .setFieldMask(FieldMask.newBuilder().build())
1401+
* .setAnnotationsLimit(134561504)
1402+
* .setPageSize(883849137)
1403+
* .setOrderBy("orderBy-1207110587")
1404+
* .setPageToken("pageToken873572522")
1405+
* .build();
1406+
* ApiFuture<DataItemView> future =
1407+
* datasetServiceClient.searchDataItemsPagedCallable().futureCall(request);
1408+
* // Do something.
1409+
* for (DataItemView element : future.get().iterateAll()) {
1410+
* // doThingsWith(element);
1411+
* }
1412+
* }
1413+
* }</pre>
1414+
*/
1415+
public final UnaryCallable<SearchDataItemsRequest, SearchDataItemsPagedResponse>
1416+
searchDataItemsPagedCallable() {
1417+
return stub.searchDataItemsPagedCallable();
1418+
}
1419+
1420+
// AUTO-GENERATED DOCUMENTATION AND METHOD.
1421+
/**
1422+
* Searches DataItems in a Dataset.
1423+
*
1424+
* <p>Sample code:
1425+
*
1426+
* <pre>{@code
1427+
* // This snippet has been automatically generated and should be regarded as a code template only.
1428+
* // It will require modifications to work:
1429+
* // - It may require correct/in-range values for request initialization.
1430+
* // - It may require specifying regional endpoints when creating the service client as shown in
1431+
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1432+
* try (DatasetServiceClient datasetServiceClient = DatasetServiceClient.create()) {
1433+
* SearchDataItemsRequest request =
1434+
* SearchDataItemsRequest.newBuilder()
1435+
* .setDataset(DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]").toString())
1436+
* .setSavedQuery(
1437+
* SavedQueryName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[SAVED_QUERY]")
1438+
* .toString())
1439+
* .setDataLabelingJob("dataLabelingJob951814757")
1440+
* .setDataItemFilter("dataItemFilter1487804341")
1441+
* .setAnnotationsFilter("annotationsFilter-583841860")
1442+
* .addAllAnnotationFilters(new ArrayList<String>())
1443+
* .setFieldMask(FieldMask.newBuilder().build())
1444+
* .setAnnotationsLimit(134561504)
1445+
* .setPageSize(883849137)
1446+
* .setOrderBy("orderBy-1207110587")
1447+
* .setPageToken("pageToken873572522")
1448+
* .build();
1449+
* while (true) {
1450+
* SearchDataItemsResponse response =
1451+
* datasetServiceClient.searchDataItemsCallable().call(request);
1452+
* for (DataItemView element : response.getDataItemViewsList()) {
1453+
* // doThingsWith(element);
1454+
* }
1455+
* String nextPageToken = response.getNextPageToken();
1456+
* if (!Strings.isNullOrEmpty(nextPageToken)) {
1457+
* request = request.toBuilder().setPageToken(nextPageToken).build();
1458+
* } else {
1459+
* break;
1460+
* }
1461+
* }
1462+
* }
1463+
* }</pre>
1464+
*/
1465+
public final UnaryCallable<SearchDataItemsRequest, SearchDataItemsResponse>
1466+
searchDataItemsCallable() {
1467+
return stub.searchDataItemsCallable();
1468+
}
1469+
13351470
// AUTO-GENERATED DOCUMENTATION AND METHOD.
13361471
/**
13371472
* Lists SavedQueries in a Dataset.
@@ -2348,6 +2483,83 @@ protected ListDataItemsFixedSizeCollection createCollection(
23482483
}
23492484
}
23502485

2486+
public static class SearchDataItemsPagedResponse
2487+
extends AbstractPagedListResponse<
2488+
SearchDataItemsRequest,
2489+
SearchDataItemsResponse,
2490+
DataItemView,
2491+
SearchDataItemsPage,
2492+
SearchDataItemsFixedSizeCollection> {
2493+
2494+
public static ApiFuture<SearchDataItemsPagedResponse> createAsync(
2495+
PageContext<SearchDataItemsRequest, SearchDataItemsResponse, DataItemView> context,
2496+
ApiFuture<SearchDataItemsResponse> futureResponse) {
2497+
ApiFuture<SearchDataItemsPage> futurePage =
2498+
SearchDataItemsPage.createEmptyPage().createPageAsync(context, futureResponse);
2499+
return ApiFutures.transform(
2500+
futurePage,
2501+
input -> new SearchDataItemsPagedResponse(input),
2502+
MoreExecutors.directExecutor());
2503+
}
2504+
2505+
private SearchDataItemsPagedResponse(SearchDataItemsPage page) {
2506+
super(page, SearchDataItemsFixedSizeCollection.createEmptyCollection());
2507+
}
2508+
}
2509+
2510+
public static class SearchDataItemsPage
2511+
extends AbstractPage<
2512+
SearchDataItemsRequest, SearchDataItemsResponse, DataItemView, SearchDataItemsPage> {
2513+
2514+
private SearchDataItemsPage(
2515+
PageContext<SearchDataItemsRequest, SearchDataItemsResponse, DataItemView> context,
2516+
SearchDataItemsResponse response) {
2517+
super(context, response);
2518+
}
2519+
2520+
private static SearchDataItemsPage createEmptyPage() {
2521+
return new SearchDataItemsPage(null, null);
2522+
}
2523+
2524+
@Override
2525+
protected SearchDataItemsPage createPage(
2526+
PageContext<SearchDataItemsRequest, SearchDataItemsResponse, DataItemView> context,
2527+
SearchDataItemsResponse response) {
2528+
return new SearchDataItemsPage(context, response);
2529+
}
2530+
2531+
@Override
2532+
public ApiFuture<SearchDataItemsPage> createPageAsync(
2533+
PageContext<SearchDataItemsRequest, SearchDataItemsResponse, DataItemView> context,
2534+
ApiFuture<SearchDataItemsResponse> futureResponse) {
2535+
return super.createPageAsync(context, futureResponse);
2536+
}
2537+
}
2538+
2539+
public static class SearchDataItemsFixedSizeCollection
2540+
extends AbstractFixedSizeCollection<
2541+
SearchDataItemsRequest,
2542+
SearchDataItemsResponse,
2543+
DataItemView,
2544+
SearchDataItemsPage,
2545+
SearchDataItemsFixedSizeCollection> {
2546+
2547+
private SearchDataItemsFixedSizeCollection(
2548+
List<SearchDataItemsPage> pages, int collectionSize) {
2549+
super(pages, collectionSize);
2550+
}
2551+
2552+
private static SearchDataItemsFixedSizeCollection createEmptyCollection() {
2553+
return new SearchDataItemsFixedSizeCollection(null, 0);
2554+
}
2555+
2556+
@Override
2557+
protected SearchDataItemsFixedSizeCollection createCollection(
2558+
List<SearchDataItemsPage> pages, int collectionSize) {
2559+
return new SearchDataItemsFixedSizeCollection(pages, collectionSize);
2560+
}
2561+
}
2562+
23512563
public static class ListSavedQueriesPagedResponse
23522564
extends AbstractPagedListResponse<
23532565
ListSavedQueriesRequest,

java-aiplatform/google-cloud-aiplatform/src/main/java/com/google/cloud/aiplatform/v1/DatasetServiceSettings.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListDatasetsPagedResponse;
2222
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListLocationsPagedResponse;
2323
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.ListSavedQueriesPagedResponse;
24+
import static com.google.cloud.aiplatform.v1.DatasetServiceClient.SearchDataItemsPagedResponse;
2425

2526
import com.google.api.core.ApiFunction;
2627
import com.google.api.core.BetaApi;
@@ -153,6 +154,13 @@ public UnaryCallSettings<ExportDataRequest, Operation> exportDataSettings() {
153154
return ((DatasetServiceStubSettings) getStubSettings()).listDataItemsSettings();
154155
}
155156

157+
/** Returns the object with the settings used for calls to searchDataItems. */
158+
public PagedCallSettings<
159+
SearchDataItemsRequest, SearchDataItemsResponse, SearchDataItemsPagedResponse>
160+
searchDataItemsSettings() {
161+
return ((DatasetServiceStubSettings) getStubSettings()).searchDataItemsSettings();
162+
}
163+
156164
/** Returns the object with the settings used for calls to listSavedQueries. */
157165
public PagedCallSettings<
158166
ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse>
@@ -367,6 +375,13 @@ public UnaryCallSettings.Builder<ExportDataRequest, Operation> exportDataSetting
367375
return getStubSettingsBuilder().listDataItemsSettings();
368376
}
369377

378+
/** Returns the builder for the settings used for calls to searchDataItems. */
379+
public PagedCallSettings.Builder<
380+
SearchDataItemsRequest, SearchDataItemsResponse, SearchDataItemsPagedResponse>
381+
searchDataItemsSettings() {
382+
return getStubSettingsBuilder().searchDataItemsSettings();
383+
}
384+
370385
/** Returns the builder for the settings used for calls to listSavedQueries. */
371386
public PagedCallSettings.Builder<
372387
ListSavedQueriesRequest, ListSavedQueriesResponse, ListSavedQueriesPagedResponse>

0 commit comments

Comments
 (0)