Class BusinessGlossaryServiceClient (1.72.0)

GitHub RepositoryProduct ReferenceREST DocumentationRPC Documentation

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:

    
    // 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().

    Methods
    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.

    • createGlossaryAsync(CreateGlossaryRequest request)

    Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

    • createGlossaryAsync(LocationName parent, Glossary glossary, String glossaryId)

    • createGlossaryAsync(String parent, Glossary glossary, String glossaryId)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • createGlossaryOperationCallable()

    • createGlossaryCallable()

    UpdateGlossary

    Updates a Glossary resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • updateGlossaryAsync(UpdateGlossaryRequest request)

    Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

    • updateGlossaryAsync(Glossary glossary, FieldMask updateMask)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • updateGlossaryOperationCallable()

    • updateGlossaryCallable()

    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.

    • deleteGlossaryAsync(DeleteGlossaryRequest request)

    Methods that return long-running operations have "Async" method variants that return OperationFuture, which is used to track polling of the service.

    • deleteGlossaryAsync(GlossaryName name)

    • deleteGlossaryAsync(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.

    • deleteGlossaryOperationCallable()

    • deleteGlossaryCallable()

    GetGlossary

    Gets a Glossary resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • getGlossary(GetGlossaryRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • getGlossary(GlossaryName name)

    • getGlossary(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.

    • getGlossaryCallable()

    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.

    • listGlossaries(ListGlossariesRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • listGlossaries(LocationName parent)

    • listGlossaries(String parent)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • listGlossariesPagedCallable()

    • listGlossariesCallable()

    CreateGlossaryCategory

    Creates a new GlossaryCategory resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • createGlossaryCategory(CreateGlossaryCategoryRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • createGlossaryCategory(GlossaryName parent, GlossaryCategory category, String categoryId)

    • createGlossaryCategory(String parent, GlossaryCategory category, String categoryId)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • createGlossaryCategoryCallable()

    UpdateGlossaryCategory

    Updates a GlossaryCategory resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • updateGlossaryCategory(UpdateGlossaryCategoryRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • updateGlossaryCategory(GlossaryCategory category, FieldMask updateMask)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • updateGlossaryCategoryCallable()

    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.

    • deleteGlossaryCategory(DeleteGlossaryCategoryRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • deleteGlossaryCategory(GlossaryCategoryName name)

    • deleteGlossaryCategory(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.

    • deleteGlossaryCategoryCallable()

    GetGlossaryCategory

    Gets a GlossaryCategory resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • getGlossaryCategory(GetGlossaryCategoryRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • getGlossaryCategory(GlossaryCategoryName name)

    • getGlossaryCategory(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.

    • getGlossaryCategoryCallable()

    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.

    • listGlossaryCategories(ListGlossaryCategoriesRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • listGlossaryCategories(GlossaryName parent)

    • listGlossaryCategories(String parent)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • listGlossaryCategoriesPagedCallable()

    • listGlossaryCategoriesCallable()

    CreateGlossaryTerm

    Creates a new GlossaryTerm resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • createGlossaryTerm(CreateGlossaryTermRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • createGlossaryTerm(GlossaryName parent, GlossaryTerm term, String termId)

    • createGlossaryTerm(String parent, GlossaryTerm term, String termId)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • createGlossaryTermCallable()

    UpdateGlossaryTerm

    Updates a GlossaryTerm resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • updateGlossaryTerm(UpdateGlossaryTermRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • updateGlossaryTerm(GlossaryTerm term, FieldMask updateMask)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • updateGlossaryTermCallable()

    DeleteGlossaryTerm

    Deletes a GlossaryTerm resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • deleteGlossaryTerm(DeleteGlossaryTermRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • deleteGlossaryTerm(GlossaryTermName name)

    • deleteGlossaryTerm(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.

    • deleteGlossaryTermCallable()

    GetGlossaryTerm

    Gets a GlossaryTerm resource.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • getGlossaryTerm(GetGlossaryTermRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • getGlossaryTerm(GlossaryTermName name)

    • getGlossaryTerm(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.

    • getGlossaryTermCallable()

    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.

    • listGlossaryTerms(ListGlossaryTermsRequest request)

    "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

    • listGlossaryTerms(GlossaryName parent)

    • listGlossaryTerms(String parent)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • listGlossaryTermsPagedCallable()

    • listGlossaryTermsCallable()

    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.

    • listLocations(ListLocationsRequest request)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • listLocationsPagedCallable()

    • listLocationsCallable()

    GetLocation

    Gets information about a location.

    Request object method variants only take one parameter, a request object, which must be constructed before the call.

    • getLocation(GetLocationRequest request)

    Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

    • getLocationCallable()

    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:

    
    // 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:

    
    // 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:

    
    // 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.

Inheritance

java.lang.Object > BusinessGlossaryServiceClient

Static Methods

create()

public static final BusinessGlossaryServiceClient create()

Constructs an instance of BusinessGlossaryServiceClient with default settings.

Returns
Type Description
BusinessGlossaryServiceClient
Exceptions
Type Description
IOException

create(BusinessGlossaryServiceSettings settings)

public static final BusinessGlossaryServiceClient create(BusinessGlossaryServiceSettings settings)

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.

Parameter
Name Description
settings BusinessGlossaryServiceSettings
Returns
Type Description
BusinessGlossaryServiceClient
Exceptions
Type Description
IOException

create(BusinessGlossaryServiceStub stub)

public static final BusinessGlossaryServiceClient create(BusinessGlossaryServiceStub stub)

Constructs an instance of BusinessGlossaryServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(BusinessGlossaryServiceSettings).

Parameter
Name Description
stub BusinessGlossaryServiceStub
Returns
Type Description
BusinessGlossaryServiceClient

Constructors

BusinessGlossaryServiceClient(BusinessGlossaryServiceSettings settings)

protected BusinessGlossaryServiceClient(BusinessGlossaryServiceSettings settings)

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.

Parameter
Name Description
settings BusinessGlossaryServiceSettings

BusinessGlossaryServiceClient(BusinessGlossaryServiceStub stub)

protected BusinessGlossaryServiceClient(BusinessGlossaryServiceStub stub)
Parameter
Name Description
stub BusinessGlossaryServiceStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
Name Description
duration long
unit TimeUnit
Returns
Type Description
boolean
Exceptions
Type Description
InterruptedException

close()

public final void close()

createGlossaryAsync(CreateGlossaryRequest request)

public final OperationFuture<Glossary,OperationMetadata> createGlossaryAsync(CreateGlossaryRequest request)

Creates a new Glossary resource.

Sample 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();
 }
 
Parameter
Name Description
request CreateGlossaryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Glossary,OperationMetadata>

createGlossaryAsync(LocationName parent, Glossary glossary, String glossaryId)

public final OperationFuture<Glossary,OperationMetadata> createGlossaryAsync(LocationName parent, Glossary glossary, String glossaryId)

Creates a new Glossary resource.

Sample 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();
 }
 
Parameters
Name Description
parent LocationName

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.

glossary Glossary

Required. The Glossary to create.

glossaryId String

Required. Glossary ID: Glossary identifier.

Returns
Type Description
OperationFuture<Glossary,OperationMetadata>

createGlossaryAsync(String parent, Glossary glossary, String glossaryId)

public final OperationFuture<Glossary,OperationMetadata> createGlossaryAsync(String parent, Glossary glossary, String glossaryId)

Creates a new Glossary resource.

Sample 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();
 }
 
Parameters
Name Description
parent String

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.

glossary Glossary

Required. The Glossary to create.

glossaryId String

Required. Glossary ID: Glossary identifier.

Returns
Type Description
OperationFuture<Glossary,OperationMetadata>

createGlossaryCallable()

public final UnaryCallable<CreateGlossaryRequest,Operation> createGlossaryCallable()

Creates a new Glossary resource.

Sample 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<Operation> future =
       businessGlossaryServiceClient.createGlossaryCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateGlossaryRequest,Operation>

createGlossaryCategory(CreateGlossaryCategoryRequest request)

public final GlossaryCategory createGlossaryCategory(CreateGlossaryCategoryRequest request)

Creates a new GlossaryCategory resource.

Sample 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);
 }
 
Parameter
Name Description
request CreateGlossaryCategoryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GlossaryCategory

createGlossaryCategory(GlossaryName parent, GlossaryCategory category, String categoryId)

public final GlossaryCategory createGlossaryCategory(GlossaryName parent, GlossaryCategory category, String categoryId)

Creates a new GlossaryCategory resource.

Sample 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);
 }
 
Parameters
Name Description
parent GlossaryName

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.

category GlossaryCategory

Required. The GlossaryCategory to create.

categoryId String

Required. GlossaryCategory identifier.

Returns
Type Description
GlossaryCategory

createGlossaryCategory(String parent, GlossaryCategory category, String categoryId)

public final GlossaryCategory createGlossaryCategory(String parent, GlossaryCategory category, String categoryId)

Creates a new GlossaryCategory resource.

Sample 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);
 }
 
Parameters
Name Description
parent String

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.

category GlossaryCategory

Required. The GlossaryCategory to create.

categoryId String

Required. GlossaryCategory identifier.

Returns
Type Description
GlossaryCategory

createGlossaryCategoryCallable()

public final UnaryCallable<CreateGlossaryCategoryRequest,GlossaryCategory> createGlossaryCategoryCallable()

Creates a new GlossaryCategory resource.

Sample 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<GlossaryCategory> future =
       businessGlossaryServiceClient.createGlossaryCategoryCallable().futureCall(request);
   // Do something.
   GlossaryCategory response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateGlossaryCategoryRequest,GlossaryCategory>

createGlossaryOperationCallable()

public final OperationCallable<CreateGlossaryRequest,Glossary,OperationMetadata> createGlossaryOperationCallable()

Creates a new Glossary resource.

Sample 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<Glossary, OperationMetadata> future =
       businessGlossaryServiceClient.createGlossaryOperationCallable().futureCall(request);
   // Do something.
   Glossary response = future.get();
 }
 
Returns
Type Description
OperationCallable<CreateGlossaryRequest,Glossary,OperationMetadata>

createGlossaryTerm(CreateGlossaryTermRequest request)

public final GlossaryTerm createGlossaryTerm(CreateGlossaryTermRequest request)

Creates a new GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
request CreateGlossaryTermRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GlossaryTerm

createGlossaryTerm(GlossaryName parent, GlossaryTerm term, String termId)

public final GlossaryTerm createGlossaryTerm(GlossaryName parent, GlossaryTerm term, String termId)

Creates a new GlossaryTerm resource.

Sample 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);
 }
 
Parameters
Name Description
parent GlossaryName

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.

term GlossaryTerm

Required. The GlossaryTerm to create.

termId String

Required. GlossaryTerm identifier.

Returns
Type Description
GlossaryTerm

createGlossaryTerm(String parent, GlossaryTerm term, String termId)

public final GlossaryTerm createGlossaryTerm(String parent, GlossaryTerm term, String termId)

Creates a new GlossaryTerm resource.

Sample 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);
 }
 
Parameters
Name Description
parent String

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.

term GlossaryTerm

Required. The GlossaryTerm to create.

termId String

Required. GlossaryTerm identifier.

Returns
Type Description
GlossaryTerm

createGlossaryTermCallable()

public final UnaryCallable<CreateGlossaryTermRequest,GlossaryTerm> createGlossaryTermCallable()

Creates a new GlossaryTerm resource.

Sample 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<GlossaryTerm> future =
       businessGlossaryServiceClient.createGlossaryTermCallable().futureCall(request);
   // Do something.
   GlossaryTerm response = future.get();
 }
 
Returns
Type Description
UnaryCallable<CreateGlossaryTermRequest,GlossaryTerm>

deleteGlossaryAsync(DeleteGlossaryRequest request)

public final OperationFuture<Empty,OperationMetadata> deleteGlossaryAsync(DeleteGlossaryRequest request)

Deletes a Glossary resource. All the categories and terms within the Glossary must be deleted before the Glossary can be deleted.

Sample 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();
 }
 
Parameter
Name Description
request DeleteGlossaryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGlossaryAsync(GlossaryName name)

public final OperationFuture<Empty,OperationMetadata> deleteGlossaryAsync(GlossaryName name)

Deletes a Glossary resource. All the categories and terms within the Glossary must be deleted before the Glossary can be deleted.

Sample 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();
 }
 
Parameter
Name Description
name GlossaryName

Required. The name of the Glossary to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGlossaryAsync(String name)

public final OperationFuture<Empty,OperationMetadata> deleteGlossaryAsync(String name)

Deletes a Glossary resource. All the categories and terms within the Glossary must be deleted before the Glossary can be deleted.

Sample 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();
 }
 
Parameter
Name Description
name String

Required. The name of the Glossary to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}

Returns
Type Description
OperationFuture<Empty,OperationMetadata>

deleteGlossaryCallable()

public final UnaryCallable<DeleteGlossaryRequest,Operation> deleteGlossaryCallable()

Deletes a Glossary resource. All the categories and terms within the Glossary must be deleted before the Glossary can be deleted.

Sample 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<Operation> future =
       businessGlossaryServiceClient.deleteGlossaryCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteGlossaryRequest,Operation>

deleteGlossaryCategory(DeleteGlossaryCategoryRequest request)

public final void deleteGlossaryCategory(DeleteGlossaryCategoryRequest request)

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:


 // 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);
 }
 
Parameter
Name Description
request DeleteGlossaryCategoryRequest

The request object containing all of the parameters for the API call.

deleteGlossaryCategory(GlossaryCategoryName name)

public final void deleteGlossaryCategory(GlossaryCategoryName name)

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:


 // 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);
 }
 
Parameter
Name Description
name GlossaryCategoryName

Required. The name of the GlossaryCategory to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}

deleteGlossaryCategory(String name)

public final void deleteGlossaryCategory(String name)

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:


 // 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);
 }
 
Parameter
Name Description
name String

Required. The name of the GlossaryCategory to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}

deleteGlossaryCategoryCallable()

public final UnaryCallable<DeleteGlossaryCategoryRequest,Empty> deleteGlossaryCategoryCallable()

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:


 // 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<Empty> future =
       businessGlossaryServiceClient.deleteGlossaryCategoryCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteGlossaryCategoryRequest,Empty>

deleteGlossaryOperationCallable()

public final OperationCallable<DeleteGlossaryRequest,Empty,OperationMetadata> deleteGlossaryOperationCallable()

Deletes a Glossary resource. All the categories and terms within the Glossary must be deleted before the Glossary can be deleted.

Sample 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<Empty, OperationMetadata> future =
       businessGlossaryServiceClient.deleteGlossaryOperationCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
OperationCallable<DeleteGlossaryRequest,Empty,OperationMetadata>

deleteGlossaryTerm(DeleteGlossaryTermRequest request)

public final void deleteGlossaryTerm(DeleteGlossaryTermRequest request)

Deletes a GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
request DeleteGlossaryTermRequest

The request object containing all of the parameters for the API call.

deleteGlossaryTerm(GlossaryTermName name)

public final void deleteGlossaryTerm(GlossaryTermName name)

Deletes a GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
name GlossaryTermName

Required. The name of the GlossaryTerm to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}

deleteGlossaryTerm(String name)

public final void deleteGlossaryTerm(String name)

Deletes a GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
name String

Required. The name of the GlossaryTerm to delete. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}

deleteGlossaryTermCallable()

public final UnaryCallable<DeleteGlossaryTermRequest,Empty> deleteGlossaryTermCallable()

Deletes a GlossaryTerm resource.

Sample 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<Empty> future =
       businessGlossaryServiceClient.deleteGlossaryTermCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
Type Description
UnaryCallable<DeleteGlossaryTermRequest,Empty>

getGlossary(GetGlossaryRequest request)

public final Glossary getGlossary(GetGlossaryRequest request)

Gets a Glossary resource.

Sample 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);
 }
 
Parameter
Name Description
request GetGlossaryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
Glossary

getGlossary(GlossaryName name)

public final Glossary getGlossary(GlossaryName name)

Gets a Glossary resource.

Sample 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);
 }
 
Parameter
Name Description
name GlossaryName

Required. The name of the Glossary to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}

Returns
Type Description
Glossary

getGlossary(String name)

public final Glossary getGlossary(String name)

Gets a Glossary resource.

Sample 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);
 }
 
Parameter
Name Description
name String

Required. The name of the Glossary to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}

Returns
Type Description
Glossary

getGlossaryCallable()

public final UnaryCallable<GetGlossaryRequest,Glossary> getGlossaryCallable()

Gets a Glossary resource.

Sample 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<Glossary> future =
       businessGlossaryServiceClient.getGlossaryCallable().futureCall(request);
   // Do something.
   Glossary response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetGlossaryRequest,Glossary>

getGlossaryCategory(GetGlossaryCategoryRequest request)

public final GlossaryCategory getGlossaryCategory(GetGlossaryCategoryRequest request)

Gets a GlossaryCategory resource.

Sample 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);
 }
 
Parameter
Name Description
request GetGlossaryCategoryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GlossaryCategory

getGlossaryCategory(GlossaryCategoryName name)

public final GlossaryCategory getGlossaryCategory(GlossaryCategoryName name)

Gets a GlossaryCategory resource.

Sample 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);
 }
 
Parameter
Name Description
name GlossaryCategoryName

Required. The name of the GlossaryCategory to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}

Returns
Type Description
GlossaryCategory

getGlossaryCategory(String name)

public final GlossaryCategory getGlossaryCategory(String name)

Gets a GlossaryCategory resource.

Sample 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);
 }
 
Parameter
Name Description
name String

Required. The name of the GlossaryCategory to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/categories/{category_id}

Returns
Type Description
GlossaryCategory

getGlossaryCategoryCallable()

public final UnaryCallable<GetGlossaryCategoryRequest,GlossaryCategory> getGlossaryCategoryCallable()

Gets a GlossaryCategory resource.

Sample 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<GlossaryCategory> future =
       businessGlossaryServiceClient.getGlossaryCategoryCallable().futureCall(request);
   // Do something.
   GlossaryCategory response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetGlossaryCategoryRequest,GlossaryCategory>

getGlossaryTerm(GetGlossaryTermRequest request)

public final GlossaryTerm getGlossaryTerm(GetGlossaryTermRequest request)

Gets a GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
request GetGlossaryTermRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GlossaryTerm

getGlossaryTerm(GlossaryTermName name)

public final GlossaryTerm getGlossaryTerm(GlossaryTermName name)

Gets a GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
name GlossaryTermName

Required. The name of the GlossaryTerm to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}

Returns
Type Description
GlossaryTerm

getGlossaryTerm(String name)

public final GlossaryTerm getGlossaryTerm(String name)

Gets a GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
name String

Required. The name of the GlossaryTerm to retrieve. Format: projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}/terms/{term_id}

Returns
Type Description
GlossaryTerm

getGlossaryTermCallable()

public final UnaryCallable<GetGlossaryTermRequest,GlossaryTerm> getGlossaryTermCallable()

Gets a GlossaryTerm resource.

Sample 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<GlossaryTerm> future =
       businessGlossaryServiceClient.getGlossaryTermCallable().futureCall(request);
   // Do something.
   GlossaryTerm response = future.get();
 }
 
Returns
Type Description
UnaryCallable<GetGlossaryTermRequest,GlossaryTerm>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getLocation(GetLocationRequest request)

public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample 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);
 }
 
Parameter
Name Description
request com.google.cloud.location.GetLocationRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
com.google.cloud.location.Location

getLocationCallable()

public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample 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<Location> future =
       businessGlossaryServiceClient.getLocationCallable().futureCall(request);
   // Do something.
   Location response = future.get();
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>

getOperationsClient()

public final OperationsClient getOperationsClient()

Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.

Returns
Type Description
OperationsClient

getSettings()

public final BusinessGlossaryServiceSettings getSettings()
Returns
Type Description
BusinessGlossaryServiceSettings

getStub()

public BusinessGlossaryServiceStub getStub()
Returns
Type Description
BusinessGlossaryServiceStub

isShutdown()

public boolean isShutdown()
Returns
Type Description
boolean

isTerminated()

public boolean isTerminated()
Returns
Type Description
boolean

listGlossaries(ListGlossariesRequest request)

public final BusinessGlossaryServiceClient.ListGlossariesPagedResponse listGlossaries(ListGlossariesRequest request)

Lists Glossary resources in a project and location.

Sample 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);
   }
 }
 
Parameter
Name Description
request ListGlossariesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossariesPagedResponse

listGlossaries(LocationName parent)

public final BusinessGlossaryServiceClient.ListGlossariesPagedResponse listGlossaries(LocationName parent)

Lists Glossary resources in a project and location.

Sample 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);
   }
 }
 
Parameter
Name Description
parent LocationName

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.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossariesPagedResponse

listGlossaries(String parent)

public final BusinessGlossaryServiceClient.ListGlossariesPagedResponse listGlossaries(String parent)

Lists Glossary resources in a project and location.

Sample 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);
   }
 }
 
Parameter
Name Description
parent String

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.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossariesPagedResponse

listGlossariesCallable()

public final UnaryCallable<ListGlossariesRequest,ListGlossariesResponse> listGlossariesCallable()

Lists Glossary resources in a project and location.

Sample 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGlossariesRequest,ListGlossariesResponse>

listGlossariesPagedCallable()

public final UnaryCallable<ListGlossariesRequest,BusinessGlossaryServiceClient.ListGlossariesPagedResponse> listGlossariesPagedCallable()

Lists Glossary resources in a project and location.

Sample 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<Glossary> future =
       businessGlossaryServiceClient.listGlossariesPagedCallable().futureCall(request);
   // Do something.
   for (Glossary element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGlossariesRequest,ListGlossariesPagedResponse>

listGlossaryCategories(GlossaryName parent)

public final BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse listGlossaryCategories(GlossaryName parent)

Lists GlossaryCategory resources in a Glossary.

Sample 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);
   }
 }
 
Parameter
Name Description
parent GlossaryName

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.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse

listGlossaryCategories(ListGlossaryCategoriesRequest request)

public final BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse listGlossaryCategories(ListGlossaryCategoriesRequest request)

Lists GlossaryCategory resources in a Glossary.

Sample 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);
   }
 }
 
Parameter
Name Description
request ListGlossaryCategoriesRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse

listGlossaryCategories(String parent)

public final BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse listGlossaryCategories(String parent)

Lists GlossaryCategory resources in a Glossary.

Sample 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);
   }
 }
 
Parameter
Name Description
parent String

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.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse

listGlossaryCategoriesCallable()

public final UnaryCallable<ListGlossaryCategoriesRequest,ListGlossaryCategoriesResponse> listGlossaryCategoriesCallable()

Lists GlossaryCategory resources in a Glossary.

Sample 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGlossaryCategoriesRequest,ListGlossaryCategoriesResponse>

listGlossaryCategoriesPagedCallable()

public final UnaryCallable<ListGlossaryCategoriesRequest,BusinessGlossaryServiceClient.ListGlossaryCategoriesPagedResponse> listGlossaryCategoriesPagedCallable()

Lists GlossaryCategory resources in a Glossary.

Sample 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<GlossaryCategory> future =
       businessGlossaryServiceClient.listGlossaryCategoriesPagedCallable().futureCall(request);
   // Do something.
   for (GlossaryCategory element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGlossaryCategoriesRequest,ListGlossaryCategoriesPagedResponse>

listGlossaryTerms(GlossaryName parent)

public final BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse listGlossaryTerms(GlossaryName parent)

Lists GlossaryTerm resources in a Glossary.

Sample 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);
   }
 }
 
Parameter
Name Description
parent GlossaryName

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.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse

listGlossaryTerms(ListGlossaryTermsRequest request)

public final BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse listGlossaryTerms(ListGlossaryTermsRequest request)

Lists GlossaryTerm resources in a Glossary.

Sample 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);
   }
 }
 
Parameter
Name Description
request ListGlossaryTermsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse

listGlossaryTerms(String parent)

public final BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse listGlossaryTerms(String parent)

Lists GlossaryTerm resources in a Glossary.

Sample 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);
   }
 }
 
Parameter
Name Description
parent String

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.

Returns
Type Description
BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse

listGlossaryTermsCallable()

public final UnaryCallable<ListGlossaryTermsRequest,ListGlossaryTermsResponse> listGlossaryTermsCallable()

Lists GlossaryTerm resources in a Glossary.

Sample 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<ListGlossaryTermsRequest,ListGlossaryTermsResponse>

listGlossaryTermsPagedCallable()

public final UnaryCallable<ListGlossaryTermsRequest,BusinessGlossaryServiceClient.ListGlossaryTermsPagedResponse> listGlossaryTermsPagedCallable()

Lists GlossaryTerm resources in a Glossary.

Sample 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<GlossaryTerm> future =
       businessGlossaryServiceClient.listGlossaryTermsPagedCallable().futureCall(request);
   // Do something.
   for (GlossaryTerm element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<ListGlossaryTermsRequest,ListGlossaryTermsPagedResponse>

listLocations(ListLocationsRequest request)

public final BusinessGlossaryServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

Sample 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);
   }
 }
 
Parameter
Name Description
request com.google.cloud.location.ListLocationsRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
BusinessGlossaryServiceClient.ListLocationsPagedResponse

listLocationsCallable()

public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

Sample 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;
     }
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>

listLocationsPagedCallable()

public final UnaryCallable<ListLocationsRequest,BusinessGlossaryServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

Sample 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<Location> future =
       businessGlossaryServiceClient.listLocationsPagedCallable().futureCall(request);
   // Do something.
   for (Location element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
Type Description
UnaryCallable<com.google.cloud.location.ListLocationsRequest,ListLocationsPagedResponse>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateGlossaryAsync(Glossary glossary, FieldMask updateMask)

public final OperationFuture<Glossary,OperationMetadata> updateGlossaryAsync(Glossary glossary, FieldMask updateMask)

Updates a Glossary resource.

Sample 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();
 }
 
Parameters
Name Description
glossary 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}

updateMask FieldMask

Required. The list of fields to update.

Returns
Type Description
OperationFuture<Glossary,OperationMetadata>

updateGlossaryAsync(UpdateGlossaryRequest request)

public final OperationFuture<Glossary,OperationMetadata> updateGlossaryAsync(UpdateGlossaryRequest request)

Updates a Glossary resource.

Sample 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();
 }
 
Parameter
Name Description
request UpdateGlossaryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
OperationFuture<Glossary,OperationMetadata>

updateGlossaryCallable()

public final UnaryCallable<UpdateGlossaryRequest,Operation> updateGlossaryCallable()

Updates a Glossary resource.

Sample 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<Operation> future =
       businessGlossaryServiceClient.updateGlossaryCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateGlossaryRequest,Operation>

updateGlossaryCategory(GlossaryCategory category, FieldMask updateMask)

public final GlossaryCategory updateGlossaryCategory(GlossaryCategory category, FieldMask updateMask)

Updates a GlossaryCategory resource.

Sample 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);
 }
 
Parameters
Name Description
category GlossaryCategory

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}

updateMask FieldMask

Required. The list of fields to update.

Returns
Type Description
GlossaryCategory

updateGlossaryCategory(UpdateGlossaryCategoryRequest request)

public final GlossaryCategory updateGlossaryCategory(UpdateGlossaryCategoryRequest request)

Updates a GlossaryCategory resource.

Sample 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);
 }
 
Parameter
Name Description
request UpdateGlossaryCategoryRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GlossaryCategory

updateGlossaryCategoryCallable()

public final UnaryCallable<UpdateGlossaryCategoryRequest,GlossaryCategory> updateGlossaryCategoryCallable()

Updates a GlossaryCategory resource.

Sample 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<GlossaryCategory> future =
       businessGlossaryServiceClient.updateGlossaryCategoryCallable().futureCall(request);
   // Do something.
   GlossaryCategory response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateGlossaryCategoryRequest,GlossaryCategory>

updateGlossaryOperationCallable()

public final OperationCallable<UpdateGlossaryRequest,Glossary,OperationMetadata> updateGlossaryOperationCallable()

Updates a Glossary resource.

Sample 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<Glossary, OperationMetadata> future =
       businessGlossaryServiceClient.updateGlossaryOperationCallable().futureCall(request);
   // Do something.
   Glossary response = future.get();
 }
 
Returns
Type Description
OperationCallable<UpdateGlossaryRequest,Glossary,OperationMetadata>

updateGlossaryTerm(GlossaryTerm term, FieldMask updateMask)

public final GlossaryTerm updateGlossaryTerm(GlossaryTerm term, FieldMask updateMask)

Updates a GlossaryTerm resource.

Sample 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);
 }
 
Parameters
Name Description
term GlossaryTerm

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}

updateMask FieldMask

Required. The list of fields to update.

Returns
Type Description
GlossaryTerm

updateGlossaryTerm(UpdateGlossaryTermRequest request)

public final GlossaryTerm updateGlossaryTerm(UpdateGlossaryTermRequest request)

Updates a GlossaryTerm resource.

Sample 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);
 }
 
Parameter
Name Description
request UpdateGlossaryTermRequest

The request object containing all of the parameters for the API call.

Returns
Type Description
GlossaryTerm

updateGlossaryTermCallable()

public final UnaryCallable<UpdateGlossaryTermRequest,GlossaryTerm> updateGlossaryTermCallable()

Updates a GlossaryTerm resource.

Sample 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<GlossaryTerm> future =
       businessGlossaryServiceClient.updateGlossaryTermCallable().futureCall(request);
   // Do something.
   GlossaryTerm response = future.get();
 }
 
Returns
Type Description
UnaryCallable<UpdateGlossaryTermRequest,GlossaryTerm>