Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit 2d98e84

Browse files
feat: add listEntryGroups, listEntries to v1beta1 client (#87)
1 parent fd021e7 commit 2d98e84

File tree

7 files changed

+642
-345
lines changed

7 files changed

+642
-345
lines changed

google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java

Lines changed: 242 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,6 +1318,248 @@ public final UnaryCallable<LookupEntryRequest, Entry> lookupEntryCallable() {
13181318
return stub.lookupEntryCallable();
13191319
}
13201320

1321+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1322+
/**
1323+
* Lists entry groups.
1324+
*
1325+
* <p>Sample code:
1326+
*
1327+
* <pre><code>
1328+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1329+
* String formattedParent = DataCatalogClient.formatLocationName("[PROJECT]", "[LOCATION]");
1330+
* ListEntryGroupsResponse response = dataCatalogClient.listEntryGroups(formattedParent);
1331+
* }
1332+
* </code></pre>
1333+
*
1334+
* @param parent Required. The name of the location that contains the entry groups, which can be
1335+
* provided in URL format. Example:
1336+
* <p>&#42; projects/{project_id}/locations/{location}
1337+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1338+
*/
1339+
public final ListEntryGroupsResponse listEntryGroups(String parent) {
1340+
LOCATION_PATH_TEMPLATE.validate(parent, "listEntryGroups");
1341+
ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder().setParent(parent).build();
1342+
return listEntryGroups(request);
1343+
}
1344+
1345+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1346+
/**
1347+
* Lists entry groups.
1348+
*
1349+
* <p>Sample code:
1350+
*
1351+
* <pre><code>
1352+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1353+
* String formattedParent = DataCatalogClient.formatLocationName("[PROJECT]", "[LOCATION]");
1354+
* ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder()
1355+
* .setParent(formattedParent)
1356+
* .build();
1357+
* ListEntryGroupsResponse response = dataCatalogClient.listEntryGroups(request);
1358+
* }
1359+
* </code></pre>
1360+
*
1361+
* @param request The request object containing all of the parameters for the API call.
1362+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1363+
*/
1364+
public final ListEntryGroupsResponse listEntryGroups(ListEntryGroupsRequest request) {
1365+
return listEntryGroupsCallable().call(request);
1366+
}
1367+
1368+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1369+
/**
1370+
* Lists entry groups.
1371+
*
1372+
* <p>Sample code:
1373+
*
1374+
* <pre><code>
1375+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1376+
* String formattedParent = DataCatalogClient.formatLocationName("[PROJECT]", "[LOCATION]");
1377+
* ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder()
1378+
* .setParent(formattedParent)
1379+
* .build();
1380+
* ApiFuture&lt;ListEntryGroupsResponse&gt; future = dataCatalogClient.listEntryGroupsCallable().futureCall(request);
1381+
* // Do something
1382+
* ListEntryGroupsResponse response = future.get();
1383+
* }
1384+
* </code></pre>
1385+
*/
1386+
public final UnaryCallable<ListEntryGroupsRequest, ListEntryGroupsResponse>
1387+
listEntryGroupsCallable() {
1388+
return stub.listEntryGroupsCallable();
1389+
}
1390+
1391+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1392+
/**
1393+
* Lists entries.
1394+
*
1395+
* <p>Sample code:
1396+
*
1397+
* <pre><code>
1398+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1399+
* String formattedParent = DataCatalogClient.formatEntryGroupName("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
1400+
* ListEntriesResponse response = dataCatalogClient.listEntries(formattedParent);
1401+
* }
1402+
* </code></pre>
1403+
*
1404+
* @param parent Required. The name of the entry group that contains the entries, which can be
1405+
* provided in URL format. Example:
1406+
* <p>&#42; projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
1407+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1408+
*/
1409+
public final ListEntriesResponse listEntries(String parent) {
1410+
ENTRY_GROUP_PATH_TEMPLATE.validate(parent, "listEntries");
1411+
ListEntriesRequest request = ListEntriesRequest.newBuilder().setParent(parent).build();
1412+
return listEntries(request);
1413+
}
1414+
1415+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1416+
/**
1417+
* Lists entries.
1418+
*
1419+
* <p>Sample code:
1420+
*
1421+
* <pre><code>
1422+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1423+
* String formattedParent = DataCatalogClient.formatEntryGroupName("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
1424+
* ListEntriesRequest request = ListEntriesRequest.newBuilder()
1425+
* .setParent(formattedParent)
1426+
* .build();
1427+
* ListEntriesResponse response = dataCatalogClient.listEntries(request);
1428+
* }
1429+
* </code></pre>
1430+
*
1431+
* @param request The request object containing all of the parameters for the API call.
1432+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1433+
*/
1434+
public final ListEntriesResponse listEntries(ListEntriesRequest request) {
1435+
return listEntriesCallable().call(request);
1436+
}
1437+
1438+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1439+
/**
1440+
* Lists entries.
1441+
*
1442+
* <p>Sample code:
1443+
*
1444+
* <pre><code>
1445+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1446+
* String formattedParent = DataCatalogClient.formatEntryGroupName("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
1447+
* ListEntriesRequest request = ListEntriesRequest.newBuilder()
1448+
* .setParent(formattedParent)
1449+
* .build();
1450+
* ApiFuture&lt;ListEntriesResponse&gt; future = dataCatalogClient.listEntriesCallable().futureCall(request);
1451+
* // Do something
1452+
* ListEntriesResponse response = future.get();
1453+
* }
1454+
* </code></pre>
1455+
*/
1456+
public final UnaryCallable<ListEntriesRequest, ListEntriesResponse> listEntriesCallable() {
1457+
return stub.listEntriesCallable();
1458+
}
1459+
1460+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1461+
/**
1462+
* Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
1463+
* the `entry_group.name` parameter (see [Data Catalog Resource Project]
1464+
* (/data-catalog/docs/concepts/resource-project) for more information).
1465+
*
1466+
* <p>Sample code:
1467+
*
1468+
* <pre><code>
1469+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1470+
* EntryGroup entryGroup = EntryGroup.newBuilder().build();
1471+
* EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup);
1472+
* }
1473+
* </code></pre>
1474+
*
1475+
* @param entryGroup Required. The updated entry group. "name" field must be set.
1476+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1477+
*/
1478+
public final EntryGroup updateEntryGroup(EntryGroup entryGroup) {
1479+
UpdateEntryGroupRequest request =
1480+
UpdateEntryGroupRequest.newBuilder().setEntryGroup(entryGroup).build();
1481+
return updateEntryGroup(request);
1482+
}
1483+
1484+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1485+
/**
1486+
* Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
1487+
* the `entry_group.name` parameter (see [Data Catalog Resource Project]
1488+
* (/data-catalog/docs/concepts/resource-project) for more information).
1489+
*
1490+
* <p>Sample code:
1491+
*
1492+
* <pre><code>
1493+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1494+
* EntryGroup entryGroup = EntryGroup.newBuilder().build();
1495+
* FieldMask updateMask = FieldMask.newBuilder().build();
1496+
* EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup, updateMask);
1497+
* }
1498+
* </code></pre>
1499+
*
1500+
* @param entryGroup Required. The updated entry group. "name" field must be set.
1501+
* @param updateMask The fields to update on the entry group. If absent or empty, all modifiable
1502+
* fields are updated.
1503+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1504+
*/
1505+
public final EntryGroup updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask) {
1506+
UpdateEntryGroupRequest request =
1507+
UpdateEntryGroupRequest.newBuilder()
1508+
.setEntryGroup(entryGroup)
1509+
.setUpdateMask(updateMask)
1510+
.build();
1511+
return updateEntryGroup(request);
1512+
}
1513+
1514+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1515+
/**
1516+
* Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
1517+
* the `entry_group.name` parameter (see [Data Catalog Resource Project]
1518+
* (/data-catalog/docs/concepts/resource-project) for more information).
1519+
*
1520+
* <p>Sample code:
1521+
*
1522+
* <pre><code>
1523+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1524+
* EntryGroup entryGroup = EntryGroup.newBuilder().build();
1525+
* UpdateEntryGroupRequest request = UpdateEntryGroupRequest.newBuilder()
1526+
* .setEntryGroup(entryGroup)
1527+
* .build();
1528+
* EntryGroup response = dataCatalogClient.updateEntryGroup(request);
1529+
* }
1530+
* </code></pre>
1531+
*
1532+
* @param request The request object containing all of the parameters for the API call.
1533+
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
1534+
*/
1535+
public final EntryGroup updateEntryGroup(UpdateEntryGroupRequest request) {
1536+
return updateEntryGroupCallable().call(request);
1537+
}
1538+
1539+
// AUTO-GENERATED DOCUMENTATION AND METHOD
1540+
/**
1541+
* Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
1542+
* the `entry_group.name` parameter (see [Data Catalog Resource Project]
1543+
* (/data-catalog/docs/concepts/resource-project) for more information).
1544+
*
1545+
* <p>Sample code:
1546+
*
1547+
* <pre><code>
1548+
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1549+
* EntryGroup entryGroup = EntryGroup.newBuilder().build();
1550+
* UpdateEntryGroupRequest request = UpdateEntryGroupRequest.newBuilder()
1551+
* .setEntryGroup(entryGroup)
1552+
* .build();
1553+
* ApiFuture&lt;EntryGroup&gt; future = dataCatalogClient.updateEntryGroupCallable().futureCall(request);
1554+
* // Do something
1555+
* EntryGroup response = future.get();
1556+
* }
1557+
* </code></pre>
1558+
*/
1559+
public final UnaryCallable<UpdateEntryGroupRequest, EntryGroup> updateEntryGroupCallable() {
1560+
return stub.updateEntryGroupCallable();
1561+
}
1562+
13211563
// AUTO-GENERATED DOCUMENTATION AND METHOD
13221564
/**
13231565
* Creates a tag template. The user should enable the Data Catalog API in the project identified
@@ -2658,128 +2900,6 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq
26582900
return stub.testIamPermissionsCallable();
26592901
}
26602902

2661-
// AUTO-GENERATED DOCUMENTATION AND METHOD
2662-
/**
2663-
* Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
2664-
* the `entry_group.name` parameter (see [Data Catalog Resource Project]
2665-
* (/data-catalog/docs/concepts/resource-project) for more information).
2666-
*
2667-
* <p>Sample code:
2668-
*
2669-
* <pre><code>
2670-
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2671-
* UpdateEntryGroupRequest request = UpdateEntryGroupRequest.newBuilder().build();
2672-
* EntryGroup response = dataCatalogClient.updateEntryGroup(request);
2673-
* }
2674-
* </code></pre>
2675-
*
2676-
* @param request The request object containing all of the parameters for the API call.
2677-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2678-
*/
2679-
public final EntryGroup updateEntryGroup(UpdateEntryGroupRequest request) {
2680-
return updateEntryGroupCallable().call(request);
2681-
}
2682-
2683-
// AUTO-GENERATED DOCUMENTATION AND METHOD
2684-
/**
2685-
* Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
2686-
* the `entry_group.name` parameter (see [Data Catalog Resource Project]
2687-
* (/data-catalog/docs/concepts/resource-project) for more information).
2688-
*
2689-
* <p>Sample code:
2690-
*
2691-
* <pre><code>
2692-
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2693-
* UpdateEntryGroupRequest request = UpdateEntryGroupRequest.newBuilder().build();
2694-
* ApiFuture&lt;EntryGroup&gt; future = dataCatalogClient.updateEntryGroupCallable().futureCall(request);
2695-
* // Do something
2696-
* EntryGroup response = future.get();
2697-
* }
2698-
* </code></pre>
2699-
*/
2700-
public final UnaryCallable<UpdateEntryGroupRequest, EntryGroup> updateEntryGroupCallable() {
2701-
return stub.updateEntryGroupCallable();
2702-
}
2703-
2704-
// AUTO-GENERATED DOCUMENTATION AND METHOD
2705-
/**
2706-
* Lists entry groups.
2707-
*
2708-
* <p>Sample code:
2709-
*
2710-
* <pre><code>
2711-
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2712-
* ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder().build();
2713-
* ListEntryGroupsResponse response = dataCatalogClient.listEntryGroups(request);
2714-
* }
2715-
* </code></pre>
2716-
*
2717-
* @param request The request object containing all of the parameters for the API call.
2718-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2719-
*/
2720-
public final ListEntryGroupsResponse listEntryGroups(ListEntryGroupsRequest request) {
2721-
return listEntryGroupsCallable().call(request);
2722-
}
2723-
2724-
// AUTO-GENERATED DOCUMENTATION AND METHOD
2725-
/**
2726-
* Lists entry groups.
2727-
*
2728-
* <p>Sample code:
2729-
*
2730-
* <pre><code>
2731-
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2732-
* ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder().build();
2733-
* ApiFuture&lt;ListEntryGroupsResponse&gt; future = dataCatalogClient.listEntryGroupsCallable().futureCall(request);
2734-
* // Do something
2735-
* ListEntryGroupsResponse response = future.get();
2736-
* }
2737-
* </code></pre>
2738-
*/
2739-
public final UnaryCallable<ListEntryGroupsRequest, ListEntryGroupsResponse>
2740-
listEntryGroupsCallable() {
2741-
return stub.listEntryGroupsCallable();
2742-
}
2743-
2744-
// AUTO-GENERATED DOCUMENTATION AND METHOD
2745-
/**
2746-
* Lists entries.
2747-
*
2748-
* <p>Sample code:
2749-
*
2750-
* <pre><code>
2751-
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2752-
* ListEntriesRequest request = ListEntriesRequest.newBuilder().build();
2753-
* ListEntriesResponse response = dataCatalogClient.listEntries(request);
2754-
* }
2755-
* </code></pre>
2756-
*
2757-
* @param request The request object containing all of the parameters for the API call.
2758-
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
2759-
*/
2760-
public final ListEntriesResponse listEntries(ListEntriesRequest request) {
2761-
return listEntriesCallable().call(request);
2762-
}
2763-
2764-
// AUTO-GENERATED DOCUMENTATION AND METHOD
2765-
/**
2766-
* Lists entries.
2767-
*
2768-
* <p>Sample code:
2769-
*
2770-
* <pre><code>
2771-
* try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2772-
* ListEntriesRequest request = ListEntriesRequest.newBuilder().build();
2773-
* ApiFuture&lt;ListEntriesResponse&gt; future = dataCatalogClient.listEntriesCallable().futureCall(request);
2774-
* // Do something
2775-
* ListEntriesResponse response = future.get();
2776-
* }
2777-
* </code></pre>
2778-
*/
2779-
public final UnaryCallable<ListEntriesRequest, ListEntriesResponse> listEntriesCallable() {
2780-
return stub.listEntriesCallable();
2781-
}
2782-
27832903
@Override
27842904
public final void close() {
27852905
stub.close();

0 commit comments

Comments
 (0)