diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java index 537fccc2..a1380094 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/DataCatalogClient.java @@ -50,6 +50,15 @@ *

This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

{@code
+ * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+ *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ *   String entryGroupId = "entryGroupId1228924712";
+ *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+ *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
+ * }
+ * }
+ * *

Note: close() needs to be called on the DataCatalogClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -164,6 +173,19 @@ public DataCatalogStub getStub() { * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more * information. * + *

Sample code: + * + *

{@code
+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
+   *   String query = "query107944136";
+   *   for (SearchCatalogResult element :
+   *       dataCatalogClient.searchCatalog(scope, query).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * * @param scope Required. The scope of this search request. A `scope` that has empty * `include_org_ids`, `include_project_ids` AND false `include_gcp_public_datasets` is * considered invalid. Data Catalog will return an error in such a case. @@ -203,6 +225,24 @@ public final SearchCatalogPagedResponse searchCatalog( * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more * information. * + *

Sample code: + * + *

{@code
+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   SearchCatalogRequest request =
+   *       SearchCatalogRequest.newBuilder()
+   *           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   for (SearchCatalogResult element : dataCatalogClient.searchCatalog(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 */ @@ -227,6 +267,25 @@ public final SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest reque * information. * *

Sample code: + * + *

{@code
+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   SearchCatalogRequest request =
+   *       SearchCatalogRequest.newBuilder()
+   *           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
+   *           .setQuery("query107944136")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setOrderBy("orderBy-1207110587")
+   *           .build();
+   *   ApiFuture future =
+   *       dataCatalogClient.searchCatalogPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (SearchCatalogResult element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
*/ public final UnaryCallable searchCatalogPagedCallable() { @@ -250,6 +309,23 @@ public final SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest reque * information. * *

Sample code: + * + *

{@code
+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   while (true) {
+   *     SearchCatalogResponse response = dataCatalogClient.searchCatalogCallable().call(request);
+   *     for (SearchCatalogResult element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
*/ public final UnaryCallable searchCatalogCallable() { return stub.searchCatalogCallable(); @@ -274,6 +350,17 @@ public final UnaryCallable searchCa * (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

Sample code: + * + *

{@code
+   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
+   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+   *   String entryGroupId = "entryGroupId1228924712";
+   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
+   *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
+   * }
+   * }
+ * * @param parent Required. The name of the project this entry group is in. Example: *
    *
  • projects/{project_id}/locations/{location} @@ -316,6 +403,17 @@ public final EntryGroup createEntryGroup( * (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

    Sample code: + * + *

    {@code
    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
    +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
    +   *   String entryGroupId = "entryGroupId1228924712";
    +   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
    +   *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
    +   * }
    +   * }
    + * * @param parent Required. The name of the project this entry group is in. Example: *
      *
    • projects/{project_id}/locations/{location} @@ -358,6 +456,20 @@ public final EntryGroup createEntryGroup( * (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   CreateEntryGroupRequest request =
      +   *       CreateEntryGroupRequest.newBuilder()
      +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
      +   *           .setEntryGroupId("entryGroupId1228924712")
      +   *           .setEntryGroup(EntryGroup.newBuilder().build())
      +   *           .build();
      +   *   EntryGroup response = dataCatalogClient.createEntryGroup(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 */ @@ -385,6 +497,21 @@ public final EntryGroup createEntryGroup(CreateEntryGroupRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   CreateEntryGroupRequest request =
      +   *       CreateEntryGroupRequest.newBuilder()
      +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
      +   *           .setEntryGroupId("entryGroupId1228924712")
      +   *           .setEntryGroup(EntryGroup.newBuilder().build())
      +   *           .build();
      +   *   ApiFuture future =
      +   *       dataCatalogClient.createEntryGroupCallable().futureCall(request);
      +   *   // Do something.
      +   *   EntryGroup response = future.get();
      +   * }
      +   * }
      */ public final UnaryCallable createEntryGroupCallable() { return stub.createEntryGroupCallable(); @@ -394,6 +521,15 @@ public final UnaryCallable createEntryGroup /** * Gets an EntryGroup. * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
      +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name);
      +   * }
      +   * }
      + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -408,6 +544,15 @@ public final EntryGroup getEntryGroup(EntryGroupName name) { /** * Gets an EntryGroup. * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
      +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name);
      +   * }
      +   * }
      + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -421,6 +566,16 @@ public final EntryGroup getEntryGroup(String name) { /** * Gets an EntryGroup. * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
      +   *   FieldMask readMask = FieldMask.newBuilder().build();
      +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
      +   * }
      +   * }
      + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @param readMask The fields to return. If not set or empty, all fields are returned. @@ -439,6 +594,16 @@ public final EntryGroup getEntryGroup(EntryGroupName name, FieldMask readMask) { /** * Gets an EntryGroup. * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
      +   *   FieldMask readMask = FieldMask.newBuilder().build();
      +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
      +   * }
      +   * }
      + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @param readMask The fields to return. If not set or empty, all fields are returned. @@ -454,6 +619,19 @@ public final EntryGroup getEntryGroup(String name, FieldMask readMask) { /** * Gets an EntryGroup. * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   GetEntryGroupRequest request =
      +   *       GetEntryGroupRequest.newBuilder()
      +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
      +   *           .setReadMask(FieldMask.newBuilder().build())
      +   *           .build();
      +   *   EntryGroup response = dataCatalogClient.getEntryGroup(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 */ @@ -466,6 +644,19 @@ public final EntryGroup getEntryGroup(GetEntryGroupRequest request) { * Gets an EntryGroup. * *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   GetEntryGroupRequest request =
      +   *       GetEntryGroupRequest.newBuilder()
      +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
      +   *           .setReadMask(FieldMask.newBuilder().build())
      +   *           .build();
      +   *   ApiFuture future = dataCatalogClient.getEntryGroupCallable().futureCall(request);
      +   *   // Do something.
      +   *   EntryGroup response = future.get();
      +   * }
      +   * }
      */ public final UnaryCallable getEntryGroupCallable() { return stub.getEntryGroupCallable(); @@ -477,6 +668,15 @@ public final UnaryCallable getEntryGroupCallab * the `entry_group.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
      +   *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup);
      +   * }
      +   * }
      + * * @param entryGroup Required. The updated entry group. "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -492,6 +692,16 @@ public final EntryGroup updateEntryGroup(EntryGroup entryGroup) { * the `entry_group.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
      +   *   FieldMask updateMask = FieldMask.newBuilder().build();
      +   *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup, updateMask);
      +   * }
      +   * }
      + * * @param entryGroup Required. The updated entry group. "name" field must be set. * @param updateMask The fields to update on the entry group. If absent or empty, all modifiable * fields are updated. @@ -512,6 +722,19 @@ public final EntryGroup updateEntryGroup(EntryGroup entryGroup, FieldMask update * the `entry_group.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   UpdateEntryGroupRequest request =
      +   *       UpdateEntryGroupRequest.newBuilder()
      +   *           .setEntryGroup(EntryGroup.newBuilder().build())
      +   *           .setUpdateMask(FieldMask.newBuilder().build())
      +   *           .build();
      +   *   EntryGroup response = dataCatalogClient.updateEntryGroup(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 */ @@ -526,6 +749,20 @@ public final EntryGroup updateEntryGroup(UpdateEntryGroupRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   UpdateEntryGroupRequest request =
      +   *       UpdateEntryGroupRequest.newBuilder()
      +   *           .setEntryGroup(EntryGroup.newBuilder().build())
      +   *           .setUpdateMask(FieldMask.newBuilder().build())
      +   *           .build();
      +   *   ApiFuture future =
      +   *       dataCatalogClient.updateEntryGroupCallable().futureCall(request);
      +   *   // Do something.
      +   *   EntryGroup response = future.get();
      +   * }
      +   * }
      */ public final UnaryCallable updateEntryGroupCallable() { return stub.updateEntryGroupCallable(); @@ -538,6 +775,15 @@ public final UnaryCallable updateEntryGroup * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
      +   *   dataCatalogClient.deleteEntryGroup(name);
      +   * }
      +   * }
      + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -555,6 +801,15 @@ public final void deleteEntryGroup(EntryGroupName name) { * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
      +   *   dataCatalogClient.deleteEntryGroup(name);
      +   * }
      +   * }
      + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -571,6 +826,19 @@ public final void deleteEntryGroup(String name) { * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   DeleteEntryGroupRequest request =
      +   *       DeleteEntryGroupRequest.newBuilder()
      +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
      +   *           .setForce(true)
      +   *           .build();
      +   *   dataCatalogClient.deleteEntryGroup(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 */ @@ -586,6 +854,19 @@ public final void deleteEntryGroup(DeleteEntryGroupRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   DeleteEntryGroupRequest request =
      +   *       DeleteEntryGroupRequest.newBuilder()
      +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
      +   *           .setForce(true)
      +   *           .build();
      +   *   ApiFuture future = dataCatalogClient.deleteEntryGroupCallable().futureCall(request);
      +   *   // Do something.
      +   *   future.get();
      +   * }
      +   * }
      */ public final UnaryCallable deleteEntryGroupCallable() { return stub.deleteEntryGroupCallable(); @@ -595,6 +876,17 @@ public final UnaryCallable deleteEntryGroupCalla /** * Lists entry groups. * + *

      Sample code: + * + *

      {@code
      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
      +   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
      +   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
      +   *     // doThingsWith(element);
      +   *   }
      +   * }
      +   * }
      + * * @param parent Required. The name of the location that contains the entry groups, which can be * provided in URL format. Example: *
        @@ -615,6 +907,17 @@ public final ListEntryGroupsPagedResponse listEntryGroups(EntryGroupName parent) /** * Lists entry groups. * + *

        Sample code: + * + *

        {@code
        +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
        +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
        +   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
        +   *     // doThingsWith(element);
        +   *   }
        +   * }
        +   * }
        + * * @param parent Required. The name of the location that contains the entry groups, which can be * provided in URL format. Example: *
          @@ -632,6 +935,22 @@ public final ListEntryGroupsPagedResponse listEntryGroups(String parent) { /** * Lists entry groups. * + *

          Sample code: + * + *

          {@code
          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
          +   *   ListEntryGroupsRequest request =
          +   *       ListEntryGroupsRequest.newBuilder()
          +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
          +   *           .setPageSize(883849137)
          +   *           .setPageToken("pageToken873572522")
          +   *           .build();
          +   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(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 */ @@ -644,6 +963,23 @@ public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest * Lists entry groups. * *

          Sample code: + * + *

          {@code
          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
          +   *   ListEntryGroupsRequest request =
          +   *       ListEntryGroupsRequest.newBuilder()
          +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
          +   *           .setPageSize(883849137)
          +   *           .setPageToken("pageToken873572522")
          +   *           .build();
          +   *   ApiFuture future =
          +   *       dataCatalogClient.listEntryGroupsPagedCallable().futureCall(request);
          +   *   // Do something.
          +   *   for (EntryGroup element : future.get().iterateAll()) {
          +   *     // doThingsWith(element);
          +   *   }
          +   * }
          +   * }
          */ public final UnaryCallable listEntryGroupsPagedCallable() { @@ -655,6 +991,24 @@ public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest * Lists entry groups. * *

          Sample code: + * + *

          {@code
          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
          +   *   while (true) {
          +   *     ListEntryGroupsResponse response =
          +   *         dataCatalogClient.listEntryGroupsCallable().call(request);
          +   *     for (EntryGroup element : response.getResponsesList()) {
          +   *       // doThingsWith(element);
          +   *     }
          +   *     String nextPageToken = response.getNextPageToken();
          +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
          +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
          +   *     } else {
          +   *       break;
          +   *     }
          +   *   }
          +   * }
          +   * }
          */ public final UnaryCallable listEntryGroupsCallable() { @@ -671,6 +1025,17 @@ public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest * *

          A maximum of 100,000 entries may be created per entry group. * + *

          Sample code: + * + *

          {@code
          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
          +   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
          +   *   String entryId = "entryId-1591558867";
          +   *   Entry entry = Entry.newBuilder().build();
          +   *   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
          +   * }
          +   * }
          + * * @param parent Required. The name of the entry group this entry is in. Example: *
            *
          • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} @@ -701,6 +1066,17 @@ public final Entry createEntry(EntryGroupName parent, String entryId, Entry entr * *

            A maximum of 100,000 entries may be created per entry group. * + *

            Sample code: + * + *

            {@code
            +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
            +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
            +   *   String entryId = "entryId-1591558867";
            +   *   Entry entry = Entry.newBuilder().build();
            +   *   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
            +   * }
            +   * }
            + * * @param parent Required. The name of the entry group this entry is in. Example: *
              *
            • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} @@ -731,6 +1107,20 @@ public final Entry createEntry(String parent, String entryId, Entry entry) { * *

              A maximum of 100,000 entries may be created per entry group. * + *

              Sample code: + * + *

              {@code
              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
              +   *   CreateEntryRequest request =
              +   *       CreateEntryRequest.newBuilder()
              +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
              +   *           .setEntryId("entryId-1591558867")
              +   *           .setEntry(Entry.newBuilder().build())
              +   *           .build();
              +   *   Entry response = dataCatalogClient.createEntry(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 */ @@ -749,6 +1139,20 @@ public final Entry createEntry(CreateEntryRequest request) { *

              A maximum of 100,000 entries may be created per entry group. * *

              Sample code: + * + *

              {@code
              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
              +   *   CreateEntryRequest request =
              +   *       CreateEntryRequest.newBuilder()
              +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
              +   *           .setEntryId("entryId-1591558867")
              +   *           .setEntry(Entry.newBuilder().build())
              +   *           .build();
              +   *   ApiFuture future = dataCatalogClient.createEntryCallable().futureCall(request);
              +   *   // Do something.
              +   *   Entry response = future.get();
              +   * }
              +   * }
              */ public final UnaryCallable createEntryCallable() { return stub.createEntryCallable(); @@ -760,6 +1164,15 @@ public final UnaryCallable createEntryCallable() { * by the `entry.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

              Sample code: + * + *

              {@code
              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
              +   *   Entry entry = Entry.newBuilder().build();
              +   *   Entry response = dataCatalogClient.updateEntry(entry);
              +   * }
              +   * }
              + * * @param entry Required. The updated entry. The "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -774,6 +1187,16 @@ public final Entry updateEntry(Entry entry) { * by the `entry.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

              Sample code: + * + *

              {@code
              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
              +   *   Entry entry = Entry.newBuilder().build();
              +   *   FieldMask updateMask = FieldMask.newBuilder().build();
              +   *   Entry response = dataCatalogClient.updateEntry(entry, updateMask);
              +   * }
              +   * }
              + * * @param entry Required. The updated entry. The "name" field must be set. * @param updateMask The fields to update on the entry. If absent or empty, all modifiable fields * are updated. @@ -801,6 +1224,19 @@ public final Entry updateEntry(Entry entry, FieldMask updateMask) { * by the `entry.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

              Sample code: + * + *

              {@code
              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
              +   *   UpdateEntryRequest request =
              +   *       UpdateEntryRequest.newBuilder()
              +   *           .setEntry(Entry.newBuilder().build())
              +   *           .setUpdateMask(FieldMask.newBuilder().build())
              +   *           .build();
              +   *   Entry response = dataCatalogClient.updateEntry(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 */ @@ -815,6 +1251,19 @@ public final Entry updateEntry(UpdateEntryRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

              Sample code: + * + *

              {@code
              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
              +   *   UpdateEntryRequest request =
              +   *       UpdateEntryRequest.newBuilder()
              +   *           .setEntry(Entry.newBuilder().build())
              +   *           .setUpdateMask(FieldMask.newBuilder().build())
              +   *           .build();
              +   *   ApiFuture future = dataCatalogClient.updateEntryCallable().futureCall(request);
              +   *   // Do something.
              +   *   Entry response = future.get();
              +   * }
              +   * }
              */ public final UnaryCallable updateEntryCallable() { return stub.updateEntryCallable(); @@ -828,6 +1277,15 @@ public final UnaryCallable updateEntryCallable() { * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

              Sample code: + * + *

              {@code
              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
              +   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
              +   *   dataCatalogClient.deleteEntry(name);
              +   * }
              +   * }
              + * * @param name Required. The name of the entry. Example: *
                *
              • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -849,6 +1307,15 @@ public final void deleteEntry(EntryName name) { * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                Sample code: + * + *

                {@code
                +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                +   *   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
                +   *   dataCatalogClient.deleteEntry(name);
                +   * }
                +   * }
                + * * @param name Required. The name of the entry. Example: *
                  *
                • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -869,6 +1336,19 @@ public final void deleteEntry(String name) { * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                  Sample code: + * + *

                  {@code
                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                  +   *   DeleteEntryRequest request =
                  +   *       DeleteEntryRequest.newBuilder()
                  +   *           .setName(
                  +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                  +   *           .build();
                  +   *   dataCatalogClient.deleteEntry(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 */ @@ -885,6 +1365,19 @@ public final void deleteEntry(DeleteEntryRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                  Sample code: + * + *

                  {@code
                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                  +   *   DeleteEntryRequest request =
                  +   *       DeleteEntryRequest.newBuilder()
                  +   *           .setName(
                  +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                  +   *           .build();
                  +   *   ApiFuture future = dataCatalogClient.deleteEntryCallable().futureCall(request);
                  +   *   // Do something.
                  +   *   future.get();
                  +   * }
                  +   * }
                  */ public final UnaryCallable deleteEntryCallable() { return stub.deleteEntryCallable(); @@ -894,6 +1387,15 @@ public final UnaryCallable deleteEntryCallable() { /** * Gets an entry. * + *

                  Sample code: + * + *

                  {@code
                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                  +   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
                  +   *   Entry response = dataCatalogClient.getEntry(name);
                  +   * }
                  +   * }
                  + * * @param name Required. The name of the entry. Example: *
                    *
                  • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -911,6 +1413,15 @@ public final Entry getEntry(EntryName name) { /** * Gets an entry. * + *

                    Sample code: + * + *

                    {@code
                    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                    +   *   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
                    +   *   Entry response = dataCatalogClient.getEntry(name);
                    +   * }
                    +   * }
                    + * * @param name Required. The name of the entry. Example: *
                      *
                    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -927,6 +1438,19 @@ public final Entry getEntry(String name) { /** * Gets an entry. * + *

                      Sample code: + * + *

                      {@code
                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                      +   *   GetEntryRequest request =
                      +   *       GetEntryRequest.newBuilder()
                      +   *           .setName(
                      +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                      +   *           .build();
                      +   *   Entry response = dataCatalogClient.getEntry(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 */ @@ -939,6 +1463,19 @@ public final Entry getEntry(GetEntryRequest request) { * Gets an entry. * *

                      Sample code: + * + *

                      {@code
                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                      +   *   GetEntryRequest request =
                      +   *       GetEntryRequest.newBuilder()
                      +   *           .setName(
                      +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                      +   *           .build();
                      +   *   ApiFuture future = dataCatalogClient.getEntryCallable().futureCall(request);
                      +   *   // Do something.
                      +   *   Entry response = future.get();
                      +   * }
                      +   * }
                      */ public final UnaryCallable getEntryCallable() { return stub.getEntryCallable(); @@ -949,6 +1486,15 @@ public final UnaryCallable getEntryCallable() { * Get an entry by target resource name. This method allows clients to use the resource name from * the source Google Cloud Platform service to get the Data Catalog Entry. * + *

                      Sample code: + * + *

                      {@code
                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                      +   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
                      +   *   Entry response = dataCatalogClient.lookupEntry(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 */ @@ -962,6 +1508,15 @@ public final Entry lookupEntry(LookupEntryRequest request) { * the source Google Cloud Platform service to get the Data Catalog Entry. * *

                      Sample code: + * + *

                      {@code
                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                      +   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
                      +   *   ApiFuture future = dataCatalogClient.lookupEntryCallable().futureCall(request);
                      +   *   // Do something.
                      +   *   Entry response = future.get();
                      +   * }
                      +   * }
                      */ public final UnaryCallable lookupEntryCallable() { return stub.lookupEntryCallable(); @@ -971,6 +1526,17 @@ public final UnaryCallable lookupEntryCallable() { /** * Lists entries. * + *

                      Sample code: + * + *

                      {@code
                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                      +   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
                      +   *   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
                      +   *     // doThingsWith(element);
                      +   *   }
                      +   * }
                      +   * }
                      + * * @param parent Required. The name of the entry group that contains the entries, which can be * provided in URL format. Example: *
                        @@ -991,6 +1557,17 @@ public final ListEntriesPagedResponse listEntries(EntryGroupName parent) { /** * Lists entries. * + *

                        Sample code: + * + *

                        {@code
                        +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                        +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                        +   *   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
                        +   *     // doThingsWith(element);
                        +   *   }
                        +   * }
                        +   * }
                        + * * @param parent Required. The name of the entry group that contains the entries, which can be * provided in URL format. Example: *
                          @@ -1008,6 +1585,23 @@ public final ListEntriesPagedResponse listEntries(String parent) { /** * Lists entries. * + *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   ListEntriesRequest request =
                          +   *       ListEntriesRequest.newBuilder()
                          +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                          +   *           .setPageSize(883849137)
                          +   *           .setPageToken("pageToken873572522")
                          +   *           .setReadMask(FieldMask.newBuilder().build())
                          +   *           .build();
                          +   *   for (Entry element : dataCatalogClient.listEntries(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 */ @@ -1020,6 +1614,23 @@ public final ListEntriesPagedResponse listEntries(ListEntriesRequest request) { * Lists entries. * *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   ListEntriesRequest request =
                          +   *       ListEntriesRequest.newBuilder()
                          +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                          +   *           .setPageSize(883849137)
                          +   *           .setPageToken("pageToken873572522")
                          +   *           .setReadMask(FieldMask.newBuilder().build())
                          +   *           .build();
                          +   *   ApiFuture future = dataCatalogClient.listEntriesPagedCallable().futureCall(request);
                          +   *   // Do something.
                          +   *   for (Entry element : future.get().iterateAll()) {
                          +   *     // doThingsWith(element);
                          +   *   }
                          +   * }
                          +   * }
                          */ public final UnaryCallable listEntriesPagedCallable() { @@ -1031,6 +1642,23 @@ public final ListEntriesPagedResponse listEntries(ListEntriesRequest request) { * Lists entries. * *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   while (true) {
                          +   *     ListEntriesResponse response = dataCatalogClient.listEntriesCallable().call(request);
                          +   *     for (Entry element : response.getResponsesList()) {
                          +   *       // doThingsWith(element);
                          +   *     }
                          +   *     String nextPageToken = response.getNextPageToken();
                          +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                          +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                          +   *     } else {
                          +   *       break;
                          +   *     }
                          +   *   }
                          +   * }
                          +   * }
                          */ public final UnaryCallable listEntriesCallable() { return stub.listEntriesCallable(); @@ -1043,6 +1671,18 @@ public final UnaryCallable listEntriesC * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                          +   *   String tagTemplateId = "tagTemplateId-1438776721";
                          +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                          +   *   TagTemplate response =
                          +   *       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
                          +   * }
                          +   * }
                          + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). *

                          Example: @@ -1072,6 +1712,18 @@ public final TagTemplate createTagTemplate( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   String parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                          +   *   String tagTemplateId = "tagTemplateId-1438776721";
                          +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                          +   *   TagTemplate response =
                          +   *       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
                          +   * }
                          +   * }
                          + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). *

                          Example: @@ -1101,6 +1753,20 @@ public final TagTemplate createTagTemplate( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   CreateTagTemplateRequest request =
                          +   *       CreateTagTemplateRequest.newBuilder()
                          +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                          +   *           .setTagTemplateId("tagTemplateId-1438776721")
                          +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                          +   *           .build();
                          +   *   TagTemplate response = dataCatalogClient.createTagTemplate(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 */ @@ -1116,6 +1782,21 @@ public final TagTemplate createTagTemplate(CreateTagTemplateRequest request) { * information). * *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   CreateTagTemplateRequest request =
                          +   *       CreateTagTemplateRequest.newBuilder()
                          +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                          +   *           .setTagTemplateId("tagTemplateId-1438776721")
                          +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                          +   *           .build();
                          +   *   ApiFuture future =
                          +   *       dataCatalogClient.createTagTemplateCallable().futureCall(request);
                          +   *   // Do something.
                          +   *   TagTemplate response = future.get();
                          +   * }
                          +   * }
                          */ public final UnaryCallable createTagTemplateCallable() { return stub.createTagTemplateCallable(); @@ -1125,6 +1806,15 @@ public final UnaryCallable createTagTempl /** * Gets a tag template. * + *

                          Sample code: + * + *

                          {@code
                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                          +   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                          +   *   TagTemplate response = dataCatalogClient.getTagTemplate(name);
                          +   * }
                          +   * }
                          + * * @param name Required. The name of the tag template. Example: *
                            *
                          • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1142,6 +1832,15 @@ public final TagTemplate getTagTemplate(TagTemplateName name) { /** * Gets a tag template. * + *

                            Sample code: + * + *

                            {@code
                            +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                            +   *   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                            +   *   TagTemplate response = dataCatalogClient.getTagTemplate(name);
                            +   * }
                            +   * }
                            + * * @param name Required. The name of the tag template. Example: *
                              *
                            • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1158,6 +1857,18 @@ public final TagTemplate getTagTemplate(String name) { /** * Gets a tag template. * + *

                              Sample code: + * + *

                              {@code
                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                              +   *   GetTagTemplateRequest request =
                              +   *       GetTagTemplateRequest.newBuilder()
                              +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                              +   *           .build();
                              +   *   TagTemplate response = dataCatalogClient.getTagTemplate(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 */ @@ -1170,6 +1881,19 @@ public final TagTemplate getTagTemplate(GetTagTemplateRequest request) { * Gets a tag template. * *

                              Sample code: + * + *

                              {@code
                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                              +   *   GetTagTemplateRequest request =
                              +   *       GetTagTemplateRequest.newBuilder()
                              +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                              +   *           .build();
                              +   *   ApiFuture future =
                              +   *       dataCatalogClient.getTagTemplateCallable().futureCall(request);
                              +   *   // Do something.
                              +   *   TagTemplate response = future.get();
                              +   * }
                              +   * }
                              */ public final UnaryCallable getTagTemplateCallable() { return stub.getTagTemplateCallable(); @@ -1183,6 +1907,15 @@ public final UnaryCallable getTagTemplateCal * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                              Sample code: + * + *

                              {@code
                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                              +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                              +   *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate);
                              +   * }
                              +   * }
                              + * * @param tagTemplate Required. The template to update. The "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1200,6 +1933,16 @@ public final TagTemplate updateTagTemplate(TagTemplate tagTemplate) { * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                              Sample code: + * + *

                              {@code
                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                              +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                              +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                              +   *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate, updateMask);
                              +   * }
                              +   * }
                              + * * @param tagTemplate Required. The template to update. The "name" field must be set. * @param updateMask The field mask specifies the parts of the template to overwrite. *

                              Allowed fields: @@ -1224,6 +1967,19 @@ public final TagTemplate updateTagTemplate(TagTemplate tagTemplate, FieldMask up * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                              Sample code: + * + *

                              {@code
                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                              +   *   UpdateTagTemplateRequest request =
                              +   *       UpdateTagTemplateRequest.newBuilder()
                              +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                              +   *           .setUpdateMask(FieldMask.newBuilder().build())
                              +   *           .build();
                              +   *   TagTemplate response = dataCatalogClient.updateTagTemplate(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 */ @@ -1240,6 +1996,20 @@ public final TagTemplate updateTagTemplate(UpdateTagTemplateRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                              Sample code: + * + *

                              {@code
                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                              +   *   UpdateTagTemplateRequest request =
                              +   *       UpdateTagTemplateRequest.newBuilder()
                              +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                              +   *           .setUpdateMask(FieldMask.newBuilder().build())
                              +   *           .build();
                              +   *   ApiFuture future =
                              +   *       dataCatalogClient.updateTagTemplateCallable().futureCall(request);
                              +   *   // Do something.
                              +   *   TagTemplate response = future.get();
                              +   * }
                              +   * }
                              */ public final UnaryCallable updateTagTemplateCallable() { return stub.updateTagTemplateCallable(); @@ -1251,6 +2021,16 @@ public final UnaryCallable updateTagTempl * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                              Sample code: + * + *

                              {@code
                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                              +   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                              +   *   boolean force = true;
                              +   *   dataCatalogClient.deleteTagTemplate(name, force);
                              +   * }
                              +   * }
                              + * * @param name Required. The name of the tag template to delete. Example: *
                                *
                              • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1276,6 +2056,16 @@ public final void deleteTagTemplate(TagTemplateName name, boolean force) { * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                Sample code: + * + *

                                {@code
                                +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                +   *   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                +   *   boolean force = true;
                                +   *   dataCatalogClient.deleteTagTemplate(name, force);
                                +   * }
                                +   * }
                                + * * @param name Required. The name of the tag template to delete. Example: *
                                  *
                                • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1298,6 +2088,19 @@ public final void deleteTagTemplate(String name, boolean force) { * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                  Sample code: + * + *

                                  {@code
                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                  +   *   DeleteTagTemplateRequest request =
                                  +   *       DeleteTagTemplateRequest.newBuilder()
                                  +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                  +   *           .setForce(true)
                                  +   *           .build();
                                  +   *   dataCatalogClient.deleteTagTemplate(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 */ @@ -1312,6 +2115,19 @@ public final void deleteTagTemplate(DeleteTagTemplateRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                  Sample code: + * + *

                                  {@code
                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                  +   *   DeleteTagTemplateRequest request =
                                  +   *       DeleteTagTemplateRequest.newBuilder()
                                  +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                  +   *           .setForce(true)
                                  +   *           .build();
                                  +   *   ApiFuture future = dataCatalogClient.deleteTagTemplateCallable().futureCall(request);
                                  +   *   // Do something.
                                  +   *   future.get();
                                  +   * }
                                  +   * }
                                  */ public final UnaryCallable deleteTagTemplateCallable() { return stub.deleteTagTemplateCallable(); @@ -1324,6 +2140,18 @@ public final UnaryCallable deleteTagTemplateCal * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                  Sample code: + * + *

                                  {@code
                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                  +   *   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                                  +   *   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
                                  +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                  +   *   TagTemplateField response =
                                  +   *       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
                                  +   * }
                                  +   * }
                                  + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). *

                                  Example: @@ -1356,6 +2184,18 @@ public final TagTemplateField createTagTemplateField( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                  Sample code: + * + *

                                  {@code
                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                  +   *   String parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                  +   *   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
                                  +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                  +   *   TagTemplateField response =
                                  +   *       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
                                  +   * }
                                  +   * }
                                  + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). *

                                  Example: @@ -1388,6 +2228,20 @@ public final TagTemplateField createTagTemplateField( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                  Sample code: + * + *

                                  {@code
                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                  +   *   CreateTagTemplateFieldRequest request =
                                  +   *       CreateTagTemplateFieldRequest.newBuilder()
                                  +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                  +   *           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
                                  +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                  +   *           .build();
                                  +   *   TagTemplateField response = dataCatalogClient.createTagTemplateField(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 */ @@ -1403,6 +2257,21 @@ public final TagTemplateField createTagTemplateField(CreateTagTemplateFieldReque * information). * *

                                  Sample code: + * + *

                                  {@code
                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                  +   *   CreateTagTemplateFieldRequest request =
                                  +   *       CreateTagTemplateFieldRequest.newBuilder()
                                  +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                  +   *           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
                                  +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                  +   *           .build();
                                  +   *   ApiFuture future =
                                  +   *       dataCatalogClient.createTagTemplateFieldCallable().futureCall(request);
                                  +   *   // Do something.
                                  +   *   TagTemplateField response = future.get();
                                  +   * }
                                  +   * }
                                  */ public final UnaryCallable createTagTemplateFieldCallable() { @@ -1416,6 +2285,17 @@ public final TagTemplateField createTagTemplateField(CreateTagTemplateFieldReque * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                  Sample code: + * + *

                                  {@code
                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                  +   *   TagTemplateFieldName name =
                                  +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                  +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                  +   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
                                  +   * }
                                  +   * }
                                  + * * @param name Required. The name of the tag template field. Example: *
                                    *
                                  • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1441,6 +2321,18 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                    Sample code: + * + *

                                    {@code
                                    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                    +   *   String name =
                                    +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                    +   *           .toString();
                                    +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                    +   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
                                    +   * }
                                    +   * }
                                    + * * @param name Required. The name of the tag template field. Example: *
                                      *
                                    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1466,6 +2358,19 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                      Sample code: + * + *

                                      {@code
                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                      +   *   TagTemplateFieldName name =
                                      +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                      +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                      +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                      +   *   TagTemplateField response =
                                      +   *       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
                                      +   * }
                                      +   * }
                                      + * * @param name Required. The name of the tag template field. Example: *
                                        *
                                      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1499,6 +2404,20 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                        Sample code: + * + *

                                        {@code
                                        +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                        +   *   String name =
                                        +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                        +   *           .toString();
                                        +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                        +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                        +   *   TagTemplateField response =
                                        +   *       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
                                        +   * }
                                        +   * }
                                        + * * @param name Required. The name of the tag template field. Example: *
                                          *
                                        • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1532,6 +2451,22 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                          Sample code: + * + *

                                          {@code
                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                          +   *   UpdateTagTemplateFieldRequest request =
                                          +   *       UpdateTagTemplateFieldRequest.newBuilder()
                                          +   *           .setName(
                                          +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                          +   *                   .toString())
                                          +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                          +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                          +   *           .build();
                                          +   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(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 */ @@ -1547,6 +2482,23 @@ public final TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldReque * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                          Sample code: + * + *

                                          {@code
                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                          +   *   UpdateTagTemplateFieldRequest request =
                                          +   *       UpdateTagTemplateFieldRequest.newBuilder()
                                          +   *           .setName(
                                          +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                          +   *                   .toString())
                                          +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                          +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                          +   *           .build();
                                          +   *   ApiFuture future =
                                          +   *       dataCatalogClient.updateTagTemplateFieldCallable().futureCall(request);
                                          +   *   // Do something.
                                          +   *   TagTemplateField response = future.get();
                                          +   * }
                                          +   * }
                                          */ public final UnaryCallable updateTagTemplateFieldCallable() { @@ -1560,6 +2512,18 @@ public final TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldReque * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                          Sample code: + * + *

                                          {@code
                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                          +   *   TagTemplateFieldName name =
                                          +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                          +   *   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
                                          +   *   TagTemplateField response =
                                          +   *       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
                                          +   * }
                                          +   * }
                                          + * * @param name Required. The name of the tag template. Example: *
                                            *
                                          • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1586,6 +2550,19 @@ public final TagTemplateField renameTagTemplateField( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                            Sample code: + * + *

                                            {@code
                                            +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                            +   *   String name =
                                            +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                            +   *           .toString();
                                            +   *   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
                                            +   *   TagTemplateField response =
                                            +   *       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
                                            +   * }
                                            +   * }
                                            + * * @param name Required. The name of the tag template. Example: *
                                              *
                                            • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1611,6 +2588,21 @@ public final TagTemplateField renameTagTemplateField(String name, String newTagT * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                              Sample code: + * + *

                                              {@code
                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                              +   *   RenameTagTemplateFieldRequest request =
                                              +   *       RenameTagTemplateFieldRequest.newBuilder()
                                              +   *           .setName(
                                              +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                              +   *                   .toString())
                                              +   *           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
                                              +   *           .build();
                                              +   *   TagTemplateField response = dataCatalogClient.renameTagTemplateField(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 */ @@ -1626,6 +2618,22 @@ public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldReque * information). * *

                                              Sample code: + * + *

                                              {@code
                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                              +   *   RenameTagTemplateFieldRequest request =
                                              +   *       RenameTagTemplateFieldRequest.newBuilder()
                                              +   *           .setName(
                                              +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                              +   *                   .toString())
                                              +   *           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
                                              +   *           .build();
                                              +   *   ApiFuture future =
                                              +   *       dataCatalogClient.renameTagTemplateFieldCallable().futureCall(request);
                                              +   *   // Do something.
                                              +   *   TagTemplateField response = future.get();
                                              +   * }
                                              +   * }
                                              */ public final UnaryCallable renameTagTemplateFieldCallable() { @@ -1639,6 +2647,17 @@ public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldReque * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                              Sample code: + * + *

                                              {@code
                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                              +   *   TagTemplateFieldName name =
                                              +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                              +   *   boolean force = true;
                                              +   *   dataCatalogClient.deleteTagTemplateField(name, force);
                                              +   * }
                                              +   * }
                                              + * * @param name Required. The name of the tag template field to delete. Example: *
                                                *
                                              • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1665,6 +2684,18 @@ public final void deleteTagTemplateField(TagTemplateFieldName name, boolean forc * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                Sample code: + * + *

                                                {@code
                                                +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                +   *   String name =
                                                +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                +   *           .toString();
                                                +   *   boolean force = true;
                                                +   *   dataCatalogClient.deleteTagTemplateField(name, force);
                                                +   * }
                                                +   * }
                                                + * * @param name Required. The name of the tag template field to delete. Example: *
                                                  *
                                                • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1688,6 +2719,21 @@ public final void deleteTagTemplateField(String name, boolean force) { * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                  Sample code: + * + *

                                                  {@code
                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                  +   *   DeleteTagTemplateFieldRequest request =
                                                  +   *       DeleteTagTemplateFieldRequest.newBuilder()
                                                  +   *           .setName(
                                                  +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                  +   *                   .toString())
                                                  +   *           .setForce(true)
                                                  +   *           .build();
                                                  +   *   dataCatalogClient.deleteTagTemplateField(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 */ @@ -1703,6 +2749,22 @@ public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request) * information). * *

                                                  Sample code: + * + *

                                                  {@code
                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                  +   *   DeleteTagTemplateFieldRequest request =
                                                  +   *       DeleteTagTemplateFieldRequest.newBuilder()
                                                  +   *           .setName(
                                                  +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                  +   *                   .toString())
                                                  +   *           .setForce(true)
                                                  +   *           .build();
                                                  +   *   ApiFuture future =
                                                  +   *       dataCatalogClient.deleteTagTemplateFieldCallable().futureCall(request);
                                                  +   *   // Do something.
                                                  +   *   future.get();
                                                  +   * }
                                                  +   * }
                                                  */ public final UnaryCallable deleteTagTemplateFieldCallable() { @@ -1718,6 +2780,16 @@ public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request) * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) * used to create the tag must be from the same organization. * + *

                                                  Sample code: + * + *

                                                  {@code
                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                  +   *   TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
                                                  +   *   Tag tag = Tag.newBuilder().build();
                                                  +   *   Tag response = dataCatalogClient.createTag(parent, tag);
                                                  +   * }
                                                  +   * }
                                                  + * * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to * Entries. Example: *
                                                    @@ -1746,6 +2818,17 @@ public final Tag createTag(TagName parent, Tag tag) { * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) * used to create the tag must be from the same organization. * + *

                                                    Sample code: + * + *

                                                    {@code
                                                    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                    +   *   String parent =
                                                    +   *       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
                                                    +   *   Tag tag = Tag.newBuilder().build();
                                                    +   *   Tag response = dataCatalogClient.createTag(parent, tag);
                                                    +   * }
                                                    +   * }
                                                    + * * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to * Entries. Example: *
                                                      @@ -1770,6 +2853,21 @@ public final Tag createTag(String parent, Tag tag) { * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) * used to create the tag must be from the same organization. * + *

                                                      Sample code: + * + *

                                                      {@code
                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                      +   *   CreateTagRequest request =
                                                      +   *       CreateTagRequest.newBuilder()
                                                      +   *           .setParent(
                                                      +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                      +   *                   .toString())
                                                      +   *           .setTag(Tag.newBuilder().build())
                                                      +   *           .build();
                                                      +   *   Tag response = dataCatalogClient.createTag(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 */ @@ -1787,6 +2885,21 @@ public final Tag createTag(CreateTagRequest request) { * used to create the tag must be from the same organization. * *

                                                      Sample code: + * + *

                                                      {@code
                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                      +   *   CreateTagRequest request =
                                                      +   *       CreateTagRequest.newBuilder()
                                                      +   *           .setParent(
                                                      +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                      +   *                   .toString())
                                                      +   *           .setTag(Tag.newBuilder().build())
                                                      +   *           .build();
                                                      +   *   ApiFuture future = dataCatalogClient.createTagCallable().futureCall(request);
                                                      +   *   // Do something.
                                                      +   *   Tag response = future.get();
                                                      +   * }
                                                      +   * }
                                                      */ public final UnaryCallable createTagCallable() { return stub.createTagCallable(); @@ -1796,6 +2909,15 @@ public final UnaryCallable createTagCallable() { /** * Updates an existing tag. * + *

                                                      Sample code: + * + *

                                                      {@code
                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                      +   *   Tag tag = Tag.newBuilder().build();
                                                      +   *   Tag response = dataCatalogClient.updateTag(tag);
                                                      +   * }
                                                      +   * }
                                                      + * * @param tag Required. The updated tag. The "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1808,6 +2930,16 @@ public final Tag updateTag(Tag tag) { /** * Updates an existing tag. * + *

                                                      Sample code: + * + *

                                                      {@code
                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                      +   *   Tag tag = Tag.newBuilder().build();
                                                      +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                                      +   *   Tag response = dataCatalogClient.updateTag(tag, updateMask);
                                                      +   * }
                                                      +   * }
                                                      + * * @param tag Required. The updated tag. The "name" field must be set. * @param updateMask The fields to update on the Tag. If absent or empty, all modifiable fields * are updated. Currently the only modifiable field is the field `fields`. @@ -1823,6 +2955,19 @@ public final Tag updateTag(Tag tag, FieldMask updateMask) { /** * Updates an existing tag. * + *

                                                      Sample code: + * + *

                                                      {@code
                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                      +   *   UpdateTagRequest request =
                                                      +   *       UpdateTagRequest.newBuilder()
                                                      +   *           .setTag(Tag.newBuilder().build())
                                                      +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                      +   *           .build();
                                                      +   *   Tag response = dataCatalogClient.updateTag(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 */ @@ -1835,6 +2980,19 @@ public final Tag updateTag(UpdateTagRequest request) { * Updates an existing tag. * *

                                                      Sample code: + * + *

                                                      {@code
                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                      +   *   UpdateTagRequest request =
                                                      +   *       UpdateTagRequest.newBuilder()
                                                      +   *           .setTag(Tag.newBuilder().build())
                                                      +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                      +   *           .build();
                                                      +   *   ApiFuture future = dataCatalogClient.updateTagCallable().futureCall(request);
                                                      +   *   // Do something.
                                                      +   *   Tag response = future.get();
                                                      +   * }
                                                      +   * }
                                                      */ public final UnaryCallable updateTagCallable() { return stub.updateTagCallable(); @@ -1844,6 +3002,15 @@ public final UnaryCallable updateTagCallable() { /** * Deletes a tag. * + *

                                                      Sample code: + * + *

                                                      {@code
                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                      +   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
                                                      +   *   dataCatalogClient.deleteTag(name);
                                                      +   * }
                                                      +   * }
                                                      + * * @param name Required. The name of the tag to delete. Example: *
                                                        *
                                                      • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} @@ -1861,6 +3028,16 @@ public final void deleteTag(EntryName name) { /** * Deletes a tag. * + *

                                                        Sample code: + * + *

                                                        {@code
                                                        +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                        +   *   String name =
                                                        +   *       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
                                                        +   *   dataCatalogClient.deleteTag(name);
                                                        +   * }
                                                        +   * }
                                                        + * * @param name Required. The name of the tag to delete. Example: *
                                                          *
                                                        • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} @@ -1877,6 +3054,20 @@ public final void deleteTag(String name) { /** * Deletes a tag. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   DeleteTagRequest request =
                                                          +   *       DeleteTagRequest.newBuilder()
                                                          +   *           .setName(
                                                          +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                          +   *                   .toString())
                                                          +   *           .build();
                                                          +   *   dataCatalogClient.deleteTag(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 */ @@ -1889,6 +3080,20 @@ public final void deleteTag(DeleteTagRequest request) { * Deletes a tag. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   DeleteTagRequest request =
                                                          +   *       DeleteTagRequest.newBuilder()
                                                          +   *           .setName(
                                                          +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                          +   *                   .toString())
                                                          +   *           .build();
                                                          +   *   ApiFuture future = dataCatalogClient.deleteTagCallable().futureCall(request);
                                                          +   *   // Do something.
                                                          +   *   future.get();
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable deleteTagCallable() { return stub.deleteTagCallable(); @@ -1898,6 +3103,17 @@ public final UnaryCallable deleteTagCallable() { /** * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
                                                          +   *   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
                                                          +   *     // doThingsWith(element);
                                                          +   *   }
                                                          +   * }
                                                          +   * }
                                                          + * * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. @@ -1919,6 +3135,18 @@ public final ListTagsPagedResponse listTags(EntryName parent) { /** * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   String parent =
                                                          +   *       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
                                                          +   *   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
                                                          +   *     // doThingsWith(element);
                                                          +   *   }
                                                          +   * }
                                                          +   * }
                                                          + * * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource * could be an [Entry][google.cloud.datacatalog.v1.Entry] or an * [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. @@ -1939,6 +3167,24 @@ public final ListTagsPagedResponse listTags(String parent) { /** * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   ListTagsRequest request =
                                                          +   *       ListTagsRequest.newBuilder()
                                                          +   *           .setParent(
                                                          +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                          +   *                   .toString())
                                                          +   *           .setPageSize(883849137)
                                                          +   *           .setPageToken("pageToken873572522")
                                                          +   *           .build();
                                                          +   *   for (Tag element : dataCatalogClient.listTags(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 */ @@ -1951,6 +3197,24 @@ public final ListTagsPagedResponse listTags(ListTagsRequest request) { * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   ListTagsRequest request =
                                                          +   *       ListTagsRequest.newBuilder()
                                                          +   *           .setParent(
                                                          +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                          +   *                   .toString())
                                                          +   *           .setPageSize(883849137)
                                                          +   *           .setPageToken("pageToken873572522")
                                                          +   *           .build();
                                                          +   *   ApiFuture future = dataCatalogClient.listTagsPagedCallable().futureCall(request);
                                                          +   *   // Do something.
                                                          +   *   for (Tag element : future.get().iterateAll()) {
                                                          +   *     // doThingsWith(element);
                                                          +   *   }
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable listTagsPagedCallable() { return stub.listTagsPagedCallable(); @@ -1961,6 +3225,23 @@ public final UnaryCallable listTagsPaged * Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   while (true) {
                                                          +   *     ListTagsResponse response = dataCatalogClient.listTagsCallable().call(request);
                                                          +   *     for (Tag element : response.getResponsesList()) {
                                                          +   *       // doThingsWith(element);
                                                          +   *     }
                                                          +   *     String nextPageToken = response.getNextPageToken();
                                                          +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                                                          +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                                                          +   *     } else {
                                                          +   *       break;
                                                          +   *     }
                                                          +   *   }
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable listTagsCallable() { return stub.listTagsCallable(); @@ -1977,6 +3258,16 @@ public final UnaryCallable listTagsCallable() * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                                                          +   *   Policy policy = Policy.newBuilder().build();
                                                          +   *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
                                                          +   * }
                                                          +   * }
                                                          + * * @param resource REQUIRED: The resource for which the policy is being specified. See the * operation documentation for the appropriate value for this field. * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the @@ -2004,6 +3295,16 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   String resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                                          +   *   Policy policy = Policy.newBuilder().build();
                                                          +   *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
                                                          +   * }
                                                          +   * }
                                                          + * * @param resource REQUIRED: The resource for which the policy is being specified. See the * operation documentation for the appropriate value for this field. * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the @@ -2028,6 +3329,20 @@ public final Policy setIamPolicy(String resource, Policy policy) { * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   SetIamPolicyRequest request =
                                                          +   *       SetIamPolicyRequest.newBuilder()
                                                          +   *           .setResource(
                                                          +   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                          +   *           .setPolicy(Policy.newBuilder().build())
                                                          +   *           .build();
                                                          +   *   Policy response = dataCatalogClient.setIamPolicy(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 */ @@ -2047,6 +3362,20 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   SetIamPolicyRequest request =
                                                          +   *       SetIamPolicyRequest.newBuilder()
                                                          +   *           .setResource(
                                                          +   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                          +   *           .setPolicy(Policy.newBuilder().build())
                                                          +   *           .build();
                                                          +   *   ApiFuture future = dataCatalogClient.setIamPolicyCallable().futureCall(request);
                                                          +   *   // Do something.
                                                          +   *   Policy response = future.get();
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable setIamPolicyCallable() { return stub.setIamPolicyCallable(); @@ -2066,6 +3395,15 @@ public final UnaryCallable setIamPolicyCallable() { * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   ResourceName resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                                                          +   *   Policy response = dataCatalogClient.getIamPolicy(resource);
                                                          +   * }
                                                          +   * }
                                                          + * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2092,6 +3430,15 @@ public final Policy getIamPolicy(ResourceName resource) { * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   String resource = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                                          +   *   Policy response = dataCatalogClient.getIamPolicy(resource);
                                                          +   * }
                                                          +   * }
                                                          + * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2115,6 +3462,20 @@ public final Policy getIamPolicy(String resource) { * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   GetIamPolicyRequest request =
                                                          +   *       GetIamPolicyRequest.newBuilder()
                                                          +   *           .setResource(
                                                          +   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                          +   *           .setOptions(GetPolicyOptions.newBuilder().build())
                                                          +   *           .build();
                                                          +   *   Policy response = dataCatalogClient.getIamPolicy(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 */ @@ -2137,6 +3498,20 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   GetIamPolicyRequest request =
                                                          +   *       GetIamPolicyRequest.newBuilder()
                                                          +   *           .setResource(
                                                          +   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                          +   *           .setOptions(GetPolicyOptions.newBuilder().build())
                                                          +   *           .build();
                                                          +   *   ApiFuture future = dataCatalogClient.getIamPolicyCallable().futureCall(request);
                                                          +   *   // Do something.
                                                          +   *   Policy response = future.get();
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable getIamPolicyCallable() { return stub.getIamPolicyCallable(); @@ -2153,6 +3528,20 @@ public final UnaryCallable getIamPolicyCallable() { * *

                                                          A caller is not required to have Google IAM permission to make this request. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   TestIamPermissionsRequest request =
                                                          +   *       TestIamPermissionsRequest.newBuilder()
                                                          +   *           .setResource(
                                                          +   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                          +   *           .addAllPermissions(new ArrayList())
                                                          +   *           .build();
                                                          +   *   TestIamPermissionsResponse response = dataCatalogClient.testIamPermissions(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 */ @@ -2172,6 +3561,21 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq *

                                                          A caller is not required to have Google IAM permission to make this request. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   TestIamPermissionsRequest request =
                                                          +   *       TestIamPermissionsRequest.newBuilder()
                                                          +   *           .setResource(
                                                          +   *               TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                          +   *           .addAllPermissions(new ArrayList())
                                                          +   *           .build();
                                                          +   *   ApiFuture future =
                                                          +   *       dataCatalogClient.testIamPermissionsCallable().futureCall(request);
                                                          +   *   // Do something.
                                                          +   *   TestIamPermissionsResponse response = future.get();
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable testIamPermissionsCallable() { diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java index f4170304..35bfb7ea 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1/package-info.java @@ -23,6 +23,15 @@ * manage their data. * *

                                                          Sample for DataCatalogClient: + * + *

                                                          {@code
                                                          + * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                          + *   String entryGroupId = "entryGroupId1228924712";
                                                          + *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
                                                          + *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
                                                          + * }
                                                          + * }
                                                          */ @Generated("by gapic-generator-java") package com.google.cloud.datacatalog.v1; diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java index e050c4d2..76af96a6 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/DataCatalogClient.java @@ -50,6 +50,15 @@ *

                                                          This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

                                                          {@code
                                                          + * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                          + *   String entryGroupId = "entryGroupId1228924712";
                                                          + *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
                                                          + *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
                                                          + * }
                                                          + * }
                                                          + * *

                                                          Note: close() needs to be called on the DataCatalogClient object to clean up resources such as * threads. In the example above, try-with-resources is used, which automatically calls close(). * @@ -165,6 +174,19 @@ public DataCatalogStub getStub() { * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more * information. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
                                                          +   *   String query = "query107944136";
                                                          +   *   for (SearchCatalogResult element :
                                                          +   *       dataCatalogClient.searchCatalog(scope, query).iterateAll()) {
                                                          +   *     // doThingsWith(element);
                                                          +   *   }
                                                          +   * }
                                                          +   * }
                                                          + * * @param scope Required. The scope of this search request. A `scope` that has empty * `include_org_ids`, `include_project_ids` AND false `include_gcp_public_datasets` is * considered invalid. Data Catalog will return an error in such a case. @@ -204,6 +226,24 @@ public final SearchCatalogPagedResponse searchCatalog( * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more * information. * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   SearchCatalogRequest request =
                                                          +   *       SearchCatalogRequest.newBuilder()
                                                          +   *           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
                                                          +   *           .setQuery("query107944136")
                                                          +   *           .setPageSize(883849137)
                                                          +   *           .setPageToken("pageToken873572522")
                                                          +   *           .setOrderBy("orderBy-1207110587")
                                                          +   *           .build();
                                                          +   *   for (SearchCatalogResult element : dataCatalogClient.searchCatalog(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 */ @@ -228,6 +268,25 @@ public final SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest reque * information. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   SearchCatalogRequest request =
                                                          +   *       SearchCatalogRequest.newBuilder()
                                                          +   *           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
                                                          +   *           .setQuery("query107944136")
                                                          +   *           .setPageSize(883849137)
                                                          +   *           .setPageToken("pageToken873572522")
                                                          +   *           .setOrderBy("orderBy-1207110587")
                                                          +   *           .build();
                                                          +   *   ApiFuture future =
                                                          +   *       dataCatalogClient.searchCatalogPagedCallable().futureCall(request);
                                                          +   *   // Do something.
                                                          +   *   for (SearchCatalogResult element : future.get().iterateAll()) {
                                                          +   *     // doThingsWith(element);
                                                          +   *   }
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable searchCatalogPagedCallable() { @@ -251,6 +310,23 @@ public final SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest reque * information. * *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   while (true) {
                                                          +   *     SearchCatalogResponse response = dataCatalogClient.searchCatalogCallable().call(request);
                                                          +   *     for (SearchCatalogResult element : response.getResponsesList()) {
                                                          +   *       // doThingsWith(element);
                                                          +   *     }
                                                          +   *     String nextPageToken = response.getNextPageToken();
                                                          +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                                                          +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                                                          +   *     } else {
                                                          +   *       break;
                                                          +   *     }
                                                          +   *   }
                                                          +   * }
                                                          +   * }
                                                          */ public final UnaryCallable searchCatalogCallable() { return stub.searchCatalogCallable(); @@ -264,6 +340,17 @@ public final UnaryCallable searchCa * (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                          Sample code: + * + *

                                                          {@code
                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                          +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                          +   *   String entryGroupId = "entryGroupId1228924712";
                                                          +   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
                                                          +   *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
                                                          +   * }
                                                          +   * }
                                                          + * * @param parent Required. The name of the project this entry group is in. Example: *
                                                            *
                                                          • projects/{project_id}/locations/{location} @@ -295,6 +382,17 @@ public final EntryGroup createEntryGroup( * (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                            Sample code: + * + *

                                                            {@code
                                                            +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                            +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                                                            +   *   String entryGroupId = "entryGroupId1228924712";
                                                            +   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
                                                            +   *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
                                                            +   * }
                                                            +   * }
                                                            + * * @param parent Required. The name of the project this entry group is in. Example: *
                                                              *
                                                            • projects/{project_id}/locations/{location} @@ -326,6 +424,20 @@ public final EntryGroup createEntryGroup( * (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   CreateEntryGroupRequest request =
                                                              +   *       CreateEntryGroupRequest.newBuilder()
                                                              +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                              +   *           .setEntryGroupId("entryGroupId1228924712")
                                                              +   *           .setEntryGroup(EntryGroup.newBuilder().build())
                                                              +   *           .build();
                                                              +   *   EntryGroup response = dataCatalogClient.createEntryGroup(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 */ @@ -342,6 +454,21 @@ public final EntryGroup createEntryGroup(CreateEntryGroupRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   CreateEntryGroupRequest request =
                                                              +   *       CreateEntryGroupRequest.newBuilder()
                                                              +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                              +   *           .setEntryGroupId("entryGroupId1228924712")
                                                              +   *           .setEntryGroup(EntryGroup.newBuilder().build())
                                                              +   *           .build();
                                                              +   *   ApiFuture future =
                                                              +   *       dataCatalogClient.createEntryGroupCallable().futureCall(request);
                                                              +   *   // Do something.
                                                              +   *   EntryGroup response = future.get();
                                                              +   * }
                                                              +   * }
                                                              */ public final UnaryCallable createEntryGroupCallable() { return stub.createEntryGroupCallable(); @@ -353,6 +480,15 @@ public final UnaryCallable createEntryGroup * the `entry_group.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
                                                              +   *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup);
                                                              +   * }
                                                              +   * }
                                                              + * * @param entryGroup Required. The updated entry group. "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -368,6 +504,16 @@ public final EntryGroup updateEntryGroup(EntryGroup entryGroup) { * the `entry_group.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
                                                              +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                                              +   *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup, updateMask);
                                                              +   * }
                                                              +   * }
                                                              + * * @param entryGroup Required. The updated entry group. "name" field must be set. * @param updateMask The fields to update on the entry group. If absent or empty, all modifiable * fields are updated. @@ -388,6 +534,19 @@ public final EntryGroup updateEntryGroup(EntryGroup entryGroup, FieldMask update * the `entry_group.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   UpdateEntryGroupRequest request =
                                                              +   *       UpdateEntryGroupRequest.newBuilder()
                                                              +   *           .setEntryGroup(EntryGroup.newBuilder().build())
                                                              +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                              +   *           .build();
                                                              +   *   EntryGroup response = dataCatalogClient.updateEntryGroup(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 */ @@ -402,6 +561,20 @@ public final EntryGroup updateEntryGroup(UpdateEntryGroupRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   UpdateEntryGroupRequest request =
                                                              +   *       UpdateEntryGroupRequest.newBuilder()
                                                              +   *           .setEntryGroup(EntryGroup.newBuilder().build())
                                                              +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                              +   *           .build();
                                                              +   *   ApiFuture future =
                                                              +   *       dataCatalogClient.updateEntryGroupCallable().futureCall(request);
                                                              +   *   // Do something.
                                                              +   *   EntryGroup response = future.get();
                                                              +   * }
                                                              +   * }
                                                              */ public final UnaryCallable updateEntryGroupCallable() { return stub.updateEntryGroupCallable(); @@ -411,6 +584,15 @@ public final UnaryCallable updateEntryGroup /** * Gets an EntryGroup. * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
                                                              +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name);
                                                              +   * }
                                                              +   * }
                                                              + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -425,6 +607,15 @@ public final EntryGroup getEntryGroup(EntryGroupName name) { /** * Gets an EntryGroup. * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                                                              +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name);
                                                              +   * }
                                                              +   * }
                                                              + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -438,6 +629,16 @@ public final EntryGroup getEntryGroup(String name) { /** * Gets an EntryGroup. * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
                                                              +   *   FieldMask readMask = FieldMask.newBuilder().build();
                                                              +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
                                                              +   * }
                                                              +   * }
                                                              + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @param readMask The fields to return. If not set or empty, all fields are returned. @@ -456,6 +657,16 @@ public final EntryGroup getEntryGroup(EntryGroupName name, FieldMask readMask) { /** * Gets an EntryGroup. * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                                                              +   *   FieldMask readMask = FieldMask.newBuilder().build();
                                                              +   *   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
                                                              +   * }
                                                              +   * }
                                                              + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @param readMask The fields to return. If not set or empty, all fields are returned. @@ -471,6 +682,19 @@ public final EntryGroup getEntryGroup(String name, FieldMask readMask) { /** * Gets an EntryGroup. * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   GetEntryGroupRequest request =
                                                              +   *       GetEntryGroupRequest.newBuilder()
                                                              +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                              +   *           .setReadMask(FieldMask.newBuilder().build())
                                                              +   *           .build();
                                                              +   *   EntryGroup response = dataCatalogClient.getEntryGroup(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 */ @@ -483,6 +707,19 @@ public final EntryGroup getEntryGroup(GetEntryGroupRequest request) { * Gets an EntryGroup. * *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   GetEntryGroupRequest request =
                                                              +   *       GetEntryGroupRequest.newBuilder()
                                                              +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                              +   *           .setReadMask(FieldMask.newBuilder().build())
                                                              +   *           .build();
                                                              +   *   ApiFuture future = dataCatalogClient.getEntryGroupCallable().futureCall(request);
                                                              +   *   // Do something.
                                                              +   *   EntryGroup response = future.get();
                                                              +   * }
                                                              +   * }
                                                              */ public final UnaryCallable getEntryGroupCallable() { return stub.getEntryGroupCallable(); @@ -495,6 +732,15 @@ public final UnaryCallable getEntryGroupCallab * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
                                                              +   *   dataCatalogClient.deleteEntryGroup(name);
                                                              +   * }
                                                              +   * }
                                                              + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -512,6 +758,15 @@ public final void deleteEntryGroup(EntryGroupName name) { * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                                                              +   *   dataCatalogClient.deleteEntryGroup(name);
                                                              +   * }
                                                              +   * }
                                                              + * * @param name Required. The name of the entry group. For example, * `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -528,6 +783,19 @@ public final void deleteEntryGroup(String name) { * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   DeleteEntryGroupRequest request =
                                                              +   *       DeleteEntryGroupRequest.newBuilder()
                                                              +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                              +   *           .setForce(true)
                                                              +   *           .build();
                                                              +   *   dataCatalogClient.deleteEntryGroup(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 */ @@ -543,6 +811,19 @@ public final void deleteEntryGroup(DeleteEntryGroupRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   DeleteEntryGroupRequest request =
                                                              +   *       DeleteEntryGroupRequest.newBuilder()
                                                              +   *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                              +   *           .setForce(true)
                                                              +   *           .build();
                                                              +   *   ApiFuture future = dataCatalogClient.deleteEntryGroupCallable().futureCall(request);
                                                              +   *   // Do something.
                                                              +   *   future.get();
                                                              +   * }
                                                              +   * }
                                                              */ public final UnaryCallable deleteEntryGroupCallable() { return stub.deleteEntryGroupCallable(); @@ -552,6 +833,17 @@ public final UnaryCallable deleteEntryGroupCalla /** * Lists entry groups. * + *

                                                              Sample code: + * + *

                                                              {@code
                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                              +   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
                                                              +   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
                                                              +   *     // doThingsWith(element);
                                                              +   *   }
                                                              +   * }
                                                              +   * }
                                                              + * * @param parent Required. The name of the location that contains the entry groups, which can be * provided in URL format. Example: *
                                                                @@ -572,6 +864,17 @@ public final ListEntryGroupsPagedResponse listEntryGroups(EntryGroupName parent) /** * Lists entry groups. * + *

                                                                Sample code: + * + *

                                                                {@code
                                                                +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                                                                +   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
                                                                +   *     // doThingsWith(element);
                                                                +   *   }
                                                                +   * }
                                                                +   * }
                                                                + * * @param parent Required. The name of the location that contains the entry groups, which can be * provided in URL format. Example: *
                                                                  @@ -589,6 +892,22 @@ public final ListEntryGroupsPagedResponse listEntryGroups(String parent) { /** * Lists entry groups. * + *

                                                                  Sample code: + * + *

                                                                  {@code
                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                  +   *   ListEntryGroupsRequest request =
                                                                  +   *       ListEntryGroupsRequest.newBuilder()
                                                                  +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                                  +   *           .setPageSize(883849137)
                                                                  +   *           .setPageToken("pageToken873572522")
                                                                  +   *           .build();
                                                                  +   *   for (EntryGroup element : dataCatalogClient.listEntryGroups(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 */ @@ -601,6 +920,23 @@ public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest * Lists entry groups. * *

                                                                  Sample code: + * + *

                                                                  {@code
                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                  +   *   ListEntryGroupsRequest request =
                                                                  +   *       ListEntryGroupsRequest.newBuilder()
                                                                  +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                                  +   *           .setPageSize(883849137)
                                                                  +   *           .setPageToken("pageToken873572522")
                                                                  +   *           .build();
                                                                  +   *   ApiFuture future =
                                                                  +   *       dataCatalogClient.listEntryGroupsPagedCallable().futureCall(request);
                                                                  +   *   // Do something.
                                                                  +   *   for (EntryGroup element : future.get().iterateAll()) {
                                                                  +   *     // doThingsWith(element);
                                                                  +   *   }
                                                                  +   * }
                                                                  +   * }
                                                                  */ public final UnaryCallable listEntryGroupsPagedCallable() { @@ -612,6 +948,24 @@ public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest * Lists entry groups. * *

                                                                  Sample code: + * + *

                                                                  {@code
                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                  +   *   while (true) {
                                                                  +   *     ListEntryGroupsResponse response =
                                                                  +   *         dataCatalogClient.listEntryGroupsCallable().call(request);
                                                                  +   *     for (EntryGroup element : response.getResponsesList()) {
                                                                  +   *       // doThingsWith(element);
                                                                  +   *     }
                                                                  +   *     String nextPageToken = response.getNextPageToken();
                                                                  +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                                                                  +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                                                                  +   *     } else {
                                                                  +   *       break;
                                                                  +   *     }
                                                                  +   *   }
                                                                  +   * }
                                                                  +   * }
                                                                  */ public final UnaryCallable listEntryGroupsCallable() { @@ -628,6 +982,17 @@ public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest * *

                                                                  A maximum of 100,000 entries may be created per entry group. * + *

                                                                  Sample code: + * + *

                                                                  {@code
                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                  +   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
                                                                  +   *   String entryId = "entryId-1591558867";
                                                                  +   *   Entry entry = Entry.newBuilder().build();
                                                                  +   *   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
                                                                  +   * }
                                                                  +   * }
                                                                  + * * @param parent Required. The name of the entry group this entry is in. Example: *
                                                                    *
                                                                  • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} @@ -658,6 +1023,17 @@ public final Entry createEntry(EntryGroupName parent, String entryId, Entry entr * *

                                                                    A maximum of 100,000 entries may be created per entry group. * + *

                                                                    Sample code: + * + *

                                                                    {@code
                                                                    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                    +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                                                                    +   *   String entryId = "entryId-1591558867";
                                                                    +   *   Entry entry = Entry.newBuilder().build();
                                                                    +   *   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
                                                                    +   * }
                                                                    +   * }
                                                                    + * * @param parent Required. The name of the entry group this entry is in. Example: *
                                                                      *
                                                                    • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} @@ -688,6 +1064,20 @@ public final Entry createEntry(String parent, String entryId, Entry entry) { * *

                                                                      A maximum of 100,000 entries may be created per entry group. * + *

                                                                      Sample code: + * + *

                                                                      {@code
                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                      +   *   CreateEntryRequest request =
                                                                      +   *       CreateEntryRequest.newBuilder()
                                                                      +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                                      +   *           .setEntryId("entryId-1591558867")
                                                                      +   *           .setEntry(Entry.newBuilder().build())
                                                                      +   *           .build();
                                                                      +   *   Entry response = dataCatalogClient.createEntry(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 */ @@ -706,6 +1096,20 @@ public final Entry createEntry(CreateEntryRequest request) { *

                                                                      A maximum of 100,000 entries may be created per entry group. * *

                                                                      Sample code: + * + *

                                                                      {@code
                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                      +   *   CreateEntryRequest request =
                                                                      +   *       CreateEntryRequest.newBuilder()
                                                                      +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                                      +   *           .setEntryId("entryId-1591558867")
                                                                      +   *           .setEntry(Entry.newBuilder().build())
                                                                      +   *           .build();
                                                                      +   *   ApiFuture future = dataCatalogClient.createEntryCallable().futureCall(request);
                                                                      +   *   // Do something.
                                                                      +   *   Entry response = future.get();
                                                                      +   * }
                                                                      +   * }
                                                                      */ public final UnaryCallable createEntryCallable() { return stub.createEntryCallable(); @@ -717,6 +1121,15 @@ public final UnaryCallable createEntryCallable() { * by the `entry.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                      Sample code: + * + *

                                                                      {@code
                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                      +   *   Entry entry = Entry.newBuilder().build();
                                                                      +   *   Entry response = dataCatalogClient.updateEntry(entry);
                                                                      +   * }
                                                                      +   * }
                                                                      + * * @param entry Required. The updated entry. The "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -731,6 +1144,16 @@ public final Entry updateEntry(Entry entry) { * by the `entry.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                      Sample code: + * + *

                                                                      {@code
                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                      +   *   Entry entry = Entry.newBuilder().build();
                                                                      +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                                                      +   *   Entry response = dataCatalogClient.updateEntry(entry, updateMask);
                                                                      +   * }
                                                                      +   * }
                                                                      + * * @param entry Required. The updated entry. The "name" field must be set. * @param updateMask The fields to update on the entry. If absent or empty, all modifiable fields * are updated. @@ -758,6 +1181,19 @@ public final Entry updateEntry(Entry entry, FieldMask updateMask) { * by the `entry.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                      Sample code: + * + *

                                                                      {@code
                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                      +   *   UpdateEntryRequest request =
                                                                      +   *       UpdateEntryRequest.newBuilder()
                                                                      +   *           .setEntry(Entry.newBuilder().build())
                                                                      +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                      +   *           .build();
                                                                      +   *   Entry response = dataCatalogClient.updateEntry(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 */ @@ -772,6 +1208,19 @@ public final Entry updateEntry(UpdateEntryRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                                      Sample code: + * + *

                                                                      {@code
                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                      +   *   UpdateEntryRequest request =
                                                                      +   *       UpdateEntryRequest.newBuilder()
                                                                      +   *           .setEntry(Entry.newBuilder().build())
                                                                      +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                      +   *           .build();
                                                                      +   *   ApiFuture future = dataCatalogClient.updateEntryCallable().futureCall(request);
                                                                      +   *   // Do something.
                                                                      +   *   Entry response = future.get();
                                                                      +   * }
                                                                      +   * }
                                                                      */ public final UnaryCallable updateEntryCallable() { return stub.updateEntryCallable(); @@ -785,6 +1234,15 @@ public final UnaryCallable updateEntryCallable() { * [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                      Sample code: + * + *

                                                                      {@code
                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                      +   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
                                                                      +   *   dataCatalogClient.deleteEntry(name);
                                                                      +   * }
                                                                      +   * }
                                                                      + * * @param name Required. The name of the entry. Example: *
                                                                        *
                                                                      • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -806,6 +1264,15 @@ public final void deleteEntry(EntryName name) { * [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                        Sample code: + * + *

                                                                        {@code
                                                                        +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                        +   *   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
                                                                        +   *   dataCatalogClient.deleteEntry(name);
                                                                        +   * }
                                                                        +   * }
                                                                        + * * @param name Required. The name of the entry. Example: *
                                                                          *
                                                                        • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -826,6 +1293,19 @@ public final void deleteEntry(String name) { * [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                          Sample code: + * + *

                                                                          {@code
                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                          +   *   DeleteEntryRequest request =
                                                                          +   *       DeleteEntryRequest.newBuilder()
                                                                          +   *           .setName(
                                                                          +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                                                                          +   *           .build();
                                                                          +   *   dataCatalogClient.deleteEntry(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 */ @@ -842,6 +1322,19 @@ public final void deleteEntry(DeleteEntryRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                                          Sample code: + * + *

                                                                          {@code
                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                          +   *   DeleteEntryRequest request =
                                                                          +   *       DeleteEntryRequest.newBuilder()
                                                                          +   *           .setName(
                                                                          +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                                                                          +   *           .build();
                                                                          +   *   ApiFuture future = dataCatalogClient.deleteEntryCallable().futureCall(request);
                                                                          +   *   // Do something.
                                                                          +   *   future.get();
                                                                          +   * }
                                                                          +   * }
                                                                          */ public final UnaryCallable deleteEntryCallable() { return stub.deleteEntryCallable(); @@ -851,6 +1344,15 @@ public final UnaryCallable deleteEntryCallable() { /** * Gets an entry. * + *

                                                                          Sample code: + * + *

                                                                          {@code
                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                          +   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
                                                                          +   *   Entry response = dataCatalogClient.getEntry(name);
                                                                          +   * }
                                                                          +   * }
                                                                          + * * @param name Required. The name of the entry. Example: *
                                                                            *
                                                                          • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -868,6 +1370,15 @@ public final Entry getEntry(EntryName name) { /** * Gets an entry. * + *

                                                                            Sample code: + * + *

                                                                            {@code
                                                                            +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                            +   *   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
                                                                            +   *   Entry response = dataCatalogClient.getEntry(name);
                                                                            +   * }
                                                                            +   * }
                                                                            + * * @param name Required. The name of the entry. Example: *
                                                                              *
                                                                            • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} @@ -884,6 +1395,19 @@ public final Entry getEntry(String name) { /** * Gets an entry. * + *

                                                                              Sample code: + * + *

                                                                              {@code
                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                              +   *   GetEntryRequest request =
                                                                              +   *       GetEntryRequest.newBuilder()
                                                                              +   *           .setName(
                                                                              +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                                                                              +   *           .build();
                                                                              +   *   Entry response = dataCatalogClient.getEntry(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 */ @@ -896,6 +1420,19 @@ public final Entry getEntry(GetEntryRequest request) { * Gets an entry. * *

                                                                              Sample code: + * + *

                                                                              {@code
                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                              +   *   GetEntryRequest request =
                                                                              +   *       GetEntryRequest.newBuilder()
                                                                              +   *           .setName(
                                                                              +   *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
                                                                              +   *           .build();
                                                                              +   *   ApiFuture future = dataCatalogClient.getEntryCallable().futureCall(request);
                                                                              +   *   // Do something.
                                                                              +   *   Entry response = future.get();
                                                                              +   * }
                                                                              +   * }
                                                                              */ public final UnaryCallable getEntryCallable() { return stub.getEntryCallable(); @@ -906,6 +1443,15 @@ public final UnaryCallable getEntryCallable() { * Get an entry by target resource name. This method allows clients to use the resource name from * the source Google Cloud Platform service to get the Data Catalog Entry. * + *

                                                                              Sample code: + * + *

                                                                              {@code
                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                              +   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
                                                                              +   *   Entry response = dataCatalogClient.lookupEntry(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 */ @@ -919,6 +1465,15 @@ public final Entry lookupEntry(LookupEntryRequest request) { * the source Google Cloud Platform service to get the Data Catalog Entry. * *

                                                                              Sample code: + * + *

                                                                              {@code
                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                              +   *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
                                                                              +   *   ApiFuture future = dataCatalogClient.lookupEntryCallable().futureCall(request);
                                                                              +   *   // Do something.
                                                                              +   *   Entry response = future.get();
                                                                              +   * }
                                                                              +   * }
                                                                              */ public final UnaryCallable lookupEntryCallable() { return stub.lookupEntryCallable(); @@ -928,6 +1483,17 @@ public final UnaryCallable lookupEntryCallable() { /** * Lists entries. * + *

                                                                              Sample code: + * + *

                                                                              {@code
                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                              +   *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
                                                                              +   *   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
                                                                              +   *     // doThingsWith(element);
                                                                              +   *   }
                                                                              +   * }
                                                                              +   * }
                                                                              + * * @param parent Required. The name of the entry group that contains the entries, which can be * provided in URL format. Example: *
                                                                                @@ -948,6 +1514,17 @@ public final ListEntriesPagedResponse listEntries(EntryGroupName parent) { /** * Lists entries. * + *

                                                                                Sample code: + * + *

                                                                                {@code
                                                                                +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                +   *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
                                                                                +   *   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
                                                                                +   *     // doThingsWith(element);
                                                                                +   *   }
                                                                                +   * }
                                                                                +   * }
                                                                                + * * @param parent Required. The name of the entry group that contains the entries, which can be * provided in URL format. Example: *
                                                                                  @@ -965,6 +1542,23 @@ public final ListEntriesPagedResponse listEntries(String parent) { /** * Lists entries. * + *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   ListEntriesRequest request =
                                                                                  +   *       ListEntriesRequest.newBuilder()
                                                                                  +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                                                  +   *           .setPageSize(883849137)
                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                  +   *           .setReadMask(FieldMask.newBuilder().build())
                                                                                  +   *           .build();
                                                                                  +   *   for (Entry element : dataCatalogClient.listEntries(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 */ @@ -977,6 +1571,23 @@ public final ListEntriesPagedResponse listEntries(ListEntriesRequest request) { * Lists entries. * *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   ListEntriesRequest request =
                                                                                  +   *       ListEntriesRequest.newBuilder()
                                                                                  +   *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
                                                                                  +   *           .setPageSize(883849137)
                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                  +   *           .setReadMask(FieldMask.newBuilder().build())
                                                                                  +   *           .build();
                                                                                  +   *   ApiFuture future = dataCatalogClient.listEntriesPagedCallable().futureCall(request);
                                                                                  +   *   // Do something.
                                                                                  +   *   for (Entry element : future.get().iterateAll()) {
                                                                                  +   *     // doThingsWith(element);
                                                                                  +   *   }
                                                                                  +   * }
                                                                                  +   * }
                                                                                  */ public final UnaryCallable listEntriesPagedCallable() { @@ -988,6 +1599,23 @@ public final ListEntriesPagedResponse listEntries(ListEntriesRequest request) { * Lists entries. * *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   while (true) {
                                                                                  +   *     ListEntriesResponse response = dataCatalogClient.listEntriesCallable().call(request);
                                                                                  +   *     for (Entry element : response.getResponsesList()) {
                                                                                  +   *       // doThingsWith(element);
                                                                                  +   *     }
                                                                                  +   *     String nextPageToken = response.getNextPageToken();
                                                                                  +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                                                                                  +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                                                                                  +   *     } else {
                                                                                  +   *       break;
                                                                                  +   *     }
                                                                                  +   *   }
                                                                                  +   * }
                                                                                  +   * }
                                                                                  */ public final UnaryCallable listEntriesCallable() { return stub.listEntriesCallable(); @@ -1000,6 +1628,18 @@ public final UnaryCallable listEntriesC * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                                                  +   *   String tagTemplateId = "tagTemplateId-1438776721";
                                                                                  +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                                                                                  +   *   TagTemplate response =
                                                                                  +   *       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
                                                                                  +   * }
                                                                                  +   * }
                                                                                  + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions. *

                                                                                  Example: @@ -1029,6 +1669,18 @@ public final TagTemplate createTagTemplate( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   String parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                                                                  +   *   String tagTemplateId = "tagTemplateId-1438776721";
                                                                                  +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                                                                                  +   *   TagTemplate response =
                                                                                  +   *       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
                                                                                  +   * }
                                                                                  +   * }
                                                                                  + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions. *

                                                                                  Example: @@ -1058,6 +1710,20 @@ public final TagTemplate createTagTemplate( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   CreateTagTemplateRequest request =
                                                                                  +   *       CreateTagTemplateRequest.newBuilder()
                                                                                  +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                  +   *           .setTagTemplateId("tagTemplateId-1438776721")
                                                                                  +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                                                                                  +   *           .build();
                                                                                  +   *   TagTemplate response = dataCatalogClient.createTagTemplate(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 */ @@ -1073,6 +1739,21 @@ public final TagTemplate createTagTemplate(CreateTagTemplateRequest request) { * information). * *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   CreateTagTemplateRequest request =
                                                                                  +   *       CreateTagTemplateRequest.newBuilder()
                                                                                  +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                  +   *           .setTagTemplateId("tagTemplateId-1438776721")
                                                                                  +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                                                                                  +   *           .build();
                                                                                  +   *   ApiFuture future =
                                                                                  +   *       dataCatalogClient.createTagTemplateCallable().futureCall(request);
                                                                                  +   *   // Do something.
                                                                                  +   *   TagTemplate response = future.get();
                                                                                  +   * }
                                                                                  +   * }
                                                                                  */ public final UnaryCallable createTagTemplateCallable() { return stub.createTagTemplateCallable(); @@ -1082,6 +1763,15 @@ public final UnaryCallable createTagTempl /** * Gets a tag template. * + *

                                                                                  Sample code: + * + *

                                                                                  {@code
                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                  +   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                                                                                  +   *   TagTemplate response = dataCatalogClient.getTagTemplate(name);
                                                                                  +   * }
                                                                                  +   * }
                                                                                  + * * @param name Required. The name of the tag template. Example: *
                                                                                    *
                                                                                  • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1099,6 +1789,15 @@ public final TagTemplate getTagTemplate(TagTemplateName name) { /** * Gets a tag template. * + *

                                                                                    Sample code: + * + *

                                                                                    {@code
                                                                                    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                    +   *   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                                                                    +   *   TagTemplate response = dataCatalogClient.getTagTemplate(name);
                                                                                    +   * }
                                                                                    +   * }
                                                                                    + * * @param name Required. The name of the tag template. Example: *
                                                                                      *
                                                                                    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1115,6 +1814,18 @@ public final TagTemplate getTagTemplate(String name) { /** * Gets a tag template. * + *

                                                                                      Sample code: + * + *

                                                                                      {@code
                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                      +   *   GetTagTemplateRequest request =
                                                                                      +   *       GetTagTemplateRequest.newBuilder()
                                                                                      +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                      +   *           .build();
                                                                                      +   *   TagTemplate response = dataCatalogClient.getTagTemplate(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 */ @@ -1127,6 +1838,19 @@ public final TagTemplate getTagTemplate(GetTagTemplateRequest request) { * Gets a tag template. * *

                                                                                      Sample code: + * + *

                                                                                      {@code
                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                      +   *   GetTagTemplateRequest request =
                                                                                      +   *       GetTagTemplateRequest.newBuilder()
                                                                                      +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                      +   *           .build();
                                                                                      +   *   ApiFuture future =
                                                                                      +   *       dataCatalogClient.getTagTemplateCallable().futureCall(request);
                                                                                      +   *   // Do something.
                                                                                      +   *   TagTemplate response = future.get();
                                                                                      +   * }
                                                                                      +   * }
                                                                                      */ public final UnaryCallable getTagTemplateCallable() { return stub.getTagTemplateCallable(); @@ -1140,6 +1864,15 @@ public final UnaryCallable getTagTemplateCal * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                      Sample code: + * + *

                                                                                      {@code
                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                      +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                                                                                      +   *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate);
                                                                                      +   * }
                                                                                      +   * }
                                                                                      + * * @param tagTemplate Required. The template to update. The "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1157,6 +1890,16 @@ public final TagTemplate updateTagTemplate(TagTemplate tagTemplate) { * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                      Sample code: + * + *

                                                                                      {@code
                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                      +   *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
                                                                                      +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                                                                      +   *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate, updateMask);
                                                                                      +   * }
                                                                                      +   * }
                                                                                      + * * @param tagTemplate Required. The template to update. The "name" field must be set. * @param updateMask The field mask specifies the parts of the template to overwrite. *

                                                                                      Allowed fields: @@ -1181,6 +1924,19 @@ public final TagTemplate updateTagTemplate(TagTemplate tagTemplate, FieldMask up * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                      Sample code: + * + *

                                                                                      {@code
                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                      +   *   UpdateTagTemplateRequest request =
                                                                                      +   *       UpdateTagTemplateRequest.newBuilder()
                                                                                      +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                                                                                      +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                      +   *           .build();
                                                                                      +   *   TagTemplate response = dataCatalogClient.updateTagTemplate(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 */ @@ -1197,6 +1953,20 @@ public final TagTemplate updateTagTemplate(UpdateTagTemplateRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                                                      Sample code: + * + *

                                                                                      {@code
                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                      +   *   UpdateTagTemplateRequest request =
                                                                                      +   *       UpdateTagTemplateRequest.newBuilder()
                                                                                      +   *           .setTagTemplate(TagTemplate.newBuilder().build())
                                                                                      +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                      +   *           .build();
                                                                                      +   *   ApiFuture future =
                                                                                      +   *       dataCatalogClient.updateTagTemplateCallable().futureCall(request);
                                                                                      +   *   // Do something.
                                                                                      +   *   TagTemplate response = future.get();
                                                                                      +   * }
                                                                                      +   * }
                                                                                      */ public final UnaryCallable updateTagTemplateCallable() { return stub.updateTagTemplateCallable(); @@ -1208,6 +1978,16 @@ public final UnaryCallable updateTagTempl * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                      Sample code: + * + *

                                                                                      {@code
                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                      +   *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                                                                                      +   *   boolean force = true;
                                                                                      +   *   dataCatalogClient.deleteTagTemplate(name, force);
                                                                                      +   * }
                                                                                      +   * }
                                                                                      + * * @param name Required. The name of the tag template to delete. Example: *
                                                                                        *
                                                                                      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1233,6 +2013,16 @@ public final void deleteTagTemplate(TagTemplateName name, boolean force) { * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                        Sample code: + * + *

                                                                                        {@code
                                                                                        +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                        +   *   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                                                                        +   *   boolean force = true;
                                                                                        +   *   dataCatalogClient.deleteTagTemplate(name, force);
                                                                                        +   * }
                                                                                        +   * }
                                                                                        + * * @param name Required. The name of the tag template to delete. Example: *
                                                                                          *
                                                                                        • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} @@ -1255,6 +2045,19 @@ public final void deleteTagTemplate(String name, boolean force) { * API in the project identified by the `name` parameter (see [Data Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                          Sample code: + * + *

                                                                                          {@code
                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                          +   *   DeleteTagTemplateRequest request =
                                                                                          +   *       DeleteTagTemplateRequest.newBuilder()
                                                                                          +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                          +   *           .setForce(true)
                                                                                          +   *           .build();
                                                                                          +   *   dataCatalogClient.deleteTagTemplate(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 */ @@ -1269,6 +2072,19 @@ public final void deleteTagTemplate(DeleteTagTemplateRequest request) { * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                                                          Sample code: + * + *

                                                                                          {@code
                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                          +   *   DeleteTagTemplateRequest request =
                                                                                          +   *       DeleteTagTemplateRequest.newBuilder()
                                                                                          +   *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                          +   *           .setForce(true)
                                                                                          +   *           .build();
                                                                                          +   *   ApiFuture future = dataCatalogClient.deleteTagTemplateCallable().futureCall(request);
                                                                                          +   *   // Do something.
                                                                                          +   *   future.get();
                                                                                          +   * }
                                                                                          +   * }
                                                                                          */ public final UnaryCallable deleteTagTemplateCallable() { return stub.deleteTagTemplateCallable(); @@ -1281,6 +2097,18 @@ public final UnaryCallable deleteTagTemplateCal * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                          Sample code: + * + *

                                                                                          {@code
                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                          +   *   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
                                                                                          +   *   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
                                                                                          +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                                                                          +   *   TagTemplateField response =
                                                                                          +   *       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
                                                                                          +   * }
                                                                                          +   * }
                                                                                          + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). *

                                                                                          Example: @@ -1313,6 +2141,18 @@ public final TagTemplateField createTagTemplateField( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                          Sample code: + * + *

                                                                                          {@code
                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                          +   *   String parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
                                                                                          +   *   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
                                                                                          +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                                                                          +   *   TagTemplateField response =
                                                                                          +   *       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
                                                                                          +   * }
                                                                                          +   * }
                                                                                          + * * @param parent Required. The name of the project and the template location * [region](https://cloud.google.com/data-catalog/docs/concepts/regions). *

                                                                                          Example: @@ -1345,6 +2185,20 @@ public final TagTemplateField createTagTemplateField( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                          Sample code: + * + *

                                                                                          {@code
                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                          +   *   CreateTagTemplateFieldRequest request =
                                                                                          +   *       CreateTagTemplateFieldRequest.newBuilder()
                                                                                          +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                          +   *           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
                                                                                          +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                                                                          +   *           .build();
                                                                                          +   *   TagTemplateField response = dataCatalogClient.createTagTemplateField(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 */ @@ -1360,6 +2214,21 @@ public final TagTemplateField createTagTemplateField(CreateTagTemplateFieldReque * information). * *

                                                                                          Sample code: + * + *

                                                                                          {@code
                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                          +   *   CreateTagTemplateFieldRequest request =
                                                                                          +   *       CreateTagTemplateFieldRequest.newBuilder()
                                                                                          +   *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
                                                                                          +   *           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
                                                                                          +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                                                                          +   *           .build();
                                                                                          +   *   ApiFuture future =
                                                                                          +   *       dataCatalogClient.createTagTemplateFieldCallable().futureCall(request);
                                                                                          +   *   // Do something.
                                                                                          +   *   TagTemplateField response = future.get();
                                                                                          +   * }
                                                                                          +   * }
                                                                                          */ public final UnaryCallable createTagTemplateFieldCallable() { @@ -1373,6 +2242,17 @@ public final TagTemplateField createTagTemplateField(CreateTagTemplateFieldReque * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                          Sample code: + * + *

                                                                                          {@code
                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                          +   *   TagTemplateFieldName name =
                                                                                          +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                                                                          +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                                                                          +   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
                                                                                          +   * }
                                                                                          +   * }
                                                                                          + * * @param name Required. The name of the tag template field. Example: *
                                                                                            *
                                                                                          • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1398,6 +2278,18 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                            Sample code: + * + *

                                                                                            {@code
                                                                                            +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                            +   *   String name =
                                                                                            +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                            +   *           .toString();
                                                                                            +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                                                                            +   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
                                                                                            +   * }
                                                                                            +   * }
                                                                                            + * * @param name Required. The name of the tag template field. Example: *
                                                                                              *
                                                                                            • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1423,6 +2315,19 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                              Sample code: + * + *

                                                                                              {@code
                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                              +   *   TagTemplateFieldName name =
                                                                                              +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                                                                              +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                                                                              +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                                                                              +   *   TagTemplateField response =
                                                                                              +   *       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
                                                                                              +   * }
                                                                                              +   * }
                                                                                              + * * @param name Required. The name of the tag template field. Example: *
                                                                                                *
                                                                                              • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1456,6 +2361,20 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                                Sample code: + * + *

                                                                                                {@code
                                                                                                +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                +   *   String name =
                                                                                                +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                +   *           .toString();
                                                                                                +   *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
                                                                                                +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                                                                                +   *   TagTemplateField response =
                                                                                                +   *       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
                                                                                                +   * }
                                                                                                +   * }
                                                                                                + * * @param name Required. The name of the tag template field. Example: *
                                                                                                  *
                                                                                                • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1489,6 +2408,22 @@ public final TagTemplateField updateTagTemplateField( * Catalog Resource Project] * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * + *

                                                                                                  Sample code: + * + *

                                                                                                  {@code
                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                  +   *   UpdateTagTemplateFieldRequest request =
                                                                                                  +   *       UpdateTagTemplateFieldRequest.newBuilder()
                                                                                                  +   *           .setName(
                                                                                                  +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                  +   *                   .toString())
                                                                                                  +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                                                                                  +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                  +   *           .build();
                                                                                                  +   *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(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 */ @@ -1504,6 +2439,23 @@ public final TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldReque * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information). * *

                                                                                                  Sample code: + * + *

                                                                                                  {@code
                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                  +   *   UpdateTagTemplateFieldRequest request =
                                                                                                  +   *       UpdateTagTemplateFieldRequest.newBuilder()
                                                                                                  +   *           .setName(
                                                                                                  +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                  +   *                   .toString())
                                                                                                  +   *           .setTagTemplateField(TagTemplateField.newBuilder().build())
                                                                                                  +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                  +   *           .build();
                                                                                                  +   *   ApiFuture future =
                                                                                                  +   *       dataCatalogClient.updateTagTemplateFieldCallable().futureCall(request);
                                                                                                  +   *   // Do something.
                                                                                                  +   *   TagTemplateField response = future.get();
                                                                                                  +   * }
                                                                                                  +   * }
                                                                                                  */ public final UnaryCallable updateTagTemplateFieldCallable() { @@ -1517,6 +2469,18 @@ public final TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldReque * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                                  Sample code: + * + *

                                                                                                  {@code
                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                  +   *   TagTemplateFieldName name =
                                                                                                  +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                                                                                  +   *   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
                                                                                                  +   *   TagTemplateField response =
                                                                                                  +   *       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
                                                                                                  +   * }
                                                                                                  +   * }
                                                                                                  + * * @param name Required. The name of the tag template. Example: *
                                                                                                    *
                                                                                                  • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1543,6 +2507,19 @@ public final TagTemplateField renameTagTemplateField( * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                                    Sample code: + * + *

                                                                                                    {@code
                                                                                                    +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                    +   *   String name =
                                                                                                    +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                    +   *           .toString();
                                                                                                    +   *   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
                                                                                                    +   *   TagTemplateField response =
                                                                                                    +   *       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
                                                                                                    +   * }
                                                                                                    +   * }
                                                                                                    + * * @param name Required. The name of the tag template. Example: *
                                                                                                      *
                                                                                                    • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1568,6 +2545,21 @@ public final TagTemplateField renameTagTemplateField(String name, String newTagT * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                                      Sample code: + * + *

                                                                                                      {@code
                                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                      +   *   RenameTagTemplateFieldRequest request =
                                                                                                      +   *       RenameTagTemplateFieldRequest.newBuilder()
                                                                                                      +   *           .setName(
                                                                                                      +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                      +   *                   .toString())
                                                                                                      +   *           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
                                                                                                      +   *           .build();
                                                                                                      +   *   TagTemplateField response = dataCatalogClient.renameTagTemplateField(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 */ @@ -1583,6 +2575,22 @@ public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldReque * information). * *

                                                                                                      Sample code: + * + *

                                                                                                      {@code
                                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                      +   *   RenameTagTemplateFieldRequest request =
                                                                                                      +   *       RenameTagTemplateFieldRequest.newBuilder()
                                                                                                      +   *           .setName(
                                                                                                      +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                      +   *                   .toString())
                                                                                                      +   *           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
                                                                                                      +   *           .build();
                                                                                                      +   *   ApiFuture future =
                                                                                                      +   *       dataCatalogClient.renameTagTemplateFieldCallable().futureCall(request);
                                                                                                      +   *   // Do something.
                                                                                                      +   *   TagTemplateField response = future.get();
                                                                                                      +   * }
                                                                                                      +   * }
                                                                                                      */ public final UnaryCallable renameTagTemplateFieldCallable() { @@ -1596,6 +2604,17 @@ public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldReque * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                                      Sample code: + * + *

                                                                                                      {@code
                                                                                                      +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                      +   *   TagTemplateFieldName name =
                                                                                                      +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
                                                                                                      +   *   boolean force = true;
                                                                                                      +   *   dataCatalogClient.deleteTagTemplateField(name, force);
                                                                                                      +   * }
                                                                                                      +   * }
                                                                                                      + * * @param name Required. The name of the tag template field to delete. Example: *
                                                                                                        *
                                                                                                      • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1622,6 +2641,18 @@ public final void deleteTagTemplateField(TagTemplateFieldName name, boolean forc * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                                        Sample code: + * + *

                                                                                                        {@code
                                                                                                        +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                        +   *   String name =
                                                                                                        +   *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                        +   *           .toString();
                                                                                                        +   *   boolean force = true;
                                                                                                        +   *   dataCatalogClient.deleteTagTemplateField(name, force);
                                                                                                        +   * }
                                                                                                        +   * }
                                                                                                        + * * @param name Required. The name of the tag template field to delete. Example: *
                                                                                                          *
                                                                                                        • projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} @@ -1645,6 +2676,21 @@ public final void deleteTagTemplateField(String name, boolean force) { * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more * information). * + *

                                                                                                          Sample code: + * + *

                                                                                                          {@code
                                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                          +   *   DeleteTagTemplateFieldRequest request =
                                                                                                          +   *       DeleteTagTemplateFieldRequest.newBuilder()
                                                                                                          +   *           .setName(
                                                                                                          +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                          +   *                   .toString())
                                                                                                          +   *           .setForce(true)
                                                                                                          +   *           .build();
                                                                                                          +   *   dataCatalogClient.deleteTagTemplateField(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 */ @@ -1660,6 +2706,22 @@ public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request) * information). * *

                                                                                                          Sample code: + * + *

                                                                                                          {@code
                                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                          +   *   DeleteTagTemplateFieldRequest request =
                                                                                                          +   *       DeleteTagTemplateFieldRequest.newBuilder()
                                                                                                          +   *           .setName(
                                                                                                          +   *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
                                                                                                          +   *                   .toString())
                                                                                                          +   *           .setForce(true)
                                                                                                          +   *           .build();
                                                                                                          +   *   ApiFuture future =
                                                                                                          +   *       dataCatalogClient.deleteTagTemplateFieldCallable().futureCall(request);
                                                                                                          +   *   // Do something.
                                                                                                          +   *   future.get();
                                                                                                          +   * }
                                                                                                          +   * }
                                                                                                          */ public final UnaryCallable deleteTagTemplateFieldCallable() { @@ -1675,6 +2737,16 @@ public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request) * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) * used to create the tag must be from the same organization. * + *

                                                                                                          Sample code: + * + *

                                                                                                          {@code
                                                                                                          +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                          +   *   TagName parent = TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]");
                                                                                                          +   *   Tag tag = Tag.newBuilder().build();
                                                                                                          +   *   Tag response = dataCatalogClient.createTag(parent, tag);
                                                                                                          +   * }
                                                                                                          +   * }
                                                                                                          + * * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to * Entries. Example: *
                                                                                                            @@ -1703,6 +2775,17 @@ public final Tag createTag(TagName parent, Tag tag) { * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) * used to create the tag must be from the same organization. * + *

                                                                                                            Sample code: + * + *

                                                                                                            {@code
                                                                                                            +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                            +   *   String parent =
                                                                                                            +   *       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
                                                                                                            +   *   Tag tag = Tag.newBuilder().build();
                                                                                                            +   *   Tag response = dataCatalogClient.createTag(parent, tag);
                                                                                                            +   * }
                                                                                                            +   * }
                                                                                                            + * * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to * Entries. Example: *
                                                                                                              @@ -1727,6 +2810,21 @@ public final Tag createTag(String parent, Tag tag) { * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) * used to create the tag must be from the same organization. * + *

                                                                                                              Sample code: + * + *

                                                                                                              {@code
                                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                              +   *   CreateTagRequest request =
                                                                                                              +   *       CreateTagRequest.newBuilder()
                                                                                                              +   *           .setParent(
                                                                                                              +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                                                                              +   *                   .toString())
                                                                                                              +   *           .setTag(Tag.newBuilder().build())
                                                                                                              +   *           .build();
                                                                                                              +   *   Tag response = dataCatalogClient.createTag(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 */ @@ -1744,6 +2842,21 @@ public final Tag createTag(CreateTagRequest request) { * used to create the tag must be from the same organization. * *

                                                                                                              Sample code: + * + *

                                                                                                              {@code
                                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                              +   *   CreateTagRequest request =
                                                                                                              +   *       CreateTagRequest.newBuilder()
                                                                                                              +   *           .setParent(
                                                                                                              +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                                                                              +   *                   .toString())
                                                                                                              +   *           .setTag(Tag.newBuilder().build())
                                                                                                              +   *           .build();
                                                                                                              +   *   ApiFuture future = dataCatalogClient.createTagCallable().futureCall(request);
                                                                                                              +   *   // Do something.
                                                                                                              +   *   Tag response = future.get();
                                                                                                              +   * }
                                                                                                              +   * }
                                                                                                              */ public final UnaryCallable createTagCallable() { return stub.createTagCallable(); @@ -1753,6 +2866,15 @@ public final UnaryCallable createTagCallable() { /** * Updates an existing tag. * + *

                                                                                                              Sample code: + * + *

                                                                                                              {@code
                                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                              +   *   Tag tag = Tag.newBuilder().build();
                                                                                                              +   *   Tag response = dataCatalogClient.updateTag(tag);
                                                                                                              +   * }
                                                                                                              +   * }
                                                                                                              + * * @param tag Required. The updated tag. The "name" field must be set. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -1765,6 +2887,16 @@ public final Tag updateTag(Tag tag) { /** * Updates an existing tag. * + *

                                                                                                              Sample code: + * + *

                                                                                                              {@code
                                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                              +   *   Tag tag = Tag.newBuilder().build();
                                                                                                              +   *   FieldMask updateMask = FieldMask.newBuilder().build();
                                                                                                              +   *   Tag response = dataCatalogClient.updateTag(tag, updateMask);
                                                                                                              +   * }
                                                                                                              +   * }
                                                                                                              + * * @param tag Required. The updated tag. The "name" field must be set. * @param updateMask The fields to update on the Tag. If absent or empty, all modifiable fields * are updated. Currently the only modifiable field is the field `fields`. @@ -1780,6 +2912,19 @@ public final Tag updateTag(Tag tag, FieldMask updateMask) { /** * Updates an existing tag. * + *

                                                                                                              Sample code: + * + *

                                                                                                              {@code
                                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                              +   *   UpdateTagRequest request =
                                                                                                              +   *       UpdateTagRequest.newBuilder()
                                                                                                              +   *           .setTag(Tag.newBuilder().build())
                                                                                                              +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                              +   *           .build();
                                                                                                              +   *   Tag response = dataCatalogClient.updateTag(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 */ @@ -1792,6 +2937,19 @@ public final Tag updateTag(UpdateTagRequest request) { * Updates an existing tag. * *

                                                                                                              Sample code: + * + *

                                                                                                              {@code
                                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                              +   *   UpdateTagRequest request =
                                                                                                              +   *       UpdateTagRequest.newBuilder()
                                                                                                              +   *           .setTag(Tag.newBuilder().build())
                                                                                                              +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                              +   *           .build();
                                                                                                              +   *   ApiFuture future = dataCatalogClient.updateTagCallable().futureCall(request);
                                                                                                              +   *   // Do something.
                                                                                                              +   *   Tag response = future.get();
                                                                                                              +   * }
                                                                                                              +   * }
                                                                                                              */ public final UnaryCallable updateTagCallable() { return stub.updateTagCallable(); @@ -1801,6 +2959,15 @@ public final UnaryCallable updateTagCallable() { /** * Deletes a tag. * + *

                                                                                                              Sample code: + * + *

                                                                                                              {@code
                                                                                                              +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                              +   *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
                                                                                                              +   *   dataCatalogClient.deleteTag(name);
                                                                                                              +   * }
                                                                                                              +   * }
                                                                                                              + * * @param name Required. The name of the tag to delete. Example: *
                                                                                                                *
                                                                                                              • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} @@ -1818,6 +2985,16 @@ public final void deleteTag(EntryName name) { /** * Deletes a tag. * + *

                                                                                                                Sample code: + * + *

                                                                                                                {@code
                                                                                                                +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                +   *   String name =
                                                                                                                +   *       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
                                                                                                                +   *   dataCatalogClient.deleteTag(name);
                                                                                                                +   * }
                                                                                                                +   * }
                                                                                                                + * * @param name Required. The name of the tag to delete. Example: *
                                                                                                                  *
                                                                                                                • projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} @@ -1834,6 +3011,20 @@ public final void deleteTag(String name) { /** * Deletes a tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   DeleteTagRequest request =
                                                                                                                  +   *       DeleteTagRequest.newBuilder()
                                                                                                                  +   *           .setName(
                                                                                                                  +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   dataCatalogClient.deleteTag(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 */ @@ -1846,6 +3037,20 @@ public final void deleteTag(DeleteTagRequest request) { * Deletes a tag. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   DeleteTagRequest request =
                                                                                                                  +   *       DeleteTagRequest.newBuilder()
                                                                                                                  +   *           .setName(
                                                                                                                  +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = dataCatalogClient.deleteTagCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable deleteTagCallable() { return stub.deleteTagCallable(); @@ -1855,6 +3060,17 @@ public final UnaryCallable deleteTagCallable() { /** * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
                                                                                                                  +   *   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource * could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an * [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. @@ -1876,6 +3092,18 @@ public final ListTagsPagedResponse listTags(EntryName parent) { /** * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   String parent =
                                                                                                                  +   *       TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]").toString();
                                                                                                                  +   *   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource * could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an * [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. @@ -1896,6 +3124,24 @@ public final ListTagsPagedResponse listTags(String parent) { /** * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   ListTagsRequest request =
                                                                                                                  +   *       ListTagsRequest.newBuilder()
                                                                                                                  +   *           .setParent(
                                                                                                                  +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .setPageSize(883849137)
                                                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                                                  +   *           .build();
                                                                                                                  +   *   for (Tag element : dataCatalogClient.listTags(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 */ @@ -1908,6 +3154,24 @@ public final ListTagsPagedResponse listTags(ListTagsRequest request) { * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   ListTagsRequest request =
                                                                                                                  +   *       ListTagsRequest.newBuilder()
                                                                                                                  +   *           .setParent(
                                                                                                                  +   *               TagName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]", "[TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .setPageSize(883849137)
                                                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = dataCatalogClient.listTagsPagedCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   for (Tag element : future.get().iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable listTagsPagedCallable() { return stub.listTagsPagedCallable(); @@ -1918,6 +3182,23 @@ public final UnaryCallable listTagsPaged * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   while (true) {
                                                                                                                  +   *     ListTagsResponse response = dataCatalogClient.listTagsCallable().call(request);
                                                                                                                  +   *     for (Tag element : response.getResponsesList()) {
                                                                                                                  +   *       // doThingsWith(element);
                                                                                                                  +   *     }
                                                                                                                  +   *     String nextPageToken = response.getNextPageToken();
                                                                                                                  +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                                                                                                                  +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                                                                                                                  +   *     } else {
                                                                                                                  +   *       break;
                                                                                                                  +   *     }
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable listTagsCallable() { return stub.listTagsCallable(); @@ -1934,6 +3215,16 @@ public final UnaryCallable listTagsCallable() * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
                                                                                                                  +   *   Policy policy = Policy.newBuilder().build();
                                                                                                                  +   *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param resource REQUIRED: The resource for which the policy is being specified. See the * operation documentation for the appropriate value for this field. * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the @@ -1961,6 +3252,16 @@ public final Policy setIamPolicy(ResourceName resource, Policy policy) { * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   String resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
                                                                                                                  +   *   Policy policy = Policy.newBuilder().build();
                                                                                                                  +   *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param resource REQUIRED: The resource for which the policy is being specified. See the * operation documentation for the appropriate value for this field. * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the @@ -1985,6 +3286,19 @@ public final Policy setIamPolicy(String resource, Policy policy) { * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   SetIamPolicyRequest request =
                                                                                                                  +   *       SetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setPolicy(Policy.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   Policy response = dataCatalogClient.setIamPolicy(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 */ @@ -2004,6 +3318,19 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   SetIamPolicyRequest request =
                                                                                                                  +   *       SetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setPolicy(Policy.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = dataCatalogClient.setIamPolicyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   Policy response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable setIamPolicyCallable() { return stub.setIamPolicyCallable(); @@ -2023,6 +3350,15 @@ public final UnaryCallable setIamPolicyCallable() { * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   ResourceName resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
                                                                                                                  +   *   Policy response = dataCatalogClient.getIamPolicy(resource);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2049,6 +3385,15 @@ public final Policy getIamPolicy(ResourceName resource) { * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   String resource = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
                                                                                                                  +   *   Policy response = dataCatalogClient.getIamPolicy(resource);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param resource REQUIRED: The resource for which the policy is being requested. See the * operation documentation for the appropriate value for this field. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -2072,6 +3417,19 @@ public final Policy getIamPolicy(String resource) { * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   GetIamPolicyRequest request =
                                                                                                                  +   *       GetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setOptions(GetPolicyOptions.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   Policy response = dataCatalogClient.getIamPolicy(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 */ @@ -2094,6 +3452,19 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   GetIamPolicyRequest request =
                                                                                                                  +   *       GetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setOptions(GetPolicyOptions.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = dataCatalogClient.getIamPolicyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   Policy response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable getIamPolicyCallable() { return stub.getIamPolicyCallable(); @@ -2110,6 +3481,19 @@ public final UnaryCallable getIamPolicyCallable() { * *

                                                                                                                  A caller is not required to have Google IAM permission to make this request. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   TestIamPermissionsRequest request =
                                                                                                                  +   *       TestIamPermissionsRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .addAllPermissions(new ArrayList())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   TestIamPermissionsResponse response = dataCatalogClient.testIamPermissions(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 */ @@ -2129,6 +3513,20 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq *

                                                                                                                  A caller is not required to have Google IAM permission to make this request. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  +   *   TestIamPermissionsRequest request =
                                                                                                                  +   *       TestIamPermissionsRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .addAllPermissions(new ArrayList())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       dataCatalogClient.testIamPermissionsCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   TestIamPermissionsResponse response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable testIamPermissionsCallable() { diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClient.java index bdb6911a..a4e0859c 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClient.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerClient.java @@ -48,6 +48,14 @@ *

                                                                                                                  This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

                                                                                                                  {@code
                                                                                                                  + * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                                                                                  + *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
                                                                                                                  + *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
                                                                                                                  + * }
                                                                                                                  + * }
                                                                                                                  + * *

                                                                                                                  Note: close() needs to be called on the PolicyTagManagerClient object to clean up resources * such as threads. In the example above, try-with-resources is used, which automatically calls * close(). @@ -155,6 +163,16 @@ public PolicyTagManagerStub getStub() { /** * Creates a taxonomy in the specified project. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                                                                                  +   *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the project that the taxonomy will belong to. * @param taxonomy The taxonomy to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -172,6 +190,16 @@ public final Taxonomy createTaxonomy(LocationName parent, Taxonomy taxonomy) { /** * Creates a taxonomy in the specified project. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
                                                                                                                  +   *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the project that the taxonomy will belong to. * @param taxonomy The taxonomy to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -186,6 +214,19 @@ public final Taxonomy createTaxonomy(String parent, Taxonomy taxonomy) { /** * Creates a taxonomy in the specified project. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   CreateTaxonomyRequest request =
                                                                                                                  +   *       CreateTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setTaxonomy(Taxonomy.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.createTaxonomy(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 */ @@ -198,6 +239,20 @@ public final Taxonomy createTaxonomy(CreateTaxonomyRequest request) { * Creates a taxonomy in the specified project. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   CreateTaxonomyRequest request =
                                                                                                                  +   *       CreateTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setTaxonomy(Taxonomy.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.createTaxonomyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   Taxonomy response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable createTaxonomyCallable() { return stub.createTaxonomyCallable(); @@ -208,6 +263,15 @@ public final UnaryCallable createTaxonomyCallab * Deletes a taxonomy. This operation will also delete all policy tags in this taxonomy along with * their associated policies. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
                                                                                                                  +   *   policyTagManagerClient.deleteTaxonomy(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the taxonomy to be deleted. All policy tags in this * taxonomy will also be deleted. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -223,6 +287,15 @@ public final void deleteTaxonomy(TaxonomyName name) { * Deletes a taxonomy. This operation will also delete all policy tags in this taxonomy along with * their associated policies. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
                                                                                                                  +   *   policyTagManagerClient.deleteTaxonomy(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the taxonomy to be deleted. All policy tags in this * taxonomy will also be deleted. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -237,6 +310,18 @@ public final void deleteTaxonomy(String name) { * Deletes a taxonomy. This operation will also delete all policy tags in this taxonomy along with * their associated policies. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   DeleteTaxonomyRequest request =
                                                                                                                  +   *       DeleteTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   policyTagManagerClient.deleteTaxonomy(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 */ @@ -250,6 +335,18 @@ public final void deleteTaxonomy(DeleteTaxonomyRequest request) { * their associated policies. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   DeleteTaxonomyRequest request =
                                                                                                                  +   *       DeleteTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = policyTagManagerClient.deleteTaxonomyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable deleteTaxonomyCallable() { return stub.deleteTaxonomyCallable(); @@ -259,6 +356,15 @@ public final UnaryCallable deleteTaxonomyCallable( /** * Updates a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.updateTaxonomy(taxonomy);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param taxonomy The taxonomy to update. Only description, display_name, and activated policy * types can be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -273,6 +379,19 @@ public final Taxonomy updateTaxonomy(Taxonomy taxonomy) { /** * Updates a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   UpdateTaxonomyRequest request =
                                                                                                                  +   *       UpdateTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setTaxonomy(Taxonomy.newBuilder().build())
                                                                                                                  +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.updateTaxonomy(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 */ @@ -285,6 +404,20 @@ public final Taxonomy updateTaxonomy(UpdateTaxonomyRequest request) { * Updates a taxonomy. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   UpdateTaxonomyRequest request =
                                                                                                                  +   *       UpdateTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setTaxonomy(Taxonomy.newBuilder().build())
                                                                                                                  +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.updateTaxonomyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   Taxonomy response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable updateTaxonomyCallable() { return stub.updateTaxonomyCallable(); @@ -295,6 +428,17 @@ public final UnaryCallable updateTaxonomyCallab * Lists all taxonomies in a project in a particular location that the caller has permission to * view. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                                                                                  +   *   for (Taxonomy element : policyTagManagerClient.listTaxonomies(parent).iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the project to list the taxonomies of. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -311,6 +455,17 @@ public final ListTaxonomiesPagedResponse listTaxonomies(LocationName parent) { * Lists all taxonomies in a project in a particular location that the caller has permission to * view. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
                                                                                                                  +   *   for (Taxonomy element : policyTagManagerClient.listTaxonomies(parent).iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the project to list the taxonomies of. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -324,6 +479,22 @@ public final ListTaxonomiesPagedResponse listTaxonomies(String parent) { * Lists all taxonomies in a project in a particular location that the caller has permission to * view. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   ListTaxonomiesRequest request =
                                                                                                                  +   *       ListTaxonomiesRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setPageSize(883849137)
                                                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                                                  +   *           .build();
                                                                                                                  +   *   for (Taxonomy element : policyTagManagerClient.listTaxonomies(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 */ @@ -337,6 +508,23 @@ public final ListTaxonomiesPagedResponse listTaxonomies(ListTaxonomiesRequest re * view. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   ListTaxonomiesRequest request =
                                                                                                                  +   *       ListTaxonomiesRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setPageSize(883849137)
                                                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.listTaxonomiesPagedCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   for (Taxonomy element : future.get().iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable listTaxonomiesPagedCallable() { @@ -349,6 +537,24 @@ public final ListTaxonomiesPagedResponse listTaxonomies(ListTaxonomiesRequest re * view. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   while (true) {
                                                                                                                  +   *     ListTaxonomiesResponse response =
                                                                                                                  +   *         policyTagManagerClient.listTaxonomiesCallable().call(request);
                                                                                                                  +   *     for (Taxonomy element : response.getResponsesList()) {
                                                                                                                  +   *       // doThingsWith(element);
                                                                                                                  +   *     }
                                                                                                                  +   *     String nextPageToken = response.getNextPageToken();
                                                                                                                  +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                                                                                                                  +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                                                                                                                  +   *     } else {
                                                                                                                  +   *       break;
                                                                                                                  +   *     }
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable listTaxonomiesCallable() { @@ -359,6 +565,15 @@ public final ListTaxonomiesPagedResponse listTaxonomies(ListTaxonomiesRequest re /** * Gets a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   TaxonomyName name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.getTaxonomy(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the requested taxonomy. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -372,6 +587,15 @@ public final Taxonomy getTaxonomy(TaxonomyName name) { /** * Gets a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String name = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString();
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.getTaxonomy(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the requested taxonomy. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -384,6 +608,18 @@ public final Taxonomy getTaxonomy(String name) { /** * Gets a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   GetTaxonomyRequest request =
                                                                                                                  +   *       GetTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   Taxonomy response = policyTagManagerClient.getTaxonomy(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 */ @@ -396,6 +632,18 @@ public final Taxonomy getTaxonomy(GetTaxonomyRequest request) { * Gets a taxonomy. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   GetTaxonomyRequest request =
                                                                                                                  +   *       GetTaxonomyRequest.newBuilder()
                                                                                                                  +   *           .setName(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = policyTagManagerClient.getTaxonomyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   Taxonomy response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable getTaxonomyCallable() { return stub.getTaxonomyCallable(); @@ -405,6 +653,16 @@ public final UnaryCallable getTaxonomyCallable() { /** * Creates a policy tag in the specified taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
                                                                                                                  +   *   PolicyTag policyTag = PolicyTag.newBuilder().build();
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.createPolicyTag(parent, policyTag);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the taxonomy that the policy tag will belong to. * @param policyTag The policy tag to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -422,6 +680,17 @@ public final PolicyTag createPolicyTag(TaxonomyName parent, PolicyTag policyTag) /** * Creates a policy tag in the specified taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String parent =
                                                                                                                  +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
                                                                                                                  +   *   PolicyTag policyTag = PolicyTag.newBuilder().build();
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.createPolicyTag(parent, policyTag);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the taxonomy that the policy tag will belong to. * @param policyTag The policy tag to be created. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -436,6 +705,21 @@ public final PolicyTag createPolicyTag(String parent, PolicyTag policyTag) { /** * Creates a policy tag in the specified taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   CreatePolicyTagRequest request =
                                                                                                                  +   *       CreatePolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setParent(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .setPolicyTag(PolicyTag.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.createPolicyTag(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 */ @@ -448,6 +732,22 @@ public final PolicyTag createPolicyTag(CreatePolicyTagRequest request) { * Creates a policy tag in the specified taxonomy. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   CreatePolicyTagRequest request =
                                                                                                                  +   *       CreatePolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setParent(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .setPolicyTag(PolicyTag.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.createPolicyTagCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   PolicyTag response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable createPolicyTagCallable() { return stub.createPolicyTagCallable(); @@ -457,6 +757,16 @@ public final UnaryCallable createPolicyTagCal /** * Deletes a policy tag. Also deletes all of its descendant policy tags. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   PolicyTagName name =
                                                                                                                  +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
                                                                                                                  +   *   policyTagManagerClient.deletePolicyTag(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the policy tag to be deleted. All of its descendant * policy tags will also be deleted. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -471,6 +781,16 @@ public final void deletePolicyTag(PolicyTagName name) { /** * Deletes a policy tag. Also deletes all of its descendant policy tags. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String name =
                                                                                                                  +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
                                                                                                                  +   *   policyTagManagerClient.deletePolicyTag(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the policy tag to be deleted. All of its descendant * policy tags will also be deleted. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -484,6 +804,20 @@ public final void deletePolicyTag(String name) { /** * Deletes a policy tag. Also deletes all of its descendant policy tags. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   DeletePolicyTagRequest request =
                                                                                                                  +   *       DeletePolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setName(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   policyTagManagerClient.deletePolicyTag(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 */ @@ -496,6 +830,21 @@ public final void deletePolicyTag(DeletePolicyTagRequest request) { * Deletes a policy tag. Also deletes all of its descendant policy tags. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   DeletePolicyTagRequest request =
                                                                                                                  +   *       DeletePolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setName(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.deletePolicyTagCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable deletePolicyTagCallable() { return stub.deletePolicyTagCallable(); @@ -505,6 +854,15 @@ public final UnaryCallable deletePolicyTagCallabl /** * Updates a policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   PolicyTag policyTag = PolicyTag.newBuilder().build();
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.updatePolicyTag(policyTag);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param policyTag The policy tag to update. Only the description, display_name, and * parent_policy_tag fields can be updated. * @throws com.google.api.gax.rpc.ApiException if the remote call fails @@ -519,6 +877,19 @@ public final PolicyTag updatePolicyTag(PolicyTag policyTag) { /** * Updates a policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   UpdatePolicyTagRequest request =
                                                                                                                  +   *       UpdatePolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setPolicyTag(PolicyTag.newBuilder().build())
                                                                                                                  +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.updatePolicyTag(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 */ @@ -531,6 +902,20 @@ public final PolicyTag updatePolicyTag(UpdatePolicyTagRequest request) { * Updates a policy tag. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   UpdatePolicyTagRequest request =
                                                                                                                  +   *       UpdatePolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setPolicyTag(PolicyTag.newBuilder().build())
                                                                                                                  +   *           .setUpdateMask(FieldMask.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.updatePolicyTagCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   PolicyTag response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable updatePolicyTagCallable() { return stub.updatePolicyTagCallable(); @@ -540,6 +925,17 @@ public final UnaryCallable updatePolicyTagCal /** * Lists all policy tags in a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   TaxonomyName parent = TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]");
                                                                                                                  +   *   for (PolicyTag element : policyTagManagerClient.listPolicyTags(parent).iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the taxonomy to list the policy tags of. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -555,6 +951,18 @@ public final ListPolicyTagsPagedResponse listPolicyTags(TaxonomyName parent) { /** * Lists all policy tags in a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String parent =
                                                                                                                  +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
                                                                                                                  +   *   for (PolicyTag element : policyTagManagerClient.listPolicyTags(parent).iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param parent Required. Resource name of the taxonomy to list the policy tags of. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -567,6 +975,24 @@ public final ListPolicyTagsPagedResponse listPolicyTags(String parent) { /** * Lists all policy tags in a taxonomy. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   ListPolicyTagsRequest request =
                                                                                                                  +   *       ListPolicyTagsRequest.newBuilder()
                                                                                                                  +   *           .setParent(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .setPageSize(883849137)
                                                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                                                  +   *           .build();
                                                                                                                  +   *   for (PolicyTag element : policyTagManagerClient.listPolicyTags(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 */ @@ -579,6 +1005,25 @@ public final ListPolicyTagsPagedResponse listPolicyTags(ListPolicyTagsRequest re * Lists all policy tags in a taxonomy. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   ListPolicyTagsRequest request =
                                                                                                                  +   *       ListPolicyTagsRequest.newBuilder()
                                                                                                                  +   *           .setParent(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .setPageSize(883849137)
                                                                                                                  +   *           .setPageToken("pageToken873572522")
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.listPolicyTagsPagedCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   for (PolicyTag element : future.get().iterateAll()) {
                                                                                                                  +   *     // doThingsWith(element);
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable listPolicyTagsPagedCallable() { @@ -590,6 +1035,24 @@ public final ListPolicyTagsPagedResponse listPolicyTags(ListPolicyTagsRequest re * Lists all policy tags in a taxonomy. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   while (true) {
                                                                                                                  +   *     ListPolicyTagsResponse response =
                                                                                                                  +   *         policyTagManagerClient.listPolicyTagsCallable().call(request);
                                                                                                                  +   *     for (PolicyTag element : response.getResponsesList()) {
                                                                                                                  +   *       // doThingsWith(element);
                                                                                                                  +   *     }
                                                                                                                  +   *     String nextPageToken = response.getNextPageToken();
                                                                                                                  +   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
                                                                                                                  +   *       request = request.toBuilder().setPageToken(nextPageToken).build();
                                                                                                                  +   *     } else {
                                                                                                                  +   *       break;
                                                                                                                  +   *     }
                                                                                                                  +   *   }
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable listPolicyTagsCallable() { @@ -600,6 +1063,16 @@ public final ListPolicyTagsPagedResponse listPolicyTags(ListPolicyTagsRequest re /** * Gets a policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   PolicyTagName name =
                                                                                                                  +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]");
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.getPolicyTag(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the requested policy tag. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -613,6 +1086,16 @@ public final PolicyTag getPolicyTag(PolicyTagName name) { /** * Gets a policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   String name =
                                                                                                                  +   *       PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]").toString();
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.getPolicyTag(name);
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  + * * @param name Required. Resource name of the requested policy tag. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -625,6 +1108,20 @@ public final PolicyTag getPolicyTag(String name) { /** * Gets a policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   GetPolicyTagRequest request =
                                                                                                                  +   *       GetPolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setName(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   PolicyTag response = policyTagManagerClient.getPolicyTag(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 */ @@ -637,6 +1134,21 @@ public final PolicyTag getPolicyTag(GetPolicyTagRequest request) { * Gets a policy tag. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   GetPolicyTagRequest request =
                                                                                                                  +   *       GetPolicyTagRequest.newBuilder()
                                                                                                                  +   *           .setName(
                                                                                                                  +   *               PolicyTagName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]", "[POLICY_TAG]")
                                                                                                                  +   *                   .toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.getPolicyTagCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   PolicyTag response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable getPolicyTagCallable() { return stub.getPolicyTagCallable(); @@ -646,6 +1158,19 @@ public final UnaryCallable getPolicyTagCallable( /** * Gets the IAM policy for a taxonomy or a policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   GetIamPolicyRequest request =
                                                                                                                  +   *       GetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setOptions(GetPolicyOptions.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   Policy response = policyTagManagerClient.getIamPolicy(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 */ @@ -658,6 +1183,19 @@ public final Policy getIamPolicy(GetIamPolicyRequest request) { * Gets the IAM policy for a taxonomy or a policy tag. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   GetIamPolicyRequest request =
                                                                                                                  +   *       GetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setOptions(GetPolicyOptions.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = policyTagManagerClient.getIamPolicyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   Policy response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable getIamPolicyCallable() { return stub.getIamPolicyCallable(); @@ -667,6 +1205,19 @@ public final UnaryCallable getIamPolicyCallable() { /** * Sets the IAM policy for a taxonomy or a policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   SetIamPolicyRequest request =
                                                                                                                  +   *       SetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setPolicy(Policy.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   Policy response = policyTagManagerClient.setIamPolicy(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 */ @@ -679,6 +1230,19 @@ public final Policy setIamPolicy(SetIamPolicyRequest request) { * Sets the IAM policy for a taxonomy or a policy tag. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   SetIamPolicyRequest request =
                                                                                                                  +   *       SetIamPolicyRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .setPolicy(Policy.newBuilder().build())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future = policyTagManagerClient.setIamPolicyCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   Policy response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable setIamPolicyCallable() { return stub.setIamPolicyCallable(); @@ -688,6 +1252,19 @@ public final UnaryCallable setIamPolicyCallable() { /** * Returns the permissions that a caller has on the specified taxonomy or policy tag. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   TestIamPermissionsRequest request =
                                                                                                                  +   *       TestIamPermissionsRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .addAllPermissions(new ArrayList())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   TestIamPermissionsResponse response = policyTagManagerClient.testIamPermissions(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 */ @@ -700,6 +1277,20 @@ public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsReq * Returns the permissions that a caller has on the specified taxonomy or policy tag. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  +   *   TestIamPermissionsRequest request =
                                                                                                                  +   *       TestIamPermissionsRequest.newBuilder()
                                                                                                                  +   *           .setResource(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .addAllPermissions(new ArrayList())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerClient.testIamPermissionsCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   TestIamPermissionsResponse response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable testIamPermissionsCallable() { diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSerializationClient.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSerializationClient.java index 57d5eed4..e2fad2cb 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSerializationClient.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/PolicyTagManagerSerializationClient.java @@ -33,6 +33,18 @@ *

                                                                                                                  This class provides the ability to make remote calls to the backing service through method * calls that map to API methods. Sample code to get started: * + *

                                                                                                                  {@code
                                                                                                                  + * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
                                                                                                                  + *     PolicyTagManagerSerializationClient.create()) {
                                                                                                                  + *   ImportTaxonomiesRequest request =
                                                                                                                  + *       ImportTaxonomiesRequest.newBuilder()
                                                                                                                  + *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  + *           .build();
                                                                                                                  + *   ImportTaxonomiesResponse response =
                                                                                                                  + *       policyTagManagerSerializationClient.importTaxonomies(request);
                                                                                                                  + * }
                                                                                                                  + * }
                                                                                                                  + * *

                                                                                                                  Note: close() needs to be called on the PolicyTagManagerSerializationClient object to clean up * resources such as threads. In the example above, try-with-resources is used, which automatically * calls close(). @@ -146,6 +158,20 @@ public PolicyTagManagerSerializationStub getStub() { * *

                                                                                                                  This method provides a bulk taxonomy / policy tag creation using nested proto structure. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
                                                                                                                  +   *     PolicyTagManagerSerializationClient.create()) {
                                                                                                                  +   *   ImportTaxonomiesRequest request =
                                                                                                                  +   *       ImportTaxonomiesRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ImportTaxonomiesResponse response =
                                                                                                                  +   *       policyTagManagerSerializationClient.importTaxonomies(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 */ @@ -160,6 +186,20 @@ public final ImportTaxonomiesResponse importTaxonomies(ImportTaxonomiesRequest r *

                                                                                                                  This method provides a bulk taxonomy / policy tag creation using nested proto structure. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
                                                                                                                  +   *     PolicyTagManagerSerializationClient.create()) {
                                                                                                                  +   *   ImportTaxonomiesRequest request =
                                                                                                                  +   *       ImportTaxonomiesRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerSerializationClient.importTaxonomiesCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   ImportTaxonomiesResponse response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable importTaxonomiesCallable() { @@ -173,6 +213,21 @@ public final ImportTaxonomiesResponse importTaxonomies(ImportTaxonomiesRequest r *

                                                                                                                  This method generates SerializedTaxonomy protos with nested policy tags that can be used as * an input for future ImportTaxonomies calls. * + *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
                                                                                                                  +   *     PolicyTagManagerSerializationClient.create()) {
                                                                                                                  +   *   ExportTaxonomiesRequest request =
                                                                                                                  +   *       ExportTaxonomiesRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .addAllTaxonomies(new ArrayList())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ExportTaxonomiesResponse response =
                                                                                                                  +   *       policyTagManagerSerializationClient.exportTaxonomies(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 */ @@ -188,6 +243,21 @@ public final ExportTaxonomiesResponse exportTaxonomies(ExportTaxonomiesRequest r * an input for future ImportTaxonomies calls. * *

                                                                                                                  Sample code: + * + *

                                                                                                                  {@code
                                                                                                                  +   * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
                                                                                                                  +   *     PolicyTagManagerSerializationClient.create()) {
                                                                                                                  +   *   ExportTaxonomiesRequest request =
                                                                                                                  +   *       ExportTaxonomiesRequest.newBuilder()
                                                                                                                  +   *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  +   *           .addAllTaxonomies(new ArrayList())
                                                                                                                  +   *           .build();
                                                                                                                  +   *   ApiFuture future =
                                                                                                                  +   *       policyTagManagerSerializationClient.exportTaxonomiesCallable().futureCall(request);
                                                                                                                  +   *   // Do something.
                                                                                                                  +   *   ExportTaxonomiesResponse response = future.get();
                                                                                                                  +   * }
                                                                                                                  +   * }
                                                                                                                  */ public final UnaryCallable exportTaxonomiesCallable() { diff --git a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/package-info.java b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/package-info.java index 3ecfb926..503e611e 100644 --- a/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/package-info.java +++ b/google-cloud-datacatalog/src/main/java/com/google/cloud/datacatalog/v1beta1/package-info.java @@ -24,6 +24,15 @@ * *

                                                                                                                  Sample for DataCatalogClient: * + *

                                                                                                                  {@code
                                                                                                                  + * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
                                                                                                                  + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                                                                                  + *   String entryGroupId = "entryGroupId1228924712";
                                                                                                                  + *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
                                                                                                                  + *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
                                                                                                                  + * }
                                                                                                                  + * }
                                                                                                                  + * *

                                                                                                                  ======================= PolicyTagManagerClient ======================= * *

                                                                                                                  Service Description: The policy tag manager API service allows clients to manage their @@ -31,12 +40,32 @@ * *

                                                                                                                  Sample for PolicyTagManagerClient: * + *

                                                                                                                  {@code
                                                                                                                  + * try (PolicyTagManagerClient policyTagManagerClient = PolicyTagManagerClient.create()) {
                                                                                                                  + *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
                                                                                                                  + *   Taxonomy taxonomy = Taxonomy.newBuilder().build();
                                                                                                                  + *   Taxonomy response = policyTagManagerClient.createTaxonomy(parent, taxonomy);
                                                                                                                  + * }
                                                                                                                  + * }
                                                                                                                  + * *

                                                                                                                  ======================= PolicyTagManagerSerializationClient ======================= * *

                                                                                                                  Service Description: Policy tag manager serialization API service allows clients to manipulate * their taxonomies and policy tags data with serialized format. * *

                                                                                                                  Sample for PolicyTagManagerSerializationClient: + * + *

                                                                                                                  {@code
                                                                                                                  + * try (PolicyTagManagerSerializationClient policyTagManagerSerializationClient =
                                                                                                                  + *     PolicyTagManagerSerializationClient.create()) {
                                                                                                                  + *   ImportTaxonomiesRequest request =
                                                                                                                  + *       ImportTaxonomiesRequest.newBuilder()
                                                                                                                  + *           .setParent(TaxonomyName.of("[PROJECT]", "[LOCATION]", "[TAXONOMY]").toString())
                                                                                                                  + *           .build();
                                                                                                                  + *   ImportTaxonomiesResponse response =
                                                                                                                  + *       policyTagManagerSerializationClient.importTaxonomies(request);
                                                                                                                  + * }
                                                                                                                  + * }
                                                                                                                  */ @Generated("by gapic-generator-java") package com.google.cloud.datacatalog.v1beta1; diff --git a/synth.metadata b/synth.metadata index c699241e..fa4d8cce 100644 --- a/synth.metadata +++ b/synth.metadata @@ -4,23 +4,23 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/java-datacatalog.git", - "sha": "754c24ce407650ac73e5c493c0b8c29516dc3dfa" + "sha": "175f1f67f58690415545a249d45b44797bc19e39" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "91e206bcfeaf8948ea03fe3cb1b7616108496cd3", - "internalRef": "350949863" + "sha": "8d8c008e56f1af31d57f75561e0f1848ffb29eeb", + "internalRef": "356341083" } }, {