@Generated(value="by gapic-generator-java") public class CatalogServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
This class provides the ability to make remote calls to the backing service through method calls that map to API methods. Sample code to get started:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require 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.
| Modifier | Constructor and Description |
|---|---|
protected |
CatalogServiceClient(CatalogServiceSettings settings)
Constructs an instance of CatalogServiceClient, using the given settings.
|
protected |
CatalogServiceClient(CatalogServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static CatalogServiceClient |
create()
Constructs an instance of CatalogServiceClient with default settings.
|
static CatalogServiceClient |
create(CatalogServiceSettings settings)
Constructs an instance of CatalogServiceClient, using the given settings.
|
static CatalogServiceClient |
create(CatalogServiceStub stub)
Constructs an instance of CatalogServiceClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> |
createAspectTypeAsync(CreateAspectTypeRequest request)
Creates an AspectType
|
com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> |
createAspectTypeAsync(LocationName parent,
AspectType aspectType,
String aspectTypeId)
Creates an AspectType
|
com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> |
createAspectTypeAsync(String parent,
AspectType aspectType,
String aspectTypeId)
Creates an AspectType
|
com.google.api.gax.rpc.UnaryCallable<CreateAspectTypeRequest,com.google.longrunning.Operation> |
createAspectTypeCallable()
Creates an AspectType
|
com.google.api.gax.rpc.OperationCallable<CreateAspectTypeRequest,AspectType,OperationMetadata> |
createAspectTypeOperationCallable()
Creates an AspectType
|
Entry |
createEntry(CreateEntryRequest request)
Creates an Entry.
|
Entry |
createEntry(EntryGroupName parent,
Entry entry,
String entryId)
Creates an Entry.
|
Entry |
createEntry(String parent,
Entry entry,
String entryId)
Creates an Entry.
|
com.google.api.gax.rpc.UnaryCallable<CreateEntryRequest,Entry> |
createEntryCallable()
Creates an Entry.
|
com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> |
createEntryGroupAsync(CreateEntryGroupRequest request)
Creates an EntryGroup
|
com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> |
createEntryGroupAsync(LocationName parent,
EntryGroup entryGroup,
String entryGroupId)
Creates an EntryGroup
|
com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> |
createEntryGroupAsync(String parent,
EntryGroup entryGroup,
String entryGroupId)
Creates an EntryGroup
|
com.google.api.gax.rpc.UnaryCallable<CreateEntryGroupRequest,com.google.longrunning.Operation> |
createEntryGroupCallable()
Creates an EntryGroup
|
com.google.api.gax.rpc.OperationCallable<CreateEntryGroupRequest,EntryGroup,OperationMetadata> |
createEntryGroupOperationCallable()
Creates an EntryGroup
|
com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> |
createEntryTypeAsync(CreateEntryTypeRequest request)
Creates an EntryType
|
com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> |
createEntryTypeAsync(LocationName parent,
EntryType entryType,
String entryTypeId)
Creates an EntryType
|
com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> |
createEntryTypeAsync(String parent,
EntryType entryType,
String entryTypeId)
Creates an EntryType
|
com.google.api.gax.rpc.UnaryCallable<CreateEntryTypeRequest,com.google.longrunning.Operation> |
createEntryTypeCallable()
Creates an EntryType
|
com.google.api.gax.rpc.OperationCallable<CreateEntryTypeRequest,EntryType,OperationMetadata> |
createEntryTypeOperationCallable()
Creates an EntryType
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAspectTypeAsync(AspectTypeName name)
Deletes a AspectType resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAspectTypeAsync(DeleteAspectTypeRequest request)
Deletes a AspectType resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteAspectTypeAsync(String name)
Deletes a AspectType resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteAspectTypeRequest,com.google.longrunning.Operation> |
deleteAspectTypeCallable()
Deletes a AspectType resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteAspectTypeRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteAspectTypeOperationCallable()
Deletes a AspectType resource.
|
Entry |
deleteEntry(DeleteEntryRequest request)
Deletes an Entry.
|
Entry |
deleteEntry(EntryName name)
Deletes an Entry.
|
Entry |
deleteEntry(String name)
Deletes an Entry.
|
com.google.api.gax.rpc.UnaryCallable<DeleteEntryRequest,Entry> |
deleteEntryCallable()
Deletes an Entry.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEntryGroupAsync(DeleteEntryGroupRequest request)
Deletes a EntryGroup resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEntryGroupAsync(EntryGroupName name)
Deletes a EntryGroup resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEntryGroupAsync(String name)
Deletes a EntryGroup resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteEntryGroupRequest,com.google.longrunning.Operation> |
deleteEntryGroupCallable()
Deletes a EntryGroup resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteEntryGroupRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteEntryGroupOperationCallable()
Deletes a EntryGroup resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEntryTypeAsync(DeleteEntryTypeRequest request)
Deletes a EntryType resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEntryTypeAsync(EntryTypeName name)
Deletes a EntryType resource.
|
com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> |
deleteEntryTypeAsync(String name)
Deletes a EntryType resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteEntryTypeRequest,com.google.longrunning.Operation> |
deleteEntryTypeCallable()
Deletes a EntryType resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteEntryTypeRequest,com.google.protobuf.Empty,OperationMetadata> |
deleteEntryTypeOperationCallable()
Deletes a EntryType resource.
|
AspectType |
getAspectType(AspectTypeName name)
Retrieves a AspectType resource.
|
AspectType |
getAspectType(GetAspectTypeRequest request)
Retrieves a AspectType resource.
|
AspectType |
getAspectType(String name)
Retrieves a AspectType resource.
|
com.google.api.gax.rpc.UnaryCallable<GetAspectTypeRequest,AspectType> |
getAspectTypeCallable()
Retrieves a AspectType resource.
|
Entry |
getEntry(EntryName name)
Gets a single entry.
|
Entry |
getEntry(GetEntryRequest request)
Gets a single entry.
|
Entry |
getEntry(String name)
Gets a single entry.
|
com.google.api.gax.rpc.UnaryCallable<GetEntryRequest,Entry> |
getEntryCallable()
Gets a single entry.
|
EntryGroup |
getEntryGroup(EntryGroupName name)
Retrieves a EntryGroup resource.
|
EntryGroup |
getEntryGroup(GetEntryGroupRequest request)
Retrieves a EntryGroup resource.
|
EntryGroup |
getEntryGroup(String name)
Retrieves a EntryGroup resource.
|
com.google.api.gax.rpc.UnaryCallable<GetEntryGroupRequest,EntryGroup> |
getEntryGroupCallable()
Retrieves a EntryGroup resource.
|
EntryType |
getEntryType(EntryTypeName name)
Retrieves a EntryType resource.
|
EntryType |
getEntryType(GetEntryTypeRequest request)
Retrieves a EntryType resource.
|
EntryType |
getEntryType(String name)
Retrieves a EntryType resource.
|
com.google.api.gax.rpc.UnaryCallable<GetEntryTypeRequest,EntryType> |
getEntryTypeCallable()
Retrieves a EntryType resource.
|
com.google.api.gax.httpjson.longrunning.OperationsClient |
getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
com.google.longrunning.OperationsClient |
getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.
|
CatalogServiceSettings |
getSettings() |
CatalogServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
CatalogServiceClient.ListAspectTypesPagedResponse |
listAspectTypes(ListAspectTypesRequest request)
Lists AspectType resources in a project and location.
|
CatalogServiceClient.ListAspectTypesPagedResponse |
listAspectTypes(LocationName parent)
Lists AspectType resources in a project and location.
|
CatalogServiceClient.ListAspectTypesPagedResponse |
listAspectTypes(String parent)
Lists AspectType resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListAspectTypesRequest,ListAspectTypesResponse> |
listAspectTypesCallable()
Lists AspectType resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListAspectTypesRequest,CatalogServiceClient.ListAspectTypesPagedResponse> |
listAspectTypesPagedCallable()
Lists AspectType resources in a project and location.
|
CatalogServiceClient.ListEntriesPagedResponse |
listEntries(EntryGroupName parent)
Lists entries within an entry group.
|
CatalogServiceClient.ListEntriesPagedResponse |
listEntries(ListEntriesRequest request)
Lists entries within an entry group.
|
CatalogServiceClient.ListEntriesPagedResponse |
listEntries(String parent)
Lists entries within an entry group.
|
com.google.api.gax.rpc.UnaryCallable<ListEntriesRequest,ListEntriesResponse> |
listEntriesCallable()
Lists entries within an entry group.
|
com.google.api.gax.rpc.UnaryCallable<ListEntriesRequest,CatalogServiceClient.ListEntriesPagedResponse> |
listEntriesPagedCallable()
Lists entries within an entry group.
|
CatalogServiceClient.ListEntryGroupsPagedResponse |
listEntryGroups(ListEntryGroupsRequest request)
Lists EntryGroup resources in a project and location.
|
CatalogServiceClient.ListEntryGroupsPagedResponse |
listEntryGroups(LocationName parent)
Lists EntryGroup resources in a project and location.
|
CatalogServiceClient.ListEntryGroupsPagedResponse |
listEntryGroups(String parent)
Lists EntryGroup resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsResponse> |
listEntryGroupsCallable()
Lists EntryGroup resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListEntryGroupsRequest,CatalogServiceClient.ListEntryGroupsPagedResponse> |
listEntryGroupsPagedCallable()
Lists EntryGroup resources in a project and location.
|
CatalogServiceClient.ListEntryTypesPagedResponse |
listEntryTypes(ListEntryTypesRequest request)
Lists EntryType resources in a project and location.
|
CatalogServiceClient.ListEntryTypesPagedResponse |
listEntryTypes(LocationName parent)
Lists EntryType resources in a project and location.
|
CatalogServiceClient.ListEntryTypesPagedResponse |
listEntryTypes(String parent)
Lists EntryType resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListEntryTypesRequest,ListEntryTypesResponse> |
listEntryTypesCallable()
Lists EntryType resources in a project and location.
|
com.google.api.gax.rpc.UnaryCallable<ListEntryTypesRequest,CatalogServiceClient.ListEntryTypesPagedResponse> |
listEntryTypesPagedCallable()
Lists EntryType resources in a project and location.
|
CatalogServiceClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,CatalogServiceClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
Entry |
lookupEntry(LookupEntryRequest request)
Looks up a single entry.
|
com.google.api.gax.rpc.UnaryCallable<LookupEntryRequest,Entry> |
lookupEntryCallable()
Looks up a single entry.
|
CatalogServiceClient.SearchEntriesPagedResponse |
searchEntries(SearchEntriesRequest request)
Searches for entries matching given query and scope.
|
CatalogServiceClient.SearchEntriesPagedResponse |
searchEntries(String name,
String query)
Searches for entries matching given query and scope.
|
com.google.api.gax.rpc.UnaryCallable<SearchEntriesRequest,SearchEntriesResponse> |
searchEntriesCallable()
Searches for entries matching given query and scope.
|
com.google.api.gax.rpc.UnaryCallable<SearchEntriesRequest,CatalogServiceClient.SearchEntriesPagedResponse> |
searchEntriesPagedCallable()
Searches for entries matching given query and scope.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> |
updateAspectTypeAsync(AspectType aspectType,
com.google.protobuf.FieldMask updateMask)
Updates a AspectType resource.
|
com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> |
updateAspectTypeAsync(UpdateAspectTypeRequest request)
Updates a AspectType resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateAspectTypeRequest,com.google.longrunning.Operation> |
updateAspectTypeCallable()
Updates a AspectType resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateAspectTypeRequest,AspectType,OperationMetadata> |
updateAspectTypeOperationCallable()
Updates a AspectType resource.
|
Entry |
updateEntry(Entry entry,
com.google.protobuf.FieldMask updateMask)
Updates an Entry.
|
Entry |
updateEntry(UpdateEntryRequest request)
Updates an Entry.
|
com.google.api.gax.rpc.UnaryCallable<UpdateEntryRequest,Entry> |
updateEntryCallable()
Updates an Entry.
|
com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> |
updateEntryGroupAsync(EntryGroup entryGroup,
com.google.protobuf.FieldMask updateMask)
Updates a EntryGroup resource.
|
com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> |
updateEntryGroupAsync(UpdateEntryGroupRequest request)
Updates a EntryGroup resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateEntryGroupRequest,com.google.longrunning.Operation> |
updateEntryGroupCallable()
Updates a EntryGroup resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateEntryGroupRequest,EntryGroup,OperationMetadata> |
updateEntryGroupOperationCallable()
Updates a EntryGroup resource.
|
com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> |
updateEntryTypeAsync(EntryType entryType,
com.google.protobuf.FieldMask updateMask)
Updates a EntryType resource.
|
com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> |
updateEntryTypeAsync(UpdateEntryTypeRequest request)
Updates a EntryType resource.
|
com.google.api.gax.rpc.UnaryCallable<UpdateEntryTypeRequest,com.google.longrunning.Operation> |
updateEntryTypeCallable()
Updates a EntryType resource.
|
com.google.api.gax.rpc.OperationCallable<UpdateEntryTypeRequest,EntryType,OperationMetadata> |
updateEntryTypeOperationCallable()
Updates a EntryType resource.
|
protected CatalogServiceClient(CatalogServiceSettings settings) throws IOException
IOExceptionprotected CatalogServiceClient(CatalogServiceStub stub)
public static final CatalogServiceClient create() throws IOException
IOExceptionpublic static final CatalogServiceClient create(CatalogServiceSettings settings) throws IOException
IOExceptionpublic static final CatalogServiceClient create(CatalogServiceStub stub)
public final CatalogServiceSettings getSettings()
public CatalogServiceStub getStub()
public final com.google.longrunning.OperationsClient getOperationsClient()
@BetaApi public final com.google.api.gax.httpjson.longrunning.OperationsClient getHttpJsonOperationsClient()
public final com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> createEntryTypeAsync(LocationName parent, EntryType entryType, String entryTypeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
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.entryType - Required. EntryType ResourceentryTypeId - Required. EntryType identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> createEntryTypeAsync(String parent, EntryType entryType, String entryTypeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
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.entryType - Required. EntryType ResourceentryTypeId - Required. EntryType identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> createEntryTypeAsync(CreateEntryTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateEntryTypeRequest,EntryType,OperationMetadata> createEntryTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<EntryType, OperationMetadata> future =
catalogServiceClient.createEntryTypeOperationCallable().futureCall(request);
// Do something.
EntryType response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateEntryTypeRequest,com.google.longrunning.Operation> createEntryTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<Operation> future =
catalogServiceClient.createEntryTypeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> updateEntryTypeAsync(EntryType entryType, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryType entryType = EntryType.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
EntryType response = catalogServiceClient.updateEntryTypeAsync(entryType, updateMask).get();
}
entryType - Required. EntryType ResourceupdateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<EntryType,OperationMetadata> updateEntryTypeAsync(UpdateEntryTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateEntryTypeRequest,EntryType,OperationMetadata> updateEntryTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateEntryTypeRequest request =
UpdateEntryTypeRequest.newBuilder()
.setEntryType(EntryType.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<EntryType, OperationMetadata> future =
catalogServiceClient.updateEntryTypeOperationCallable().futureCall(request);
// Do something.
EntryType response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateEntryTypeRequest,com.google.longrunning.Operation> updateEntryTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateEntryTypeRequest request =
UpdateEntryTypeRequest.newBuilder()
.setEntryType(EntryType.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
catalogServiceClient.updateEntryTypeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEntryTypeAsync(EntryTypeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryTypeName name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]");
catalogServiceClient.deleteEntryTypeAsync(name).get();
}
name - Required. The resource name of the EntryType:
`projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEntryTypeAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString();
catalogServiceClient.deleteEntryTypeAsync(name).get();
}
name - Required. The resource name of the EntryType:
`projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEntryTypeAsync(DeleteEntryTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryTypeRequest request =
DeleteEntryTypeRequest.newBuilder()
.setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
.setEtag("etag3123477")
.build();
catalogServiceClient.deleteEntryTypeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteEntryTypeRequest,com.google.protobuf.Empty,OperationMetadata> deleteEntryTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryTypeRequest request =
DeleteEntryTypeRequest.newBuilder()
.setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
catalogServiceClient.deleteEntryTypeOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteEntryTypeRequest,com.google.longrunning.Operation> deleteEntryTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryTypeRequest request =
DeleteEntryTypeRequest.newBuilder()
.setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
catalogServiceClient.deleteEntryTypeCallable().futureCall(request);
// Do something.
future.get();
}
public final CatalogServiceClient.ListEntryTypesPagedResponse listEntryTypes(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (EntryType element : catalogServiceClient.listEntryTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListEntryTypesPagedResponse listEntryTypes(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (EntryType element : catalogServiceClient.listEntryTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListEntryTypesPagedResponse listEntryTypes(ListEntryTypesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListEntryTypesRequest,CatalogServiceClient.ListEntryTypesPagedResponse> listEntryTypesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<EntryType> future =
catalogServiceClient.listEntryTypesPagedCallable().futureCall(request);
// Do something.
for (EntryType element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListEntryTypesRequest,ListEntryTypesResponse> listEntryTypesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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 EntryType getEntryType(EntryTypeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryTypeName name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]");
EntryType response = catalogServiceClient.getEntryType(name);
}
name - Required. The resource name of the EntryType:
`projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EntryType getEntryType(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString();
EntryType response = catalogServiceClient.getEntryType(name);
}
name - Required. The resource name of the EntryType:
`projects/{project_number}/locations/{location_id}/entryTypes/{entry_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EntryType getEntryType(GetEntryTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetEntryTypeRequest request =
GetEntryTypeRequest.newBuilder()
.setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
.build();
EntryType response = catalogServiceClient.getEntryType(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetEntryTypeRequest,EntryType> getEntryTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetEntryTypeRequest request =
GetEntryTypeRequest.newBuilder()
.setName(EntryTypeName.of("[PROJECT]", "[LOCATION]", "[ENTRY_TYPE]").toString())
.build();
ApiFuture<EntryType> future = catalogServiceClient.getEntryTypeCallable().futureCall(request);
// Do something.
EntryType response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> createAspectTypeAsync(LocationName parent, AspectType aspectType, String aspectTypeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
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.aspectType - Required. AspectType ResourceaspectTypeId - Required. AspectType identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> createAspectTypeAsync(String parent, AspectType aspectType, String aspectTypeId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
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.aspectType - Required. AspectType ResourceaspectTypeId - Required. AspectType identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> createAspectTypeAsync(CreateAspectTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateAspectTypeRequest,AspectType,OperationMetadata> createAspectTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<AspectType, OperationMetadata> future =
catalogServiceClient.createAspectTypeOperationCallable().futureCall(request);
// Do something.
AspectType response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateAspectTypeRequest,com.google.longrunning.Operation> createAspectTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<Operation> future =
catalogServiceClient.createAspectTypeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> updateAspectTypeAsync(AspectType aspectType, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
AspectType aspectType = AspectType.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
AspectType response =
catalogServiceClient.updateAspectTypeAsync(aspectType, updateMask).get();
}
aspectType - Required. AspectType ResourceupdateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<AspectType,OperationMetadata> updateAspectTypeAsync(UpdateAspectTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateAspectTypeRequest,AspectType,OperationMetadata> updateAspectTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateAspectTypeRequest request =
UpdateAspectTypeRequest.newBuilder()
.setAspectType(AspectType.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<AspectType, OperationMetadata> future =
catalogServiceClient.updateAspectTypeOperationCallable().futureCall(request);
// Do something.
AspectType response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateAspectTypeRequest,com.google.longrunning.Operation> updateAspectTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateAspectTypeRequest request =
UpdateAspectTypeRequest.newBuilder()
.setAspectType(AspectType.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
catalogServiceClient.updateAspectTypeCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAspectTypeAsync(AspectTypeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
AspectTypeName name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]");
catalogServiceClient.deleteAspectTypeAsync(name).get();
}
name - Required. The resource name of the AspectType:
`projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAspectTypeAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString();
catalogServiceClient.deleteAspectTypeAsync(name).get();
}
name - Required. The resource name of the AspectType:
`projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteAspectTypeAsync(DeleteAspectTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteAspectTypeRequest request =
DeleteAspectTypeRequest.newBuilder()
.setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
.setEtag("etag3123477")
.build();
catalogServiceClient.deleteAspectTypeAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteAspectTypeRequest,com.google.protobuf.Empty,OperationMetadata> deleteAspectTypeOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteAspectTypeRequest request =
DeleteAspectTypeRequest.newBuilder()
.setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
catalogServiceClient.deleteAspectTypeOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteAspectTypeRequest,com.google.longrunning.Operation> deleteAspectTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteAspectTypeRequest request =
DeleteAspectTypeRequest.newBuilder()
.setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
catalogServiceClient.deleteAspectTypeCallable().futureCall(request);
// Do something.
future.get();
}
public final CatalogServiceClient.ListAspectTypesPagedResponse listAspectTypes(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (AspectType element : catalogServiceClient.listAspectTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListAspectTypesPagedResponse listAspectTypes(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (AspectType element : catalogServiceClient.listAspectTypes(parent).iterateAll()) {
// doThingsWith(element);
}
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListAspectTypesPagedResponse listAspectTypes(ListAspectTypesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListAspectTypesRequest,CatalogServiceClient.ListAspectTypesPagedResponse> listAspectTypesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<AspectType> future =
catalogServiceClient.listAspectTypesPagedCallable().futureCall(request);
// Do something.
for (AspectType element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListAspectTypesRequest,ListAspectTypesResponse> listAspectTypesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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 AspectType getAspectType(AspectTypeName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
AspectTypeName name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]");
AspectType response = catalogServiceClient.getAspectType(name);
}
name - Required. The resource name of the AspectType:
`projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AspectType getAspectType(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString();
AspectType response = catalogServiceClient.getAspectType(name);
}
name - Required. The resource name of the AspectType:
`projects/{project_number}/locations/{location_id}/aspectTypes/{aspect_type_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final AspectType getAspectType(GetAspectTypeRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetAspectTypeRequest request =
GetAspectTypeRequest.newBuilder()
.setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
.build();
AspectType response = catalogServiceClient.getAspectType(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetAspectTypeRequest,AspectType> getAspectTypeCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetAspectTypeRequest request =
GetAspectTypeRequest.newBuilder()
.setName(AspectTypeName.of("[PROJECT]", "[LOCATION]", "[ASPECT_TYPE]").toString())
.build();
ApiFuture<AspectType> future =
catalogServiceClient.getAspectTypeCallable().futureCall(request);
// Do something.
AspectType response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> createEntryGroupAsync(LocationName parent, EntryGroup entryGroup, String entryGroupId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
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.entryGroup - Required. EntryGroup ResourceentryGroupId - Required. EntryGroup identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> createEntryGroupAsync(String parent, EntryGroup entryGroup, String entryGroupId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
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.entryGroup - Required. EntryGroup ResourceentryGroupId - Required. EntryGroup identifier.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> createEntryGroupAsync(CreateEntryGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<CreateEntryGroupRequest,EntryGroup,OperationMetadata> createEntryGroupOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
CreateEntryGroupRequest request =
CreateEntryGroupRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setEntryGroupId("entryGroupId1228924712")
.setEntryGroup(EntryGroup.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<EntryGroup, OperationMetadata> future =
catalogServiceClient.createEntryGroupOperationCallable().futureCall(request);
// Do something.
EntryGroup response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<CreateEntryGroupRequest,com.google.longrunning.Operation> createEntryGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
CreateEntryGroupRequest request =
CreateEntryGroupRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setEntryGroupId("entryGroupId1228924712")
.setEntryGroup(EntryGroup.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
catalogServiceClient.createEntryGroupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> updateEntryGroupAsync(EntryGroup entryGroup, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryGroup entryGroup = EntryGroup.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
EntryGroup response =
catalogServiceClient.updateEntryGroupAsync(entryGroup, updateMask).get();
}
entryGroup - Required. EntryGroup ResourceupdateMask - Required. Mask of fields to update.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<EntryGroup,OperationMetadata> updateEntryGroupAsync(UpdateEntryGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<UpdateEntryGroupRequest,EntryGroup,OperationMetadata> updateEntryGroupOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateEntryGroupRequest request =
UpdateEntryGroupRequest.newBuilder()
.setEntryGroup(EntryGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
OperationFuture<EntryGroup, OperationMetadata> future =
catalogServiceClient.updateEntryGroupOperationCallable().futureCall(request);
// Do something.
EntryGroup response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateEntryGroupRequest,com.google.longrunning.Operation> updateEntryGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateEntryGroupRequest request =
UpdateEntryGroupRequest.newBuilder()
.setEntryGroup(EntryGroup.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setValidateOnly(true)
.build();
ApiFuture<Operation> future =
catalogServiceClient.updateEntryGroupCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEntryGroupAsync(EntryGroupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
catalogServiceClient.deleteEntryGroupAsync(name).get();
}
name - Required. The resource name of the EntryGroup:
`projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEntryGroupAsync(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
catalogServiceClient.deleteEntryGroupAsync(name).get();
}
name - Required. The resource name of the EntryGroup:
`projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteEntryGroupAsync(DeleteEntryGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryGroupRequest request =
DeleteEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setEtag("etag3123477")
.build();
catalogServiceClient.deleteEntryGroupAsync(request).get();
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.OperationCallable<DeleteEntryGroupRequest,com.google.protobuf.Empty,OperationMetadata> deleteEntryGroupOperationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryGroupRequest request =
DeleteEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setEtag("etag3123477")
.build();
OperationFuture<Empty, OperationMetadata> future =
catalogServiceClient.deleteEntryGroupOperationCallable().futureCall(request);
// Do something.
future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteEntryGroupRequest,com.google.longrunning.Operation> deleteEntryGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryGroupRequest request =
DeleteEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.setEtag("etag3123477")
.build();
ApiFuture<Operation> future =
catalogServiceClient.deleteEntryGroupCallable().futureCall(request);
// Do something.
future.get();
}
public final CatalogServiceClient.ListEntryGroupsPagedResponse listEntryGroups(LocationName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (EntryGroup element : catalogServiceClient.listEntryGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListEntryGroupsPagedResponse listEntryGroups(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (EntryGroup element : catalogServiceClient.listEntryGroups(parent).iterateAll()) {
// doThingsWith(element);
}
}
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.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListEntryGroupsPagedResponse listEntryGroups(ListEntryGroupsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListEntryGroupsRequest,CatalogServiceClient.ListEntryGroupsPagedResponse> listEntryGroupsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<EntryGroup> future =
catalogServiceClient.listEntryGroupsPagedCallable().futureCall(request);
// Do something.
for (EntryGroup element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListEntryGroupsRequest,ListEntryGroupsResponse> listEntryGroupsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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 EntryGroup getEntryGroup(EntryGroupName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryGroupName name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
EntryGroup response = catalogServiceClient.getEntryGroup(name);
}
name - Required. The resource name of the EntryGroup:
`projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EntryGroup getEntryGroup(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
EntryGroup response = catalogServiceClient.getEntryGroup(name);
}
name - Required. The resource name of the EntryGroup:
`projects/{project_number}/locations/{location_id}/entryGroups/{entry_group_id}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final EntryGroup getEntryGroup(GetEntryGroupRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetEntryGroupRequest request =
GetEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.build();
EntryGroup response = catalogServiceClient.getEntryGroup(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetEntryGroupRequest,EntryGroup> getEntryGroupCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetEntryGroupRequest request =
GetEntryGroupRequest.newBuilder()
.setName(EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString())
.build();
ApiFuture<EntryGroup> future =
catalogServiceClient.getEntryGroupCallable().futureCall(request);
// Do something.
EntryGroup response = future.get();
}
public final Entry createEntry(EntryGroupName parent, Entry entry, String entryId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
parent - Required. The resource name of the parent Entry Group:
`projects/{project}/locations/{location}/entryGroups/{entry_group}`.entry - Required. Entry resource.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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Entry createEntry(String parent, Entry entry, String entryId)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
parent - Required. The resource name of the parent Entry Group:
`projects/{project}/locations/{location}/entryGroups/{entry_group}`.entry - Required. Entry resource.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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Entry createEntry(CreateEntryRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateEntryRequest,Entry> createEntryCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<Entry> future = catalogServiceClient.createEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
public final Entry updateEntry(Entry entry, com.google.protobuf.FieldMask updateMask)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
Entry entry = Entry.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
Entry response = catalogServiceClient.updateEntry(entry, updateMask);
}
entry - Required. Entry resource.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.
com.google.api.gax.rpc.ApiException - if the remote call failspublic final Entry updateEntry(UpdateEntryRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateEntryRequest request =
UpdateEntryRequest.newBuilder()
.setEntry(Entry.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setDeleteMissingAspects(true)
.addAllAspectKeys(new ArrayList<String>())
.build();
Entry response = catalogServiceClient.updateEntry(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateEntryRequest,Entry> updateEntryCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
UpdateEntryRequest request =
UpdateEntryRequest.newBuilder()
.setEntry(Entry.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.setAllowMissing(true)
.setDeleteMissingAspects(true)
.addAllAspectKeys(new ArrayList<String>())
.build();
ApiFuture<Entry> future = catalogServiceClient.updateEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
public final Entry deleteEntry(EntryName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
Entry response = catalogServiceClient.deleteEntry(name);
}
name - Required. The resource name of the Entry:
`projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Entry deleteEntry(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
Entry response = catalogServiceClient.deleteEntry(name);
}
name - Required. The resource name of the Entry:
`projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Entry deleteEntry(DeleteEntryRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryRequest request =
DeleteEntryRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
Entry response = catalogServiceClient.deleteEntry(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteEntryRequest,Entry> deleteEntryCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
DeleteEntryRequest request =
DeleteEntryRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
ApiFuture<Entry> future = catalogServiceClient.deleteEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
public final CatalogServiceClient.ListEntriesPagedResponse listEntries(EntryGroupName parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryGroupName parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]");
for (Entry element : catalogServiceClient.listEntries(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent Entry Group:
`projects/{project}/locations/{location}/entryGroups/{entry_group}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListEntriesPagedResponse listEntries(String parent)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String parent = EntryGroupName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]").toString();
for (Entry element : catalogServiceClient.listEntries(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The resource name of the parent Entry Group:
`projects/{project}/locations/{location}/entryGroups/{entry_group}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.ListEntriesPagedResponse listEntries(ListEntriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListEntriesRequest,CatalogServiceClient.ListEntriesPagedResponse> listEntriesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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<Entry> future = catalogServiceClient.listEntriesPagedCallable().futureCall(request);
// Do something.
for (Entry element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListEntriesRequest,ListEntriesResponse> listEntriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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 Entry getEntry(EntryName name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
EntryName name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]");
Entry response = catalogServiceClient.getEntry(name);
}
name - Required. The resource name of the Entry:
`projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Entry getEntry(String name)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString();
Entry response = catalogServiceClient.getEntry(name);
}
name - Required. The resource name of the Entry:
`projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final Entry getEntry(GetEntryRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetEntryRequest request =
GetEntryRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setView(EntryView.forNumber(0))
.addAllAspectTypes(new ArrayList<String>())
.addAllPaths(new ArrayList<String>())
.build();
Entry response = catalogServiceClient.getEntry(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetEntryRequest,Entry> getEntryCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetEntryRequest request =
GetEntryRequest.newBuilder()
.setName(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.setView(EntryView.forNumber(0))
.addAllAspectTypes(new ArrayList<String>())
.addAllPaths(new ArrayList<String>())
.build();
ApiFuture<Entry> future = catalogServiceClient.getEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
public final Entry lookupEntry(LookupEntryRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
LookupEntryRequest request =
LookupEntryRequest.newBuilder()
.setName("name3373707")
.setView(EntryView.forNumber(0))
.addAllAspectTypes(new ArrayList<String>())
.addAllPaths(new ArrayList<String>())
.setEntry(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
Entry response = catalogServiceClient.lookupEntry(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<LookupEntryRequest,Entry> lookupEntryCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
LookupEntryRequest request =
LookupEntryRequest.newBuilder()
.setName("name3373707")
.setView(EntryView.forNumber(0))
.addAllAspectTypes(new ArrayList<String>())
.addAllPaths(new ArrayList<String>())
.setEntry(
EntryName.of("[PROJECT]", "[LOCATION]", "[ENTRY_GROUP]", "[ENTRY]").toString())
.build();
ApiFuture<Entry> future = catalogServiceClient.lookupEntryCallable().futureCall(request);
// Do something.
Entry response = future.get();
}
public final CatalogServiceClient.SearchEntriesPagedResponse searchEntries(String name, String query)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
String name = "name3373707";
String query = "query107944136";
for (SearchEntriesResult element :
catalogServiceClient.searchEntries(name, query).iterateAll()) {
// doThingsWith(element);
}
}
name - Required. The project to which the request should be attributed in the following
form: `projects/{project}/locations/{location}`.query - Required. The query against which entries in scope should be matched.com.google.api.gax.rpc.ApiException - if the remote call failspublic final CatalogServiceClient.SearchEntriesPagedResponse searchEntries(SearchEntriesRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<SearchEntriesRequest,CatalogServiceClient.SearchEntriesPagedResponse> searchEntriesPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
SearchEntriesRequest request =
SearchEntriesRequest.newBuilder()
.setName("name3373707")
.setQuery("query107944136")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.setOrderBy("orderBy-1207110587")
.setScope("scope109264468")
.build();
ApiFuture<SearchEntriesResult> future =
catalogServiceClient.searchEntriesPagedCallable().futureCall(request);
// Do something.
for (SearchEntriesResult element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<SearchEntriesRequest,SearchEntriesResponse> searchEntriesCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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 CatalogServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,CatalogServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
catalogServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (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 com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = catalogServiceClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future = catalogServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2024 Google LLC. All rights reserved.