• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2022 Google LLC
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      https://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.google.cloud.datacatalog.v1beta1;
18 
19 import com.google.api.core.ApiFuture;
20 import com.google.api.core.ApiFutures;
21 import com.google.api.core.BetaApi;
22 import com.google.api.gax.core.BackgroundResource;
23 import com.google.api.gax.paging.AbstractFixedSizeCollection;
24 import com.google.api.gax.paging.AbstractPage;
25 import com.google.api.gax.paging.AbstractPagedListResponse;
26 import com.google.api.gax.rpc.PageContext;
27 import com.google.api.gax.rpc.UnaryCallable;
28 import com.google.api.resourcenames.ResourceName;
29 import com.google.cloud.datacatalog.v1beta1.stub.DataCatalogStub;
30 import com.google.cloud.datacatalog.v1beta1.stub.DataCatalogStubSettings;
31 import com.google.common.util.concurrent.MoreExecutors;
32 import com.google.iam.v1.GetIamPolicyRequest;
33 import com.google.iam.v1.Policy;
34 import com.google.iam.v1.SetIamPolicyRequest;
35 import com.google.iam.v1.TestIamPermissionsRequest;
36 import com.google.iam.v1.TestIamPermissionsResponse;
37 import com.google.protobuf.Empty;
38 import com.google.protobuf.FieldMask;
39 import java.io.IOException;
40 import java.util.List;
41 import java.util.concurrent.TimeUnit;
42 import javax.annotation.Generated;
43 
44 // AUTO-GENERATED DOCUMENTATION AND CLASS.
45 /**
46  * Service Description: Data Catalog API service allows clients to discover, understand, and manage
47  * their data.
48  *
49  * <p>This class provides the ability to make remote calls to the backing service through method
50  * calls that map to API methods. Sample code to get started:
51  *
52  * <pre>{@code
53  * // This snippet has been automatically generated and should be regarded as a code template only.
54  * // It will require modifications to work:
55  * // - It may require correct/in-range values for request initialization.
56  * // - It may require specifying regional endpoints when creating the service client as shown in
57  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
58  * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
59  *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
60  *   String entryGroupId = "entryGroupId1228924712";
61  *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
62  *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
63  * }
64  * }</pre>
65  *
66  * <p>Note: close() needs to be called on the DataCatalogClient object to clean up resources such as
67  * threads. In the example above, try-with-resources is used, which automatically calls close().
68  *
69  * <p>The surface of this class includes several types of Java methods for each of the API's
70  * methods:
71  *
72  * <ol>
73  *   <li>A "flattened" method. With this type of method, the fields of the request type have been
74  *       converted into function parameters. It may be the case that not all fields are available as
75  *       parameters, and not every API method will have a flattened method entry point.
76  *   <li>A "request object" method. This type of method only takes one parameter, a request object,
77  *       which must be constructed before the call. Not every API method will have a request object
78  *       method.
79  *   <li>A "callable" method. This type of method takes no parameters and returns an immutable API
80  *       callable object, which can be used to initiate calls to the service.
81  * </ol>
82  *
83  * <p>See the individual methods for example code.
84  *
85  * <p>Many parameters require resource names to be formatted in a particular way. To assist with
86  * these names, this class includes a format method for each type of name, and additionally a parse
87  * method to extract the individual identifiers contained within names that are returned.
88  *
89  * <p>This class can be customized by passing in a custom instance of DataCatalogSettings to
90  * create(). For example:
91  *
92  * <p>To customize credentials:
93  *
94  * <pre>{@code
95  * // This snippet has been automatically generated and should be regarded as a code template only.
96  * // It will require modifications to work:
97  * // - It may require correct/in-range values for request initialization.
98  * // - It may require specifying regional endpoints when creating the service client as shown in
99  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
100  * DataCatalogSettings dataCatalogSettings =
101  *     DataCatalogSettings.newBuilder()
102  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
103  *         .build();
104  * DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);
105  * }</pre>
106  *
107  * <p>To customize the endpoint:
108  *
109  * <pre>{@code
110  * // This snippet has been automatically generated and should be regarded as a code template only.
111  * // It will require modifications to work:
112  * // - It may require correct/in-range values for request initialization.
113  * // - It may require specifying regional endpoints when creating the service client as shown in
114  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
115  * DataCatalogSettings dataCatalogSettings =
116  *     DataCatalogSettings.newBuilder().setEndpoint(myEndpoint).build();
117  * DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);
118  * }</pre>
119  *
120  * <p>To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
121  * the wire:
122  *
123  * <pre>{@code
124  * // This snippet has been automatically generated and should be regarded as a code template only.
125  * // It will require modifications to work:
126  * // - It may require correct/in-range values for request initialization.
127  * // - It may require specifying regional endpoints when creating the service client as shown in
128  * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
129  * DataCatalogSettings dataCatalogSettings = DataCatalogSettings.newHttpJsonBuilder().build();
130  * DataCatalogClient dataCatalogClient = DataCatalogClient.create(dataCatalogSettings);
131  * }</pre>
132  *
133  * <p>Please refer to the GitHub repository's samples for more quickstart code snippets.
134  */
135 @BetaApi
136 @Generated("by gapic-generator-java")
137 public class DataCatalogClient implements BackgroundResource {
138   private final DataCatalogSettings settings;
139   private final DataCatalogStub stub;
140 
141   /** Constructs an instance of DataCatalogClient with default settings. */
create()142   public static final DataCatalogClient create() throws IOException {
143     return create(DataCatalogSettings.newBuilder().build());
144   }
145 
146   /**
147    * Constructs an instance of DataCatalogClient, using the given settings. The channels are created
148    * based on the settings passed in, or defaults for any settings that are not set.
149    */
create(DataCatalogSettings settings)150   public static final DataCatalogClient create(DataCatalogSettings settings) throws IOException {
151     return new DataCatalogClient(settings);
152   }
153 
154   /**
155    * Constructs an instance of DataCatalogClient, using the given stub for making calls. This is for
156    * advanced usage - prefer using create(DataCatalogSettings).
157    */
create(DataCatalogStub stub)158   public static final DataCatalogClient create(DataCatalogStub stub) {
159     return new DataCatalogClient(stub);
160   }
161 
162   /**
163    * Constructs an instance of DataCatalogClient, using the given settings. This is protected so
164    * that it is easy to make a subclass, but otherwise, the static factory methods should be
165    * preferred.
166    */
DataCatalogClient(DataCatalogSettings settings)167   protected DataCatalogClient(DataCatalogSettings settings) throws IOException {
168     this.settings = settings;
169     this.stub = ((DataCatalogStubSettings) settings.getStubSettings()).createStub();
170   }
171 
DataCatalogClient(DataCatalogStub stub)172   protected DataCatalogClient(DataCatalogStub stub) {
173     this.settings = null;
174     this.stub = stub;
175   }
176 
getSettings()177   public final DataCatalogSettings getSettings() {
178     return settings;
179   }
180 
getStub()181   public DataCatalogStub getStub() {
182     return stub;
183   }
184 
185   // AUTO-GENERATED DOCUMENTATION AND METHOD.
186   /**
187    * Searches Data Catalog for multiple resources like entries, tags that match a query.
188    *
189    * <p>This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
190    * return the complete resource, only the resource identifier and high level fields. Clients can
191    * subsequentally call `Get` methods.
192    *
193    * <p>Note that Data Catalog search queries do not guarantee full recall. Query results that match
194    * your query may not be returned, even in subsequent result pages. Also note that results
195    * returned (and not returned) can vary across repeated search queries.
196    *
197    * <p>See [Data Catalog Search
198    * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more
199    * information.
200    *
201    * <p>Sample code:
202    *
203    * <pre>{@code
204    * // This snippet has been automatically generated and should be regarded as a code template only.
205    * // It will require modifications to work:
206    * // - It may require correct/in-range values for request initialization.
207    * // - It may require specifying regional endpoints when creating the service client as shown in
208    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
209    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
210    *   SearchCatalogRequest.Scope scope = SearchCatalogRequest.Scope.newBuilder().build();
211    *   String query = "query107944136";
212    *   for (SearchCatalogResult element :
213    *       dataCatalogClient.searchCatalog(scope, query).iterateAll()) {
214    *     // doThingsWith(element);
215    *   }
216    * }
217    * }</pre>
218    *
219    * @param scope Required. The scope of this search request. A `scope` that has empty
220    *     `include_org_ids`, `include_project_ids` AND false `include_gcp_public_datasets` is
221    *     considered invalid. Data Catalog will return an error in such a case.
222    * @param query Required. The query string in search query syntax. The query must be non-empty.
223    *     <p>Query strings can be simple as "x" or more qualified as:
224    *     <ul>
225    *       <li>name:x
226    *       <li>column:x
227    *       <li>description:y
228    *     </ul>
229    *     <p>Note: Query tokens need to have a minimum of 3 characters for substring matching to work
230    *     correctly. See [Data Catalog Search
231    *     Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more
232    *     information.
233    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
234    */
searchCatalog( SearchCatalogRequest.Scope scope, String query)235   public final SearchCatalogPagedResponse searchCatalog(
236       SearchCatalogRequest.Scope scope, String query) {
237     SearchCatalogRequest request =
238         SearchCatalogRequest.newBuilder().setScope(scope).setQuery(query).build();
239     return searchCatalog(request);
240   }
241 
242   // AUTO-GENERATED DOCUMENTATION AND METHOD.
243   /**
244    * Searches Data Catalog for multiple resources like entries, tags that match a query.
245    *
246    * <p>This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
247    * return the complete resource, only the resource identifier and high level fields. Clients can
248    * subsequentally call `Get` methods.
249    *
250    * <p>Note that Data Catalog search queries do not guarantee full recall. Query results that match
251    * your query may not be returned, even in subsequent result pages. Also note that results
252    * returned (and not returned) can vary across repeated search queries.
253    *
254    * <p>See [Data Catalog Search
255    * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more
256    * information.
257    *
258    * <p>Sample code:
259    *
260    * <pre>{@code
261    * // This snippet has been automatically generated and should be regarded as a code template only.
262    * // It will require modifications to work:
263    * // - It may require correct/in-range values for request initialization.
264    * // - It may require specifying regional endpoints when creating the service client as shown in
265    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
266    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
267    *   SearchCatalogRequest request =
268    *       SearchCatalogRequest.newBuilder()
269    *           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
270    *           .setQuery("query107944136")
271    *           .setPageSize(883849137)
272    *           .setPageToken("pageToken873572522")
273    *           .setOrderBy("orderBy-1207110587")
274    *           .build();
275    *   for (SearchCatalogResult element : dataCatalogClient.searchCatalog(request).iterateAll()) {
276    *     // doThingsWith(element);
277    *   }
278    * }
279    * }</pre>
280    *
281    * @param request The request object containing all of the parameters for the API call.
282    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
283    */
searchCatalog(SearchCatalogRequest request)284   public final SearchCatalogPagedResponse searchCatalog(SearchCatalogRequest request) {
285     return searchCatalogPagedCallable().call(request);
286   }
287 
288   // AUTO-GENERATED DOCUMENTATION AND METHOD.
289   /**
290    * Searches Data Catalog for multiple resources like entries, tags that match a query.
291    *
292    * <p>This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
293    * return the complete resource, only the resource identifier and high level fields. Clients can
294    * subsequentally call `Get` methods.
295    *
296    * <p>Note that Data Catalog search queries do not guarantee full recall. Query results that match
297    * your query may not be returned, even in subsequent result pages. Also note that results
298    * returned (and not returned) can vary across repeated search queries.
299    *
300    * <p>See [Data Catalog Search
301    * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more
302    * information.
303    *
304    * <p>Sample code:
305    *
306    * <pre>{@code
307    * // This snippet has been automatically generated and should be regarded as a code template only.
308    * // It will require modifications to work:
309    * // - It may require correct/in-range values for request initialization.
310    * // - It may require specifying regional endpoints when creating the service client as shown in
311    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
312    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
313    *   SearchCatalogRequest request =
314    *       SearchCatalogRequest.newBuilder()
315    *           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
316    *           .setQuery("query107944136")
317    *           .setPageSize(883849137)
318    *           .setPageToken("pageToken873572522")
319    *           .setOrderBy("orderBy-1207110587")
320    *           .build();
321    *   ApiFuture<SearchCatalogResult> future =
322    *       dataCatalogClient.searchCatalogPagedCallable().futureCall(request);
323    *   // Do something.
324    *   for (SearchCatalogResult element : future.get().iterateAll()) {
325    *     // doThingsWith(element);
326    *   }
327    * }
328    * }</pre>
329    */
330   public final UnaryCallable<SearchCatalogRequest, SearchCatalogPagedResponse>
searchCatalogPagedCallable()331       searchCatalogPagedCallable() {
332     return stub.searchCatalogPagedCallable();
333   }
334 
335   // AUTO-GENERATED DOCUMENTATION AND METHOD.
336   /**
337    * Searches Data Catalog for multiple resources like entries, tags that match a query.
338    *
339    * <p>This is a custom method (https://cloud.google.com/apis/design/custom_methods) and does not
340    * return the complete resource, only the resource identifier and high level fields. Clients can
341    * subsequentally call `Get` methods.
342    *
343    * <p>Note that Data Catalog search queries do not guarantee full recall. Query results that match
344    * your query may not be returned, even in subsequent result pages. Also note that results
345    * returned (and not returned) can vary across repeated search queries.
346    *
347    * <p>See [Data Catalog Search
348    * Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) for more
349    * information.
350    *
351    * <p>Sample code:
352    *
353    * <pre>{@code
354    * // This snippet has been automatically generated and should be regarded as a code template only.
355    * // It will require modifications to work:
356    * // - It may require correct/in-range values for request initialization.
357    * // - It may require specifying regional endpoints when creating the service client as shown in
358    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
359    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
360    *   SearchCatalogRequest request =
361    *       SearchCatalogRequest.newBuilder()
362    *           .setScope(SearchCatalogRequest.Scope.newBuilder().build())
363    *           .setQuery("query107944136")
364    *           .setPageSize(883849137)
365    *           .setPageToken("pageToken873572522")
366    *           .setOrderBy("orderBy-1207110587")
367    *           .build();
368    *   while (true) {
369    *     SearchCatalogResponse response = dataCatalogClient.searchCatalogCallable().call(request);
370    *     for (SearchCatalogResult element : response.getResultsList()) {
371    *       // doThingsWith(element);
372    *     }
373    *     String nextPageToken = response.getNextPageToken();
374    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
375    *       request = request.toBuilder().setPageToken(nextPageToken).build();
376    *     } else {
377    *       break;
378    *     }
379    *   }
380    * }
381    * }</pre>
382    */
searchCatalogCallable()383   public final UnaryCallable<SearchCatalogRequest, SearchCatalogResponse> searchCatalogCallable() {
384     return stub.searchCatalogCallable();
385   }
386 
387   // AUTO-GENERATED DOCUMENTATION AND METHOD.
388   /**
389    * A maximum of 10,000 entry groups may be created per organization across all locations.
390    *
391    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
392    * (see [Data Catalog Resource Project]
393    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
394    *
395    * <p>Sample code:
396    *
397    * <pre>{@code
398    * // This snippet has been automatically generated and should be regarded as a code template only.
399    * // It will require modifications to work:
400    * // - It may require correct/in-range values for request initialization.
401    * // - It may require specifying regional endpoints when creating the service client as shown in
402    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
403    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
404    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
405    *   String entryGroupId = "entryGroupId1228924712";
406    *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
407    *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
408    * }
409    * }</pre>
410    *
411    * @param parent Required. The name of the project this entry group is in. Example:
412    *     <ul>
413    *       <li>projects/{project_id}/locations/{location}
414    *     </ul>
415    *     <p>Note that this EntryGroup and its child resources may not actually be stored in the
416    *     location in this name.
417    * @param entryGroupId Required. The id of the entry group to create. The id must begin with a
418    *     letter or underscore, contain only English letters, numbers and underscores, and be at most
419    *     64 characters.
420    * @param entryGroup The entry group to create. Defaults to an empty entry group.
421    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
422    */
createEntryGroup( LocationName parent, String entryGroupId, EntryGroup entryGroup)423   public final EntryGroup createEntryGroup(
424       LocationName parent, String entryGroupId, EntryGroup entryGroup) {
425     CreateEntryGroupRequest request =
426         CreateEntryGroupRequest.newBuilder()
427             .setParent(parent == null ? null : parent.toString())
428             .setEntryGroupId(entryGroupId)
429             .setEntryGroup(entryGroup)
430             .build();
431     return createEntryGroup(request);
432   }
433 
434   // AUTO-GENERATED DOCUMENTATION AND METHOD.
435   /**
436    * A maximum of 10,000 entry groups may be created per organization across all locations.
437    *
438    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
439    * (see [Data Catalog Resource Project]
440    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
441    *
442    * <p>Sample code:
443    *
444    * <pre>{@code
445    * // This snippet has been automatically generated and should be regarded as a code template only.
446    * // It will require modifications to work:
447    * // - It may require correct/in-range values for request initialization.
448    * // - It may require specifying regional endpoints when creating the service client as shown in
449    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
450    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
451    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
452    *   String entryGroupId = "entryGroupId1228924712";
453    *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
454    *   EntryGroup response = dataCatalogClient.createEntryGroup(parent, entryGroupId, entryGroup);
455    * }
456    * }</pre>
457    *
458    * @param parent Required. The name of the project this entry group is in. Example:
459    *     <ul>
460    *       <li>projects/{project_id}/locations/{location}
461    *     </ul>
462    *     <p>Note that this EntryGroup and its child resources may not actually be stored in the
463    *     location in this name.
464    * @param entryGroupId Required. The id of the entry group to create. The id must begin with a
465    *     letter or underscore, contain only English letters, numbers and underscores, and be at most
466    *     64 characters.
467    * @param entryGroup The entry group to create. Defaults to an empty entry group.
468    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
469    */
createEntryGroup( String parent, String entryGroupId, EntryGroup entryGroup)470   public final EntryGroup createEntryGroup(
471       String parent, String entryGroupId, EntryGroup entryGroup) {
472     CreateEntryGroupRequest request =
473         CreateEntryGroupRequest.newBuilder()
474             .setParent(parent)
475             .setEntryGroupId(entryGroupId)
476             .setEntryGroup(entryGroup)
477             .build();
478     return createEntryGroup(request);
479   }
480 
481   // AUTO-GENERATED DOCUMENTATION AND METHOD.
482   /**
483    * A maximum of 10,000 entry groups may be created per organization across all locations.
484    *
485    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
486    * (see [Data Catalog Resource Project]
487    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
488    *
489    * <p>Sample code:
490    *
491    * <pre>{@code
492    * // This snippet has been automatically generated and should be regarded as a code template only.
493    * // It will require modifications to work:
494    * // - It may require correct/in-range values for request initialization.
495    * // - It may require specifying regional endpoints when creating the service client as shown in
496    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
497    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
498    *   CreateEntryGroupRequest request =
499    *       CreateEntryGroupRequest.newBuilder()
500    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
501    *           .setEntryGroupId("entryGroupId1228924712")
502    *           .setEntryGroup(EntryGroup.newBuilder().build())
503    *           .build();
504    *   EntryGroup response = dataCatalogClient.createEntryGroup(request);
505    * }
506    * }</pre>
507    *
508    * @param request The request object containing all of the parameters for the API call.
509    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
510    */
createEntryGroup(CreateEntryGroupRequest request)511   public final EntryGroup createEntryGroup(CreateEntryGroupRequest request) {
512     return createEntryGroupCallable().call(request);
513   }
514 
515   // AUTO-GENERATED DOCUMENTATION AND METHOD.
516   /**
517    * A maximum of 10,000 entry groups may be created per organization across all locations.
518    *
519    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
520    * (see [Data Catalog Resource Project]
521    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
522    *
523    * <p>Sample code:
524    *
525    * <pre>{@code
526    * // This snippet has been automatically generated and should be regarded as a code template only.
527    * // It will require modifications to work:
528    * // - It may require correct/in-range values for request initialization.
529    * // - It may require specifying regional endpoints when creating the service client as shown in
530    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
531    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
532    *   CreateEntryGroupRequest request =
533    *       CreateEntryGroupRequest.newBuilder()
534    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
535    *           .setEntryGroupId("entryGroupId1228924712")
536    *           .setEntryGroup(EntryGroup.newBuilder().build())
537    *           .build();
538    *   ApiFuture<EntryGroup> future =
539    *       dataCatalogClient.createEntryGroupCallable().futureCall(request);
540    *   // Do something.
541    *   EntryGroup response = future.get();
542    * }
543    * }</pre>
544    */
createEntryGroupCallable()545   public final UnaryCallable<CreateEntryGroupRequest, EntryGroup> createEntryGroupCallable() {
546     return stub.createEntryGroupCallable();
547   }
548 
549   // AUTO-GENERATED DOCUMENTATION AND METHOD.
550   /**
551    * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
552    * the `entry_group.name` parameter (see [Data Catalog Resource Project]
553    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
554    *
555    * <p>Sample code:
556    *
557    * <pre>{@code
558    * // This snippet has been automatically generated and should be regarded as a code template only.
559    * // It will require modifications to work:
560    * // - It may require correct/in-range values for request initialization.
561    * // - It may require specifying regional endpoints when creating the service client as shown in
562    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
563    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
564    *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
565    *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup);
566    * }
567    * }</pre>
568    *
569    * @param entryGroup Required. The updated entry group. "name" field must be set.
570    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
571    */
updateEntryGroup(EntryGroup entryGroup)572   public final EntryGroup updateEntryGroup(EntryGroup entryGroup) {
573     UpdateEntryGroupRequest request =
574         UpdateEntryGroupRequest.newBuilder().setEntryGroup(entryGroup).build();
575     return updateEntryGroup(request);
576   }
577 
578   // AUTO-GENERATED DOCUMENTATION AND METHOD.
579   /**
580    * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
581    * the `entry_group.name` parameter (see [Data Catalog Resource Project]
582    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
583    *
584    * <p>Sample code:
585    *
586    * <pre>{@code
587    * // This snippet has been automatically generated and should be regarded as a code template only.
588    * // It will require modifications to work:
589    * // - It may require correct/in-range values for request initialization.
590    * // - It may require specifying regional endpoints when creating the service client as shown in
591    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
592    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
593    *   EntryGroup entryGroup = EntryGroup.newBuilder().build();
594    *   FieldMask updateMask = FieldMask.newBuilder().build();
595    *   EntryGroup response = dataCatalogClient.updateEntryGroup(entryGroup, updateMask);
596    * }
597    * }</pre>
598    *
599    * @param entryGroup Required. The updated entry group. "name" field must be set.
600    * @param updateMask The fields to update on the entry group. If absent or empty, all modifiable
601    *     fields are updated.
602    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
603    */
updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask)604   public final EntryGroup updateEntryGroup(EntryGroup entryGroup, FieldMask updateMask) {
605     UpdateEntryGroupRequest request =
606         UpdateEntryGroupRequest.newBuilder()
607             .setEntryGroup(entryGroup)
608             .setUpdateMask(updateMask)
609             .build();
610     return updateEntryGroup(request);
611   }
612 
613   // AUTO-GENERATED DOCUMENTATION AND METHOD.
614   /**
615    * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
616    * the `entry_group.name` parameter (see [Data Catalog Resource Project]
617    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
618    *
619    * <p>Sample code:
620    *
621    * <pre>{@code
622    * // This snippet has been automatically generated and should be regarded as a code template only.
623    * // It will require modifications to work:
624    * // - It may require correct/in-range values for request initialization.
625    * // - It may require specifying regional endpoints when creating the service client as shown in
626    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
627    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
628    *   UpdateEntryGroupRequest request =
629    *       UpdateEntryGroupRequest.newBuilder()
630    *           .setEntryGroup(EntryGroup.newBuilder().build())
631    *           .setUpdateMask(FieldMask.newBuilder().build())
632    *           .build();
633    *   EntryGroup response = dataCatalogClient.updateEntryGroup(request);
634    * }
635    * }</pre>
636    *
637    * @param request The request object containing all of the parameters for the API call.
638    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
639    */
updateEntryGroup(UpdateEntryGroupRequest request)640   public final EntryGroup updateEntryGroup(UpdateEntryGroupRequest request) {
641     return updateEntryGroupCallable().call(request);
642   }
643 
644   // AUTO-GENERATED DOCUMENTATION AND METHOD.
645   /**
646    * Updates an EntryGroup. The user should enable the Data Catalog API in the project identified by
647    * the `entry_group.name` parameter (see [Data Catalog Resource Project]
648    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
649    *
650    * <p>Sample code:
651    *
652    * <pre>{@code
653    * // This snippet has been automatically generated and should be regarded as a code template only.
654    * // It will require modifications to work:
655    * // - It may require correct/in-range values for request initialization.
656    * // - It may require specifying regional endpoints when creating the service client as shown in
657    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
658    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
659    *   UpdateEntryGroupRequest request =
660    *       UpdateEntryGroupRequest.newBuilder()
661    *           .setEntryGroup(EntryGroup.newBuilder().build())
662    *           .setUpdateMask(FieldMask.newBuilder().build())
663    *           .build();
664    *   ApiFuture<EntryGroup> future =
665    *       dataCatalogClient.updateEntryGroupCallable().futureCall(request);
666    *   // Do something.
667    *   EntryGroup response = future.get();
668    * }
669    * }</pre>
670    */
updateEntryGroupCallable()671   public final UnaryCallable<UpdateEntryGroupRequest, EntryGroup> updateEntryGroupCallable() {
672     return stub.updateEntryGroupCallable();
673   }
674 
675   // AUTO-GENERATED DOCUMENTATION AND METHOD.
676   /**
677    * Gets an EntryGroup.
678    *
679    * <p>Sample code:
680    *
681    * <pre>{@code
682    * // This snippet has been automatically generated and should be regarded as a code template only.
683    * // It will require modifications to work:
684    * // - It may require correct/in-range values for request initialization.
685    * // - It may require specifying regional endpoints when creating the service client as shown in
686    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
687    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
688    *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
689    *   EntryGroup response = dataCatalogClient.getEntryGroup(name);
690    * }
691    * }</pre>
692    *
693    * @param name Required. The name of the entry group. For example,
694    *     `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
695    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
696    */
getEntryGroup(EntryGroupName name)697   public final EntryGroup getEntryGroup(EntryGroupName name) {
698     GetEntryGroupRequest request =
699         GetEntryGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
700     return getEntryGroup(request);
701   }
702 
703   // AUTO-GENERATED DOCUMENTATION AND METHOD.
704   /**
705    * Gets an EntryGroup.
706    *
707    * <p>Sample code:
708    *
709    * <pre>{@code
710    * // This snippet has been automatically generated and should be regarded as a code template only.
711    * // It will require modifications to work:
712    * // - It may require correct/in-range values for request initialization.
713    * // - It may require specifying regional endpoints when creating the service client as shown in
714    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
715    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
716    *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
717    *   EntryGroup response = dataCatalogClient.getEntryGroup(name);
718    * }
719    * }</pre>
720    *
721    * @param name Required. The name of the entry group. For example,
722    *     `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
723    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
724    */
getEntryGroup(String name)725   public final EntryGroup getEntryGroup(String name) {
726     GetEntryGroupRequest request = GetEntryGroupRequest.newBuilder().setName(name).build();
727     return getEntryGroup(request);
728   }
729 
730   // AUTO-GENERATED DOCUMENTATION AND METHOD.
731   /**
732    * Gets an EntryGroup.
733    *
734    * <p>Sample code:
735    *
736    * <pre>{@code
737    * // This snippet has been automatically generated and should be regarded as a code template only.
738    * // It will require modifications to work:
739    * // - It may require correct/in-range values for request initialization.
740    * // - It may require specifying regional endpoints when creating the service client as shown in
741    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
742    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
743    *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
744    *   FieldMask readMask = FieldMask.newBuilder().build();
745    *   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
746    * }
747    * }</pre>
748    *
749    * @param name Required. The name of the entry group. For example,
750    *     `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
751    * @param readMask The fields to return. If not set or empty, all fields are returned.
752    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
753    */
getEntryGroup(EntryGroupName name, FieldMask readMask)754   public final EntryGroup getEntryGroup(EntryGroupName name, FieldMask readMask) {
755     GetEntryGroupRequest request =
756         GetEntryGroupRequest.newBuilder()
757             .setName(name == null ? null : name.toString())
758             .setReadMask(readMask)
759             .build();
760     return getEntryGroup(request);
761   }
762 
763   // AUTO-GENERATED DOCUMENTATION AND METHOD.
764   /**
765    * Gets an EntryGroup.
766    *
767    * <p>Sample code:
768    *
769    * <pre>{@code
770    * // This snippet has been automatically generated and should be regarded as a code template only.
771    * // It will require modifications to work:
772    * // - It may require correct/in-range values for request initialization.
773    * // - It may require specifying regional endpoints when creating the service client as shown in
774    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
775    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
776    *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
777    *   FieldMask readMask = FieldMask.newBuilder().build();
778    *   EntryGroup response = dataCatalogClient.getEntryGroup(name, readMask);
779    * }
780    * }</pre>
781    *
782    * @param name Required. The name of the entry group. For example,
783    *     `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
784    * @param readMask The fields to return. If not set or empty, all fields are returned.
785    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
786    */
getEntryGroup(String name, FieldMask readMask)787   public final EntryGroup getEntryGroup(String name, FieldMask readMask) {
788     GetEntryGroupRequest request =
789         GetEntryGroupRequest.newBuilder().setName(name).setReadMask(readMask).build();
790     return getEntryGroup(request);
791   }
792 
793   // AUTO-GENERATED DOCUMENTATION AND METHOD.
794   /**
795    * Gets an EntryGroup.
796    *
797    * <p>Sample code:
798    *
799    * <pre>{@code
800    * // This snippet has been automatically generated and should be regarded as a code template only.
801    * // It will require modifications to work:
802    * // - It may require correct/in-range values for request initialization.
803    * // - It may require specifying regional endpoints when creating the service client as shown in
804    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
805    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
806    *   GetEntryGroupRequest request =
807    *       GetEntryGroupRequest.newBuilder()
808    *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
809    *           .setReadMask(FieldMask.newBuilder().build())
810    *           .build();
811    *   EntryGroup response = dataCatalogClient.getEntryGroup(request);
812    * }
813    * }</pre>
814    *
815    * @param request The request object containing all of the parameters for the API call.
816    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
817    */
getEntryGroup(GetEntryGroupRequest request)818   public final EntryGroup getEntryGroup(GetEntryGroupRequest request) {
819     return getEntryGroupCallable().call(request);
820   }
821 
822   // AUTO-GENERATED DOCUMENTATION AND METHOD.
823   /**
824    * Gets an EntryGroup.
825    *
826    * <p>Sample code:
827    *
828    * <pre>{@code
829    * // This snippet has been automatically generated and should be regarded as a code template only.
830    * // It will require modifications to work:
831    * // - It may require correct/in-range values for request initialization.
832    * // - It may require specifying regional endpoints when creating the service client as shown in
833    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
834    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
835    *   GetEntryGroupRequest request =
836    *       GetEntryGroupRequest.newBuilder()
837    *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
838    *           .setReadMask(FieldMask.newBuilder().build())
839    *           .build();
840    *   ApiFuture<EntryGroup> future = dataCatalogClient.getEntryGroupCallable().futureCall(request);
841    *   // Do something.
842    *   EntryGroup response = future.get();
843    * }
844    * }</pre>
845    */
getEntryGroupCallable()846   public final UnaryCallable<GetEntryGroupRequest, EntryGroup> getEntryGroupCallable() {
847     return stub.getEntryGroupCallable();
848   }
849 
850   // AUTO-GENERATED DOCUMENTATION AND METHOD.
851   /**
852    * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
853    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
854    * Catalog Resource Project]
855    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
856    *
857    * <p>Sample code:
858    *
859    * <pre>{@code
860    * // This snippet has been automatically generated and should be regarded as a code template only.
861    * // It will require modifications to work:
862    * // - It may require correct/in-range values for request initialization.
863    * // - It may require specifying regional endpoints when creating the service client as shown in
864    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
865    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
866    *   EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
867    *   dataCatalogClient.deleteEntryGroup(name);
868    * }
869    * }</pre>
870    *
871    * @param name Required. The name of the entry group. For example,
872    *     `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
873    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
874    */
deleteEntryGroup(EntryGroupName name)875   public final void deleteEntryGroup(EntryGroupName name) {
876     DeleteEntryGroupRequest request =
877         DeleteEntryGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
878     deleteEntryGroup(request);
879   }
880 
881   // AUTO-GENERATED DOCUMENTATION AND METHOD.
882   /**
883    * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
884    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
885    * Catalog Resource Project]
886    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
887    *
888    * <p>Sample code:
889    *
890    * <pre>{@code
891    * // This snippet has been automatically generated and should be regarded as a code template only.
892    * // It will require modifications to work:
893    * // - It may require correct/in-range values for request initialization.
894    * // - It may require specifying regional endpoints when creating the service client as shown in
895    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
896    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
897    *   String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
898    *   dataCatalogClient.deleteEntryGroup(name);
899    * }
900    * }</pre>
901    *
902    * @param name Required. The name of the entry group. For example,
903    *     `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`.
904    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
905    */
deleteEntryGroup(String name)906   public final void deleteEntryGroup(String name) {
907     DeleteEntryGroupRequest request = DeleteEntryGroupRequest.newBuilder().setName(name).build();
908     deleteEntryGroup(request);
909   }
910 
911   // AUTO-GENERATED DOCUMENTATION AND METHOD.
912   /**
913    * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
914    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
915    * Catalog Resource Project]
916    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
917    *
918    * <p>Sample code:
919    *
920    * <pre>{@code
921    * // This snippet has been automatically generated and should be regarded as a code template only.
922    * // It will require modifications to work:
923    * // - It may require correct/in-range values for request initialization.
924    * // - It may require specifying regional endpoints when creating the service client as shown in
925    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
926    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
927    *   DeleteEntryGroupRequest request =
928    *       DeleteEntryGroupRequest.newBuilder()
929    *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
930    *           .setForce(true)
931    *           .build();
932    *   dataCatalogClient.deleteEntryGroup(request);
933    * }
934    * }</pre>
935    *
936    * @param request The request object containing all of the parameters for the API call.
937    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
938    */
deleteEntryGroup(DeleteEntryGroupRequest request)939   public final void deleteEntryGroup(DeleteEntryGroupRequest request) {
940     deleteEntryGroupCallable().call(request);
941   }
942 
943   // AUTO-GENERATED DOCUMENTATION AND METHOD.
944   /**
945    * Deletes an EntryGroup. Only entry groups that do not contain entries can be deleted. Users
946    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
947    * Catalog Resource Project]
948    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
949    *
950    * <p>Sample code:
951    *
952    * <pre>{@code
953    * // This snippet has been automatically generated and should be regarded as a code template only.
954    * // It will require modifications to work:
955    * // - It may require correct/in-range values for request initialization.
956    * // - It may require specifying regional endpoints when creating the service client as shown in
957    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
958    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
959    *   DeleteEntryGroupRequest request =
960    *       DeleteEntryGroupRequest.newBuilder()
961    *           .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
962    *           .setForce(true)
963    *           .build();
964    *   ApiFuture<Empty> future = dataCatalogClient.deleteEntryGroupCallable().futureCall(request);
965    *   // Do something.
966    *   future.get();
967    * }
968    * }</pre>
969    */
deleteEntryGroupCallable()970   public final UnaryCallable<DeleteEntryGroupRequest, Empty> deleteEntryGroupCallable() {
971     return stub.deleteEntryGroupCallable();
972   }
973 
974   // AUTO-GENERATED DOCUMENTATION AND METHOD.
975   /**
976    * Lists entry groups.
977    *
978    * <p>Sample code:
979    *
980    * <pre>{@code
981    * // This snippet has been automatically generated and should be regarded as a code template only.
982    * // It will require modifications to work:
983    * // - It may require correct/in-range values for request initialization.
984    * // - It may require specifying regional endpoints when creating the service client as shown in
985    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
986    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
987    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
988    *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
989    *     // doThingsWith(element);
990    *   }
991    * }
992    * }</pre>
993    *
994    * @param parent Required. The name of the location that contains the entry groups, which can be
995    *     provided in URL format. Example:
996    *     <ul>
997    *       <li>projects/{project_id}/locations/{location}
998    *     </ul>
999    *
1000    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1001    */
listEntryGroups(LocationName parent)1002   public final ListEntryGroupsPagedResponse listEntryGroups(LocationName parent) {
1003     ListEntryGroupsRequest request =
1004         ListEntryGroupsRequest.newBuilder()
1005             .setParent(parent == null ? null : parent.toString())
1006             .build();
1007     return listEntryGroups(request);
1008   }
1009 
1010   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1011   /**
1012    * Lists entry groups.
1013    *
1014    * <p>Sample code:
1015    *
1016    * <pre>{@code
1017    * // This snippet has been automatically generated and should be regarded as a code template only.
1018    * // It will require modifications to work:
1019    * // - It may require correct/in-range values for request initialization.
1020    * // - It may require specifying regional endpoints when creating the service client as shown in
1021    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1022    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1023    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
1024    *   for (EntryGroup element : dataCatalogClient.listEntryGroups(parent).iterateAll()) {
1025    *     // doThingsWith(element);
1026    *   }
1027    * }
1028    * }</pre>
1029    *
1030    * @param parent Required. The name of the location that contains the entry groups, which can be
1031    *     provided in URL format. Example:
1032    *     <ul>
1033    *       <li>projects/{project_id}/locations/{location}
1034    *     </ul>
1035    *
1036    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1037    */
listEntryGroups(String parent)1038   public final ListEntryGroupsPagedResponse listEntryGroups(String parent) {
1039     ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder().setParent(parent).build();
1040     return listEntryGroups(request);
1041   }
1042 
1043   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1044   /**
1045    * Lists entry groups.
1046    *
1047    * <p>Sample code:
1048    *
1049    * <pre>{@code
1050    * // This snippet has been automatically generated and should be regarded as a code template only.
1051    * // It will require modifications to work:
1052    * // - It may require correct/in-range values for request initialization.
1053    * // - It may require specifying regional endpoints when creating the service client as shown in
1054    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1055    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1056    *   ListEntryGroupsRequest request =
1057    *       ListEntryGroupsRequest.newBuilder()
1058    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1059    *           .setPageSize(883849137)
1060    *           .setPageToken("pageToken873572522")
1061    *           .build();
1062    *   for (EntryGroup element : dataCatalogClient.listEntryGroups(request).iterateAll()) {
1063    *     // doThingsWith(element);
1064    *   }
1065    * }
1066    * }</pre>
1067    *
1068    * @param request The request object containing all of the parameters for the API call.
1069    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1070    */
listEntryGroups(ListEntryGroupsRequest request)1071   public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest request) {
1072     return listEntryGroupsPagedCallable().call(request);
1073   }
1074 
1075   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1076   /**
1077    * Lists entry groups.
1078    *
1079    * <p>Sample code:
1080    *
1081    * <pre>{@code
1082    * // This snippet has been automatically generated and should be regarded as a code template only.
1083    * // It will require modifications to work:
1084    * // - It may require correct/in-range values for request initialization.
1085    * // - It may require specifying regional endpoints when creating the service client as shown in
1086    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1087    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1088    *   ListEntryGroupsRequest request =
1089    *       ListEntryGroupsRequest.newBuilder()
1090    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1091    *           .setPageSize(883849137)
1092    *           .setPageToken("pageToken873572522")
1093    *           .build();
1094    *   ApiFuture<EntryGroup> future =
1095    *       dataCatalogClient.listEntryGroupsPagedCallable().futureCall(request);
1096    *   // Do something.
1097    *   for (EntryGroup element : future.get().iterateAll()) {
1098    *     // doThingsWith(element);
1099    *   }
1100    * }
1101    * }</pre>
1102    */
1103   public final UnaryCallable<ListEntryGroupsRequest, ListEntryGroupsPagedResponse>
listEntryGroupsPagedCallable()1104       listEntryGroupsPagedCallable() {
1105     return stub.listEntryGroupsPagedCallable();
1106   }
1107 
1108   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1109   /**
1110    * Lists entry groups.
1111    *
1112    * <p>Sample code:
1113    *
1114    * <pre>{@code
1115    * // This snippet has been automatically generated and should be regarded as a code template only.
1116    * // It will require modifications to work:
1117    * // - It may require correct/in-range values for request initialization.
1118    * // - It may require specifying regional endpoints when creating the service client as shown in
1119    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1120    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1121    *   ListEntryGroupsRequest request =
1122    *       ListEntryGroupsRequest.newBuilder()
1123    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
1124    *           .setPageSize(883849137)
1125    *           .setPageToken("pageToken873572522")
1126    *           .build();
1127    *   while (true) {
1128    *     ListEntryGroupsResponse response =
1129    *         dataCatalogClient.listEntryGroupsCallable().call(request);
1130    *     for (EntryGroup element : response.getEntryGroupsList()) {
1131    *       // doThingsWith(element);
1132    *     }
1133    *     String nextPageToken = response.getNextPageToken();
1134    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1135    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1136    *     } else {
1137    *       break;
1138    *     }
1139    *   }
1140    * }
1141    * }</pre>
1142    */
1143   public final UnaryCallable<ListEntryGroupsRequest, ListEntryGroupsResponse>
listEntryGroupsCallable()1144       listEntryGroupsCallable() {
1145     return stub.listEntryGroupsCallable();
1146   }
1147 
1148   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1149   /**
1150    * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
1151    *
1152    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
1153    * (see [Data Catalog Resource Project]
1154    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1155    *
1156    * <p>A maximum of 100,000 entries may be created per entry group.
1157    *
1158    * <p>Sample code:
1159    *
1160    * <pre>{@code
1161    * // This snippet has been automatically generated and should be regarded as a code template only.
1162    * // It will require modifications to work:
1163    * // - It may require correct/in-range values for request initialization.
1164    * // - It may require specifying regional endpoints when creating the service client as shown in
1165    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1166    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1167    *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
1168    *   String entryId = "entryId-1591558867";
1169    *   Entry entry = Entry.newBuilder().build();
1170    *   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
1171    * }
1172    * }</pre>
1173    *
1174    * @param parent Required. The name of the entry group this entry is in. Example:
1175    *     <ul>
1176    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
1177    *     </ul>
1178    *     <p>Note that this Entry and its child resources may not actually be stored in the location
1179    *     in this name.
1180    * @param entryId Required. The id of the entry to create.
1181    * @param entry Required. The entry to create.
1182    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1183    */
createEntry(EntryGroupName parent, String entryId, Entry entry)1184   public final Entry createEntry(EntryGroupName parent, String entryId, Entry entry) {
1185     CreateEntryRequest request =
1186         CreateEntryRequest.newBuilder()
1187             .setParent(parent == null ? null : parent.toString())
1188             .setEntryId(entryId)
1189             .setEntry(entry)
1190             .build();
1191     return createEntry(request);
1192   }
1193 
1194   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1195   /**
1196    * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
1197    *
1198    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
1199    * (see [Data Catalog Resource Project]
1200    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1201    *
1202    * <p>A maximum of 100,000 entries may be created per entry group.
1203    *
1204    * <p>Sample code:
1205    *
1206    * <pre>{@code
1207    * // This snippet has been automatically generated and should be regarded as a code template only.
1208    * // It will require modifications to work:
1209    * // - It may require correct/in-range values for request initialization.
1210    * // - It may require specifying regional endpoints when creating the service client as shown in
1211    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1212    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1213    *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
1214    *   String entryId = "entryId-1591558867";
1215    *   Entry entry = Entry.newBuilder().build();
1216    *   Entry response = dataCatalogClient.createEntry(parent, entryId, entry);
1217    * }
1218    * }</pre>
1219    *
1220    * @param parent Required. The name of the entry group this entry is in. Example:
1221    *     <ul>
1222    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
1223    *     </ul>
1224    *     <p>Note that this Entry and its child resources may not actually be stored in the location
1225    *     in this name.
1226    * @param entryId Required. The id of the entry to create.
1227    * @param entry Required. The entry to create.
1228    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1229    */
createEntry(String parent, String entryId, Entry entry)1230   public final Entry createEntry(String parent, String entryId, Entry entry) {
1231     CreateEntryRequest request =
1232         CreateEntryRequest.newBuilder()
1233             .setParent(parent)
1234             .setEntryId(entryId)
1235             .setEntry(entry)
1236             .build();
1237     return createEntry(request);
1238   }
1239 
1240   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1241   /**
1242    * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
1243    *
1244    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
1245    * (see [Data Catalog Resource Project]
1246    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1247    *
1248    * <p>A maximum of 100,000 entries may be created per entry group.
1249    *
1250    * <p>Sample code:
1251    *
1252    * <pre>{@code
1253    * // This snippet has been automatically generated and should be regarded as a code template only.
1254    * // It will require modifications to work:
1255    * // - It may require correct/in-range values for request initialization.
1256    * // - It may require specifying regional endpoints when creating the service client as shown in
1257    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1258    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1259    *   CreateEntryRequest request =
1260    *       CreateEntryRequest.newBuilder()
1261    *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
1262    *           .setEntryId("entryId-1591558867")
1263    *           .setEntry(Entry.newBuilder().build())
1264    *           .build();
1265    *   Entry response = dataCatalogClient.createEntry(request);
1266    * }
1267    * }</pre>
1268    *
1269    * @param request The request object containing all of the parameters for the API call.
1270    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1271    */
createEntry(CreateEntryRequest request)1272   public final Entry createEntry(CreateEntryRequest request) {
1273     return createEntryCallable().call(request);
1274   }
1275 
1276   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1277   /**
1278    * Creates an entry. Only entries of 'FILESET' type or user-specified type can be created.
1279    *
1280    * <p>Users should enable the Data Catalog API in the project identified by the `parent` parameter
1281    * (see [Data Catalog Resource Project]
1282    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1283    *
1284    * <p>A maximum of 100,000 entries may be created per entry group.
1285    *
1286    * <p>Sample code:
1287    *
1288    * <pre>{@code
1289    * // This snippet has been automatically generated and should be regarded as a code template only.
1290    * // It will require modifications to work:
1291    * // - It may require correct/in-range values for request initialization.
1292    * // - It may require specifying regional endpoints when creating the service client as shown in
1293    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1294    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1295    *   CreateEntryRequest request =
1296    *       CreateEntryRequest.newBuilder()
1297    *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
1298    *           .setEntryId("entryId-1591558867")
1299    *           .setEntry(Entry.newBuilder().build())
1300    *           .build();
1301    *   ApiFuture<Entry> future = dataCatalogClient.createEntryCallable().futureCall(request);
1302    *   // Do something.
1303    *   Entry response = future.get();
1304    * }
1305    * }</pre>
1306    */
createEntryCallable()1307   public final UnaryCallable<CreateEntryRequest, Entry> createEntryCallable() {
1308     return stub.createEntryCallable();
1309   }
1310 
1311   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1312   /**
1313    * Updates an existing entry. Users should enable the Data Catalog API in the project identified
1314    * by the `entry.name` parameter (see [Data Catalog Resource Project]
1315    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1316    *
1317    * <p>Sample code:
1318    *
1319    * <pre>{@code
1320    * // This snippet has been automatically generated and should be regarded as a code template only.
1321    * // It will require modifications to work:
1322    * // - It may require correct/in-range values for request initialization.
1323    * // - It may require specifying regional endpoints when creating the service client as shown in
1324    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1325    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1326    *   Entry entry = Entry.newBuilder().build();
1327    *   Entry response = dataCatalogClient.updateEntry(entry);
1328    * }
1329    * }</pre>
1330    *
1331    * @param entry Required. The updated entry. The "name" field must be set.
1332    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1333    */
updateEntry(Entry entry)1334   public final Entry updateEntry(Entry entry) {
1335     UpdateEntryRequest request = UpdateEntryRequest.newBuilder().setEntry(entry).build();
1336     return updateEntry(request);
1337   }
1338 
1339   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1340   /**
1341    * Updates an existing entry. Users should enable the Data Catalog API in the project identified
1342    * by the `entry.name` parameter (see [Data Catalog Resource Project]
1343    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1344    *
1345    * <p>Sample code:
1346    *
1347    * <pre>{@code
1348    * // This snippet has been automatically generated and should be regarded as a code template only.
1349    * // It will require modifications to work:
1350    * // - It may require correct/in-range values for request initialization.
1351    * // - It may require specifying regional endpoints when creating the service client as shown in
1352    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1353    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1354    *   Entry entry = Entry.newBuilder().build();
1355    *   FieldMask updateMask = FieldMask.newBuilder().build();
1356    *   Entry response = dataCatalogClient.updateEntry(entry, updateMask);
1357    * }
1358    * }</pre>
1359    *
1360    * @param entry Required. The updated entry. The "name" field must be set.
1361    * @param updateMask The fields to update on the entry. If absent or empty, all modifiable fields
1362    *     are updated.
1363    *     <p>The following fields are modifiable:
1364    *     <ul>
1365    *       <li>For entries with type `DATA_STREAM`: &#42; `schema`
1366    *       <li>For entries with type `FILESET` &#42; `schema` &#42; `display_name` &#42;
1367    *           `description` &#42; `gcs_fileset_spec` &#42; `gcs_fileset_spec.file_patterns`
1368    *       <li>For entries with `user_specified_type` &#42; `schema` &#42; `display_name` &#42;
1369    *           `description` &#42; user_specified_type &#42; user_specified_system &#42;
1370    *           linked_resource &#42; source_system_timestamps
1371    *     </ul>
1372    *
1373    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1374    */
updateEntry(Entry entry, FieldMask updateMask)1375   public final Entry updateEntry(Entry entry, FieldMask updateMask) {
1376     UpdateEntryRequest request =
1377         UpdateEntryRequest.newBuilder().setEntry(entry).setUpdateMask(updateMask).build();
1378     return updateEntry(request);
1379   }
1380 
1381   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1382   /**
1383    * Updates an existing entry. Users should enable the Data Catalog API in the project identified
1384    * by the `entry.name` parameter (see [Data Catalog Resource Project]
1385    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1386    *
1387    * <p>Sample code:
1388    *
1389    * <pre>{@code
1390    * // This snippet has been automatically generated and should be regarded as a code template only.
1391    * // It will require modifications to work:
1392    * // - It may require correct/in-range values for request initialization.
1393    * // - It may require specifying regional endpoints when creating the service client as shown in
1394    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1395    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1396    *   UpdateEntryRequest request =
1397    *       UpdateEntryRequest.newBuilder()
1398    *           .setEntry(Entry.newBuilder().build())
1399    *           .setUpdateMask(FieldMask.newBuilder().build())
1400    *           .build();
1401    *   Entry response = dataCatalogClient.updateEntry(request);
1402    * }
1403    * }</pre>
1404    *
1405    * @param request The request object containing all of the parameters for the API call.
1406    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1407    */
updateEntry(UpdateEntryRequest request)1408   public final Entry updateEntry(UpdateEntryRequest request) {
1409     return updateEntryCallable().call(request);
1410   }
1411 
1412   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1413   /**
1414    * Updates an existing entry. Users should enable the Data Catalog API in the project identified
1415    * by the `entry.name` parameter (see [Data Catalog Resource Project]
1416    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1417    *
1418    * <p>Sample code:
1419    *
1420    * <pre>{@code
1421    * // This snippet has been automatically generated and should be regarded as a code template only.
1422    * // It will require modifications to work:
1423    * // - It may require correct/in-range values for request initialization.
1424    * // - It may require specifying regional endpoints when creating the service client as shown in
1425    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1426    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1427    *   UpdateEntryRequest request =
1428    *       UpdateEntryRequest.newBuilder()
1429    *           .setEntry(Entry.newBuilder().build())
1430    *           .setUpdateMask(FieldMask.newBuilder().build())
1431    *           .build();
1432    *   ApiFuture<Entry> future = dataCatalogClient.updateEntryCallable().futureCall(request);
1433    *   // Do something.
1434    *   Entry response = future.get();
1435    * }
1436    * }</pre>
1437    */
updateEntryCallable()1438   public final UnaryCallable<UpdateEntryRequest, Entry> updateEntryCallable() {
1439     return stub.updateEntryCallable();
1440   }
1441 
1442   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1443   /**
1444    * Deletes an existing entry. Only entries created through
1445    * [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] method can be deleted.
1446    * Users should enable the Data Catalog API in the project identified by the `name` parameter (see
1447    * [Data Catalog Resource Project]
1448    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1449    *
1450    * <p>Sample code:
1451    *
1452    * <pre>{@code
1453    * // This snippet has been automatically generated and should be regarded as a code template only.
1454    * // It will require modifications to work:
1455    * // - It may require correct/in-range values for request initialization.
1456    * // - It may require specifying regional endpoints when creating the service client as shown in
1457    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1458    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1459    *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
1460    *   dataCatalogClient.deleteEntry(name);
1461    * }
1462    * }</pre>
1463    *
1464    * @param name Required. The name of the entry. Example:
1465    *     <ul>
1466    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
1467    *     </ul>
1468    *
1469    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1470    */
deleteEntry(EntryName name)1471   public final void deleteEntry(EntryName name) {
1472     DeleteEntryRequest request =
1473         DeleteEntryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
1474     deleteEntry(request);
1475   }
1476 
1477   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1478   /**
1479    * Deletes an existing entry. Only entries created through
1480    * [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] method can be deleted.
1481    * Users should enable the Data Catalog API in the project identified by the `name` parameter (see
1482    * [Data Catalog Resource Project]
1483    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1484    *
1485    * <p>Sample code:
1486    *
1487    * <pre>{@code
1488    * // This snippet has been automatically generated and should be regarded as a code template only.
1489    * // It will require modifications to work:
1490    * // - It may require correct/in-range values for request initialization.
1491    * // - It may require specifying regional endpoints when creating the service client as shown in
1492    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1493    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1494    *   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
1495    *   dataCatalogClient.deleteEntry(name);
1496    * }
1497    * }</pre>
1498    *
1499    * @param name Required. The name of the entry. Example:
1500    *     <ul>
1501    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
1502    *     </ul>
1503    *
1504    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1505    */
deleteEntry(String name)1506   public final void deleteEntry(String name) {
1507     DeleteEntryRequest request = DeleteEntryRequest.newBuilder().setName(name).build();
1508     deleteEntry(request);
1509   }
1510 
1511   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1512   /**
1513    * Deletes an existing entry. Only entries created through
1514    * [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] method can be deleted.
1515    * Users should enable the Data Catalog API in the project identified by the `name` parameter (see
1516    * [Data Catalog Resource Project]
1517    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1518    *
1519    * <p>Sample code:
1520    *
1521    * <pre>{@code
1522    * // This snippet has been automatically generated and should be regarded as a code template only.
1523    * // It will require modifications to work:
1524    * // - It may require correct/in-range values for request initialization.
1525    * // - It may require specifying regional endpoints when creating the service client as shown in
1526    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1527    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1528    *   DeleteEntryRequest request =
1529    *       DeleteEntryRequest.newBuilder()
1530    *           .setName(
1531    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
1532    *           .build();
1533    *   dataCatalogClient.deleteEntry(request);
1534    * }
1535    * }</pre>
1536    *
1537    * @param request The request object containing all of the parameters for the API call.
1538    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1539    */
deleteEntry(DeleteEntryRequest request)1540   public final void deleteEntry(DeleteEntryRequest request) {
1541     deleteEntryCallable().call(request);
1542   }
1543 
1544   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1545   /**
1546    * Deletes an existing entry. Only entries created through
1547    * [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] method can be deleted.
1548    * Users should enable the Data Catalog API in the project identified by the `name` parameter (see
1549    * [Data Catalog Resource Project]
1550    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
1551    *
1552    * <p>Sample code:
1553    *
1554    * <pre>{@code
1555    * // This snippet has been automatically generated and should be regarded as a code template only.
1556    * // It will require modifications to work:
1557    * // - It may require correct/in-range values for request initialization.
1558    * // - It may require specifying regional endpoints when creating the service client as shown in
1559    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1560    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1561    *   DeleteEntryRequest request =
1562    *       DeleteEntryRequest.newBuilder()
1563    *           .setName(
1564    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
1565    *           .build();
1566    *   ApiFuture<Empty> future = dataCatalogClient.deleteEntryCallable().futureCall(request);
1567    *   // Do something.
1568    *   future.get();
1569    * }
1570    * }</pre>
1571    */
deleteEntryCallable()1572   public final UnaryCallable<DeleteEntryRequest, Empty> deleteEntryCallable() {
1573     return stub.deleteEntryCallable();
1574   }
1575 
1576   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1577   /**
1578    * Gets an entry.
1579    *
1580    * <p>Sample code:
1581    *
1582    * <pre>{@code
1583    * // This snippet has been automatically generated and should be regarded as a code template only.
1584    * // It will require modifications to work:
1585    * // - It may require correct/in-range values for request initialization.
1586    * // - It may require specifying regional endpoints when creating the service client as shown in
1587    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1588    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1589    *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
1590    *   Entry response = dataCatalogClient.getEntry(name);
1591    * }
1592    * }</pre>
1593    *
1594    * @param name Required. The name of the entry. Example:
1595    *     <ul>
1596    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
1597    *     </ul>
1598    *
1599    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1600    */
getEntry(EntryName name)1601   public final Entry getEntry(EntryName name) {
1602     GetEntryRequest request =
1603         GetEntryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
1604     return getEntry(request);
1605   }
1606 
1607   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1608   /**
1609    * Gets an entry.
1610    *
1611    * <p>Sample code:
1612    *
1613    * <pre>{@code
1614    * // This snippet has been automatically generated and should be regarded as a code template only.
1615    * // It will require modifications to work:
1616    * // - It may require correct/in-range values for request initialization.
1617    * // - It may require specifying regional endpoints when creating the service client as shown in
1618    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1619    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1620    *   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
1621    *   Entry response = dataCatalogClient.getEntry(name);
1622    * }
1623    * }</pre>
1624    *
1625    * @param name Required. The name of the entry. Example:
1626    *     <ul>
1627    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
1628    *     </ul>
1629    *
1630    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1631    */
getEntry(String name)1632   public final Entry getEntry(String name) {
1633     GetEntryRequest request = GetEntryRequest.newBuilder().setName(name).build();
1634     return getEntry(request);
1635   }
1636 
1637   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1638   /**
1639    * Gets an entry.
1640    *
1641    * <p>Sample code:
1642    *
1643    * <pre>{@code
1644    * // This snippet has been automatically generated and should be regarded as a code template only.
1645    * // It will require modifications to work:
1646    * // - It may require correct/in-range values for request initialization.
1647    * // - It may require specifying regional endpoints when creating the service client as shown in
1648    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1649    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1650    *   GetEntryRequest request =
1651    *       GetEntryRequest.newBuilder()
1652    *           .setName(
1653    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
1654    *           .build();
1655    *   Entry response = dataCatalogClient.getEntry(request);
1656    * }
1657    * }</pre>
1658    *
1659    * @param request The request object containing all of the parameters for the API call.
1660    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1661    */
getEntry(GetEntryRequest request)1662   public final Entry getEntry(GetEntryRequest request) {
1663     return getEntryCallable().call(request);
1664   }
1665 
1666   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1667   /**
1668    * Gets an entry.
1669    *
1670    * <p>Sample code:
1671    *
1672    * <pre>{@code
1673    * // This snippet has been automatically generated and should be regarded as a code template only.
1674    * // It will require modifications to work:
1675    * // - It may require correct/in-range values for request initialization.
1676    * // - It may require specifying regional endpoints when creating the service client as shown in
1677    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1678    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1679    *   GetEntryRequest request =
1680    *       GetEntryRequest.newBuilder()
1681    *           .setName(
1682    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
1683    *           .build();
1684    *   ApiFuture<Entry> future = dataCatalogClient.getEntryCallable().futureCall(request);
1685    *   // Do something.
1686    *   Entry response = future.get();
1687    * }
1688    * }</pre>
1689    */
getEntryCallable()1690   public final UnaryCallable<GetEntryRequest, Entry> getEntryCallable() {
1691     return stub.getEntryCallable();
1692   }
1693 
1694   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1695   /**
1696    * Get an entry by target resource name. This method allows clients to use the resource name from
1697    * the source Google Cloud Platform service to get the Data Catalog Entry.
1698    *
1699    * <p>Sample code:
1700    *
1701    * <pre>{@code
1702    * // This snippet has been automatically generated and should be regarded as a code template only.
1703    * // It will require modifications to work:
1704    * // - It may require correct/in-range values for request initialization.
1705    * // - It may require specifying regional endpoints when creating the service client as shown in
1706    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1707    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1708    *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
1709    *   Entry response = dataCatalogClient.lookupEntry(request);
1710    * }
1711    * }</pre>
1712    *
1713    * @param request The request object containing all of the parameters for the API call.
1714    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1715    */
lookupEntry(LookupEntryRequest request)1716   public final Entry lookupEntry(LookupEntryRequest request) {
1717     return lookupEntryCallable().call(request);
1718   }
1719 
1720   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1721   /**
1722    * Get an entry by target resource name. This method allows clients to use the resource name from
1723    * the source Google Cloud Platform service to get the Data Catalog Entry.
1724    *
1725    * <p>Sample code:
1726    *
1727    * <pre>{@code
1728    * // This snippet has been automatically generated and should be regarded as a code template only.
1729    * // It will require modifications to work:
1730    * // - It may require correct/in-range values for request initialization.
1731    * // - It may require specifying regional endpoints when creating the service client as shown in
1732    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1733    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1734    *   LookupEntryRequest request = LookupEntryRequest.newBuilder().build();
1735    *   ApiFuture<Entry> future = dataCatalogClient.lookupEntryCallable().futureCall(request);
1736    *   // Do something.
1737    *   Entry response = future.get();
1738    * }
1739    * }</pre>
1740    */
lookupEntryCallable()1741   public final UnaryCallable<LookupEntryRequest, Entry> lookupEntryCallable() {
1742     return stub.lookupEntryCallable();
1743   }
1744 
1745   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1746   /**
1747    * Lists entries.
1748    *
1749    * <p>Sample code:
1750    *
1751    * <pre>{@code
1752    * // This snippet has been automatically generated and should be regarded as a code template only.
1753    * // It will require modifications to work:
1754    * // - It may require correct/in-range values for request initialization.
1755    * // - It may require specifying regional endpoints when creating the service client as shown in
1756    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1757    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1758    *   EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
1759    *   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
1760    *     // doThingsWith(element);
1761    *   }
1762    * }
1763    * }</pre>
1764    *
1765    * @param parent Required. The name of the entry group that contains the entries, which can be
1766    *     provided in URL format. Example:
1767    *     <ul>
1768    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
1769    *     </ul>
1770    *
1771    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1772    */
listEntries(EntryGroupName parent)1773   public final ListEntriesPagedResponse listEntries(EntryGroupName parent) {
1774     ListEntriesRequest request =
1775         ListEntriesRequest.newBuilder()
1776             .setParent(parent == null ? null : parent.toString())
1777             .build();
1778     return listEntries(request);
1779   }
1780 
1781   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1782   /**
1783    * Lists entries.
1784    *
1785    * <p>Sample code:
1786    *
1787    * <pre>{@code
1788    * // This snippet has been automatically generated and should be regarded as a code template only.
1789    * // It will require modifications to work:
1790    * // - It may require correct/in-range values for request initialization.
1791    * // - It may require specifying regional endpoints when creating the service client as shown in
1792    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1793    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1794    *   String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
1795    *   for (Entry element : dataCatalogClient.listEntries(parent).iterateAll()) {
1796    *     // doThingsWith(element);
1797    *   }
1798    * }
1799    * }</pre>
1800    *
1801    * @param parent Required. The name of the entry group that contains the entries, which can be
1802    *     provided in URL format. Example:
1803    *     <ul>
1804    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
1805    *     </ul>
1806    *
1807    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1808    */
listEntries(String parent)1809   public final ListEntriesPagedResponse listEntries(String parent) {
1810     ListEntriesRequest request = ListEntriesRequest.newBuilder().setParent(parent).build();
1811     return listEntries(request);
1812   }
1813 
1814   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1815   /**
1816    * Lists entries.
1817    *
1818    * <p>Sample code:
1819    *
1820    * <pre>{@code
1821    * // This snippet has been automatically generated and should be regarded as a code template only.
1822    * // It will require modifications to work:
1823    * // - It may require correct/in-range values for request initialization.
1824    * // - It may require specifying regional endpoints when creating the service client as shown in
1825    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1826    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1827    *   ListEntriesRequest request =
1828    *       ListEntriesRequest.newBuilder()
1829    *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
1830    *           .setPageSize(883849137)
1831    *           .setPageToken("pageToken873572522")
1832    *           .setReadMask(FieldMask.newBuilder().build())
1833    *           .build();
1834    *   for (Entry element : dataCatalogClient.listEntries(request).iterateAll()) {
1835    *     // doThingsWith(element);
1836    *   }
1837    * }
1838    * }</pre>
1839    *
1840    * @param request The request object containing all of the parameters for the API call.
1841    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1842    */
listEntries(ListEntriesRequest request)1843   public final ListEntriesPagedResponse listEntries(ListEntriesRequest request) {
1844     return listEntriesPagedCallable().call(request);
1845   }
1846 
1847   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1848   /**
1849    * Lists entries.
1850    *
1851    * <p>Sample code:
1852    *
1853    * <pre>{@code
1854    * // This snippet has been automatically generated and should be regarded as a code template only.
1855    * // It will require modifications to work:
1856    * // - It may require correct/in-range values for request initialization.
1857    * // - It may require specifying regional endpoints when creating the service client as shown in
1858    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1859    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1860    *   ListEntriesRequest request =
1861    *       ListEntriesRequest.newBuilder()
1862    *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
1863    *           .setPageSize(883849137)
1864    *           .setPageToken("pageToken873572522")
1865    *           .setReadMask(FieldMask.newBuilder().build())
1866    *           .build();
1867    *   ApiFuture<Entry> future = dataCatalogClient.listEntriesPagedCallable().futureCall(request);
1868    *   // Do something.
1869    *   for (Entry element : future.get().iterateAll()) {
1870    *     // doThingsWith(element);
1871    *   }
1872    * }
1873    * }</pre>
1874    */
1875   public final UnaryCallable<ListEntriesRequest, ListEntriesPagedResponse>
listEntriesPagedCallable()1876       listEntriesPagedCallable() {
1877     return stub.listEntriesPagedCallable();
1878   }
1879 
1880   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1881   /**
1882    * Lists entries.
1883    *
1884    * <p>Sample code:
1885    *
1886    * <pre>{@code
1887    * // This snippet has been automatically generated and should be regarded as a code template only.
1888    * // It will require modifications to work:
1889    * // - It may require correct/in-range values for request initialization.
1890    * // - It may require specifying regional endpoints when creating the service client as shown in
1891    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1892    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1893    *   ListEntriesRequest request =
1894    *       ListEntriesRequest.newBuilder()
1895    *           .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
1896    *           .setPageSize(883849137)
1897    *           .setPageToken("pageToken873572522")
1898    *           .setReadMask(FieldMask.newBuilder().build())
1899    *           .build();
1900    *   while (true) {
1901    *     ListEntriesResponse response = dataCatalogClient.listEntriesCallable().call(request);
1902    *     for (Entry element : response.getEntriesList()) {
1903    *       // doThingsWith(element);
1904    *     }
1905    *     String nextPageToken = response.getNextPageToken();
1906    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
1907    *       request = request.toBuilder().setPageToken(nextPageToken).build();
1908    *     } else {
1909    *       break;
1910    *     }
1911    *   }
1912    * }
1913    * }</pre>
1914    */
listEntriesCallable()1915   public final UnaryCallable<ListEntriesRequest, ListEntriesResponse> listEntriesCallable() {
1916     return stub.listEntriesCallable();
1917   }
1918 
1919   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1920   /**
1921    * Creates a tag template. The user should enable the Data Catalog API in the project identified
1922    * by the `parent` parameter (see [Data Catalog Resource
1923    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
1924    * information).
1925    *
1926    * <p>Sample code:
1927    *
1928    * <pre>{@code
1929    * // This snippet has been automatically generated and should be regarded as a code template only.
1930    * // It will require modifications to work:
1931    * // - It may require correct/in-range values for request initialization.
1932    * // - It may require specifying regional endpoints when creating the service client as shown in
1933    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1934    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1935    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
1936    *   String tagTemplateId = "tagTemplateId-1438776721";
1937    *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
1938    *   TagTemplate response =
1939    *       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
1940    * }
1941    * }</pre>
1942    *
1943    * @param parent Required. The name of the project and the template location
1944    *     [region](https://cloud.google.com/data-catalog/docs/concepts/regions.
1945    *     <p>Example:
1946    *     <ul>
1947    *       <li>projects/{project_id}/locations/us-central1
1948    *     </ul>
1949    *
1950    * @param tagTemplateId Required. The id of the tag template to create.
1951    * @param tagTemplate Required. The tag template to create.
1952    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1953    */
createTagTemplate( LocationName parent, String tagTemplateId, TagTemplate tagTemplate)1954   public final TagTemplate createTagTemplate(
1955       LocationName parent, String tagTemplateId, TagTemplate tagTemplate) {
1956     CreateTagTemplateRequest request =
1957         CreateTagTemplateRequest.newBuilder()
1958             .setParent(parent == null ? null : parent.toString())
1959             .setTagTemplateId(tagTemplateId)
1960             .setTagTemplate(tagTemplate)
1961             .build();
1962     return createTagTemplate(request);
1963   }
1964 
1965   // AUTO-GENERATED DOCUMENTATION AND METHOD.
1966   /**
1967    * Creates a tag template. The user should enable the Data Catalog API in the project identified
1968    * by the `parent` parameter (see [Data Catalog Resource
1969    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
1970    * information).
1971    *
1972    * <p>Sample code:
1973    *
1974    * <pre>{@code
1975    * // This snippet has been automatically generated and should be regarded as a code template only.
1976    * // It will require modifications to work:
1977    * // - It may require correct/in-range values for request initialization.
1978    * // - It may require specifying regional endpoints when creating the service client as shown in
1979    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
1980    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
1981    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
1982    *   String tagTemplateId = "tagTemplateId-1438776721";
1983    *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
1984    *   TagTemplate response =
1985    *       dataCatalogClient.createTagTemplate(parent, tagTemplateId, tagTemplate);
1986    * }
1987    * }</pre>
1988    *
1989    * @param parent Required. The name of the project and the template location
1990    *     [region](https://cloud.google.com/data-catalog/docs/concepts/regions.
1991    *     <p>Example:
1992    *     <ul>
1993    *       <li>projects/{project_id}/locations/us-central1
1994    *     </ul>
1995    *
1996    * @param tagTemplateId Required. The id of the tag template to create.
1997    * @param tagTemplate Required. The tag template to create.
1998    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
1999    */
createTagTemplate( String parent, String tagTemplateId, TagTemplate tagTemplate)2000   public final TagTemplate createTagTemplate(
2001       String parent, String tagTemplateId, TagTemplate tagTemplate) {
2002     CreateTagTemplateRequest request =
2003         CreateTagTemplateRequest.newBuilder()
2004             .setParent(parent)
2005             .setTagTemplateId(tagTemplateId)
2006             .setTagTemplate(tagTemplate)
2007             .build();
2008     return createTagTemplate(request);
2009   }
2010 
2011   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2012   /**
2013    * Creates a tag template. The user should enable the Data Catalog API in the project identified
2014    * by the `parent` parameter (see [Data Catalog Resource
2015    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2016    * information).
2017    *
2018    * <p>Sample code:
2019    *
2020    * <pre>{@code
2021    * // This snippet has been automatically generated and should be regarded as a code template only.
2022    * // It will require modifications to work:
2023    * // - It may require correct/in-range values for request initialization.
2024    * // - It may require specifying regional endpoints when creating the service client as shown in
2025    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2026    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2027    *   CreateTagTemplateRequest request =
2028    *       CreateTagTemplateRequest.newBuilder()
2029    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
2030    *           .setTagTemplateId("tagTemplateId-1438776721")
2031    *           .setTagTemplate(TagTemplate.newBuilder().build())
2032    *           .build();
2033    *   TagTemplate response = dataCatalogClient.createTagTemplate(request);
2034    * }
2035    * }</pre>
2036    *
2037    * @param request The request object containing all of the parameters for the API call.
2038    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2039    */
createTagTemplate(CreateTagTemplateRequest request)2040   public final TagTemplate createTagTemplate(CreateTagTemplateRequest request) {
2041     return createTagTemplateCallable().call(request);
2042   }
2043 
2044   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2045   /**
2046    * Creates a tag template. The user should enable the Data Catalog API in the project identified
2047    * by the `parent` parameter (see [Data Catalog Resource
2048    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2049    * information).
2050    *
2051    * <p>Sample code:
2052    *
2053    * <pre>{@code
2054    * // This snippet has been automatically generated and should be regarded as a code template only.
2055    * // It will require modifications to work:
2056    * // - It may require correct/in-range values for request initialization.
2057    * // - It may require specifying regional endpoints when creating the service client as shown in
2058    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2059    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2060    *   CreateTagTemplateRequest request =
2061    *       CreateTagTemplateRequest.newBuilder()
2062    *           .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
2063    *           .setTagTemplateId("tagTemplateId-1438776721")
2064    *           .setTagTemplate(TagTemplate.newBuilder().build())
2065    *           .build();
2066    *   ApiFuture<TagTemplate> future =
2067    *       dataCatalogClient.createTagTemplateCallable().futureCall(request);
2068    *   // Do something.
2069    *   TagTemplate response = future.get();
2070    * }
2071    * }</pre>
2072    */
createTagTemplateCallable()2073   public final UnaryCallable<CreateTagTemplateRequest, TagTemplate> createTagTemplateCallable() {
2074     return stub.createTagTemplateCallable();
2075   }
2076 
2077   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2078   /**
2079    * Gets a tag template.
2080    *
2081    * <p>Sample code:
2082    *
2083    * <pre>{@code
2084    * // This snippet has been automatically generated and should be regarded as a code template only.
2085    * // It will require modifications to work:
2086    * // - It may require correct/in-range values for request initialization.
2087    * // - It may require specifying regional endpoints when creating the service client as shown in
2088    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2089    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2090    *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
2091    *   TagTemplate response = dataCatalogClient.getTagTemplate(name);
2092    * }
2093    * }</pre>
2094    *
2095    * @param name Required. The name of the tag template. Example:
2096    *     <ul>
2097    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
2098    *     </ul>
2099    *
2100    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2101    */
getTagTemplate(TagTemplateName name)2102   public final TagTemplate getTagTemplate(TagTemplateName name) {
2103     GetTagTemplateRequest request =
2104         GetTagTemplateRequest.newBuilder().setName(name == null ? null : name.toString()).build();
2105     return getTagTemplate(request);
2106   }
2107 
2108   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2109   /**
2110    * Gets a tag template.
2111    *
2112    * <p>Sample code:
2113    *
2114    * <pre>{@code
2115    * // This snippet has been automatically generated and should be regarded as a code template only.
2116    * // It will require modifications to work:
2117    * // - It may require correct/in-range values for request initialization.
2118    * // - It may require specifying regional endpoints when creating the service client as shown in
2119    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2120    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2121    *   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
2122    *   TagTemplate response = dataCatalogClient.getTagTemplate(name);
2123    * }
2124    * }</pre>
2125    *
2126    * @param name Required. The name of the tag template. Example:
2127    *     <ul>
2128    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
2129    *     </ul>
2130    *
2131    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2132    */
getTagTemplate(String name)2133   public final TagTemplate getTagTemplate(String name) {
2134     GetTagTemplateRequest request = GetTagTemplateRequest.newBuilder().setName(name).build();
2135     return getTagTemplate(request);
2136   }
2137 
2138   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2139   /**
2140    * Gets a tag template.
2141    *
2142    * <p>Sample code:
2143    *
2144    * <pre>{@code
2145    * // This snippet has been automatically generated and should be regarded as a code template only.
2146    * // It will require modifications to work:
2147    * // - It may require correct/in-range values for request initialization.
2148    * // - It may require specifying regional endpoints when creating the service client as shown in
2149    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2150    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2151    *   GetTagTemplateRequest request =
2152    *       GetTagTemplateRequest.newBuilder()
2153    *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
2154    *           .build();
2155    *   TagTemplate response = dataCatalogClient.getTagTemplate(request);
2156    * }
2157    * }</pre>
2158    *
2159    * @param request The request object containing all of the parameters for the API call.
2160    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2161    */
getTagTemplate(GetTagTemplateRequest request)2162   public final TagTemplate getTagTemplate(GetTagTemplateRequest request) {
2163     return getTagTemplateCallable().call(request);
2164   }
2165 
2166   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2167   /**
2168    * Gets a tag template.
2169    *
2170    * <p>Sample code:
2171    *
2172    * <pre>{@code
2173    * // This snippet has been automatically generated and should be regarded as a code template only.
2174    * // It will require modifications to work:
2175    * // - It may require correct/in-range values for request initialization.
2176    * // - It may require specifying regional endpoints when creating the service client as shown in
2177    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2178    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2179    *   GetTagTemplateRequest request =
2180    *       GetTagTemplateRequest.newBuilder()
2181    *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
2182    *           .build();
2183    *   ApiFuture<TagTemplate> future =
2184    *       dataCatalogClient.getTagTemplateCallable().futureCall(request);
2185    *   // Do something.
2186    *   TagTemplate response = future.get();
2187    * }
2188    * }</pre>
2189    */
getTagTemplateCallable()2190   public final UnaryCallable<GetTagTemplateRequest, TagTemplate> getTagTemplateCallable() {
2191     return stub.getTagTemplateCallable();
2192   }
2193 
2194   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2195   /**
2196    * Updates a tag template. This method cannot be used to update the fields of a template. The tag
2197    * template fields are represented as separate resources and should be updated using their own
2198    * create/update/delete methods. Users should enable the Data Catalog API in the project
2199    * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project]
2200    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2201    *
2202    * <p>Sample code:
2203    *
2204    * <pre>{@code
2205    * // This snippet has been automatically generated and should be regarded as a code template only.
2206    * // It will require modifications to work:
2207    * // - It may require correct/in-range values for request initialization.
2208    * // - It may require specifying regional endpoints when creating the service client as shown in
2209    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2210    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2211    *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
2212    *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate);
2213    * }
2214    * }</pre>
2215    *
2216    * @param tagTemplate Required. The template to update. The "name" field must be set.
2217    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2218    */
updateTagTemplate(TagTemplate tagTemplate)2219   public final TagTemplate updateTagTemplate(TagTemplate tagTemplate) {
2220     UpdateTagTemplateRequest request =
2221         UpdateTagTemplateRequest.newBuilder().setTagTemplate(tagTemplate).build();
2222     return updateTagTemplate(request);
2223   }
2224 
2225   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2226   /**
2227    * Updates a tag template. This method cannot be used to update the fields of a template. The tag
2228    * template fields are represented as separate resources and should be updated using their own
2229    * create/update/delete methods. Users should enable the Data Catalog API in the project
2230    * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project]
2231    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2232    *
2233    * <p>Sample code:
2234    *
2235    * <pre>{@code
2236    * // This snippet has been automatically generated and should be regarded as a code template only.
2237    * // It will require modifications to work:
2238    * // - It may require correct/in-range values for request initialization.
2239    * // - It may require specifying regional endpoints when creating the service client as shown in
2240    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2241    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2242    *   TagTemplate tagTemplate = TagTemplate.newBuilder().build();
2243    *   FieldMask updateMask = FieldMask.newBuilder().build();
2244    *   TagTemplate response = dataCatalogClient.updateTagTemplate(tagTemplate, updateMask);
2245    * }
2246    * }</pre>
2247    *
2248    * @param tagTemplate Required. The template to update. The "name" field must be set.
2249    * @param updateMask The field mask specifies the parts of the template to overwrite.
2250    *     <p>Allowed fields:
2251    *     <p>&#42; `display_name`
2252    *     <p>If absent or empty, all of the allowed fields above will be updated.
2253    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2254    */
updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask)2255   public final TagTemplate updateTagTemplate(TagTemplate tagTemplate, FieldMask updateMask) {
2256     UpdateTagTemplateRequest request =
2257         UpdateTagTemplateRequest.newBuilder()
2258             .setTagTemplate(tagTemplate)
2259             .setUpdateMask(updateMask)
2260             .build();
2261     return updateTagTemplate(request);
2262   }
2263 
2264   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2265   /**
2266    * Updates a tag template. This method cannot be used to update the fields of a template. The tag
2267    * template fields are represented as separate resources and should be updated using their own
2268    * create/update/delete methods. Users should enable the Data Catalog API in the project
2269    * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project]
2270    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2271    *
2272    * <p>Sample code:
2273    *
2274    * <pre>{@code
2275    * // This snippet has been automatically generated and should be regarded as a code template only.
2276    * // It will require modifications to work:
2277    * // - It may require correct/in-range values for request initialization.
2278    * // - It may require specifying regional endpoints when creating the service client as shown in
2279    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2280    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2281    *   UpdateTagTemplateRequest request =
2282    *       UpdateTagTemplateRequest.newBuilder()
2283    *           .setTagTemplate(TagTemplate.newBuilder().build())
2284    *           .setUpdateMask(FieldMask.newBuilder().build())
2285    *           .build();
2286    *   TagTemplate response = dataCatalogClient.updateTagTemplate(request);
2287    * }
2288    * }</pre>
2289    *
2290    * @param request The request object containing all of the parameters for the API call.
2291    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2292    */
updateTagTemplate(UpdateTagTemplateRequest request)2293   public final TagTemplate updateTagTemplate(UpdateTagTemplateRequest request) {
2294     return updateTagTemplateCallable().call(request);
2295   }
2296 
2297   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2298   /**
2299    * Updates a tag template. This method cannot be used to update the fields of a template. The tag
2300    * template fields are represented as separate resources and should be updated using their own
2301    * create/update/delete methods. Users should enable the Data Catalog API in the project
2302    * identified by the `tag_template.name` parameter (see [Data Catalog Resource Project]
2303    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2304    *
2305    * <p>Sample code:
2306    *
2307    * <pre>{@code
2308    * // This snippet has been automatically generated and should be regarded as a code template only.
2309    * // It will require modifications to work:
2310    * // - It may require correct/in-range values for request initialization.
2311    * // - It may require specifying regional endpoints when creating the service client as shown in
2312    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2313    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2314    *   UpdateTagTemplateRequest request =
2315    *       UpdateTagTemplateRequest.newBuilder()
2316    *           .setTagTemplate(TagTemplate.newBuilder().build())
2317    *           .setUpdateMask(FieldMask.newBuilder().build())
2318    *           .build();
2319    *   ApiFuture<TagTemplate> future =
2320    *       dataCatalogClient.updateTagTemplateCallable().futureCall(request);
2321    *   // Do something.
2322    *   TagTemplate response = future.get();
2323    * }
2324    * }</pre>
2325    */
updateTagTemplateCallable()2326   public final UnaryCallable<UpdateTagTemplateRequest, TagTemplate> updateTagTemplateCallable() {
2327     return stub.updateTagTemplateCallable();
2328   }
2329 
2330   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2331   /**
2332    * Deletes a tag template and all tags using the template. Users should enable the Data Catalog
2333    * API in the project identified by the `name` parameter (see [Data Catalog Resource Project]
2334    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2335    *
2336    * <p>Sample code:
2337    *
2338    * <pre>{@code
2339    * // This snippet has been automatically generated and should be regarded as a code template only.
2340    * // It will require modifications to work:
2341    * // - It may require correct/in-range values for request initialization.
2342    * // - It may require specifying regional endpoints when creating the service client as shown in
2343    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2344    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2345    *   TagTemplateName name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
2346    *   boolean force = true;
2347    *   dataCatalogClient.deleteTagTemplate(name, force);
2348    * }
2349    * }</pre>
2350    *
2351    * @param name Required. The name of the tag template to delete. Example:
2352    *     <ul>
2353    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
2354    *     </ul>
2355    *
2356    * @param force Required. Currently, this field must always be set to `true`. This confirms the
2357    *     deletion of any possible tags using this template. `force = false` will be supported in the
2358    *     future.
2359    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2360    */
deleteTagTemplate(TagTemplateName name, boolean force)2361   public final void deleteTagTemplate(TagTemplateName name, boolean force) {
2362     DeleteTagTemplateRequest request =
2363         DeleteTagTemplateRequest.newBuilder()
2364             .setName(name == null ? null : name.toString())
2365             .setForce(force)
2366             .build();
2367     deleteTagTemplate(request);
2368   }
2369 
2370   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2371   /**
2372    * Deletes a tag template and all tags using the template. Users should enable the Data Catalog
2373    * API in the project identified by the `name` parameter (see [Data Catalog Resource Project]
2374    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2375    *
2376    * <p>Sample code:
2377    *
2378    * <pre>{@code
2379    * // This snippet has been automatically generated and should be regarded as a code template only.
2380    * // It will require modifications to work:
2381    * // - It may require correct/in-range values for request initialization.
2382    * // - It may require specifying regional endpoints when creating the service client as shown in
2383    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2384    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2385    *   String name = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
2386    *   boolean force = true;
2387    *   dataCatalogClient.deleteTagTemplate(name, force);
2388    * }
2389    * }</pre>
2390    *
2391    * @param name Required. The name of the tag template to delete. Example:
2392    *     <ul>
2393    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
2394    *     </ul>
2395    *
2396    * @param force Required. Currently, this field must always be set to `true`. This confirms the
2397    *     deletion of any possible tags using this template. `force = false` will be supported in the
2398    *     future.
2399    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2400    */
deleteTagTemplate(String name, boolean force)2401   public final void deleteTagTemplate(String name, boolean force) {
2402     DeleteTagTemplateRequest request =
2403         DeleteTagTemplateRequest.newBuilder().setName(name).setForce(force).build();
2404     deleteTagTemplate(request);
2405   }
2406 
2407   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2408   /**
2409    * Deletes a tag template and all tags using the template. Users should enable the Data Catalog
2410    * API in the project identified by the `name` parameter (see [Data Catalog Resource Project]
2411    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2412    *
2413    * <p>Sample code:
2414    *
2415    * <pre>{@code
2416    * // This snippet has been automatically generated and should be regarded as a code template only.
2417    * // It will require modifications to work:
2418    * // - It may require correct/in-range values for request initialization.
2419    * // - It may require specifying regional endpoints when creating the service client as shown in
2420    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2421    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2422    *   DeleteTagTemplateRequest request =
2423    *       DeleteTagTemplateRequest.newBuilder()
2424    *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
2425    *           .setForce(true)
2426    *           .build();
2427    *   dataCatalogClient.deleteTagTemplate(request);
2428    * }
2429    * }</pre>
2430    *
2431    * @param request The request object containing all of the parameters for the API call.
2432    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2433    */
deleteTagTemplate(DeleteTagTemplateRequest request)2434   public final void deleteTagTemplate(DeleteTagTemplateRequest request) {
2435     deleteTagTemplateCallable().call(request);
2436   }
2437 
2438   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2439   /**
2440    * Deletes a tag template and all tags using the template. Users should enable the Data Catalog
2441    * API in the project identified by the `name` parameter (see [Data Catalog Resource Project]
2442    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2443    *
2444    * <p>Sample code:
2445    *
2446    * <pre>{@code
2447    * // This snippet has been automatically generated and should be regarded as a code template only.
2448    * // It will require modifications to work:
2449    * // - It may require correct/in-range values for request initialization.
2450    * // - It may require specifying regional endpoints when creating the service client as shown in
2451    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2452    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2453    *   DeleteTagTemplateRequest request =
2454    *       DeleteTagTemplateRequest.newBuilder()
2455    *           .setName(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
2456    *           .setForce(true)
2457    *           .build();
2458    *   ApiFuture<Empty> future = dataCatalogClient.deleteTagTemplateCallable().futureCall(request);
2459    *   // Do something.
2460    *   future.get();
2461    * }
2462    * }</pre>
2463    */
deleteTagTemplateCallable()2464   public final UnaryCallable<DeleteTagTemplateRequest, Empty> deleteTagTemplateCallable() {
2465     return stub.deleteTagTemplateCallable();
2466   }
2467 
2468   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2469   /**
2470    * Creates a field in a tag template. The user should enable the Data Catalog API in the project
2471    * identified by the `parent` parameter (see [Data Catalog Resource
2472    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2473    * information).
2474    *
2475    * <p>Sample code:
2476    *
2477    * <pre>{@code
2478    * // This snippet has been automatically generated and should be regarded as a code template only.
2479    * // It will require modifications to work:
2480    * // - It may require correct/in-range values for request initialization.
2481    * // - It may require specifying regional endpoints when creating the service client as shown in
2482    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2483    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2484    *   TagTemplateName parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]");
2485    *   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
2486    *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
2487    *   TagTemplateField response =
2488    *       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
2489    * }
2490    * }</pre>
2491    *
2492    * @param parent Required. The name of the project and the template location
2493    *     [region](https://cloud.google.com/data-catalog/docs/concepts/regions).
2494    *     <p>Example:
2495    *     <ul>
2496    *       <li>projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
2497    *     </ul>
2498    *
2499    * @param tagTemplateFieldId Required. The ID of the tag template field to create. Field ids can
2500    *     contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes
2501    *     (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs
2502    *     must also be unique within their template.
2503    * @param tagTemplateField Required. The tag template field to create.
2504    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2505    */
createTagTemplateField( TagTemplateName parent, String tagTemplateFieldId, TagTemplateField tagTemplateField)2506   public final TagTemplateField createTagTemplateField(
2507       TagTemplateName parent, String tagTemplateFieldId, TagTemplateField tagTemplateField) {
2508     CreateTagTemplateFieldRequest request =
2509         CreateTagTemplateFieldRequest.newBuilder()
2510             .setParent(parent == null ? null : parent.toString())
2511             .setTagTemplateFieldId(tagTemplateFieldId)
2512             .setTagTemplateField(tagTemplateField)
2513             .build();
2514     return createTagTemplateField(request);
2515   }
2516 
2517   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2518   /**
2519    * Creates a field in a tag template. The user should enable the Data Catalog API in the project
2520    * identified by the `parent` parameter (see [Data Catalog Resource
2521    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2522    * information).
2523    *
2524    * <p>Sample code:
2525    *
2526    * <pre>{@code
2527    * // This snippet has been automatically generated and should be regarded as a code template only.
2528    * // It will require modifications to work:
2529    * // - It may require correct/in-range values for request initialization.
2530    * // - It may require specifying regional endpoints when creating the service client as shown in
2531    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2532    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2533    *   String parent = TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString();
2534    *   String tagTemplateFieldId = "tagTemplateFieldId-1556835615";
2535    *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
2536    *   TagTemplateField response =
2537    *       dataCatalogClient.createTagTemplateField(parent, tagTemplateFieldId, tagTemplateField);
2538    * }
2539    * }</pre>
2540    *
2541    * @param parent Required. The name of the project and the template location
2542    *     [region](https://cloud.google.com/data-catalog/docs/concepts/regions).
2543    *     <p>Example:
2544    *     <ul>
2545    *       <li>projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
2546    *     </ul>
2547    *
2548    * @param tagTemplateFieldId Required. The ID of the tag template field to create. Field ids can
2549    *     contain letters (both uppercase and lowercase), numbers (0-9), underscores (_) and dashes
2550    *     (-). Field IDs must be at least 1 character long and at most 128 characters long. Field IDs
2551    *     must also be unique within their template.
2552    * @param tagTemplateField Required. The tag template field to create.
2553    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2554    */
createTagTemplateField( String parent, String tagTemplateFieldId, TagTemplateField tagTemplateField)2555   public final TagTemplateField createTagTemplateField(
2556       String parent, String tagTemplateFieldId, TagTemplateField tagTemplateField) {
2557     CreateTagTemplateFieldRequest request =
2558         CreateTagTemplateFieldRequest.newBuilder()
2559             .setParent(parent)
2560             .setTagTemplateFieldId(tagTemplateFieldId)
2561             .setTagTemplateField(tagTemplateField)
2562             .build();
2563     return createTagTemplateField(request);
2564   }
2565 
2566   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2567   /**
2568    * Creates a field in a tag template. The user should enable the Data Catalog API in the project
2569    * identified by the `parent` parameter (see [Data Catalog Resource
2570    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2571    * information).
2572    *
2573    * <p>Sample code:
2574    *
2575    * <pre>{@code
2576    * // This snippet has been automatically generated and should be regarded as a code template only.
2577    * // It will require modifications to work:
2578    * // - It may require correct/in-range values for request initialization.
2579    * // - It may require specifying regional endpoints when creating the service client as shown in
2580    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2581    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2582    *   CreateTagTemplateFieldRequest request =
2583    *       CreateTagTemplateFieldRequest.newBuilder()
2584    *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
2585    *           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
2586    *           .setTagTemplateField(TagTemplateField.newBuilder().build())
2587    *           .build();
2588    *   TagTemplateField response = dataCatalogClient.createTagTemplateField(request);
2589    * }
2590    * }</pre>
2591    *
2592    * @param request The request object containing all of the parameters for the API call.
2593    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2594    */
createTagTemplateField(CreateTagTemplateFieldRequest request)2595   public final TagTemplateField createTagTemplateField(CreateTagTemplateFieldRequest request) {
2596     return createTagTemplateFieldCallable().call(request);
2597   }
2598 
2599   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2600   /**
2601    * Creates a field in a tag template. The user should enable the Data Catalog API in the project
2602    * identified by the `parent` parameter (see [Data Catalog Resource
2603    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2604    * information).
2605    *
2606    * <p>Sample code:
2607    *
2608    * <pre>{@code
2609    * // This snippet has been automatically generated and should be regarded as a code template only.
2610    * // It will require modifications to work:
2611    * // - It may require correct/in-range values for request initialization.
2612    * // - It may require specifying regional endpoints when creating the service client as shown in
2613    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2614    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2615    *   CreateTagTemplateFieldRequest request =
2616    *       CreateTagTemplateFieldRequest.newBuilder()
2617    *           .setParent(TagTemplateName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]").toString())
2618    *           .setTagTemplateFieldId("tagTemplateFieldId-1556835615")
2619    *           .setTagTemplateField(TagTemplateField.newBuilder().build())
2620    *           .build();
2621    *   ApiFuture<TagTemplateField> future =
2622    *       dataCatalogClient.createTagTemplateFieldCallable().futureCall(request);
2623    *   // Do something.
2624    *   TagTemplateField response = future.get();
2625    * }
2626    * }</pre>
2627    */
2628   public final UnaryCallable<CreateTagTemplateFieldRequest, TagTemplateField>
createTagTemplateFieldCallable()2629       createTagTemplateFieldCallable() {
2630     return stub.createTagTemplateFieldCallable();
2631   }
2632 
2633   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2634   /**
2635    * Updates a field in a tag template. This method cannot be used to update the field type. Users
2636    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
2637    * Catalog Resource Project]
2638    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2639    *
2640    * <p>Sample code:
2641    *
2642    * <pre>{@code
2643    * // This snippet has been automatically generated and should be regarded as a code template only.
2644    * // It will require modifications to work:
2645    * // - It may require correct/in-range values for request initialization.
2646    * // - It may require specifying regional endpoints when creating the service client as shown in
2647    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2648    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2649    *   TagTemplateFieldName name =
2650    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
2651    *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
2652    *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
2653    * }
2654    * }</pre>
2655    *
2656    * @param name Required. The name of the tag template field. Example:
2657    *     <ul>
2658    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
2659    *     </ul>
2660    *
2661    * @param tagTemplateField Required. The template to update.
2662    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2663    */
updateTagTemplateField( TagTemplateFieldName name, TagTemplateField tagTemplateField)2664   public final TagTemplateField updateTagTemplateField(
2665       TagTemplateFieldName name, TagTemplateField tagTemplateField) {
2666     UpdateTagTemplateFieldRequest request =
2667         UpdateTagTemplateFieldRequest.newBuilder()
2668             .setName(name == null ? null : name.toString())
2669             .setTagTemplateField(tagTemplateField)
2670             .build();
2671     return updateTagTemplateField(request);
2672   }
2673 
2674   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2675   /**
2676    * Updates a field in a tag template. This method cannot be used to update the field type. Users
2677    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
2678    * Catalog Resource Project]
2679    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2680    *
2681    * <p>Sample code:
2682    *
2683    * <pre>{@code
2684    * // This snippet has been automatically generated and should be regarded as a code template only.
2685    * // It will require modifications to work:
2686    * // - It may require correct/in-range values for request initialization.
2687    * // - It may require specifying regional endpoints when creating the service client as shown in
2688    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2689    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2690    *   String name =
2691    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
2692    *           .toString();
2693    *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
2694    *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(name, tagTemplateField);
2695    * }
2696    * }</pre>
2697    *
2698    * @param name Required. The name of the tag template field. Example:
2699    *     <ul>
2700    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
2701    *     </ul>
2702    *
2703    * @param tagTemplateField Required. The template to update.
2704    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2705    */
updateTagTemplateField( String name, TagTemplateField tagTemplateField)2706   public final TagTemplateField updateTagTemplateField(
2707       String name, TagTemplateField tagTemplateField) {
2708     UpdateTagTemplateFieldRequest request =
2709         UpdateTagTemplateFieldRequest.newBuilder()
2710             .setName(name)
2711             .setTagTemplateField(tagTemplateField)
2712             .build();
2713     return updateTagTemplateField(request);
2714   }
2715 
2716   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2717   /**
2718    * Updates a field in a tag template. This method cannot be used to update the field type. Users
2719    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
2720    * Catalog Resource Project]
2721    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2722    *
2723    * <p>Sample code:
2724    *
2725    * <pre>{@code
2726    * // This snippet has been automatically generated and should be regarded as a code template only.
2727    * // It will require modifications to work:
2728    * // - It may require correct/in-range values for request initialization.
2729    * // - It may require specifying regional endpoints when creating the service client as shown in
2730    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2731    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2732    *   TagTemplateFieldName name =
2733    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
2734    *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
2735    *   FieldMask updateMask = FieldMask.newBuilder().build();
2736    *   TagTemplateField response =
2737    *       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
2738    * }
2739    * }</pre>
2740    *
2741    * @param name Required. The name of the tag template field. Example:
2742    *     <ul>
2743    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
2744    *     </ul>
2745    *
2746    * @param tagTemplateField Required. The template to update.
2747    * @param updateMask Optional. The field mask specifies the parts of the template to be updated.
2748    *     Allowed fields:
2749    *     <p>&#42; `display_name` &#42; `type.enum_type` &#42; `is_required`
2750    *     <p>If `update_mask` is not set or empty, all of the allowed fields above will be updated.
2751    *     <p>When updating an enum type, the provided values will be merged with the existing values.
2752    *     Therefore, enum values can only be added, existing enum values cannot be deleted nor
2753    *     renamed. Updating a template field from optional to required is NOT allowed.
2754    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2755    */
updateTagTemplateField( TagTemplateFieldName name, TagTemplateField tagTemplateField, FieldMask updateMask)2756   public final TagTemplateField updateTagTemplateField(
2757       TagTemplateFieldName name, TagTemplateField tagTemplateField, FieldMask updateMask) {
2758     UpdateTagTemplateFieldRequest request =
2759         UpdateTagTemplateFieldRequest.newBuilder()
2760             .setName(name == null ? null : name.toString())
2761             .setTagTemplateField(tagTemplateField)
2762             .setUpdateMask(updateMask)
2763             .build();
2764     return updateTagTemplateField(request);
2765   }
2766 
2767   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2768   /**
2769    * Updates a field in a tag template. This method cannot be used to update the field type. Users
2770    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
2771    * Catalog Resource Project]
2772    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2773    *
2774    * <p>Sample code:
2775    *
2776    * <pre>{@code
2777    * // This snippet has been automatically generated and should be regarded as a code template only.
2778    * // It will require modifications to work:
2779    * // - It may require correct/in-range values for request initialization.
2780    * // - It may require specifying regional endpoints when creating the service client as shown in
2781    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2782    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2783    *   String name =
2784    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
2785    *           .toString();
2786    *   TagTemplateField tagTemplateField = TagTemplateField.newBuilder().build();
2787    *   FieldMask updateMask = FieldMask.newBuilder().build();
2788    *   TagTemplateField response =
2789    *       dataCatalogClient.updateTagTemplateField(name, tagTemplateField, updateMask);
2790    * }
2791    * }</pre>
2792    *
2793    * @param name Required. The name of the tag template field. Example:
2794    *     <ul>
2795    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
2796    *     </ul>
2797    *
2798    * @param tagTemplateField Required. The template to update.
2799    * @param updateMask Optional. The field mask specifies the parts of the template to be updated.
2800    *     Allowed fields:
2801    *     <p>&#42; `display_name` &#42; `type.enum_type` &#42; `is_required`
2802    *     <p>If `update_mask` is not set or empty, all of the allowed fields above will be updated.
2803    *     <p>When updating an enum type, the provided values will be merged with the existing values.
2804    *     Therefore, enum values can only be added, existing enum values cannot be deleted nor
2805    *     renamed. Updating a template field from optional to required is NOT allowed.
2806    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2807    */
updateTagTemplateField( String name, TagTemplateField tagTemplateField, FieldMask updateMask)2808   public final TagTemplateField updateTagTemplateField(
2809       String name, TagTemplateField tagTemplateField, FieldMask updateMask) {
2810     UpdateTagTemplateFieldRequest request =
2811         UpdateTagTemplateFieldRequest.newBuilder()
2812             .setName(name)
2813             .setTagTemplateField(tagTemplateField)
2814             .setUpdateMask(updateMask)
2815             .build();
2816     return updateTagTemplateField(request);
2817   }
2818 
2819   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2820   /**
2821    * Updates a field in a tag template. This method cannot be used to update the field type. Users
2822    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
2823    * Catalog Resource Project]
2824    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2825    *
2826    * <p>Sample code:
2827    *
2828    * <pre>{@code
2829    * // This snippet has been automatically generated and should be regarded as a code template only.
2830    * // It will require modifications to work:
2831    * // - It may require correct/in-range values for request initialization.
2832    * // - It may require specifying regional endpoints when creating the service client as shown in
2833    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2834    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2835    *   UpdateTagTemplateFieldRequest request =
2836    *       UpdateTagTemplateFieldRequest.newBuilder()
2837    *           .setName(
2838    *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
2839    *                   .toString())
2840    *           .setTagTemplateField(TagTemplateField.newBuilder().build())
2841    *           .setUpdateMask(FieldMask.newBuilder().build())
2842    *           .build();
2843    *   TagTemplateField response = dataCatalogClient.updateTagTemplateField(request);
2844    * }
2845    * }</pre>
2846    *
2847    * @param request The request object containing all of the parameters for the API call.
2848    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2849    */
updateTagTemplateField(UpdateTagTemplateFieldRequest request)2850   public final TagTemplateField updateTagTemplateField(UpdateTagTemplateFieldRequest request) {
2851     return updateTagTemplateFieldCallable().call(request);
2852   }
2853 
2854   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2855   /**
2856    * Updates a field in a tag template. This method cannot be used to update the field type. Users
2857    * should enable the Data Catalog API in the project identified by the `name` parameter (see [Data
2858    * Catalog Resource Project]
2859    * (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more information).
2860    *
2861    * <p>Sample code:
2862    *
2863    * <pre>{@code
2864    * // This snippet has been automatically generated and should be regarded as a code template only.
2865    * // It will require modifications to work:
2866    * // - It may require correct/in-range values for request initialization.
2867    * // - It may require specifying regional endpoints when creating the service client as shown in
2868    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2869    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2870    *   UpdateTagTemplateFieldRequest request =
2871    *       UpdateTagTemplateFieldRequest.newBuilder()
2872    *           .setName(
2873    *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
2874    *                   .toString())
2875    *           .setTagTemplateField(TagTemplateField.newBuilder().build())
2876    *           .setUpdateMask(FieldMask.newBuilder().build())
2877    *           .build();
2878    *   ApiFuture<TagTemplateField> future =
2879    *       dataCatalogClient.updateTagTemplateFieldCallable().futureCall(request);
2880    *   // Do something.
2881    *   TagTemplateField response = future.get();
2882    * }
2883    * }</pre>
2884    */
2885   public final UnaryCallable<UpdateTagTemplateFieldRequest, TagTemplateField>
updateTagTemplateFieldCallable()2886       updateTagTemplateFieldCallable() {
2887     return stub.updateTagTemplateFieldCallable();
2888   }
2889 
2890   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2891   /**
2892    * Renames a field in a tag template. The user should enable the Data Catalog API in the project
2893    * identified by the `name` parameter (see [Data Catalog Resource
2894    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2895    * information).
2896    *
2897    * <p>Sample code:
2898    *
2899    * <pre>{@code
2900    * // This snippet has been automatically generated and should be regarded as a code template only.
2901    * // It will require modifications to work:
2902    * // - It may require correct/in-range values for request initialization.
2903    * // - It may require specifying regional endpoints when creating the service client as shown in
2904    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2905    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2906    *   TagTemplateFieldName name =
2907    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
2908    *   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
2909    *   TagTemplateField response =
2910    *       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
2911    * }
2912    * }</pre>
2913    *
2914    * @param name Required. The name of the tag template. Example:
2915    *     <ul>
2916    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
2917    *     </ul>
2918    *
2919    * @param newTagTemplateFieldId Required. The new ID of this tag template field. For example,
2920    *     `my_new_field`.
2921    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2922    */
renameTagTemplateField( TagTemplateFieldName name, String newTagTemplateFieldId)2923   public final TagTemplateField renameTagTemplateField(
2924       TagTemplateFieldName name, String newTagTemplateFieldId) {
2925     RenameTagTemplateFieldRequest request =
2926         RenameTagTemplateFieldRequest.newBuilder()
2927             .setName(name == null ? null : name.toString())
2928             .setNewTagTemplateFieldId(newTagTemplateFieldId)
2929             .build();
2930     return renameTagTemplateField(request);
2931   }
2932 
2933   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2934   /**
2935    * Renames a field in a tag template. The user should enable the Data Catalog API in the project
2936    * identified by the `name` parameter (see [Data Catalog Resource
2937    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2938    * information).
2939    *
2940    * <p>Sample code:
2941    *
2942    * <pre>{@code
2943    * // This snippet has been automatically generated and should be regarded as a code template only.
2944    * // It will require modifications to work:
2945    * // - It may require correct/in-range values for request initialization.
2946    * // - It may require specifying regional endpoints when creating the service client as shown in
2947    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2948    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2949    *   String name =
2950    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
2951    *           .toString();
2952    *   String newTagTemplateFieldId = "newTagTemplateFieldId2008993953";
2953    *   TagTemplateField response =
2954    *       dataCatalogClient.renameTagTemplateField(name, newTagTemplateFieldId);
2955    * }
2956    * }</pre>
2957    *
2958    * @param name Required. The name of the tag template. Example:
2959    *     <ul>
2960    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
2961    *     </ul>
2962    *
2963    * @param newTagTemplateFieldId Required. The new ID of this tag template field. For example,
2964    *     `my_new_field`.
2965    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
2966    */
renameTagTemplateField(String name, String newTagTemplateFieldId)2967   public final TagTemplateField renameTagTemplateField(String name, String newTagTemplateFieldId) {
2968     RenameTagTemplateFieldRequest request =
2969         RenameTagTemplateFieldRequest.newBuilder()
2970             .setName(name)
2971             .setNewTagTemplateFieldId(newTagTemplateFieldId)
2972             .build();
2973     return renameTagTemplateField(request);
2974   }
2975 
2976   // AUTO-GENERATED DOCUMENTATION AND METHOD.
2977   /**
2978    * Renames a field in a tag template. The user should enable the Data Catalog API in the project
2979    * identified by the `name` parameter (see [Data Catalog Resource
2980    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
2981    * information).
2982    *
2983    * <p>Sample code:
2984    *
2985    * <pre>{@code
2986    * // This snippet has been automatically generated and should be regarded as a code template only.
2987    * // It will require modifications to work:
2988    * // - It may require correct/in-range values for request initialization.
2989    * // - It may require specifying regional endpoints when creating the service client as shown in
2990    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
2991    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
2992    *   RenameTagTemplateFieldRequest request =
2993    *       RenameTagTemplateFieldRequest.newBuilder()
2994    *           .setName(
2995    *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
2996    *                   .toString())
2997    *           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
2998    *           .build();
2999    *   TagTemplateField response = dataCatalogClient.renameTagTemplateField(request);
3000    * }
3001    * }</pre>
3002    *
3003    * @param request The request object containing all of the parameters for the API call.
3004    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3005    */
renameTagTemplateField(RenameTagTemplateFieldRequest request)3006   public final TagTemplateField renameTagTemplateField(RenameTagTemplateFieldRequest request) {
3007     return renameTagTemplateFieldCallable().call(request);
3008   }
3009 
3010   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3011   /**
3012    * Renames a field in a tag template. The user should enable the Data Catalog API in the project
3013    * identified by the `name` parameter (see [Data Catalog Resource
3014    * Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
3015    * information).
3016    *
3017    * <p>Sample code:
3018    *
3019    * <pre>{@code
3020    * // This snippet has been automatically generated and should be regarded as a code template only.
3021    * // It will require modifications to work:
3022    * // - It may require correct/in-range values for request initialization.
3023    * // - It may require specifying regional endpoints when creating the service client as shown in
3024    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3025    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3026    *   RenameTagTemplateFieldRequest request =
3027    *       RenameTagTemplateFieldRequest.newBuilder()
3028    *           .setName(
3029    *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
3030    *                   .toString())
3031    *           .setNewTagTemplateFieldId("newTagTemplateFieldId2008993953")
3032    *           .build();
3033    *   ApiFuture<TagTemplateField> future =
3034    *       dataCatalogClient.renameTagTemplateFieldCallable().futureCall(request);
3035    *   // Do something.
3036    *   TagTemplateField response = future.get();
3037    * }
3038    * }</pre>
3039    */
3040   public final UnaryCallable<RenameTagTemplateFieldRequest, TagTemplateField>
renameTagTemplateFieldCallable()3041       renameTagTemplateFieldCallable() {
3042     return stub.renameTagTemplateFieldCallable();
3043   }
3044 
3045   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3046   /**
3047    * Deletes a field in a tag template and all uses of that field. Users should enable the Data
3048    * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource
3049    * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
3050    * information).
3051    *
3052    * <p>Sample code:
3053    *
3054    * <pre>{@code
3055    * // This snippet has been automatically generated and should be regarded as a code template only.
3056    * // It will require modifications to work:
3057    * // - It may require correct/in-range values for request initialization.
3058    * // - It may require specifying regional endpoints when creating the service client as shown in
3059    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3060    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3061    *   TagTemplateFieldName name =
3062    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]");
3063    *   boolean force = true;
3064    *   dataCatalogClient.deleteTagTemplateField(name, force);
3065    * }
3066    * }</pre>
3067    *
3068    * @param name Required. The name of the tag template field to delete. Example:
3069    *     <ul>
3070    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
3071    *     </ul>
3072    *
3073    * @param force Required. Currently, this field must always be set to `true`. This confirms the
3074    *     deletion of this field from any tags using this field. `force = false` will be supported in
3075    *     the future.
3076    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3077    */
deleteTagTemplateField(TagTemplateFieldName name, boolean force)3078   public final void deleteTagTemplateField(TagTemplateFieldName name, boolean force) {
3079     DeleteTagTemplateFieldRequest request =
3080         DeleteTagTemplateFieldRequest.newBuilder()
3081             .setName(name == null ? null : name.toString())
3082             .setForce(force)
3083             .build();
3084     deleteTagTemplateField(request);
3085   }
3086 
3087   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3088   /**
3089    * Deletes a field in a tag template and all uses of that field. Users should enable the Data
3090    * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource
3091    * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
3092    * information).
3093    *
3094    * <p>Sample code:
3095    *
3096    * <pre>{@code
3097    * // This snippet has been automatically generated and should be regarded as a code template only.
3098    * // It will require modifications to work:
3099    * // - It may require correct/in-range values for request initialization.
3100    * // - It may require specifying regional endpoints when creating the service client as shown in
3101    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3102    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3103    *   String name =
3104    *       TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
3105    *           .toString();
3106    *   boolean force = true;
3107    *   dataCatalogClient.deleteTagTemplateField(name, force);
3108    * }
3109    * }</pre>
3110    *
3111    * @param name Required. The name of the tag template field to delete. Example:
3112    *     <ul>
3113    *       <li>projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id}
3114    *     </ul>
3115    *
3116    * @param force Required. Currently, this field must always be set to `true`. This confirms the
3117    *     deletion of this field from any tags using this field. `force = false` will be supported in
3118    *     the future.
3119    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3120    */
deleteTagTemplateField(String name, boolean force)3121   public final void deleteTagTemplateField(String name, boolean force) {
3122     DeleteTagTemplateFieldRequest request =
3123         DeleteTagTemplateFieldRequest.newBuilder().setName(name).setForce(force).build();
3124     deleteTagTemplateField(request);
3125   }
3126 
3127   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3128   /**
3129    * Deletes a field in a tag template and all uses of that field. Users should enable the Data
3130    * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource
3131    * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
3132    * information).
3133    *
3134    * <p>Sample code:
3135    *
3136    * <pre>{@code
3137    * // This snippet has been automatically generated and should be regarded as a code template only.
3138    * // It will require modifications to work:
3139    * // - It may require correct/in-range values for request initialization.
3140    * // - It may require specifying regional endpoints when creating the service client as shown in
3141    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3142    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3143    *   DeleteTagTemplateFieldRequest request =
3144    *       DeleteTagTemplateFieldRequest.newBuilder()
3145    *           .setName(
3146    *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
3147    *                   .toString())
3148    *           .setForce(true)
3149    *           .build();
3150    *   dataCatalogClient.deleteTagTemplateField(request);
3151    * }
3152    * }</pre>
3153    *
3154    * @param request The request object containing all of the parameters for the API call.
3155    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3156    */
deleteTagTemplateField(DeleteTagTemplateFieldRequest request)3157   public final void deleteTagTemplateField(DeleteTagTemplateFieldRequest request) {
3158     deleteTagTemplateFieldCallable().call(request);
3159   }
3160 
3161   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3162   /**
3163    * Deletes a field in a tag template and all uses of that field. Users should enable the Data
3164    * Catalog API in the project identified by the `name` parameter (see [Data Catalog Resource
3165    * Project] (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for more
3166    * information).
3167    *
3168    * <p>Sample code:
3169    *
3170    * <pre>{@code
3171    * // This snippet has been automatically generated and should be regarded as a code template only.
3172    * // It will require modifications to work:
3173    * // - It may require correct/in-range values for request initialization.
3174    * // - It may require specifying regional endpoints when creating the service client as shown in
3175    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3176    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3177    *   DeleteTagTemplateFieldRequest request =
3178    *       DeleteTagTemplateFieldRequest.newBuilder()
3179    *           .setName(
3180    *               TagTemplateFieldName.of("[PROJECT]", "[LOCATION]", "[TAG_TEMPLATE]", "[FIELD]")
3181    *                   .toString())
3182    *           .setForce(true)
3183    *           .build();
3184    *   ApiFuture<Empty> future =
3185    *       dataCatalogClient.deleteTagTemplateFieldCallable().futureCall(request);
3186    *   // Do something.
3187    *   future.get();
3188    * }
3189    * }</pre>
3190    */
3191   public final UnaryCallable<DeleteTagTemplateFieldRequest, Empty>
deleteTagTemplateFieldCallable()3192       deleteTagTemplateFieldCallable() {
3193     return stub.deleteTagTemplateFieldCallable();
3194   }
3195 
3196   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3197   /**
3198    * Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. Note: The project
3199    * identified by the `parent` parameter for the
3200    * [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters)
3201    * and the [tag
3202    * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters)
3203    * used to create the tag must be from the same organization.
3204    *
3205    * <p>Sample code:
3206    *
3207    * <pre>{@code
3208    * // This snippet has been automatically generated and should be regarded as a code template only.
3209    * // It will require modifications to work:
3210    * // - It may require correct/in-range values for request initialization.
3211    * // - It may require specifying regional endpoints when creating the service client as shown in
3212    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3213    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3214    *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3215    *   Tag tag = Tag.newBuilder().build();
3216    *   Tag response = dataCatalogClient.createTag(parent, tag);
3217    * }
3218    * }</pre>
3219    *
3220    * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to
3221    *     Entries. Example:
3222    *     <ul>
3223    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
3224    *     </ul>
3225    *     <p>Note that this Tag and its child resources may not actually be stored in the location in
3226    *     this name.
3227    * @param tag Required. The tag to create.
3228    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3229    */
createTag(EntryName parent, Tag tag)3230   public final Tag createTag(EntryName parent, Tag tag) {
3231     CreateTagRequest request =
3232         CreateTagRequest.newBuilder()
3233             .setParent(parent == null ? null : parent.toString())
3234             .setTag(tag)
3235             .build();
3236     return createTag(request);
3237   }
3238 
3239   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3240   /**
3241    * Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. Note: The project
3242    * identified by the `parent` parameter for the
3243    * [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters)
3244    * and the [tag
3245    * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters)
3246    * used to create the tag must be from the same organization.
3247    *
3248    * <p>Sample code:
3249    *
3250    * <pre>{@code
3251    * // This snippet has been automatically generated and should be regarded as a code template only.
3252    * // It will require modifications to work:
3253    * // - It may require correct/in-range values for request initialization.
3254    * // - It may require specifying regional endpoints when creating the service client as shown in
3255    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3256    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3257    *   String parent =
3258    *       EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
3259    *   Tag tag = Tag.newBuilder().build();
3260    *   Tag response = dataCatalogClient.createTag(parent, tag);
3261    * }
3262    * }</pre>
3263    *
3264    * @param parent Required. The name of the resource to attach this tag to. Tags can be attached to
3265    *     Entries. Example:
3266    *     <ul>
3267    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
3268    *     </ul>
3269    *     <p>Note that this Tag and its child resources may not actually be stored in the location in
3270    *     this name.
3271    * @param tag Required. The tag to create.
3272    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3273    */
createTag(String parent, Tag tag)3274   public final Tag createTag(String parent, Tag tag) {
3275     CreateTagRequest request = CreateTagRequest.newBuilder().setParent(parent).setTag(tag).build();
3276     return createTag(request);
3277   }
3278 
3279   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3280   /**
3281    * Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. Note: The project
3282    * identified by the `parent` parameter for the
3283    * [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters)
3284    * and the [tag
3285    * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters)
3286    * used to create the tag must be from the same organization.
3287    *
3288    * <p>Sample code:
3289    *
3290    * <pre>{@code
3291    * // This snippet has been automatically generated and should be regarded as a code template only.
3292    * // It will require modifications to work:
3293    * // - It may require correct/in-range values for request initialization.
3294    * // - It may require specifying regional endpoints when creating the service client as shown in
3295    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3296    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3297    *   CreateTagRequest request =
3298    *       CreateTagRequest.newBuilder()
3299    *           .setParent(
3300    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
3301    *           .setTag(Tag.newBuilder().build())
3302    *           .build();
3303    *   Tag response = dataCatalogClient.createTag(request);
3304    * }
3305    * }</pre>
3306    *
3307    * @param request The request object containing all of the parameters for the API call.
3308    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3309    */
createTag(CreateTagRequest request)3310   public final Tag createTag(CreateTagRequest request) {
3311     return createTagCallable().call(request);
3312   }
3313 
3314   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3315   /**
3316    * Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. Note: The project
3317    * identified by the `parent` parameter for the
3318    * [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters)
3319    * and the [tag
3320    * template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters)
3321    * used to create the tag must be from the same organization.
3322    *
3323    * <p>Sample code:
3324    *
3325    * <pre>{@code
3326    * // This snippet has been automatically generated and should be regarded as a code template only.
3327    * // It will require modifications to work:
3328    * // - It may require correct/in-range values for request initialization.
3329    * // - It may require specifying regional endpoints when creating the service client as shown in
3330    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3331    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3332    *   CreateTagRequest request =
3333    *       CreateTagRequest.newBuilder()
3334    *           .setParent(
3335    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
3336    *           .setTag(Tag.newBuilder().build())
3337    *           .build();
3338    *   ApiFuture<Tag> future = dataCatalogClient.createTagCallable().futureCall(request);
3339    *   // Do something.
3340    *   Tag response = future.get();
3341    * }
3342    * }</pre>
3343    */
createTagCallable()3344   public final UnaryCallable<CreateTagRequest, Tag> createTagCallable() {
3345     return stub.createTagCallable();
3346   }
3347 
3348   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3349   /**
3350    * Updates an existing tag.
3351    *
3352    * <p>Sample code:
3353    *
3354    * <pre>{@code
3355    * // This snippet has been automatically generated and should be regarded as a code template only.
3356    * // It will require modifications to work:
3357    * // - It may require correct/in-range values for request initialization.
3358    * // - It may require specifying regional endpoints when creating the service client as shown in
3359    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3360    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3361    *   Tag tag = Tag.newBuilder().build();
3362    *   Tag response = dataCatalogClient.updateTag(tag);
3363    * }
3364    * }</pre>
3365    *
3366    * @param tag Required. The updated tag. The "name" field must be set.
3367    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3368    */
updateTag(Tag tag)3369   public final Tag updateTag(Tag tag) {
3370     UpdateTagRequest request = UpdateTagRequest.newBuilder().setTag(tag).build();
3371     return updateTag(request);
3372   }
3373 
3374   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3375   /**
3376    * Updates an existing tag.
3377    *
3378    * <p>Sample code:
3379    *
3380    * <pre>{@code
3381    * // This snippet has been automatically generated and should be regarded as a code template only.
3382    * // It will require modifications to work:
3383    * // - It may require correct/in-range values for request initialization.
3384    * // - It may require specifying regional endpoints when creating the service client as shown in
3385    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3386    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3387    *   Tag tag = Tag.newBuilder().build();
3388    *   FieldMask updateMask = FieldMask.newBuilder().build();
3389    *   Tag response = dataCatalogClient.updateTag(tag, updateMask);
3390    * }
3391    * }</pre>
3392    *
3393    * @param tag Required. The updated tag. The "name" field must be set.
3394    * @param updateMask The fields to update on the Tag. If absent or empty, all modifiable fields
3395    *     are updated. Currently the only modifiable field is the field `fields`.
3396    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3397    */
updateTag(Tag tag, FieldMask updateMask)3398   public final Tag updateTag(Tag tag, FieldMask updateMask) {
3399     UpdateTagRequest request =
3400         UpdateTagRequest.newBuilder().setTag(tag).setUpdateMask(updateMask).build();
3401     return updateTag(request);
3402   }
3403 
3404   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3405   /**
3406    * Updates an existing tag.
3407    *
3408    * <p>Sample code:
3409    *
3410    * <pre>{@code
3411    * // This snippet has been automatically generated and should be regarded as a code template only.
3412    * // It will require modifications to work:
3413    * // - It may require correct/in-range values for request initialization.
3414    * // - It may require specifying regional endpoints when creating the service client as shown in
3415    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3416    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3417    *   UpdateTagRequest request =
3418    *       UpdateTagRequest.newBuilder()
3419    *           .setTag(Tag.newBuilder().build())
3420    *           .setUpdateMask(FieldMask.newBuilder().build())
3421    *           .build();
3422    *   Tag response = dataCatalogClient.updateTag(request);
3423    * }
3424    * }</pre>
3425    *
3426    * @param request The request object containing all of the parameters for the API call.
3427    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3428    */
updateTag(UpdateTagRequest request)3429   public final Tag updateTag(UpdateTagRequest request) {
3430     return updateTagCallable().call(request);
3431   }
3432 
3433   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3434   /**
3435    * Updates an existing tag.
3436    *
3437    * <p>Sample code:
3438    *
3439    * <pre>{@code
3440    * // This snippet has been automatically generated and should be regarded as a code template only.
3441    * // It will require modifications to work:
3442    * // - It may require correct/in-range values for request initialization.
3443    * // - It may require specifying regional endpoints when creating the service client as shown in
3444    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3445    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3446    *   UpdateTagRequest request =
3447    *       UpdateTagRequest.newBuilder()
3448    *           .setTag(Tag.newBuilder().build())
3449    *           .setUpdateMask(FieldMask.newBuilder().build())
3450    *           .build();
3451    *   ApiFuture<Tag> future = dataCatalogClient.updateTagCallable().futureCall(request);
3452    *   // Do something.
3453    *   Tag response = future.get();
3454    * }
3455    * }</pre>
3456    */
updateTagCallable()3457   public final UnaryCallable<UpdateTagRequest, Tag> updateTagCallable() {
3458     return stub.updateTagCallable();
3459   }
3460 
3461   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3462   /**
3463    * Deletes a tag.
3464    *
3465    * <p>Sample code:
3466    *
3467    * <pre>{@code
3468    * // This snippet has been automatically generated and should be regarded as a code template only.
3469    * // It will require modifications to work:
3470    * // - It may require correct/in-range values for request initialization.
3471    * // - It may require specifying regional endpoints when creating the service client as shown in
3472    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3473    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3474    *   EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3475    *   dataCatalogClient.deleteTag(name);
3476    * }
3477    * }</pre>
3478    *
3479    * @param name Required. The name of the tag to delete. Example:
3480    *     <ul>
3481    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
3482    *     </ul>
3483    *
3484    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3485    */
deleteTag(EntryName name)3486   public final void deleteTag(EntryName name) {
3487     DeleteTagRequest request =
3488         DeleteTagRequest.newBuilder().setName(name == null ? null : name.toString()).build();
3489     deleteTag(request);
3490   }
3491 
3492   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3493   /**
3494    * Deletes a tag.
3495    *
3496    * <p>Sample code:
3497    *
3498    * <pre>{@code
3499    * // This snippet has been automatically generated and should be regarded as a code template only.
3500    * // It will require modifications to work:
3501    * // - It may require correct/in-range values for request initialization.
3502    * // - It may require specifying regional endpoints when creating the service client as shown in
3503    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3504    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3505    *   String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
3506    *   dataCatalogClient.deleteTag(name);
3507    * }
3508    * }</pre>
3509    *
3510    * @param name Required. The name of the tag to delete. Example:
3511    *     <ul>
3512    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
3513    *     </ul>
3514    *
3515    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3516    */
deleteTag(String name)3517   public final void deleteTag(String name) {
3518     DeleteTagRequest request = DeleteTagRequest.newBuilder().setName(name).build();
3519     deleteTag(request);
3520   }
3521 
3522   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3523   /**
3524    * Deletes a tag.
3525    *
3526    * <p>Sample code:
3527    *
3528    * <pre>{@code
3529    * // This snippet has been automatically generated and should be regarded as a code template only.
3530    * // It will require modifications to work:
3531    * // - It may require correct/in-range values for request initialization.
3532    * // - It may require specifying regional endpoints when creating the service client as shown in
3533    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3534    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3535    *   DeleteTagRequest request =
3536    *       DeleteTagRequest.newBuilder()
3537    *           .setName(
3538    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
3539    *           .build();
3540    *   dataCatalogClient.deleteTag(request);
3541    * }
3542    * }</pre>
3543    *
3544    * @param request The request object containing all of the parameters for the API call.
3545    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3546    */
deleteTag(DeleteTagRequest request)3547   public final void deleteTag(DeleteTagRequest request) {
3548     deleteTagCallable().call(request);
3549   }
3550 
3551   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3552   /**
3553    * Deletes a tag.
3554    *
3555    * <p>Sample code:
3556    *
3557    * <pre>{@code
3558    * // This snippet has been automatically generated and should be regarded as a code template only.
3559    * // It will require modifications to work:
3560    * // - It may require correct/in-range values for request initialization.
3561    * // - It may require specifying regional endpoints when creating the service client as shown in
3562    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3563    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3564    *   DeleteTagRequest request =
3565    *       DeleteTagRequest.newBuilder()
3566    *           .setName(
3567    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
3568    *           .build();
3569    *   ApiFuture<Empty> future = dataCatalogClient.deleteTagCallable().futureCall(request);
3570    *   // Do something.
3571    *   future.get();
3572    * }
3573    * }</pre>
3574    */
deleteTagCallable()3575   public final UnaryCallable<DeleteTagRequest, Empty> deleteTagCallable() {
3576     return stub.deleteTagCallable();
3577   }
3578 
3579   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3580   /**
3581    * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry].
3582    *
3583    * <p>Sample code:
3584    *
3585    * <pre>{@code
3586    * // This snippet has been automatically generated and should be regarded as a code template only.
3587    * // It will require modifications to work:
3588    * // - It may require correct/in-range values for request initialization.
3589    * // - It may require specifying regional endpoints when creating the service client as shown in
3590    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3591    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3592    *   EntryName parent = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3593    *   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
3594    *     // doThingsWith(element);
3595    *   }
3596    * }
3597    * }</pre>
3598    *
3599    * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource
3600    *     could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an
3601    *     [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup].
3602    *     <p>Examples:
3603    *     <ul>
3604    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
3605    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
3606    *     </ul>
3607    *
3608    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3609    */
listTags(EntryName parent)3610   public final ListTagsPagedResponse listTags(EntryName parent) {
3611     ListTagsRequest request =
3612         ListTagsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build();
3613     return listTags(request);
3614   }
3615 
3616   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3617   /**
3618    * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry].
3619    *
3620    * <p>Sample code:
3621    *
3622    * <pre>{@code
3623    * // This snippet has been automatically generated and should be regarded as a code template only.
3624    * // It will require modifications to work:
3625    * // - It may require correct/in-range values for request initialization.
3626    * // - It may require specifying regional endpoints when creating the service client as shown in
3627    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3628    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3629    *   String parent =
3630    *       EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
3631    *   for (Tag element : dataCatalogClient.listTags(parent).iterateAll()) {
3632    *     // doThingsWith(element);
3633    *   }
3634    * }
3635    * }</pre>
3636    *
3637    * @param parent Required. The name of the Data Catalog resource to list the tags of. The resource
3638    *     could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an
3639    *     [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup].
3640    *     <p>Examples:
3641    *     <ul>
3642    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}
3643    *       <li>projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}
3644    *     </ul>
3645    *
3646    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3647    */
listTags(String parent)3648   public final ListTagsPagedResponse listTags(String parent) {
3649     ListTagsRequest request = ListTagsRequest.newBuilder().setParent(parent).build();
3650     return listTags(request);
3651   }
3652 
3653   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3654   /**
3655    * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry].
3656    *
3657    * <p>Sample code:
3658    *
3659    * <pre>{@code
3660    * // This snippet has been automatically generated and should be regarded as a code template only.
3661    * // It will require modifications to work:
3662    * // - It may require correct/in-range values for request initialization.
3663    * // - It may require specifying regional endpoints when creating the service client as shown in
3664    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3665    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3666    *   ListTagsRequest request =
3667    *       ListTagsRequest.newBuilder()
3668    *           .setParent(
3669    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
3670    *           .setPageSize(883849137)
3671    *           .setPageToken("pageToken873572522")
3672    *           .build();
3673    *   for (Tag element : dataCatalogClient.listTags(request).iterateAll()) {
3674    *     // doThingsWith(element);
3675    *   }
3676    * }
3677    * }</pre>
3678    *
3679    * @param request The request object containing all of the parameters for the API call.
3680    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3681    */
listTags(ListTagsRequest request)3682   public final ListTagsPagedResponse listTags(ListTagsRequest request) {
3683     return listTagsPagedCallable().call(request);
3684   }
3685 
3686   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3687   /**
3688    * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry].
3689    *
3690    * <p>Sample code:
3691    *
3692    * <pre>{@code
3693    * // This snippet has been automatically generated and should be regarded as a code template only.
3694    * // It will require modifications to work:
3695    * // - It may require correct/in-range values for request initialization.
3696    * // - It may require specifying regional endpoints when creating the service client as shown in
3697    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3698    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3699    *   ListTagsRequest request =
3700    *       ListTagsRequest.newBuilder()
3701    *           .setParent(
3702    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
3703    *           .setPageSize(883849137)
3704    *           .setPageToken("pageToken873572522")
3705    *           .build();
3706    *   ApiFuture<Tag> future = dataCatalogClient.listTagsPagedCallable().futureCall(request);
3707    *   // Do something.
3708    *   for (Tag element : future.get().iterateAll()) {
3709    *     // doThingsWith(element);
3710    *   }
3711    * }
3712    * }</pre>
3713    */
listTagsPagedCallable()3714   public final UnaryCallable<ListTagsRequest, ListTagsPagedResponse> listTagsPagedCallable() {
3715     return stub.listTagsPagedCallable();
3716   }
3717 
3718   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3719   /**
3720    * Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry].
3721    *
3722    * <p>Sample code:
3723    *
3724    * <pre>{@code
3725    * // This snippet has been automatically generated and should be regarded as a code template only.
3726    * // It will require modifications to work:
3727    * // - It may require correct/in-range values for request initialization.
3728    * // - It may require specifying regional endpoints when creating the service client as shown in
3729    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3730    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3731    *   ListTagsRequest request =
3732    *       ListTagsRequest.newBuilder()
3733    *           .setParent(
3734    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
3735    *           .setPageSize(883849137)
3736    *           .setPageToken("pageToken873572522")
3737    *           .build();
3738    *   while (true) {
3739    *     ListTagsResponse response = dataCatalogClient.listTagsCallable().call(request);
3740    *     for (Tag element : response.getTagsList()) {
3741    *       // doThingsWith(element);
3742    *     }
3743    *     String nextPageToken = response.getNextPageToken();
3744    *     if (!Strings.isNullOrEmpty(nextPageToken)) {
3745    *       request = request.toBuilder().setPageToken(nextPageToken).build();
3746    *     } else {
3747    *       break;
3748    *     }
3749    *   }
3750    * }
3751    * }</pre>
3752    */
listTagsCallable()3753   public final UnaryCallable<ListTagsRequest, ListTagsResponse> listTagsCallable() {
3754     return stub.listTagsCallable();
3755   }
3756 
3757   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3758   /**
3759    * Sets the access control policy for a resource. Replaces any existing policy. Supported
3760    * resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
3761    * manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
3762    * to Data Catalog.
3763    *
3764    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
3765    * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
3766    * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
3767    *
3768    * <p>Sample code:
3769    *
3770    * <pre>{@code
3771    * // This snippet has been automatically generated and should be regarded as a code template only.
3772    * // It will require modifications to work:
3773    * // - It may require correct/in-range values for request initialization.
3774    * // - It may require specifying regional endpoints when creating the service client as shown in
3775    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3776    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3777    *   ResourceName resource = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
3778    *   Policy policy = Policy.newBuilder().build();
3779    *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
3780    * }
3781    * }</pre>
3782    *
3783    * @param resource REQUIRED: The resource for which the policy is being specified. See the
3784    *     operation documentation for the appropriate value for this field.
3785    * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
3786    *     policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
3787    *     Platform services (such as Projects) might reject them.
3788    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3789    */
setIamPolicy(ResourceName resource, Policy policy)3790   public final Policy setIamPolicy(ResourceName resource, Policy policy) {
3791     SetIamPolicyRequest request =
3792         SetIamPolicyRequest.newBuilder()
3793             .setResource(resource == null ? null : resource.toString())
3794             .setPolicy(policy)
3795             .build();
3796     return setIamPolicy(request);
3797   }
3798 
3799   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3800   /**
3801    * Sets the access control policy for a resource. Replaces any existing policy. Supported
3802    * resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
3803    * manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
3804    * to Data Catalog.
3805    *
3806    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
3807    * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
3808    * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
3809    *
3810    * <p>Sample code:
3811    *
3812    * <pre>{@code
3813    * // This snippet has been automatically generated and should be regarded as a code template only.
3814    * // It will require modifications to work:
3815    * // - It may require correct/in-range values for request initialization.
3816    * // - It may require specifying regional endpoints when creating the service client as shown in
3817    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3818    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3819    *   String resource =
3820    *       EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
3821    *   Policy policy = Policy.newBuilder().build();
3822    *   Policy response = dataCatalogClient.setIamPolicy(resource, policy);
3823    * }
3824    * }</pre>
3825    *
3826    * @param resource REQUIRED: The resource for which the policy is being specified. See the
3827    *     operation documentation for the appropriate value for this field.
3828    * @param policy REQUIRED: The complete policy to be applied to the `resource`. The size of the
3829    *     policy is limited to a few 10s of KB. An empty policy is a valid policy but certain Cloud
3830    *     Platform services (such as Projects) might reject them.
3831    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3832    */
setIamPolicy(String resource, Policy policy)3833   public final Policy setIamPolicy(String resource, Policy policy) {
3834     SetIamPolicyRequest request =
3835         SetIamPolicyRequest.newBuilder().setResource(resource).setPolicy(policy).build();
3836     return setIamPolicy(request);
3837   }
3838 
3839   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3840   /**
3841    * Sets the access control policy for a resource. Replaces any existing policy. Supported
3842    * resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
3843    * manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
3844    * to Data Catalog.
3845    *
3846    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
3847    * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
3848    * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
3849    *
3850    * <p>Sample code:
3851    *
3852    * <pre>{@code
3853    * // This snippet has been automatically generated and should be regarded as a code template only.
3854    * // It will require modifications to work:
3855    * // - It may require correct/in-range values for request initialization.
3856    * // - It may require specifying regional endpoints when creating the service client as shown in
3857    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3858    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3859    *   SetIamPolicyRequest request =
3860    *       SetIamPolicyRequest.newBuilder()
3861    *           .setResource(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
3862    *           .setPolicy(Policy.newBuilder().build())
3863    *           .setUpdateMask(FieldMask.newBuilder().build())
3864    *           .build();
3865    *   Policy response = dataCatalogClient.setIamPolicy(request);
3866    * }
3867    * }</pre>
3868    *
3869    * @param request The request object containing all of the parameters for the API call.
3870    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3871    */
setIamPolicy(SetIamPolicyRequest request)3872   public final Policy setIamPolicy(SetIamPolicyRequest request) {
3873     return setIamPolicyCallable().call(request);
3874   }
3875 
3876   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3877   /**
3878    * Sets the access control policy for a resource. Replaces any existing policy. Supported
3879    * resources are: - Tag templates. - Entries. - Entry groups. Note, this method cannot be used to
3880    * manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform resources synced
3881    * to Data Catalog.
3882    *
3883    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.setIamPolicy`
3884    * to set policies on tag templates. - `datacatalog.entries.setIamPolicy` to set policies on
3885    * entries. - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups.
3886    *
3887    * <p>Sample code:
3888    *
3889    * <pre>{@code
3890    * // This snippet has been automatically generated and should be regarded as a code template only.
3891    * // It will require modifications to work:
3892    * // - It may require correct/in-range values for request initialization.
3893    * // - It may require specifying regional endpoints when creating the service client as shown in
3894    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3895    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3896    *   SetIamPolicyRequest request =
3897    *       SetIamPolicyRequest.newBuilder()
3898    *           .setResource(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
3899    *           .setPolicy(Policy.newBuilder().build())
3900    *           .setUpdateMask(FieldMask.newBuilder().build())
3901    *           .build();
3902    *   ApiFuture<Policy> future = dataCatalogClient.setIamPolicyCallable().futureCall(request);
3903    *   // Do something.
3904    *   Policy response = future.get();
3905    * }
3906    * }</pre>
3907    */
setIamPolicyCallable()3908   public final UnaryCallable<SetIamPolicyRequest, Policy> setIamPolicyCallable() {
3909     return stub.setIamPolicyCallable();
3910   }
3911 
3912   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3913   /**
3914    * Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
3915    * does not exist. An empty policy is returned if the resource exists but does not have a policy
3916    * set on it.
3917    *
3918    * <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
3919    * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
3920    * resources synced to Data Catalog.
3921    *
3922    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
3923    * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
3924    * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
3925    *
3926    * <p>Sample code:
3927    *
3928    * <pre>{@code
3929    * // This snippet has been automatically generated and should be regarded as a code template only.
3930    * // It will require modifications to work:
3931    * // - It may require correct/in-range values for request initialization.
3932    * // - It may require specifying regional endpoints when creating the service client as shown in
3933    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3934    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3935    *   ResourceName resource = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
3936    *   Policy response = dataCatalogClient.getIamPolicy(resource);
3937    * }
3938    * }</pre>
3939    *
3940    * @param resource REQUIRED: The resource for which the policy is being requested. See the
3941    *     operation documentation for the appropriate value for this field.
3942    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3943    */
getIamPolicy(ResourceName resource)3944   public final Policy getIamPolicy(ResourceName resource) {
3945     GetIamPolicyRequest request =
3946         GetIamPolicyRequest.newBuilder()
3947             .setResource(resource == null ? null : resource.toString())
3948             .build();
3949     return getIamPolicy(request);
3950   }
3951 
3952   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3953   /**
3954    * Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
3955    * does not exist. An empty policy is returned if the resource exists but does not have a policy
3956    * set on it.
3957    *
3958    * <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
3959    * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
3960    * resources synced to Data Catalog.
3961    *
3962    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
3963    * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
3964    * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
3965    *
3966    * <p>Sample code:
3967    *
3968    * <pre>{@code
3969    * // This snippet has been automatically generated and should be regarded as a code template only.
3970    * // It will require modifications to work:
3971    * // - It may require correct/in-range values for request initialization.
3972    * // - It may require specifying regional endpoints when creating the service client as shown in
3973    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
3974    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
3975    *   String resource =
3976    *       EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
3977    *   Policy response = dataCatalogClient.getIamPolicy(resource);
3978    * }
3979    * }</pre>
3980    *
3981    * @param resource REQUIRED: The resource for which the policy is being requested. See the
3982    *     operation documentation for the appropriate value for this field.
3983    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
3984    */
getIamPolicy(String resource)3985   public final Policy getIamPolicy(String resource) {
3986     GetIamPolicyRequest request = GetIamPolicyRequest.newBuilder().setResource(resource).build();
3987     return getIamPolicy(request);
3988   }
3989 
3990   // AUTO-GENERATED DOCUMENTATION AND METHOD.
3991   /**
3992    * Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
3993    * does not exist. An empty policy is returned if the resource exists but does not have a policy
3994    * set on it.
3995    *
3996    * <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
3997    * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
3998    * resources synced to Data Catalog.
3999    *
4000    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
4001    * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
4002    * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
4003    *
4004    * <p>Sample code:
4005    *
4006    * <pre>{@code
4007    * // This snippet has been automatically generated and should be regarded as a code template only.
4008    * // It will require modifications to work:
4009    * // - It may require correct/in-range values for request initialization.
4010    * // - It may require specifying regional endpoints when creating the service client as shown in
4011    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4012    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
4013    *   GetIamPolicyRequest request =
4014    *       GetIamPolicyRequest.newBuilder()
4015    *           .setResource(
4016    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
4017    *           .setOptions(GetPolicyOptions.newBuilder().build())
4018    *           .build();
4019    *   Policy response = dataCatalogClient.getIamPolicy(request);
4020    * }
4021    * }</pre>
4022    *
4023    * @param request The request object containing all of the parameters for the API call.
4024    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4025    */
getIamPolicy(GetIamPolicyRequest request)4026   public final Policy getIamPolicy(GetIamPolicyRequest request) {
4027     return getIamPolicyCallable().call(request);
4028   }
4029 
4030   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4031   /**
4032    * Gets the access control policy for a resource. A `NOT_FOUND` error is returned if the resource
4033    * does not exist. An empty policy is returned if the resource exists but does not have a policy
4034    * set on it.
4035    *
4036    * <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
4037    * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
4038    * resources synced to Data Catalog.
4039    *
4040    * <p>Callers must have following Google IAM permission - `datacatalog.tagTemplates.getIamPolicy`
4041    * to get policies on tag templates. - `datacatalog.entries.getIamPolicy` to get policies on
4042    * entries. - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups.
4043    *
4044    * <p>Sample code:
4045    *
4046    * <pre>{@code
4047    * // This snippet has been automatically generated and should be regarded as a code template only.
4048    * // It will require modifications to work:
4049    * // - It may require correct/in-range values for request initialization.
4050    * // - It may require specifying regional endpoints when creating the service client as shown in
4051    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4052    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
4053    *   GetIamPolicyRequest request =
4054    *       GetIamPolicyRequest.newBuilder()
4055    *           .setResource(
4056    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
4057    *           .setOptions(GetPolicyOptions.newBuilder().build())
4058    *           .build();
4059    *   ApiFuture<Policy> future = dataCatalogClient.getIamPolicyCallable().futureCall(request);
4060    *   // Do something.
4061    *   Policy response = future.get();
4062    * }
4063    * }</pre>
4064    */
getIamPolicyCallable()4065   public final UnaryCallable<GetIamPolicyRequest, Policy> getIamPolicyCallable() {
4066     return stub.getIamPolicyCallable();
4067   }
4068 
4069   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4070   /**
4071    * Returns the caller's permissions on a resource. If the resource does not exist, an empty set of
4072    * permissions is returned (We don't return a `NOT_FOUND` error).
4073    *
4074    * <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
4075    * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
4076    * resources synced to Data Catalog.
4077    *
4078    * <p>A caller is not required to have Google IAM permission to make this request.
4079    *
4080    * <p>Sample code:
4081    *
4082    * <pre>{@code
4083    * // This snippet has been automatically generated and should be regarded as a code template only.
4084    * // It will require modifications to work:
4085    * // - It may require correct/in-range values for request initialization.
4086    * // - It may require specifying regional endpoints when creating the service client as shown in
4087    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4088    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
4089    *   TestIamPermissionsRequest request =
4090    *       TestIamPermissionsRequest.newBuilder()
4091    *           .setResource(
4092    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
4093    *           .addAllPermissions(new ArrayList<String>())
4094    *           .build();
4095    *   TestIamPermissionsResponse response = dataCatalogClient.testIamPermissions(request);
4096    * }
4097    * }</pre>
4098    *
4099    * @param request The request object containing all of the parameters for the API call.
4100    * @throws com.google.api.gax.rpc.ApiException if the remote call fails
4101    */
testIamPermissions(TestIamPermissionsRequest request)4102   public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request) {
4103     return testIamPermissionsCallable().call(request);
4104   }
4105 
4106   // AUTO-GENERATED DOCUMENTATION AND METHOD.
4107   /**
4108    * Returns the caller's permissions on a resource. If the resource does not exist, an empty set of
4109    * permissions is returned (We don't return a `NOT_FOUND` error).
4110    *
4111    * <p>Supported resources are: - Tag templates. - Entries. - Entry groups. Note, this method
4112    * cannot be used to manage policies for BigQuery, Pub/Sub and any external Google Cloud Platform
4113    * resources synced to Data Catalog.
4114    *
4115    * <p>A caller is not required to have Google IAM permission to make this request.
4116    *
4117    * <p>Sample code:
4118    *
4119    * <pre>{@code
4120    * // This snippet has been automatically generated and should be regarded as a code template only.
4121    * // It will require modifications to work:
4122    * // - It may require correct/in-range values for request initialization.
4123    * // - It may require specifying regional endpoints when creating the service client as shown in
4124    * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
4125    * try (DataCatalogClient dataCatalogClient = DataCatalogClient.create()) {
4126    *   TestIamPermissionsRequest request =
4127    *       TestIamPermissionsRequest.newBuilder()
4128    *           .setResource(
4129    *               EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
4130    *           .addAllPermissions(new ArrayList<String>())
4131    *           .build();
4132    *   ApiFuture<TestIamPermissionsResponse> future =
4133    *       dataCatalogClient.testIamPermissionsCallable().futureCall(request);
4134    *   // Do something.
4135    *   TestIamPermissionsResponse response = future.get();
4136    * }
4137    * }</pre>
4138    */
4139   public final UnaryCallable<TestIamPermissionsRequest, TestIamPermissionsResponse>
testIamPermissionsCallable()4140       testIamPermissionsCallable() {
4141     return stub.testIamPermissionsCallable();
4142   }
4143 
4144   @Override
close()4145   public final void close() {
4146     stub.close();
4147   }
4148 
4149   @Override
shutdown()4150   public void shutdown() {
4151     stub.shutdown();
4152   }
4153 
4154   @Override
isShutdown()4155   public boolean isShutdown() {
4156     return stub.isShutdown();
4157   }
4158 
4159   @Override
isTerminated()4160   public boolean isTerminated() {
4161     return stub.isTerminated();
4162   }
4163 
4164   @Override
shutdownNow()4165   public void shutdownNow() {
4166     stub.shutdownNow();
4167   }
4168 
4169   @Override
awaitTermination(long duration, TimeUnit unit)4170   public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException {
4171     return stub.awaitTermination(duration, unit);
4172   }
4173 
4174   public static class SearchCatalogPagedResponse
4175       extends AbstractPagedListResponse<
4176           SearchCatalogRequest,
4177           SearchCatalogResponse,
4178           SearchCatalogResult,
4179           SearchCatalogPage,
4180           SearchCatalogFixedSizeCollection> {
4181 
createAsync( PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context, ApiFuture<SearchCatalogResponse> futureResponse)4182     public static ApiFuture<SearchCatalogPagedResponse> createAsync(
4183         PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context,
4184         ApiFuture<SearchCatalogResponse> futureResponse) {
4185       ApiFuture<SearchCatalogPage> futurePage =
4186           SearchCatalogPage.createEmptyPage().createPageAsync(context, futureResponse);
4187       return ApiFutures.transform(
4188           futurePage,
4189           input -> new SearchCatalogPagedResponse(input),
4190           MoreExecutors.directExecutor());
4191     }
4192 
SearchCatalogPagedResponse(SearchCatalogPage page)4193     private SearchCatalogPagedResponse(SearchCatalogPage page) {
4194       super(page, SearchCatalogFixedSizeCollection.createEmptyCollection());
4195     }
4196   }
4197 
4198   public static class SearchCatalogPage
4199       extends AbstractPage<
4200           SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult, SearchCatalogPage> {
4201 
SearchCatalogPage( PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context, SearchCatalogResponse response)4202     private SearchCatalogPage(
4203         PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context,
4204         SearchCatalogResponse response) {
4205       super(context, response);
4206     }
4207 
createEmptyPage()4208     private static SearchCatalogPage createEmptyPage() {
4209       return new SearchCatalogPage(null, null);
4210     }
4211 
4212     @Override
createPage( PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context, SearchCatalogResponse response)4213     protected SearchCatalogPage createPage(
4214         PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context,
4215         SearchCatalogResponse response) {
4216       return new SearchCatalogPage(context, response);
4217     }
4218 
4219     @Override
createPageAsync( PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context, ApiFuture<SearchCatalogResponse> futureResponse)4220     public ApiFuture<SearchCatalogPage> createPageAsync(
4221         PageContext<SearchCatalogRequest, SearchCatalogResponse, SearchCatalogResult> context,
4222         ApiFuture<SearchCatalogResponse> futureResponse) {
4223       return super.createPageAsync(context, futureResponse);
4224     }
4225   }
4226 
4227   public static class SearchCatalogFixedSizeCollection
4228       extends AbstractFixedSizeCollection<
4229           SearchCatalogRequest,
4230           SearchCatalogResponse,
4231           SearchCatalogResult,
4232           SearchCatalogPage,
4233           SearchCatalogFixedSizeCollection> {
4234 
SearchCatalogFixedSizeCollection(List<SearchCatalogPage> pages, int collectionSize)4235     private SearchCatalogFixedSizeCollection(List<SearchCatalogPage> pages, int collectionSize) {
4236       super(pages, collectionSize);
4237     }
4238 
createEmptyCollection()4239     private static SearchCatalogFixedSizeCollection createEmptyCollection() {
4240       return new SearchCatalogFixedSizeCollection(null, 0);
4241     }
4242 
4243     @Override
createCollection( List<SearchCatalogPage> pages, int collectionSize)4244     protected SearchCatalogFixedSizeCollection createCollection(
4245         List<SearchCatalogPage> pages, int collectionSize) {
4246       return new SearchCatalogFixedSizeCollection(pages, collectionSize);
4247     }
4248   }
4249 
4250   public static class ListEntryGroupsPagedResponse
4251       extends AbstractPagedListResponse<
4252           ListEntryGroupsRequest,
4253           ListEntryGroupsResponse,
4254           EntryGroup,
4255           ListEntryGroupsPage,
4256           ListEntryGroupsFixedSizeCollection> {
4257 
createAsync( PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context, ApiFuture<ListEntryGroupsResponse> futureResponse)4258     public static ApiFuture<ListEntryGroupsPagedResponse> createAsync(
4259         PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context,
4260         ApiFuture<ListEntryGroupsResponse> futureResponse) {
4261       ApiFuture<ListEntryGroupsPage> futurePage =
4262           ListEntryGroupsPage.createEmptyPage().createPageAsync(context, futureResponse);
4263       return ApiFutures.transform(
4264           futurePage,
4265           input -> new ListEntryGroupsPagedResponse(input),
4266           MoreExecutors.directExecutor());
4267     }
4268 
ListEntryGroupsPagedResponse(ListEntryGroupsPage page)4269     private ListEntryGroupsPagedResponse(ListEntryGroupsPage page) {
4270       super(page, ListEntryGroupsFixedSizeCollection.createEmptyCollection());
4271     }
4272   }
4273 
4274   public static class ListEntryGroupsPage
4275       extends AbstractPage<
4276           ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup, ListEntryGroupsPage> {
4277 
ListEntryGroupsPage( PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context, ListEntryGroupsResponse response)4278     private ListEntryGroupsPage(
4279         PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context,
4280         ListEntryGroupsResponse response) {
4281       super(context, response);
4282     }
4283 
createEmptyPage()4284     private static ListEntryGroupsPage createEmptyPage() {
4285       return new ListEntryGroupsPage(null, null);
4286     }
4287 
4288     @Override
createPage( PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context, ListEntryGroupsResponse response)4289     protected ListEntryGroupsPage createPage(
4290         PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context,
4291         ListEntryGroupsResponse response) {
4292       return new ListEntryGroupsPage(context, response);
4293     }
4294 
4295     @Override
createPageAsync( PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context, ApiFuture<ListEntryGroupsResponse> futureResponse)4296     public ApiFuture<ListEntryGroupsPage> createPageAsync(
4297         PageContext<ListEntryGroupsRequest, ListEntryGroupsResponse, EntryGroup> context,
4298         ApiFuture<ListEntryGroupsResponse> futureResponse) {
4299       return super.createPageAsync(context, futureResponse);
4300     }
4301   }
4302 
4303   public static class ListEntryGroupsFixedSizeCollection
4304       extends AbstractFixedSizeCollection<
4305           ListEntryGroupsRequest,
4306           ListEntryGroupsResponse,
4307           EntryGroup,
4308           ListEntryGroupsPage,
4309           ListEntryGroupsFixedSizeCollection> {
4310 
ListEntryGroupsFixedSizeCollection( List<ListEntryGroupsPage> pages, int collectionSize)4311     private ListEntryGroupsFixedSizeCollection(
4312         List<ListEntryGroupsPage> pages, int collectionSize) {
4313       super(pages, collectionSize);
4314     }
4315 
createEmptyCollection()4316     private static ListEntryGroupsFixedSizeCollection createEmptyCollection() {
4317       return new ListEntryGroupsFixedSizeCollection(null, 0);
4318     }
4319 
4320     @Override
createCollection( List<ListEntryGroupsPage> pages, int collectionSize)4321     protected ListEntryGroupsFixedSizeCollection createCollection(
4322         List<ListEntryGroupsPage> pages, int collectionSize) {
4323       return new ListEntryGroupsFixedSizeCollection(pages, collectionSize);
4324     }
4325   }
4326 
4327   public static class ListEntriesPagedResponse
4328       extends AbstractPagedListResponse<
4329           ListEntriesRequest,
4330           ListEntriesResponse,
4331           Entry,
4332           ListEntriesPage,
4333           ListEntriesFixedSizeCollection> {
4334 
createAsync( PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context, ApiFuture<ListEntriesResponse> futureResponse)4335     public static ApiFuture<ListEntriesPagedResponse> createAsync(
4336         PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context,
4337         ApiFuture<ListEntriesResponse> futureResponse) {
4338       ApiFuture<ListEntriesPage> futurePage =
4339           ListEntriesPage.createEmptyPage().createPageAsync(context, futureResponse);
4340       return ApiFutures.transform(
4341           futurePage, input -> new ListEntriesPagedResponse(input), MoreExecutors.directExecutor());
4342     }
4343 
ListEntriesPagedResponse(ListEntriesPage page)4344     private ListEntriesPagedResponse(ListEntriesPage page) {
4345       super(page, ListEntriesFixedSizeCollection.createEmptyCollection());
4346     }
4347   }
4348 
4349   public static class ListEntriesPage
4350       extends AbstractPage<ListEntriesRequest, ListEntriesResponse, Entry, ListEntriesPage> {
4351 
ListEntriesPage( PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context, ListEntriesResponse response)4352     private ListEntriesPage(
4353         PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context,
4354         ListEntriesResponse response) {
4355       super(context, response);
4356     }
4357 
createEmptyPage()4358     private static ListEntriesPage createEmptyPage() {
4359       return new ListEntriesPage(null, null);
4360     }
4361 
4362     @Override
createPage( PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context, ListEntriesResponse response)4363     protected ListEntriesPage createPage(
4364         PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context,
4365         ListEntriesResponse response) {
4366       return new ListEntriesPage(context, response);
4367     }
4368 
4369     @Override
createPageAsync( PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context, ApiFuture<ListEntriesResponse> futureResponse)4370     public ApiFuture<ListEntriesPage> createPageAsync(
4371         PageContext<ListEntriesRequest, ListEntriesResponse, Entry> context,
4372         ApiFuture<ListEntriesResponse> futureResponse) {
4373       return super.createPageAsync(context, futureResponse);
4374     }
4375   }
4376 
4377   public static class ListEntriesFixedSizeCollection
4378       extends AbstractFixedSizeCollection<
4379           ListEntriesRequest,
4380           ListEntriesResponse,
4381           Entry,
4382           ListEntriesPage,
4383           ListEntriesFixedSizeCollection> {
4384 
ListEntriesFixedSizeCollection(List<ListEntriesPage> pages, int collectionSize)4385     private ListEntriesFixedSizeCollection(List<ListEntriesPage> pages, int collectionSize) {
4386       super(pages, collectionSize);
4387     }
4388 
createEmptyCollection()4389     private static ListEntriesFixedSizeCollection createEmptyCollection() {
4390       return new ListEntriesFixedSizeCollection(null, 0);
4391     }
4392 
4393     @Override
createCollection( List<ListEntriesPage> pages, int collectionSize)4394     protected ListEntriesFixedSizeCollection createCollection(
4395         List<ListEntriesPage> pages, int collectionSize) {
4396       return new ListEntriesFixedSizeCollection(pages, collectionSize);
4397     }
4398   }
4399 
4400   public static class ListTagsPagedResponse
4401       extends AbstractPagedListResponse<
4402           ListTagsRequest, ListTagsResponse, Tag, ListTagsPage, ListTagsFixedSizeCollection> {
4403 
createAsync( PageContext<ListTagsRequest, ListTagsResponse, Tag> context, ApiFuture<ListTagsResponse> futureResponse)4404     public static ApiFuture<ListTagsPagedResponse> createAsync(
4405         PageContext<ListTagsRequest, ListTagsResponse, Tag> context,
4406         ApiFuture<ListTagsResponse> futureResponse) {
4407       ApiFuture<ListTagsPage> futurePage =
4408           ListTagsPage.createEmptyPage().createPageAsync(context, futureResponse);
4409       return ApiFutures.transform(
4410           futurePage, input -> new ListTagsPagedResponse(input), MoreExecutors.directExecutor());
4411     }
4412 
ListTagsPagedResponse(ListTagsPage page)4413     private ListTagsPagedResponse(ListTagsPage page) {
4414       super(page, ListTagsFixedSizeCollection.createEmptyCollection());
4415     }
4416   }
4417 
4418   public static class ListTagsPage
4419       extends AbstractPage<ListTagsRequest, ListTagsResponse, Tag, ListTagsPage> {
4420 
ListTagsPage( PageContext<ListTagsRequest, ListTagsResponse, Tag> context, ListTagsResponse response)4421     private ListTagsPage(
4422         PageContext<ListTagsRequest, ListTagsResponse, Tag> context, ListTagsResponse response) {
4423       super(context, response);
4424     }
4425 
createEmptyPage()4426     private static ListTagsPage createEmptyPage() {
4427       return new ListTagsPage(null, null);
4428     }
4429 
4430     @Override
createPage( PageContext<ListTagsRequest, ListTagsResponse, Tag> context, ListTagsResponse response)4431     protected ListTagsPage createPage(
4432         PageContext<ListTagsRequest, ListTagsResponse, Tag> context, ListTagsResponse response) {
4433       return new ListTagsPage(context, response);
4434     }
4435 
4436     @Override
createPageAsync( PageContext<ListTagsRequest, ListTagsResponse, Tag> context, ApiFuture<ListTagsResponse> futureResponse)4437     public ApiFuture<ListTagsPage> createPageAsync(
4438         PageContext<ListTagsRequest, ListTagsResponse, Tag> context,
4439         ApiFuture<ListTagsResponse> futureResponse) {
4440       return super.createPageAsync(context, futureResponse);
4441     }
4442   }
4443 
4444   public static class ListTagsFixedSizeCollection
4445       extends AbstractFixedSizeCollection<
4446           ListTagsRequest, ListTagsResponse, Tag, ListTagsPage, ListTagsFixedSizeCollection> {
4447 
ListTagsFixedSizeCollection(List<ListTagsPage> pages, int collectionSize)4448     private ListTagsFixedSizeCollection(List<ListTagsPage> pages, int collectionSize) {
4449       super(pages, collectionSize);
4450     }
4451 
createEmptyCollection()4452     private static ListTagsFixedSizeCollection createEmptyCollection() {
4453       return new ListTagsFixedSizeCollection(null, 0);
4454     }
4455 
4456     @Override
createCollection( List<ListTagsPage> pages, int collectionSize)4457     protected ListTagsFixedSizeCollection createCollection(
4458         List<ListTagsPage> pages, int collectionSize) {
4459       return new ListTagsFixedSizeCollection(pages, collectionSize);
4460     }
4461   }
4462 }
4463