diff --git a/generation_config.yaml b/generation_config.yaml index d8fda9de394d..4e39dcfe9135 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,6 +1,6 @@ gapic_generator_version: 2.38.1 protobuf_version: '25.2' -googleapis_commitish: 1af32e6094f4d65fb53a01394ba030c495ece1bc +googleapis_commitish: 4bcefb91a6b7da272db7b4d045f12c6292964b20 owlbot_cli_image: sha256:623647ee79ac605858d09e60c1382a716c125fb776f69301b72de1cd35d49409 synthtool_commitish: 6612ab8f3afcd5e292aecd647f0fa68812c9f5b5 template_excludes: diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/CatalogServiceClient.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/CatalogServiceClient.java new file mode 100644 index 000000000000..7c4c0e2f060e --- /dev/null +++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/CatalogServiceClient.java @@ -0,0 +1,4336 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.dataplex.v1; + +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.httpjson.longrunning.OperationsClient; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.dataplex.v1.stub.CatalogServiceStub; +import com.google.cloud.dataplex.v1.stub.CatalogServiceStubSettings; +import com.google.cloud.location.GetLocationRequest; +import com.google.cloud.location.ListLocationsRequest; +import com.google.cloud.location.ListLocationsResponse; +import com.google.cloud.location.Location; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: The primary resources offered by this service are EntryGroups, EntryTypes, + * AspectTypes, Entry and Aspect which collectively allow a data administrator to organize, manage, + * secure and catalog data across their organization located across cloud projects in a variety of + * storage systems including Cloud Storage and BigQuery. + * + *
This class provides the ability to make remote calls to the backing service through method + * calls that map to API methods. Sample code to get started: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryTypeName name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]");
+ * EntryType response = catalogServiceClient.getEntryType(name);
+ * }
+ * }
+ *
+ * Note: close() needs to be called on the CatalogServiceClient object to clean up resources such + * as threads. In the example above, try-with-resources is used, which automatically calls close(). + * + *
| Method | + *Description | + *Method Variants | + *
|---|---|---|
CreateEntryType |
+ * Creates an EntryType |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateEntryType |
+ * Updates a EntryType resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteEntryType |
+ * Deletes a EntryType resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListEntryTypes |
+ * Lists EntryType resources in a project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetEntryType |
+ * Retrieves a EntryType resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateAspectType |
+ * Creates an AspectType |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateAspectType |
+ * Updates a AspectType resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteAspectType |
+ * Deletes a AspectType resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListAspectTypes |
+ * Lists AspectType resources in a project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetAspectType |
+ * Retrieves a AspectType resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateEntryGroup |
+ * Creates an EntryGroup |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateEntryGroup |
+ * Updates a EntryGroup resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteEntryGroup |
+ * Deletes a EntryGroup resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListEntryGroups |
+ * Lists EntryGroup resources in a project and location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetEntryGroup |
+ * Retrieves a EntryGroup resource. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
CreateEntry |
+ * Creates an Entry. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
UpdateEntry |
+ * Updates an Entry. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
DeleteEntry |
+ * Deletes an Entry. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListEntries |
+ * Lists entries within an entry group. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetEntry |
+ * Gets a single entry. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
LookupEntry |
+ * Looks up a single entry. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
SearchEntries |
+ * Searches for entries matching given query and scope. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
ListLocations |
+ * Lists information about the supported locations for this service. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
GetLocation |
+ * Gets information about a location. |
+ *
+ * Request object method variants only take one parameter, a request object, which must be constructed before the call. + *
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. + *
|
+ *
See the individual methods for example code. + * + *
Many parameters require resource names to be formatted in a particular way. To assist with + * these names, this class includes a format method for each type of name, and additionally a parse + * method to extract the individual identifiers contained within names that are returned. + * + *
This class can be customized by passing in a custom instance of CatalogServiceSettings to + * create(). For example: + * + *
To customize credentials: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CatalogServiceSettings catalogServiceSettings =
+ * CatalogServiceSettings.newBuilder()
+ * .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ * .build();
+ * CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
+ * }
+ *
+ * To customize the endpoint: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CatalogServiceSettings catalogServiceSettings =
+ * CatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
+ * }
+ *
+ * To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over + * the wire: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CatalogServiceSettings catalogServiceSettings =
+ * CatalogServiceSettings.newHttpJsonBuilder().build();
+ * CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
+ * }
+ *
+ * Please refer to the GitHub repository's samples for more quickstart code snippets. + */ +@Generated("by gapic-generator-java") +public class CatalogServiceClient implements BackgroundResource { + private final CatalogServiceSettings settings; + private final CatalogServiceStub stub; + private final OperationsClient httpJsonOperationsClient; + private final com.google.longrunning.OperationsClient operationsClient; + + /** Constructs an instance of CatalogServiceClient with default settings. */ + public static final CatalogServiceClient create() throws IOException { + return create(CatalogServiceSettings.newBuilder().build()); + } + + /** + * Constructs an instance of CatalogServiceClient, using the given settings. The channels are + * created based on the settings passed in, or defaults for any settings that are not set. + */ + public static final CatalogServiceClient create(CatalogServiceSettings settings) + throws IOException { + return new CatalogServiceClient(settings); + } + + /** + * Constructs an instance of CatalogServiceClient, using the given stub for making calls. This is + * for advanced usage - prefer using create(CatalogServiceSettings). + */ + public static final CatalogServiceClient create(CatalogServiceStub stub) { + return new CatalogServiceClient(stub); + } + + /** + * Constructs an instance of CatalogServiceClient, using the given settings. This is protected so + * that it is easy to make a subclass, but otherwise, the static factory methods should be + * preferred. + */ + protected CatalogServiceClient(CatalogServiceSettings settings) throws IOException { + this.settings = settings; + this.stub = ((CatalogServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + protected CatalogServiceClient(CatalogServiceStub stub) { + this.settings = null; + this.stub = stub; + this.operationsClient = + com.google.longrunning.OperationsClient.create(this.stub.getOperationsStub()); + this.httpJsonOperationsClient = OperationsClient.create(this.stub.getHttpJsonOperationsStub()); + } + + public final CatalogServiceSettings getSettings() { + return settings; + } + + public CatalogServiceStub getStub() { + return stub; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + public final com.google.longrunning.OperationsClient getOperationsClient() { + return operationsClient; + } + + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi + public final OperationsClient getHttpJsonOperationsClient() { + return httpJsonOperationsClient; + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an EntryType + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * EntryType entryType = EntryType.newBuilder().build();
+ * String entryTypeId = "entryTypeId-1105721081";
+ * EntryType response =
+ * catalogServiceClient.createEntryTypeAsync(parent, entryType, entryTypeId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the EntryType, of the form:
+ * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
+ * region.
+ * @param entryType Required. EntryType Resource
+ * @param entryTypeId Required. EntryType identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * EntryType entryType = EntryType.newBuilder().build();
+ * String entryTypeId = "entryTypeId-1105721081";
+ * EntryType response =
+ * catalogServiceClient.createEntryTypeAsync(parent, entryType, entryTypeId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the EntryType, of the form:
+ * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
+ * region.
+ * @param entryType Required. EntryType Resource
+ * @param entryTypeId Required. EntryType identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryTypeRequest request =
+ * CreateEntryTypeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setEntryTypeId("entryTypeId-1105721081")
+ * .setEntryType(EntryType.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * EntryType response = catalogServiceClient.createEntryTypeAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryTypeRequest request =
+ * CreateEntryTypeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setEntryTypeId("entryTypeId-1105721081")
+ * .setEntryType(EntryType.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.createEntryTypeOperationCallable().futureCall(request);
+ * // Do something.
+ * EntryType response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryTypeRequest request =
+ * CreateEntryTypeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setEntryTypeId("entryTypeId-1105721081")
+ * .setEntryType(EntryType.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.createEntryTypeCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryType entryType = EntryType.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * EntryType response = catalogServiceClient.updateEntryTypeAsync(entryType, updateMask).get();
+ * }
+ * }
+ *
+ * @param entryType Required. EntryType Resource
+ * @param updateMask Required. Mask of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryTypeRequest request =
+ * UpdateEntryTypeRequest.newBuilder()
+ * .setEntryType(EntryType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * EntryType response = catalogServiceClient.updateEntryTypeAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryTypeRequest request =
+ * UpdateEntryTypeRequest.newBuilder()
+ * .setEntryType(EntryType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.updateEntryTypeOperationCallable().futureCall(request);
+ * // Do something.
+ * EntryType response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryTypeRequest request =
+ * UpdateEntryTypeRequest.newBuilder()
+ * .setEntryType(EntryType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.updateEntryTypeCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryTypeName name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]");
+ * catalogServiceClient.deleteEntryTypeAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryType:
+ * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString();
+ * catalogServiceClient.deleteEntryTypeAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryType:
+ * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryTypeRequest request =
+ * DeleteEntryTypeRequest.newBuilder()
+ * .setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * catalogServiceClient.deleteEntryTypeAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryTypeRequest request =
+ * DeleteEntryTypeRequest.newBuilder()
+ * .setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.deleteEntryTypeOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryTypeRequest request =
+ * DeleteEntryTypeRequest.newBuilder()
+ * .setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.deleteEntryTypeCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (EntryType element : catalogServiceClient.listEntryTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the EntryType location, of the form:
+ * `projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
+ * region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntryTypesPagedResponse listEntryTypes(LocationName parent) {
+ ListEntryTypesRequest request =
+ ListEntryTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEntryTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntryType resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (EntryType element : catalogServiceClient.listEntryTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the EntryType location, of the form:
+ * `projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
+ * region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntryTypesPagedResponse listEntryTypes(String parent) {
+ ListEntryTypesRequest request = ListEntryTypesRequest.newBuilder().setParent(parent).build();
+ return listEntryTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntryType resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntryTypesRequest request =
+ * ListEntryTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (EntryType element : catalogServiceClient.listEntryTypes(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntryTypesPagedResponse listEntryTypes(ListEntryTypesRequest request) {
+ return listEntryTypesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntryType resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntryTypesRequest request =
+ * ListEntryTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.listEntryTypesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (EntryType element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntryTypesRequest request =
+ * ListEntryTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListEntryTypesResponse response =
+ * catalogServiceClient.listEntryTypesCallable().call(request);
+ * for (EntryType element : response.getEntryTypesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryTypeName name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]");
+ * EntryType response = catalogServiceClient.getEntryType(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryType:
+ * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryType getEntryType(EntryTypeName name) {
+ GetEntryTypeRequest request =
+ GetEntryTypeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEntryType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a EntryType resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString();
+ * EntryType response = catalogServiceClient.getEntryType(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryType:
+ * `projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryType getEntryType(String name) {
+ GetEntryTypeRequest request = GetEntryTypeRequest.newBuilder().setName(name).build();
+ return getEntryType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a EntryType resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryTypeRequest request =
+ * GetEntryTypeRequest.newBuilder()
+ * .setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
+ * .build();
+ * EntryType response = catalogServiceClient.getEntryType(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryType getEntryType(GetEntryTypeRequest request) {
+ return getEntryTypeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a EntryType resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryTypeRequest request =
+ * GetEntryTypeRequest.newBuilder()
+ * .setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
+ * .build();
+ * ApiFuture future = catalogServiceClient.getEntryTypeCallable().futureCall(request);
+ * // Do something.
+ * EntryType response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * AspectType aspectType = AspectType.newBuilder().build();
+ * String aspectTypeId = "aspectTypeId-423030675";
+ * AspectType response =
+ * catalogServiceClient.createAspectTypeAsync(parent, aspectType, aspectTypeId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the AspectType, of the form:
+ * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
+ * region.
+ * @param aspectType Required. AspectType Resource
+ * @param aspectTypeId Required. AspectType identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * AspectType aspectType = AspectType.newBuilder().build();
+ * String aspectTypeId = "aspectTypeId-423030675";
+ * AspectType response =
+ * catalogServiceClient.createAspectTypeAsync(parent, aspectType, aspectTypeId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the AspectType, of the form:
+ * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
+ * region.
+ * @param aspectType Required. AspectType Resource
+ * @param aspectTypeId Required. AspectType identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateAspectTypeRequest request =
+ * CreateAspectTypeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAspectTypeId("aspectTypeId-423030675")
+ * .setAspectType(AspectType.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * AspectType response = catalogServiceClient.createAspectTypeAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateAspectTypeRequest request =
+ * CreateAspectTypeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAspectTypeId("aspectTypeId-423030675")
+ * .setAspectType(AspectType.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.createAspectTypeOperationCallable().futureCall(request);
+ * // Do something.
+ * AspectType response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateAspectTypeRequest request =
+ * CreateAspectTypeRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setAspectTypeId("aspectTypeId-423030675")
+ * .setAspectType(AspectType.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.createAspectTypeCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * AspectType aspectType = AspectType.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * AspectType response =
+ * catalogServiceClient.updateAspectTypeAsync(aspectType, updateMask).get();
+ * }
+ * }
+ *
+ * @param aspectType Required. AspectType Resource
+ * @param updateMask Required. Mask of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateAspectTypeRequest request =
+ * UpdateAspectTypeRequest.newBuilder()
+ * .setAspectType(AspectType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * AspectType response = catalogServiceClient.updateAspectTypeAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateAspectTypeRequest request =
+ * UpdateAspectTypeRequest.newBuilder()
+ * .setAspectType(AspectType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.updateAspectTypeOperationCallable().futureCall(request);
+ * // Do something.
+ * AspectType response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateAspectTypeRequest request =
+ * UpdateAspectTypeRequest.newBuilder()
+ * .setAspectType(AspectType.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.updateAspectTypeCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * AspectTypeName name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]");
+ * catalogServiceClient.deleteAspectTypeAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the AspectType:
+ * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString();
+ * catalogServiceClient.deleteAspectTypeAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the AspectType:
+ * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteAspectTypeRequest request =
+ * DeleteAspectTypeRequest.newBuilder()
+ * .setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * catalogServiceClient.deleteAspectTypeAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteAspectTypeRequest request =
+ * DeleteAspectTypeRequest.newBuilder()
+ * .setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.deleteAspectTypeOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteAspectTypeRequest request =
+ * DeleteAspectTypeRequest.newBuilder()
+ * .setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.deleteAspectTypeCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (AspectType element : catalogServiceClient.listAspectTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the AspectType location, of the form:
+ * `projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
+ * region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAspectTypesPagedResponse listAspectTypes(LocationName parent) {
+ ListAspectTypesRequest request =
+ ListAspectTypesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listAspectTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AspectType resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (AspectType element : catalogServiceClient.listAspectTypes(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the AspectType location, of the form:
+ * `projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
+ * region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAspectTypesPagedResponse listAspectTypes(String parent) {
+ ListAspectTypesRequest request = ListAspectTypesRequest.newBuilder().setParent(parent).build();
+ return listAspectTypes(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AspectType resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListAspectTypesRequest request =
+ * ListAspectTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (AspectType element : catalogServiceClient.listAspectTypes(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListAspectTypesPagedResponse listAspectTypes(ListAspectTypesRequest request) {
+ return listAspectTypesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists AspectType resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListAspectTypesRequest request =
+ * ListAspectTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.listAspectTypesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (AspectType element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListAspectTypesRequest request =
+ * ListAspectTypesRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListAspectTypesResponse response =
+ * catalogServiceClient.listAspectTypesCallable().call(request);
+ * for (AspectType element : response.getAspectTypesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * AspectTypeName name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]");
+ * AspectType response = catalogServiceClient.getAspectType(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the AspectType:
+ * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AspectType getAspectType(AspectTypeName name) {
+ GetAspectTypeRequest request =
+ GetAspectTypeRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getAspectType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a AspectType resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString();
+ * AspectType response = catalogServiceClient.getAspectType(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the AspectType:
+ * `projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AspectType getAspectType(String name) {
+ GetAspectTypeRequest request = GetAspectTypeRequest.newBuilder().setName(name).build();
+ return getAspectType(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a AspectType resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetAspectTypeRequest request =
+ * GetAspectTypeRequest.newBuilder()
+ * .setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
+ * .build();
+ * AspectType response = catalogServiceClient.getAspectType(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final AspectType getAspectType(GetAspectTypeRequest request) {
+ return getAspectTypeCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a AspectType resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetAspectTypeRequest request =
+ * GetAspectTypeRequest.newBuilder()
+ * .setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.getAspectTypeCallable().futureCall(request);
+ * // Do something.
+ * AspectType response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * EntryGroup entryGroup = EntryGroup.newBuilder().build();
+ * String entryGroupId = "entryGroupId1228924712";
+ * EntryGroup response =
+ * catalogServiceClient.createEntryGroupAsync(parent, entryGroup, entryGroupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the entryGroup, of the form:
+ * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
+ * region.
+ * @param entryGroup Required. EntryGroup Resource
+ * @param entryGroupId Required. EntryGroup identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * EntryGroup entryGroup = EntryGroup.newBuilder().build();
+ * String entryGroupId = "entryGroupId1228924712";
+ * EntryGroup response =
+ * catalogServiceClient.createEntryGroupAsync(parent, entryGroup, entryGroupId).get();
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the entryGroup, of the form:
+ * projects/{project_number}/locations/{location_id} where `location_id` refers to a GCP
+ * region.
+ * @param entryGroup Required. EntryGroup Resource
+ * @param entryGroupId Required. EntryGroup identifier.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryGroupRequest request =
+ * CreateEntryGroupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setEntryGroupId("entryGroupId1228924712")
+ * .setEntryGroup(EntryGroup.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * EntryGroup response = catalogServiceClient.createEntryGroupAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryGroupRequest request =
+ * CreateEntryGroupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setEntryGroupId("entryGroupId1228924712")
+ * .setEntryGroup(EntryGroup.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.createEntryGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * EntryGroup response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryGroupRequest request =
+ * CreateEntryGroupRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setEntryGroupId("entryGroupId1228924712")
+ * .setEntryGroup(EntryGroup.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.createEntryGroupCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryGroup entryGroup = EntryGroup.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * EntryGroup response =
+ * catalogServiceClient.updateEntryGroupAsync(entryGroup, updateMask).get();
+ * }
+ * }
+ *
+ * @param entryGroup Required. EntryGroup Resource
+ * @param updateMask Required. Mask of fields to update.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryGroupRequest request =
+ * UpdateEntryGroupRequest.newBuilder()
+ * .setEntryGroup(EntryGroup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * EntryGroup response = catalogServiceClient.updateEntryGroupAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryGroupRequest request =
+ * UpdateEntryGroupRequest.newBuilder()
+ * .setEntryGroup(EntryGroup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.updateEntryGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * EntryGroup response = future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryGroupRequest request =
+ * UpdateEntryGroupRequest.newBuilder()
+ * .setEntryGroup(EntryGroup.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setValidateOnly(true)
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.updateEntryGroupCallable().futureCall(request);
+ * // Do something.
+ * Operation response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+ * catalogServiceClient.deleteEntryGroupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryGroup:
+ * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
+ * catalogServiceClient.deleteEntryGroupAsync(name).get();
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryGroup:
+ * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryGroupRequest request =
+ * DeleteEntryGroupRequest.newBuilder()
+ * .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * catalogServiceClient.deleteEntryGroupAsync(request).get();
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final OperationFutureSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryGroupRequest request =
+ * DeleteEntryGroupRequest.newBuilder()
+ * .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * OperationFuture future =
+ * catalogServiceClient.deleteEntryGroupOperationCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final OperationCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryGroupRequest request =
+ * DeleteEntryGroupRequest.newBuilder()
+ * .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setEtag("etag3123477")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.deleteEntryGroupCallable().futureCall(request);
+ * // Do something.
+ * future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
+ * for (EntryGroup element : catalogServiceClient.listEntryGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the entryGroup location, of the form:
+ * `projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
+ * region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntryGroupsPagedResponse listEntryGroups(LocationName parent) {
+ ListEntryGroupsRequest request =
+ ListEntryGroupsRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEntryGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntryGroup resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
+ * for (EntryGroup element : catalogServiceClient.listEntryGroups(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the entryGroup location, of the form:
+ * `projects/{project_number}/locations/{location_id}` where `location_id` refers to a GCP
+ * region.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntryGroupsPagedResponse listEntryGroups(String parent) {
+ ListEntryGroupsRequest request = ListEntryGroupsRequest.newBuilder().setParent(parent).build();
+ return listEntryGroups(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntryGroup resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntryGroupsRequest request =
+ * ListEntryGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * for (EntryGroup element : catalogServiceClient.listEntryGroups(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest request) {
+ return listEntryGroupsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists EntryGroup resources in a project and location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntryGroupsRequest request =
+ * ListEntryGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.listEntryGroupsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (EntryGroup element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntryGroupsRequest request =
+ * ListEntryGroupsRequest.newBuilder()
+ * .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .setOrderBy("orderBy-1207110587")
+ * .build();
+ * while (true) {
+ * ListEntryGroupsResponse response =
+ * catalogServiceClient.listEntryGroupsCallable().call(request);
+ * for (EntryGroup element : response.getEntryGroupsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+ * EntryGroup response = catalogServiceClient.getEntryGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryGroup:
+ * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryGroup getEntryGroup(EntryGroupName name) {
+ GetEntryGroupRequest request =
+ GetEntryGroupRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEntryGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a EntryGroup resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
+ * EntryGroup response = catalogServiceClient.getEntryGroup(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the EntryGroup:
+ * `projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryGroup getEntryGroup(String name) {
+ GetEntryGroupRequest request = GetEntryGroupRequest.newBuilder().setName(name).build();
+ return getEntryGroup(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a EntryGroup resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryGroupRequest request =
+ * GetEntryGroupRequest.newBuilder()
+ * .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .build();
+ * EntryGroup response = catalogServiceClient.getEntryGroup(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final EntryGroup getEntryGroup(GetEntryGroupRequest request) {
+ return getEntryGroupCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Retrieves a EntryGroup resource.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryGroupRequest request =
+ * GetEntryGroupRequest.newBuilder()
+ * .setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.getEntryGroupCallable().futureCall(request);
+ * // Do something.
+ * EntryGroup response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+ * Entry entry = Entry.newBuilder().build();
+ * String entryId = "entryId-1591558867";
+ * Entry response = catalogServiceClient.createEntry(parent, entry, entryId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent Entry Group:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
+ * @param entry Required. Entry resource.
+ * @param entryId Required. Entry identifier. It has to be unique within an Entry Group.
+ * Entries corresponding to Google Cloud resources use Entry ID format based on Full + * Resource Names (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * The format is a Full Resource Name of the resource without the prefix double slashes in the + * API Service Name part of Full Resource Name. This allows retrieval of entries using their + * associated resource name. + *
For example if the Full Resource Name of a resource is + * `//library.googleapis.com/shelves/shelf1/books/book2`, then the suggested entry_id is + * `library.googleapis.com/shelves/shelf1/books/book2`. + *
It is also suggested to follow the same convention for entries corresponding to + * resources from other providers or systems than Google Cloud. + *
The maximum size of the field is 4000 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry createEntry(EntryGroupName parent, Entry entry, String entryId) { + CreateEntryRequest request = + CreateEntryRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setEntry(entry) + .setEntryId(entryId) + .build(); + return createEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Entry. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
+ * Entry entry = Entry.newBuilder().build();
+ * String entryId = "entryId-1591558867";
+ * Entry response = catalogServiceClient.createEntry(parent, entry, entryId);
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent Entry Group:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
+ * @param entry Required. Entry resource.
+ * @param entryId Required. Entry identifier. It has to be unique within an Entry Group.
+ * Entries corresponding to Google Cloud resources use Entry ID format based on Full + * Resource Names (https://cloud.google.com/apis/design/resource_names#full_resource_name). + * The format is a Full Resource Name of the resource without the prefix double slashes in the + * API Service Name part of Full Resource Name. This allows retrieval of entries using their + * associated resource name. + *
For example if the Full Resource Name of a resource is + * `//library.googleapis.com/shelves/shelf1/books/book2`, then the suggested entry_id is + * `library.googleapis.com/shelves/shelf1/books/book2`. + *
It is also suggested to follow the same convention for entries corresponding to + * resources from other providers or systems than Google Cloud. + *
The maximum size of the field is 4000 characters. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry createEntry(String parent, Entry entry, String entryId) { + CreateEntryRequest request = + CreateEntryRequest.newBuilder() + .setParent(parent) + .setEntry(entry) + .setEntryId(entryId) + .build(); + return createEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an Entry. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryRequest request =
+ * CreateEntryRequest.newBuilder()
+ * .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setEntryId("entryId-1591558867")
+ * .setEntry(Entry.newBuilder().build())
+ * .build();
+ * Entry response = catalogServiceClient.createEntry(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry createEntry(CreateEntryRequest request) {
+ return createEntryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Creates an Entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * CreateEntryRequest request =
+ * CreateEntryRequest.newBuilder()
+ * .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setEntryId("entryId-1591558867")
+ * .setEntry(Entry.newBuilder().build())
+ * .build();
+ * ApiFuture future = catalogServiceClient.createEntryCallable().futureCall(request);
+ * // Do something.
+ * Entry response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * Entry entry = Entry.newBuilder().build();
+ * FieldMask updateMask = FieldMask.newBuilder().build();
+ * Entry response = catalogServiceClient.updateEntry(entry, updateMask);
+ * }
+ * }
+ *
+ * @param entry Required. Entry resource.
+ * @param updateMask Optional. Mask of fields to update. To update Aspects, the update_mask must
+ * contain the value "aspects".
+ * If the update_mask is empty, all modifiable fields present in the request will be + * updated. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Entry updateEntry(Entry entry, FieldMask updateMask) { + UpdateEntryRequest request = + UpdateEntryRequest.newBuilder().setEntry(entry).setUpdateMask(updateMask).build(); + return updateEntry(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an Entry. + * + *
Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryRequest request =
+ * UpdateEntryRequest.newBuilder()
+ * .setEntry(Entry.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .setDeleteMissingAspects(true)
+ * .addAllAspectKeys(new ArrayList())
+ * .build();
+ * Entry response = catalogServiceClient.updateEntry(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry updateEntry(UpdateEntryRequest request) {
+ return updateEntryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Updates an Entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * UpdateEntryRequest request =
+ * UpdateEntryRequest.newBuilder()
+ * .setEntry(Entry.newBuilder().build())
+ * .setUpdateMask(FieldMask.newBuilder().build())
+ * .setAllowMissing(true)
+ * .setDeleteMissingAspects(true)
+ * .addAllAspectKeys(new ArrayList())
+ * .build();
+ * ApiFuture future = catalogServiceClient.updateEntryCallable().futureCall(request);
+ * // Do something.
+ * Entry response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+ * Entry response = catalogServiceClient.deleteEntry(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry deleteEntry(EntryName name) {
+ DeleteEntryRequest request =
+ DeleteEntryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return deleteEntry(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
+ * Entry response = catalogServiceClient.deleteEntry(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry deleteEntry(String name) {
+ DeleteEntryRequest request = DeleteEntryRequest.newBuilder().setName(name).build();
+ return deleteEntry(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryRequest request =
+ * DeleteEntryRequest.newBuilder()
+ * .setName(
+ * EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
+ * .build();
+ * Entry response = catalogServiceClient.deleteEntry(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry deleteEntry(DeleteEntryRequest request) {
+ return deleteEntryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Deletes an Entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * DeleteEntryRequest request =
+ * DeleteEntryRequest.newBuilder()
+ * .setName(
+ * EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
+ * .build();
+ * ApiFuture future = catalogServiceClient.deleteEntryCallable().futureCall(request);
+ * // Do something.
+ * Entry response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
+ * for (Entry element : catalogServiceClient.listEntries(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent Entry Group:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntriesPagedResponse listEntries(EntryGroupName parent) {
+ ListEntriesRequest request =
+ ListEntriesRequest.newBuilder()
+ .setParent(parent == null ? null : parent.toString())
+ .build();
+ return listEntries(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists entries within an entry group.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
+ * for (Entry element : catalogServiceClient.listEntries(parent).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param parent Required. The resource name of the parent Entry Group:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntriesPagedResponse listEntries(String parent) {
+ ListEntriesRequest request = ListEntriesRequest.newBuilder().setParent(parent).build();
+ return listEntries(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists entries within an entry group.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntriesRequest request =
+ * ListEntriesRequest.newBuilder()
+ * .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * for (Entry element : catalogServiceClient.listEntries(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListEntriesPagedResponse listEntries(ListEntriesRequest request) {
+ return listEntriesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists entries within an entry group.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntriesRequest request =
+ * ListEntriesRequest.newBuilder()
+ * .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * ApiFuture future = catalogServiceClient.listEntriesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Entry element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListEntriesRequest request =
+ * ListEntriesRequest.newBuilder()
+ * .setParent(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setFilter("filter-1274492040")
+ * .build();
+ * while (true) {
+ * ListEntriesResponse response = catalogServiceClient.listEntriesCallable().call(request);
+ * for (Entry element : response.getEntriesList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
+ * Entry response = catalogServiceClient.getEntry(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry getEntry(EntryName name) {
+ GetEntryRequest request =
+ GetEntryRequest.newBuilder().setName(name == null ? null : name.toString()).build();
+ return getEntry(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a single entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
+ * Entry response = catalogServiceClient.getEntry(name);
+ * }
+ * }
+ *
+ * @param name Required. The resource name of the Entry:
+ * `projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry getEntry(String name) {
+ GetEntryRequest request = GetEntryRequest.newBuilder().setName(name).build();
+ return getEntry(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a single entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryRequest request =
+ * GetEntryRequest.newBuilder()
+ * .setName(
+ * EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
+ * .setView(EntryView.forNumber(0))
+ * .addAllAspectTypes(new ArrayList())
+ * .addAllPaths(new ArrayList())
+ * .build();
+ * Entry response = catalogServiceClient.getEntry(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry getEntry(GetEntryRequest request) {
+ return getEntryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets a single entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetEntryRequest request =
+ * GetEntryRequest.newBuilder()
+ * .setName(
+ * EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
+ * .setView(EntryView.forNumber(0))
+ * .addAllAspectTypes(new ArrayList())
+ * .addAllPaths(new ArrayList())
+ * .build();
+ * ApiFuture future = catalogServiceClient.getEntryCallable().futureCall(request);
+ * // Do something.
+ * Entry response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LookupEntryRequest request =
+ * LookupEntryRequest.newBuilder()
+ * .setName("name3373707")
+ * .setView(EntryView.forNumber(0))
+ * .addAllAspectTypes(new ArrayList())
+ * .addAllPaths(new ArrayList())
+ * .setEntry(
+ * EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
+ * .build();
+ * Entry response = catalogServiceClient.lookupEntry(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Entry lookupEntry(LookupEntryRequest request) {
+ return lookupEntryCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Looks up a single entry.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * LookupEntryRequest request =
+ * LookupEntryRequest.newBuilder()
+ * .setName("name3373707")
+ * .setView(EntryView.forNumber(0))
+ * .addAllAspectTypes(new ArrayList())
+ * .addAllPaths(new ArrayList())
+ * .setEntry(
+ * EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
+ * .build();
+ * ApiFuture future = catalogServiceClient.lookupEntryCallable().futureCall(request);
+ * // Do something.
+ * Entry response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * String name = "name3373707";
+ * String query = "query107944136";
+ * for (SearchEntriesResult element :
+ * catalogServiceClient.searchEntries(name, query).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param name Required. The project to which the request should be attributed in the following
+ * form: `projects/{project}/locations/{location}`.
+ * @param query Required. The query against which entries in scope should be matched.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchEntriesPagedResponse searchEntries(String name, String query) {
+ SearchEntriesRequest request =
+ SearchEntriesRequest.newBuilder().setName(name).setQuery(query).build();
+ return searchEntries(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches for entries matching given query and scope.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * SearchEntriesRequest request =
+ * SearchEntriesRequest.newBuilder()
+ * .setName("name3373707")
+ * .setQuery("query107944136")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setScope("scope109264468")
+ * .build();
+ * for (SearchEntriesResult element : catalogServiceClient.searchEntries(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final SearchEntriesPagedResponse searchEntries(SearchEntriesRequest request) {
+ return searchEntriesPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Searches for entries matching given query and scope.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * SearchEntriesRequest request =
+ * SearchEntriesRequest.newBuilder()
+ * .setName("name3373707")
+ * .setQuery("query107944136")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setScope("scope109264468")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.searchEntriesPagedCallable().futureCall(request);
+ * // Do something.
+ * for (SearchEntriesResult element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * SearchEntriesRequest request =
+ * SearchEntriesRequest.newBuilder()
+ * .setName("name3373707")
+ * .setQuery("query107944136")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .setOrderBy("orderBy-1207110587")
+ * .setScope("scope109264468")
+ * .build();
+ * while (true) {
+ * SearchEntriesResponse response = catalogServiceClient.searchEntriesCallable().call(request);
+ * for (SearchEntriesResult element : response.getResultsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * for (Location element : catalogServiceClient.listLocations(request).iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final ListLocationsPagedResponse listLocations(ListLocationsRequest request) {
+ return listLocationsPagedCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Lists information about the supported locations for this service.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * ApiFuture future =
+ * catalogServiceClient.listLocationsPagedCallable().futureCall(request);
+ * // Do something.
+ * for (Location element : future.get().iterateAll()) {
+ * // doThingsWith(element);
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * ListLocationsRequest request =
+ * ListLocationsRequest.newBuilder()
+ * .setName("name3373707")
+ * .setFilter("filter-1274492040")
+ * .setPageSize(883849137)
+ * .setPageToken("pageToken873572522")
+ * .build();
+ * while (true) {
+ * ListLocationsResponse response = catalogServiceClient.listLocationsCallable().call(request);
+ * for (Location element : response.getLocationsList()) {
+ * // doThingsWith(element);
+ * }
+ * String nextPageToken = response.getNextPageToken();
+ * if (!Strings.isNullOrEmpty(nextPageToken)) {
+ * request = request.toBuilder().setPageToken(nextPageToken).build();
+ * } else {
+ * break;
+ * }
+ * }
+ * }
+ * }
+ */
+ public final UnaryCallableSample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * Location response = catalogServiceClient.getLocation(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final Location getLocation(GetLocationRequest request) {
+ return getLocationCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Gets information about a location.
+ *
+ * Sample code: + * + *
{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture future = catalogServiceClient.getLocationCallable().futureCall(request);
+ * // Do something.
+ * Location response = future.get();
+ * }
+ * }
+ */
+ public final UnaryCallableThe default instance has everything set to sensible defaults: + * + *
The builder of this class is recursive, so contained classes are themselves builders. When + * build() is called, the tree of builders is called to create the complete settings object. + * + *
For example, to set the total timeout of getEntryType to 30 seconds: + * + *
{@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
+ * CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
+ * CatalogServiceSettings.newBuilder();
+ * catalogServiceSettingsBuilder
+ * .getEntryTypeSettings()
+ * .setRetrySettings(
+ * catalogServiceSettingsBuilder
+ * .getEntryTypeSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CatalogServiceSettings extends ClientSettingsNote: This method does not support applying settings to streaming methods.
+ */
+ public Builder applyToAllUnaryMethods(
+ ApiFunction GenerateDataQualityRules Generates recommended DataQualityRule from a data profiling DataScan. Request object method variants only take one parameter, a request object, which must be constructed before the call. generateDataQualityRules(GenerateDataQualityRulesRequest request)
+ * "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. generateDataQualityRules(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. generateDataQualityRulesCallable()
+ * ListLocations Lists information about the supported locations for this service. Sample code:
+ *
+ * Sample code:
+ *
+ * Sample code:
+ *
+ * The interfaces provided are listed below, along with usage samples.
*
+ * ======================= CatalogServiceClient =======================
+ *
+ * Service Description: The primary resources offered by this service are EntryGroups,
+ * EntryTypes, AspectTypes, Entry and Aspect which collectively allow a data administrator to
+ * organize, manage, secure and catalog data across their organization located across cloud projects
+ * in a variety of storage systems including Cloud Storage and BigQuery.
+ *
+ * Sample for CatalogServiceClient:
+ *
+ * ======================= ContentServiceClient =======================
*
* Service Description: ContentService manages Notebook and SQL Scripts for Dataplex.
diff --git a/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/CatalogServiceStub.java b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/CatalogServiceStub.java
new file mode 100644
index 000000000000..00897cfbfb87
--- /dev/null
+++ b/java-dataplex/google-cloud-dataplex/src/main/java/com/google/cloud/dataplex/v1/stub/CatalogServiceStub.java
@@ -0,0 +1,259 @@
+/*
+ * Copyright 2024 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.dataplex.v1.stub;
+
+import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListAspectTypesPagedResponse;
+import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListEntriesPagedResponse;
+import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListEntryGroupsPagedResponse;
+import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListEntryTypesPagedResponse;
+import static com.google.cloud.dataplex.v1.CatalogServiceClient.ListLocationsPagedResponse;
+import static com.google.cloud.dataplex.v1.CatalogServiceClient.SearchEntriesPagedResponse;
+
+import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.cloud.dataplex.v1.AspectType;
+import com.google.cloud.dataplex.v1.CreateAspectTypeRequest;
+import com.google.cloud.dataplex.v1.CreateEntryGroupRequest;
+import com.google.cloud.dataplex.v1.CreateEntryRequest;
+import com.google.cloud.dataplex.v1.CreateEntryTypeRequest;
+import com.google.cloud.dataplex.v1.DeleteAspectTypeRequest;
+import com.google.cloud.dataplex.v1.DeleteEntryGroupRequest;
+import com.google.cloud.dataplex.v1.DeleteEntryRequest;
+import com.google.cloud.dataplex.v1.DeleteEntryTypeRequest;
+import com.google.cloud.dataplex.v1.Entry;
+import com.google.cloud.dataplex.v1.EntryGroup;
+import com.google.cloud.dataplex.v1.EntryType;
+import com.google.cloud.dataplex.v1.GetAspectTypeRequest;
+import com.google.cloud.dataplex.v1.GetEntryGroupRequest;
+import com.google.cloud.dataplex.v1.GetEntryRequest;
+import com.google.cloud.dataplex.v1.GetEntryTypeRequest;
+import com.google.cloud.dataplex.v1.ListAspectTypesRequest;
+import com.google.cloud.dataplex.v1.ListAspectTypesResponse;
+import com.google.cloud.dataplex.v1.ListEntriesRequest;
+import com.google.cloud.dataplex.v1.ListEntriesResponse;
+import com.google.cloud.dataplex.v1.ListEntryGroupsRequest;
+import com.google.cloud.dataplex.v1.ListEntryGroupsResponse;
+import com.google.cloud.dataplex.v1.ListEntryTypesRequest;
+import com.google.cloud.dataplex.v1.ListEntryTypesResponse;
+import com.google.cloud.dataplex.v1.LookupEntryRequest;
+import com.google.cloud.dataplex.v1.OperationMetadata;
+import com.google.cloud.dataplex.v1.SearchEntriesRequest;
+import com.google.cloud.dataplex.v1.SearchEntriesResponse;
+import com.google.cloud.dataplex.v1.UpdateAspectTypeRequest;
+import com.google.cloud.dataplex.v1.UpdateEntryGroupRequest;
+import com.google.cloud.dataplex.v1.UpdateEntryRequest;
+import com.google.cloud.dataplex.v1.UpdateEntryTypeRequest;
+import com.google.cloud.location.GetLocationRequest;
+import com.google.cloud.location.ListLocationsRequest;
+import com.google.cloud.location.ListLocationsResponse;
+import com.google.cloud.location.Location;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import com.google.protobuf.Empty;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Base stub class for the CatalogService service API.
+ *
+ * This class is for advanced usage and reflects the underlying API directly.
+ */
+@Generated("by gapic-generator-java")
+public abstract class CatalogServiceStub implements BackgroundResource {
+
+ public OperationsStub getOperationsStub() {
+ return null;
+ }
+
+ public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() {
+ return null;
+ }
+
+ public OperationCallable The default instance has everything set to sensible defaults:
+ *
+ * The builder of this class is recursive, so contained classes are themselves builders. When
+ * build() is called, the tree of builders is called to create the complete settings object.
+ *
+ * For example, to set the total timeout of getEntryType to 30 seconds:
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
+ *
*
*
*
@@ -1545,6 +1563,94 @@ public final ListDataScanJobsPagedResponse listDataScanJobs(ListDataScanJobsRequ
return stub.listDataScanJobsCallable();
}
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates recommended DataQualityRule from a data profiling DataScan.
+ *
+ * {@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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * String name = "name3373707";
+ * GenerateDataQualityRulesResponse response =
+ * dataScanServiceClient.generateDataQualityRules(name);
+ * }
+ * }
+ *
+ * @param name Required. The name should be either
+ *
+ *
+ *
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateDataQualityRulesResponse generateDataQualityRules(String name) {
+ GenerateDataQualityRulesRequest request =
+ GenerateDataQualityRulesRequest.newBuilder().setName(name).build();
+ return generateDataQualityRules(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates recommended DataQualityRule from a data profiling DataScan.
+ *
+ * {@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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GenerateDataQualityRulesRequest request =
+ * GenerateDataQualityRulesRequest.newBuilder().setName("name3373707").build();
+ * GenerateDataQualityRulesResponse response =
+ * dataScanServiceClient.generateDataQualityRules(request);
+ * }
+ * }
+ *
+ * @param request The request object containing all of the parameters for the API call.
+ * @throws com.google.api.gax.rpc.ApiException if the remote call fails
+ */
+ public final GenerateDataQualityRulesResponse generateDataQualityRules(
+ GenerateDataQualityRulesRequest request) {
+ return generateDataQualityRulesCallable().call(request);
+ }
+
+ // AUTO-GENERATED DOCUMENTATION AND METHOD.
+ /**
+ * Generates recommended DataQualityRule from a data profiling DataScan.
+ *
+ * {@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 (DataScanServiceClient dataScanServiceClient = DataScanServiceClient.create()) {
+ * GenerateDataQualityRulesRequest request =
+ * GenerateDataQualityRulesRequest.newBuilder().setName("name3373707").build();
+ * ApiFuture
+ */
+ public final UnaryCallable{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+ * EntryTypeName name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]");
+ * EntryType response = catalogServiceClient.getEntryType(name);
+ * }
+ * }
+ *
*
+ *
+ *
+ * {@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * CatalogServiceStubSettings.Builder catalogServiceSettingsBuilder =
+ * CatalogServiceStubSettings.newBuilder();
+ * catalogServiceSettingsBuilder
+ * .getEntryTypeSettings()
+ * .setRetrySettings(
+ * catalogServiceSettingsBuilder
+ * .getEntryTypeSettings()
+ * .getRetrySettings()
+ * .toBuilder()
+ * .setTotalTimeout(Duration.ofSeconds(30))
+ * .build());
+ * CatalogServiceStubSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
+ * }
+ */
+@Generated("by gapic-generator-java")
+public class CatalogServiceStubSettings extends StubSettings