diff --git a/generation_config.yaml b/generation_config.yaml index a2f41f0e02a4..3a9aa5852f4b 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.62.1 -googleapis_commitish: 6d1dca2b8e3d50914609414e219df2778b2b20ba +googleapis_commitish: 9978d435df71bb16ecadd1e4421640748d0bf533 libraries_bom_version: 26.67.0 # the libraries are ordered with respect to library name, which is diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/BusinessGlossaryServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/BusinessGlossaryServiceClient.java new file mode 100644 index 000000000000..2f663f7a59db --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/BusinessGlossaryServiceClient.java @@ -0,0 +1,3144 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataplex.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataplex.v1.stub.BusinessGlossaryServiceStub; +import com.google.cloud.dataplex.v1.stub.BusinessGlossaryServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: BusinessGlossaryService provides APIs for managing business glossary + * resources for enterprise customers. The resources currently supported in Business Glossary are: + * 1. Glossary 2. GlossaryCategory 3. GlossaryTerm + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * Glossary response = businessGlossaryServiceClient.getGlossary(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the BusinessGlossaryServiceClient object to clean up + * resources such as threads. In the example above, try-with-resources is used, which automatically + * calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
CreateGlossary |
+ * Creates a new Glossary resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateGlossary |
+ * Updates a Glossary resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteGlossary |
+ * Deletes a Glossary resource. All the categories and terms within the Glossary must be deleted before the Glossary can be deleted. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetGlossary |
+ * Gets a Glossary resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListGlossaries |
+ * Lists Glossary resources in a project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateGlossaryCategory |
+ * Creates a new GlossaryCategory resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateGlossaryCategory |
+ * Updates a GlossaryCategory resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteGlossaryCategory |
+ * Deletes a GlossaryCategory resource. All the GlossaryCategories and GlossaryTerms nested directly under the specified GlossaryCategory will be moved one level up to the parent in the hierarchy. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetGlossaryCategory |
+ * Gets a GlossaryCategory resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListGlossaryCategories |
+ * Lists GlossaryCategory resources in a Glossary. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateGlossaryTerm |
+ * Creates a new GlossaryTerm resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateGlossaryTerm |
+ * Updates a GlossaryTerm resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteGlossaryTerm |
+ * Deletes a GlossaryTerm resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetGlossaryTerm |
+ * Gets a GlossaryTerm resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListGlossaryTerms |
+ * Lists GlossaryTerm resources in a Glossary. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of + * BusinessGlossaryServiceSettings to create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BusinessGlossaryServiceSettings businessGlossaryServiceSettings =
+ * BusinessGlossaryServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create(businessGlossaryServiceSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BusinessGlossaryServiceSettings businessGlossaryServiceSettings =
+ * BusinessGlossaryServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create(businessGlossaryServiceSettings);
+ * }
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BusinessGlossaryServiceSettings businessGlossaryServiceSettings =
+ * BusinessGlossaryServiceSettings.newHttpJsonBuilder().build();
+ * BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create(businessGlossaryServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class BusinessGlossaryServiceClient implements BackgroundResource { + private final BusinessGlossaryServiceSettings settings; + private final BusinessGlossaryServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of BusinessGlossaryServiceClient with default settings. */ + public static final BusinessGlossaryServiceClient create() throws IOException { + return create(BusinessGlossaryServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of BusinessGlossaryServiceClient, using the given settings. The channels + * are created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final BusinessGlossaryServiceClient create(BusinessGlossaryServiceSettings settings) + throws IOException { + return new BusinessGlossaryServiceClient(settings); + } + + /** + * Constructs an instance of BusinessGlossaryServiceClient, using the given stub for making calls. + * This is for advanced usage - prefer using create(BusinessGlossaryServiceSettings). + */ + public static final BusinessGlossaryServiceClient create(BusinessGlossaryServiceStub stub) { + return new BusinessGlossaryServiceClient(stub); + } + + /** + * Constructs an instance of BusinessGlossaryServiceClient, using the given settings. This is + * protected so that it is easy to make a subclass, but otherwise, the static factory methods + * should be preferred. + */ + protected BusinessGlossaryServiceClient(BusinessGlossaryServiceSettings settings) + throws IOException { + this.settings = settings; + this.stub = ((BusinessGlossaryServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected BusinessGlossaryServiceClient(BusinessGlossaryServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final BusinessGlossaryServiceSettings getSettings() { + return settings; + } + + public BusinessGlossaryServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new Glossary resource. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * Glossary glossary = Glossary.newBuilder().build();
+ * String glossaryId = "glossaryId1849967577";
+ * Glossary response =
+ * businessGlossaryServiceClient.createGlossaryAsync(parent, glossary, glossaryId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this Glossary will be created. Format:
+ * projects/{project_id_or_number}/locations/{location_id} where `location_id` refers to a
+ * Google Cloud region.
+ * @param glossary Required. The Glossary to create.
+ * @param glossaryId Required. Glossary ID: Glossary identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * Glossary glossary = Glossary.newBuilder().build();
+ * String glossaryId = "glossaryId1849967577";
+ * Glossary response =
+ * businessGlossaryServiceClient.createGlossaryAsync(parent, glossary, glossaryId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this Glossary will be created. Format:
+ * projects/{project_id_or_number}/locations/{location_id} where `location_id` refers to a
+ * Google Cloud region.
+ * @param glossary Required. The Glossary to create.
+ * @param glossaryId Required. Glossary ID: Glossary identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * CreateGlossaryRequest request =
+ * CreateGlossaryRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setGlossaryId("glossaryId1849967577")
+ * .setGlossary(Glossary.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Glossary response = businessGlossaryServiceClient.createGlossaryAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * CreateGlossaryRequest request =
+ * CreateGlossaryRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setGlossaryId("glossaryId1849967577")
+ * .setGlossary(Glossary.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * businessGlossaryServiceClient.createGlossaryOperationCallable().futureCall(request);
+ * // Do something.
+ * Glossary response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * CreateGlossaryRequest request =
+ * CreateGlossaryRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setGlossaryId("glossaryId1849967577")
+ * .setGlossary(Glossary.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.createGlossaryCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * Glossary glossary = Glossary.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Glossary response =
+ * businessGlossaryServiceClient.updateGlossaryAsync(glossary, updateMask).get();
+ * }
+ * }
+ *
+ * @param glossary Required. The Glossary to update. The Glossary's `name` field is used to
+ * identify the Glossary to update. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
+ * @param updateMask Required. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * UpdateGlossaryRequest request =
+ * UpdateGlossaryRequest.newBuilder()
+ * .setGlossary(Glossary.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * Glossary response = businessGlossaryServiceClient.updateGlossaryAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * UpdateGlossaryRequest request =
+ * UpdateGlossaryRequest.newBuilder()
+ * .setGlossary(Glossary.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * businessGlossaryServiceClient.updateGlossaryOperationCallable().futureCall(request);
+ * // Do something.
+ * Glossary response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * UpdateGlossaryRequest request =
+ * UpdateGlossaryRequest.newBuilder()
+ * .setGlossary(Glossary.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.updateGlossaryCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * businessGlossaryServiceClient.deleteGlossaryAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Glossary to delete. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString();
+ * businessGlossaryServiceClient.deleteGlossaryAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The name of the Glossary to delete. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * DeleteGlossaryRequest request =
+ * DeleteGlossaryRequest.newBuilder()
+ * .setName(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * businessGlossaryServiceClient.deleteGlossaryAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * DeleteGlossaryRequest request =
+ * DeleteGlossaryRequest.newBuilder()
+ * .setName(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * businessGlossaryServiceClient.deleteGlossaryOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * DeleteGlossaryRequest request =
+ * DeleteGlossaryRequest.newBuilder()
+ * .setName(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.deleteGlossaryCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * Glossary response = businessGlossaryServiceClient.getGlossary(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Glossary to retrieve. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Glossary getGlossary(GlossaryName name) {
+ GetGlossaryRequest request =
+ GetGlossaryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getGlossary(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Glossary resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString();
+ * Glossary response = businessGlossaryServiceClient.getGlossary(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the Glossary to retrieve. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Glossary getGlossary(String name) {
+ GetGlossaryRequest request = GetGlossaryRequest.newBuilder().setName(name).build();
+ return getGlossary(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Glossary resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetGlossaryRequest request =
+ * GetGlossaryRequest.newBuilder()
+ * .setName(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .build();
+ * Glossary response = businessGlossaryServiceClient.getGlossary(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Glossary getGlossary(GetGlossaryRequest request) {
+ return getGlossaryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a Glossary resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetGlossaryRequest request =
+ * GetGlossaryRequest.newBuilder()
+ * .setName(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.getGlossaryCallable().futureCall(request);
+ * // Do something.
+ * Glossary response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (Glossary element : businessGlossaryServiceClient.listGlossaries(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which has this collection of Glossaries. Format:
+ * projects/{project_id_or_number}/locations/{location_id} where `location_id` refers to a
+ * Google Cloud region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossariesPagedResponse listGlossaries(LocationName parent) {
+ ListGlossariesRequest request =
+ ListGlossariesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listGlossaries(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Glossary resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (Glossary element : businessGlossaryServiceClient.listGlossaries(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which has this collection of Glossaries. Format:
+ * projects/{project_id_or_number}/locations/{location_id} where `location_id` refers to a
+ * Google Cloud region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossariesPagedResponse listGlossaries(String parent) {
+ ListGlossariesRequest request = ListGlossariesRequest.newBuilder().setParent(parent).build();
+ return listGlossaries(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Glossary resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossariesRequest request =
+ * ListGlossariesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (Glossary element : businessGlossaryServiceClient.listGlossaries(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossariesPagedResponse listGlossaries(ListGlossariesRequest request) {
+ return listGlossariesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists Glossary resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossariesRequest request =
+ * ListGlossariesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.listGlossariesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Glossary element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossariesRequest request =
+ * ListGlossariesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListGlossariesResponse response =
+ * businessGlossaryServiceClient.listGlossariesCallable().call(request);
+ * for (Glossary element : response.getGlossariesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * GlossaryCategory category = GlossaryCategory.newBuilder().build();
+ * String categoryId = "categoryId1296531129";
+ * GlossaryCategory response =
+ * businessGlossaryServiceClient.createGlossaryCategory(parent, category, categoryId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this GlossaryCategory will be created.
+ * Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
+ * where `locationId` refers to a Google Cloud region.
+ * @param category Required. The GlossaryCategory to create.
+ * @param categoryId Required. GlossaryCategory identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory createGlossaryCategory(
+ GlossaryName parent, GlossaryCategory category, String categoryId) {
+ CreateGlossaryCategoryRequest request =
+ CreateGlossaryCategoryRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setCategory(category)
+ .setCategoryId(categoryId)
+ .build();
+ return createGlossaryCategory(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString();
+ * GlossaryCategory category = GlossaryCategory.newBuilder().build();
+ * String categoryId = "categoryId1296531129";
+ * GlossaryCategory response =
+ * businessGlossaryServiceClient.createGlossaryCategory(parent, category, categoryId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where this GlossaryCategory will be created.
+ * Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
+ * where `locationId` refers to a Google Cloud region.
+ * @param category Required. The GlossaryCategory to create.
+ * @param categoryId Required. GlossaryCategory identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory createGlossaryCategory(
+ String parent, GlossaryCategory category, String categoryId) {
+ CreateGlossaryCategoryRequest request =
+ CreateGlossaryCategoryRequest.newBuilder()
+ .setParent(parent)
+ .setCategory(category)
+ .setCategoryId(categoryId)
+ .build();
+ return createGlossaryCategory(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * CreateGlossaryCategoryRequest request =
+ * CreateGlossaryCategoryRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setCategoryId("categoryId1296531129")
+ * .setCategory(GlossaryCategory.newBuilder().build())
+ * .build();
+ * GlossaryCategory response = businessGlossaryServiceClient.createGlossaryCategory(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory createGlossaryCategory(CreateGlossaryCategoryRequest request) {
+ return createGlossaryCategoryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * CreateGlossaryCategoryRequest request =
+ * CreateGlossaryCategoryRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setCategoryId("categoryId1296531129")
+ * .setCategory(GlossaryCategory.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.createGlossaryCategoryCallable().futureCall(request);
+ * // Do something.
+ * GlossaryCategory response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryCategory category = GlossaryCategory.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * GlossaryCategory response =
+ * businessGlossaryServiceClient.updateGlossaryCategory(category, updateMask);
+ * }
+ * }
+ *
+ * @param category Required. The GlossaryCategory to update. The GlossaryCategory's `name` field
+ * is used to identify the GlossaryCategory to update. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
+ * @param updateMask Required. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory updateGlossaryCategory(
+ GlossaryCategory category, FieldMask updateMask) {
+ UpdateGlossaryCategoryRequest request =
+ UpdateGlossaryCategoryRequest.newBuilder()
+ .setCategory(category)
+ .setUpdateMask(updateMask)
+ .build();
+ return updateGlossaryCategory(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * UpdateGlossaryCategoryRequest request =
+ * UpdateGlossaryCategoryRequest.newBuilder()
+ * .setCategory(GlossaryCategory.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * GlossaryCategory response = businessGlossaryServiceClient.updateGlossaryCategory(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory updateGlossaryCategory(UpdateGlossaryCategoryRequest request) {
+ return updateGlossaryCategoryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * UpdateGlossaryCategoryRequest request =
+ * UpdateGlossaryCategoryRequest.newBuilder()
+ * .setCategory(GlossaryCategory.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.updateGlossaryCategoryCallable().futureCall(request);
+ * // Do something.
+ * GlossaryCategory response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryCategoryName name =
+ * GlossaryCategoryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]");
+ * businessGlossaryServiceClient.deleteGlossaryCategory(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryCategory to delete. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGlossaryCategory(GlossaryCategoryName name) {
+ DeleteGlossaryCategoryRequest request =
+ DeleteGlossaryCategoryRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteGlossaryCategory(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a GlossaryCategory resource. All the GlossaryCategories and GlossaryTerms nested
+ * directly under the specified GlossaryCategory will be moved one level up to the parent in the
+ * hierarchy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String name =
+ * GlossaryCategoryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]")
+ * .toString();
+ * businessGlossaryServiceClient.deleteGlossaryCategory(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryCategory to delete. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGlossaryCategory(String name) {
+ DeleteGlossaryCategoryRequest request =
+ DeleteGlossaryCategoryRequest.newBuilder().setName(name).build();
+ deleteGlossaryCategory(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a GlossaryCategory resource. All the GlossaryCategories and GlossaryTerms nested
+ * directly under the specified GlossaryCategory will be moved one level up to the parent in the
+ * hierarchy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * DeleteGlossaryCategoryRequest request =
+ * DeleteGlossaryCategoryRequest.newBuilder()
+ * .setName(
+ * GlossaryCategoryName.of(
+ * "[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]")
+ * .toString())
+ * .build();
+ * businessGlossaryServiceClient.deleteGlossaryCategory(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGlossaryCategory(DeleteGlossaryCategoryRequest request) {
+ deleteGlossaryCategoryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a GlossaryCategory resource. All the GlossaryCategories and GlossaryTerms nested
+ * directly under the specified GlossaryCategory will be moved one level up to the parent in the
+ * hierarchy.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * DeleteGlossaryCategoryRequest request =
+ * DeleteGlossaryCategoryRequest.newBuilder()
+ * .setName(
+ * GlossaryCategoryName.of(
+ * "[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.deleteGlossaryCategoryCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryCategoryName name =
+ * GlossaryCategoryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]");
+ * GlossaryCategory response = businessGlossaryServiceClient.getGlossaryCategory(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryCategory to retrieve. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory getGlossaryCategory(GlossaryCategoryName name) {
+ GetGlossaryCategoryRequest request =
+ GetGlossaryCategoryRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ return getGlossaryCategory(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String name =
+ * GlossaryCategoryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]")
+ * .toString();
+ * GlossaryCategory response = businessGlossaryServiceClient.getGlossaryCategory(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryCategory to retrieve. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory getGlossaryCategory(String name) {
+ GetGlossaryCategoryRequest request =
+ GetGlossaryCategoryRequest.newBuilder().setName(name).build();
+ return getGlossaryCategory(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetGlossaryCategoryRequest request =
+ * GetGlossaryCategoryRequest.newBuilder()
+ * .setName(
+ * GlossaryCategoryName.of(
+ * "[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]")
+ * .toString())
+ * .build();
+ * GlossaryCategory response = businessGlossaryServiceClient.getGlossaryCategory(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryCategory getGlossaryCategory(GetGlossaryCategoryRequest request) {
+ return getGlossaryCategoryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a GlossaryCategory resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetGlossaryCategoryRequest request =
+ * GetGlossaryCategoryRequest.newBuilder()
+ * .setName(
+ * GlossaryCategoryName.of(
+ * "[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_CATEGORY]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.getGlossaryCategoryCallable().futureCall(request);
+ * // Do something.
+ * GlossaryCategory response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * for (GlossaryCategory element :
+ * businessGlossaryServiceClient.listGlossaryCategories(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which has this collection of GlossaryCategories. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} Location
+ * is the Google Cloud region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossaryCategoriesPagedResponse listGlossaryCategories(GlossaryName parent) {
+ ListGlossaryCategoriesRequest request =
+ ListGlossaryCategoriesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listGlossaryCategories(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists GlossaryCategory resources in a Glossary.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString();
+ * for (GlossaryCategory element :
+ * businessGlossaryServiceClient.listGlossaryCategories(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which has this collection of GlossaryCategories. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} Location
+ * is the Google Cloud region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossaryCategoriesPagedResponse listGlossaryCategories(String parent) {
+ ListGlossaryCategoriesRequest request =
+ ListGlossaryCategoriesRequest.newBuilder().setParent(parent).build();
+ return listGlossaryCategories(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists GlossaryCategory resources in a Glossary.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossaryCategoriesRequest request =
+ * ListGlossaryCategoriesRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (GlossaryCategory element :
+ * businessGlossaryServiceClient.listGlossaryCategories(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossaryCategoriesPagedResponse listGlossaryCategories(
+ ListGlossaryCategoriesRequest request) {
+ return listGlossaryCategoriesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists GlossaryCategory resources in a Glossary.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossaryCategoriesRequest request =
+ * ListGlossaryCategoriesRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.listGlossaryCategoriesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (GlossaryCategory element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossaryCategoriesRequest request =
+ * ListGlossaryCategoriesRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListGlossaryCategoriesResponse response =
+ * businessGlossaryServiceClient.listGlossaryCategoriesCallable().call(request);
+ * for (GlossaryCategory element : response.getCategoriesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * GlossaryTerm term = GlossaryTerm.newBuilder().build();
+ * String termId = "termId-877206873";
+ * GlossaryTerm response =
+ * businessGlossaryServiceClient.createGlossaryTerm(parent, term, termId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where the GlossaryTerm will be created. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} where
+ * `location_id` refers to a Google Cloud region.
+ * @param term Required. The GlossaryTerm to create.
+ * @param termId Required. GlossaryTerm identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm createGlossaryTerm(
+ GlossaryName parent, GlossaryTerm term, String termId) {
+ CreateGlossaryTermRequest request =
+ CreateGlossaryTermRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setTerm(term)
+ .setTermId(termId)
+ .build();
+ return createGlossaryTerm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString();
+ * GlossaryTerm term = GlossaryTerm.newBuilder().build();
+ * String termId = "termId-877206873";
+ * GlossaryTerm response =
+ * businessGlossaryServiceClient.createGlossaryTerm(parent, term, termId);
+ * }
+ * }
+ *
+ * @param parent Required. The parent resource where the GlossaryTerm will be created. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} where
+ * `location_id` refers to a Google Cloud region.
+ * @param term Required. The GlossaryTerm to create.
+ * @param termId Required. GlossaryTerm identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm createGlossaryTerm(String parent, GlossaryTerm term, String termId) {
+ CreateGlossaryTermRequest request =
+ CreateGlossaryTermRequest.newBuilder()
+ .setParent(parent)
+ .setTerm(term)
+ .setTermId(termId)
+ .build();
+ return createGlossaryTerm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * CreateGlossaryTermRequest request =
+ * CreateGlossaryTermRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setTermId("termId-877206873")
+ * .setTerm(GlossaryTerm.newBuilder().build())
+ * .build();
+ * GlossaryTerm response = businessGlossaryServiceClient.createGlossaryTerm(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm createGlossaryTerm(CreateGlossaryTermRequest request) {
+ return createGlossaryTermCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates a new GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * CreateGlossaryTermRequest request =
+ * CreateGlossaryTermRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setTermId("termId-877206873")
+ * .setTerm(GlossaryTerm.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.createGlossaryTermCallable().futureCall(request);
+ * // Do something.
+ * GlossaryTerm response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryTerm term = GlossaryTerm.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * GlossaryTerm response = businessGlossaryServiceClient.updateGlossaryTerm(term, updateMask);
+ * }
+ * }
+ *
+ * @param term Required. The GlossaryTerm to update. The GlossaryTerm's `name` field is used to
+ * identify the GlossaryTerm to update. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
+ * @param updateMask Required. The list of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm updateGlossaryTerm(GlossaryTerm term, FieldMask updateMask) {
+ UpdateGlossaryTermRequest request =
+ UpdateGlossaryTermRequest.newBuilder().setTerm(term).setUpdateMask(updateMask).build();
+ return updateGlossaryTerm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * UpdateGlossaryTermRequest request =
+ * UpdateGlossaryTermRequest.newBuilder()
+ * .setTerm(GlossaryTerm.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * GlossaryTerm response = businessGlossaryServiceClient.updateGlossaryTerm(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm updateGlossaryTerm(UpdateGlossaryTermRequest request) {
+ return updateGlossaryTermCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * UpdateGlossaryTermRequest request =
+ * UpdateGlossaryTermRequest.newBuilder()
+ * .setTerm(GlossaryTerm.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.updateGlossaryTermCallable().futureCall(request);
+ * // Do something.
+ * GlossaryTerm response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryTermName name =
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]");
+ * businessGlossaryServiceClient.deleteGlossaryTerm(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryTerm to delete. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGlossaryTerm(GlossaryTermName name) {
+ DeleteGlossaryTermRequest request =
+ DeleteGlossaryTermRequest.newBuilder()
+ .setName(name == null ? null : name.toString())
+ .build();
+ deleteGlossaryTerm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String name =
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]")
+ * .toString();
+ * businessGlossaryServiceClient.deleteGlossaryTerm(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryTerm to delete. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGlossaryTerm(String name) {
+ DeleteGlossaryTermRequest request =
+ DeleteGlossaryTermRequest.newBuilder().setName(name).build();
+ deleteGlossaryTerm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * DeleteGlossaryTermRequest request =
+ * DeleteGlossaryTermRequest.newBuilder()
+ * .setName(
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]")
+ * .toString())
+ * .build();
+ * businessGlossaryServiceClient.deleteGlossaryTerm(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final void deleteGlossaryTerm(DeleteGlossaryTermRequest request) {
+ deleteGlossaryTermCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * DeleteGlossaryTermRequest request =
+ * DeleteGlossaryTermRequest.newBuilder()
+ * .setName(
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.deleteGlossaryTermCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryTermName name =
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]");
+ * GlossaryTerm response = businessGlossaryServiceClient.getGlossaryTerm(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryTerm to retrieve. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm getGlossaryTerm(GlossaryTermName name) {
+ GetGlossaryTermRequest request =
+ GetGlossaryTermRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getGlossaryTerm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String name =
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]")
+ * .toString();
+ * GlossaryTerm response = businessGlossaryServiceClient.getGlossaryTerm(name);
+ * }
+ * }
+ *
+ * @param name Required. The name of the GlossaryTerm to retrieve. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm getGlossaryTerm(String name) {
+ GetGlossaryTermRequest request = GetGlossaryTermRequest.newBuilder().setName(name).build();
+ return getGlossaryTerm(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetGlossaryTermRequest request =
+ * GetGlossaryTermRequest.newBuilder()
+ * .setName(
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]")
+ * .toString())
+ * .build();
+ * GlossaryTerm response = businessGlossaryServiceClient.getGlossaryTerm(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GlossaryTerm getGlossaryTerm(GetGlossaryTermRequest request) {
+ return getGlossaryTermCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a GlossaryTerm resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetGlossaryTermRequest request =
+ * GetGlossaryTermRequest.newBuilder()
+ * .setName(
+ * GlossaryTermName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]", "[GLOSSARY_TERM]")
+ * .toString())
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.getGlossaryTermCallable().futureCall(request);
+ * // Do something.
+ * GlossaryTerm response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * for (GlossaryTerm element :
+ * businessGlossaryServiceClient.listGlossaryTerms(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which has this collection of GlossaryTerms. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} where
+ * `location_id` refers to a Google Cloud region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossaryTermsPagedResponse listGlossaryTerms(GlossaryName parent) {
+ ListGlossaryTermsRequest request =
+ ListGlossaryTermsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listGlossaryTerms(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists GlossaryTerm resources in a Glossary.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * String parent = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString();
+ * for (GlossaryTerm element :
+ * businessGlossaryServiceClient.listGlossaryTerms(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The parent, which has this collection of GlossaryTerms. Format:
+ * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id} where
+ * `location_id` refers to a Google Cloud region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossaryTermsPagedResponse listGlossaryTerms(String parent) {
+ ListGlossaryTermsRequest request =
+ ListGlossaryTermsRequest.newBuilder().setParent(parent).build();
+ return listGlossaryTerms(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists GlossaryTerm resources in a Glossary.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossaryTermsRequest request =
+ * ListGlossaryTermsRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (GlossaryTerm element :
+ * businessGlossaryServiceClient.listGlossaryTerms(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListGlossaryTermsPagedResponse listGlossaryTerms(ListGlossaryTermsRequest request) {
+ return listGlossaryTermsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists GlossaryTerm resources in a Glossary.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossaryTermsRequest request =
+ * ListGlossaryTermsRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.listGlossaryTermsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (GlossaryTerm element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListGlossaryTermsRequest request =
+ * ListGlossaryTermsRequest.newBuilder()
+ * .setParent(GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListGlossaryTermsResponse response =
+ * businessGlossaryServiceClient.listGlossaryTermsCallable().call(request);
+ * for (GlossaryTerm element : response.getTermsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : businessGlossaryServiceClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response =
+ * businessGlossaryServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = businessGlossaryServiceClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future =
+ * businessGlossaryServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the + * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings) + * of getGlossary: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BusinessGlossaryServiceSettings.Builder businessGlossaryServiceSettingsBuilder =
+ * BusinessGlossaryServiceSettings.newBuilder();
+ * businessGlossaryServiceSettingsBuilder
+ * .getGlossarySettings()
+ * .setRetrySettings(
+ * businessGlossaryServiceSettingsBuilder
+ * .getGlossarySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * BusinessGlossaryServiceSettings businessGlossaryServiceSettings =
+ * businessGlossaryServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an + * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to + * configure the RetrySettings for createGlossary: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BusinessGlossaryServiceSettings.Builder businessGlossaryServiceSettingsBuilder =
+ * BusinessGlossaryServiceSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * businessGlossaryServiceSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class BusinessGlossaryServiceSettings
+ extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
@@ -500,7 +500,7 @@
*
* CreateMetadataJob Creates a metadata job. For example, use a metadata job to import Dataplex Catalog entries and aspects from a third-party system into Dataplex. Creates a metadata job. For example, use a metadata job to import metadata from a third-party system into Dataplex Universal Catalog. Request object method variants only take one parameter, a request object, which must be constructed before the call. CreateEntryLink Creates an Entry Link. Request object method variants only take one parameter, a request object, which must be constructed before the call. createEntryLink(CreateEntryLinkRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. createEntryLink(EntryGroupName parent, EntryLink entryLink, String entryLinkId)
+ * createEntryLink(String parent, EntryLink entryLink, String entryLinkId)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. createEntryLinkCallable()
+ * DeleteEntryLink Deletes an Entry Link. Request object method variants only take one parameter, a request object, which must be constructed before the call. deleteEntryLink(DeleteEntryLinkRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. deleteEntryLink(EntryLinkName name)
+ * deleteEntryLink(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. deleteEntryLinkCallable()
+ * GetEntryLink Gets an Entry Link. Request object method variants only take one parameter, a request object, which must be constructed before the call. getEntryLink(GetEntryLinkRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. getEntryLink(EntryLinkName name)
+ * getEntryLink(String name)
+ * Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. getEntryLinkCallable()
+ * ListLocations Lists information about the supported locations for this service. Sample code:
*
@@ -3859,8 +3916,8 @@ public final OperationFuture Sample code:
*
@@ -3899,8 +3956,8 @@ public final OperationFuture Sample code:
*
@@ -3932,8 +3989,8 @@ public final OperationFuture Sample code:
*
@@ -3965,8 +4022,8 @@ public final OperationFuture Sample code:
*
@@ -4408,6 +4465,388 @@ public final UnaryCallable Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java
index 66b4b7114519..64d3f900c254 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/ContentServiceClient.java
@@ -46,7 +46,8 @@
// AUTO-GENERATED DOCUMENTATION AND CLASS.
/**
- * Service Description: ContentService manages Notebook and SQL Scripts for Dataplex.
+ * Service Description: ContentService manages Notebook and SQL Scripts for Dataplex Universal
+ * Catalog.
*
* This class provides the ability to make remote calls to the backing service through method
* calls that map to API methods. Sample code to get started:
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java
index e97a30cbca84..079cb9e0ce55 100644
--- a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/DataScanServiceClient.java
@@ -435,7 +435,8 @@ public final OperationsClient getHttpJsonOperationsClient() {
*
* @param parent Required. The resource name of the parent location:
* `projects/{project}/locations/{location_id}` where `project` refers to a
- * *project_id* or *project_number* and `location_id` refers to a GCP region.
+ * *project_id* or *project_number* and `location_id` refers to a Google Cloud
+ * region.
* @param dataScan Required. DataScan resource.
* @param dataScanId Required. DataScan identifier.
* Only **OnDemand** data scans are allowed.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -1211,7 +1215,7 @@ public final RunDataScanResponse runDataScan(DataScanName name) {
* @param name Required. The resource name of the DataScan:
* `projects/{project}/locations/{location_id}/dataScans/{data_scan_id}`. where `project`
* refers to a *project_id* or *project_number* and `location_id` refers to a
- * GCP region.
+ * Google Cloud region.
* Only **OnDemand** data scans are allowed.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
@@ -1297,7 +1301,7 @@ public final UnaryCallable The interfaces provided are listed below, along with usage samples.
*
+ * ======================= BusinessGlossaryServiceClient =======================
+ *
+ * Service Description: BusinessGlossaryService provides APIs for managing business glossary
+ * resources for enterprise customers. The resources currently supported in Business Glossary are:
+ * 1. Glossary 2. GlossaryCategory 3. GlossaryTerm
+ *
+ * Sample for BusinessGlossaryServiceClient:
+ *
+ * ======================= CatalogServiceClient =======================
*
* Service Description: The primary resources offered by this service are EntryGroups,
- * EntryTypes, AspectTypes, and Entries. They collectively let data administrators organize, manage,
- * secure, and catalog data located across cloud projects in their organization in a variety of
- * storage systems, including Cloud Storage and BigQuery.
+ * EntryTypes, AspectTypes, Entries and EntryLinks. They collectively let data administrators
+ * organize, manage, secure, and catalog data located across cloud projects in their organization in
+ * a variety of storage systems, including Cloud Storage and BigQuery.
*
* Sample for CatalogServiceClient:
*
@@ -42,7 +63,8 @@
*
* ======================= CmekServiceClient =======================
*
- * Service Description: Dataplex Cmek Service
+ * Service Description: Dataplex Universal Catalog Customer Managed Encryption Keys (CMEK)
+ * Service
*
* Sample for CmekServiceClient:
*
@@ -61,7 +83,8 @@
*
* ======================= ContentServiceClient =======================
*
- * Service Description: ContentService manages Notebook and SQL Scripts for Dataplex.
+ * Service Description: ContentService manages Notebook and SQL Scripts for Dataplex Universal
+ * Catalog.
*
* Sample for ContentServiceClient:
*
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/BusinessGlossaryServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/BusinessGlossaryServiceStub.java
new file mode 100644
index 000000000000..debf802702d3
--- /dev/null
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/BusinessGlossaryServiceStub.java
@@ -0,0 +1,185 @@
+/*
+ * Copyright 2025 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.dataplex.v1.stub;
+
+import static com.google.cloud.dataplex.v1.BusinessGlossaryServiceClient.ListGlossariesPagedResponse;
+import static com.google.cloud.dataplex.v1.BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse;
+import static com.google.cloud.dataplex.v1.BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse;
+import static com.google.cloud.dataplex.v1.BusinessGlossaryServiceClient.ListLocationsPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.dataplex.v1.CreateGlossaryCategoryRequest;
+import com.google.cloud.dataplex.v1.CreateGlossaryRequest;
+import com.google.cloud.dataplex.v1.CreateGlossaryTermRequest;
+import com.google.cloud.dataplex.v1.DeleteGlossaryCategoryRequest;
+import com.google.cloud.dataplex.v1.DeleteGlossaryRequest;
+import com.google.cloud.dataplex.v1.DeleteGlossaryTermRequest;
+import com.google.cloud.dataplex.v1.GetGlossaryCategoryRequest;
+import com.google.cloud.dataplex.v1.GetGlossaryRequest;
+import com.google.cloud.dataplex.v1.GetGlossaryTermRequest;
+import com.google.cloud.dataplex.v1.Glossary;
+import com.google.cloud.dataplex.v1.GlossaryCategory;
+import com.google.cloud.dataplex.v1.GlossaryTerm;
+import com.google.cloud.dataplex.v1.ListGlossariesRequest;
+import com.google.cloud.dataplex.v1.ListGlossariesResponse;
+import com.google.cloud.dataplex.v1.ListGlossaryCategoriesRequest;
+import com.google.cloud.dataplex.v1.ListGlossaryCategoriesResponse;
+import com.google.cloud.dataplex.v1.ListGlossaryTermsRequest;
+import com.google.cloud.dataplex.v1.ListGlossaryTermsResponse;
+import com.google.cloud.dataplex.v1.OperationMetadata;
+import com.google.cloud.dataplex.v1.UpdateGlossaryCategoryRequest;
+import com.google.cloud.dataplex.v1.UpdateGlossaryRequest;
+import com.google.cloud.dataplex.v1.UpdateGlossaryTermRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the BusinessGlossaryService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class BusinessGlossaryServiceStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the
+ * [RetrySettings](https://cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.retrying.RetrySettings)
+ * of getGlossary:
+ *
+ * To configure the RetrySettings of a Long Running Operation method, create an
+ * OperationTimedPollAlgorithm object and update the RPC's polling algorithm. For example, to
+ * configure the RetrySettings for createGlossary:
+ *
+ *
*
*
- *
+ *
*
*
*
@@ -578,6 +578,63 @@
*
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
*
@@ -2213,8 +2270,8 @@ public final UnaryCallable {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+ * EntryLink entryLink = EntryLink.newBuilder().build();
+ * String entryLinkId = "entryLinkId-1349584441";
+ * EntryLink response = catalogServiceClient.createEntryLink(parent, entryLink, entryLinkId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent Entry Group:
+ * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
+ * @param entryLink Required. Entry Link resource.
+ * @param entryLinkId Required. Entry Link identifier
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink createEntryLink(
+ EntryGroupName parent, EntryLink entryLink, String entryLinkId) {
+ CreateEntryLinkRequest request =
+ CreateEntryLinkRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .setEntryLink(entryLink)
+ .setEntryLinkId(entryLinkId)
+ .build();
+ return createEntryLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
+ * EntryLink entryLink = EntryLink.newBuilder().build();
+ * String entryLinkId = "entryLinkId-1349584441";
+ * EntryLink response = catalogServiceClient.createEntryLink(parent, entryLink, entryLinkId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent Entry Group:
+ * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
+ * @param entryLink Required. Entry Link resource.
+ * @param entryLinkId Required. Entry Link identifier
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink createEntryLink(String parent, EntryLink entryLink, String entryLinkId) {
+ CreateEntryLinkRequest request =
+ CreateEntryLinkRequest.newBuilder()
+ .setParent(parent)
+ .setEntryLink(entryLink)
+ .setEntryLinkId(entryLinkId)
+ .build();
+ return createEntryLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryLinkRequest request =
+ * CreateEntryLinkRequest.newBuilder()
+ * .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setEntryLinkId("entryLinkId-1349584441")
+ * .setEntryLink(EntryLink.newBuilder().build())
+ * .build();
+ * EntryLink response = catalogServiceClient.createEntryLink(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink createEntryLink(CreateEntryLinkRequest request) {
+ return createEntryLinkCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryLinkRequest request =
+ * CreateEntryLinkRequest.newBuilder()
+ * .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setEntryLinkId("entryLinkId-1349584441")
+ * .setEntryLink(EntryLink.newBuilder().build())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryLinkName name =
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]");
+ * EntryLink response = catalogServiceClient.deleteEntryLink(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry Link:
+ * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink deleteEntryLink(EntryLinkName name) {
+ DeleteEntryLinkRequest request =
+ DeleteEntryLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteEntryLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name =
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]").toString();
+ * EntryLink response = catalogServiceClient.deleteEntryLink(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry Link:
+ * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink deleteEntryLink(String name) {
+ DeleteEntryLinkRequest request = DeleteEntryLinkRequest.newBuilder().setName(name).build();
+ return deleteEntryLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryLinkRequest request =
+ * DeleteEntryLinkRequest.newBuilder()
+ * .setName(
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]")
+ * .toString())
+ * .build();
+ * EntryLink response = catalogServiceClient.deleteEntryLink(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink deleteEntryLink(DeleteEntryLinkRequest request) {
+ return deleteEntryLinkCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryLinkRequest request =
+ * DeleteEntryLinkRequest.newBuilder()
+ * .setName(
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryLinkName name =
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]");
+ * EntryLink response = catalogServiceClient.getEntryLink(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry Link:
+ * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink getEntryLink(EntryLinkName name) {
+ GetEntryLinkRequest request =
+ GetEntryLinkRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEntryLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name =
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]").toString();
+ * EntryLink response = catalogServiceClient.getEntryLink(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry Link:
+ * `projects/{project_id_or_number}/locations/{location_id}/entryGroups/{entry_group_id}/entryLinks/{entry_link_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink getEntryLink(String name) {
+ GetEntryLinkRequest request = GetEntryLinkRequest.newBuilder().setName(name).build();
+ return getEntryLink(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryLinkRequest request =
+ * GetEntryLinkRequest.newBuilder()
+ * .setName(
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]")
+ * .toString())
+ * .build();
+ * EntryLink response = catalogServiceClient.getEntryLink(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryLink getEntryLink(GetEntryLinkRequest request) {
+ return getEntryLinkCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets an Entry Link.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryLinkRequest request =
+ * GetEntryLinkRequest.newBuilder()
+ * .setName(
+ * EntryLinkName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY_LINK]")
+ * .toString())
+ * .build();
+ * ApiFuture
+ */
+ public final UnaryCallable
@@ -482,7 +483,8 @@ public final OperationFuture
@@ -745,7 +747,7 @@ public final UnaryCallable
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (BusinessGlossaryServiceClient businessGlossaryServiceClient =
+ * BusinessGlossaryServiceClient.create()) {
+ * GlossaryName name = GlossaryName.of("[PROJECT]", "[LOCATION]", "[GLOSSARY]");
+ * Glossary response = businessGlossaryServiceClient.getGlossary(name);
+ * }
+ * }
+ *
*
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BusinessGlossaryServiceStubSettings.Builder businessGlossaryServiceSettingsBuilder =
+ * BusinessGlossaryServiceStubSettings.newBuilder();
+ * businessGlossaryServiceSettingsBuilder
+ * .getGlossarySettings()
+ * .setRetrySettings(
+ * businessGlossaryServiceSettingsBuilder
+ * .getGlossarySettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofSeconds(1))
+ * .setInitialRpcTimeoutDuration(Duration.ofSeconds(5))
+ * .setMaxAttempts(5)
+ * .setMaxRetryDelayDuration(Duration.ofSeconds(30))
+ * .setMaxRpcTimeoutDuration(Duration.ofSeconds(60))
+ * .setRetryDelayMultiplier(1.3)
+ * .setRpcTimeoutMultiplier(1.5)
+ * .setTotalTimeoutDuration(Duration.ofSeconds(300))
+ * .build());
+ * BusinessGlossaryServiceStubSettings businessGlossaryServiceSettings =
+ * businessGlossaryServiceSettingsBuilder.build();
+ * }
+ *
+ * Please refer to the [Client Side Retry
+ * Guide](https://github.com/googleapis/google-cloud-java/blob/main/docs/client_retries.md) for
+ * additional support in setting retries.
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * BusinessGlossaryServiceStubSettings.Builder businessGlossaryServiceSettingsBuilder =
+ * BusinessGlossaryServiceStubSettings.newBuilder();
+ * TimedRetryAlgorithm timedRetryAlgorithm =
+ * OperationalTimedPollAlgorithm.create(
+ * RetrySettings.newBuilder()
+ * .setInitialRetryDelayDuration(Duration.ofMillis(500))
+ * .setRetryDelayMultiplier(1.5)
+ * .setMaxRetryDelayDuration(Duration.ofMillis(5000))
+ * .setTotalTimeoutDuration(Duration.ofHours(24))
+ * .build());
+ * businessGlossaryServiceSettingsBuilder
+ * .createClusterOperationSettings()
+ * .setPollingAlgorithm(timedRetryAlgorithm)
+ * .build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class BusinessGlossaryServiceStubSettings
+ extends StubSettings