- 0.49.0 (latest)
- 0.48.0
- 0.47.0
- 0.45.0
- 0.44.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.33.0
- 0.32.0
- 0.31.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.16.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.0
- 0.8.0
- 0.7.0
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.0
- 0.1.0
GitHub Repository | Product Reference |
Service Description: Service for managing site search related resources.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
SiteSearchEngineName name =
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]");
SiteSearchEngine response = siteSearchEngineServiceClient.getSiteSearchEngine(name);
}
Note: close() needs to be called on the SiteSearchEngineServiceClient 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 |
---|---|---|
GetSiteSearchEngine |
Gets the SiteSearchEngine. |
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.
|
CreateTargetSite |
Creates a TargetSite. |
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
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
BatchCreateTargetSites |
Creates TargetSite in a batch. |
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.
|
GetTargetSite |
Gets a TargetSite. |
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.
|
UpdateTargetSite |
Updates a TargetSite. |
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
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteTargetSite |
Deletes a TargetSite. |
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
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListTargetSites |
Gets a list of TargetSites. |
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.
|
EnableAdvancedSiteSearch |
Upgrade from basic site search to advanced site search. |
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.
|
DisableAdvancedSiteSearch |
Downgrade from advanced site search to basic site search. |
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.
|
RecrawlUris |
Request on-demand recrawl for a list of URIs. |
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.
|
BatchVerifyTargetSites |
Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification. |
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.
|
FetchDomainVerificationStatus |
Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment. |
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 SiteSearchEngineServiceSettings 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
SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
SiteSearchEngineServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
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
SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
SiteSearchEngineServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
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
SiteSearchEngineServiceSettings siteSearchEngineServiceSettings =
SiteSearchEngineServiceSettings.newHttpJsonBuilder().build();
SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create(siteSearchEngineServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
Static Methods
create()
public static final SiteSearchEngineServiceClient create()
Constructs an instance of SiteSearchEngineServiceClient with default settings.
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(SiteSearchEngineServiceSettings settings)
public static final SiteSearchEngineServiceClient create(SiteSearchEngineServiceSettings settings)
Constructs an instance of SiteSearchEngineServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.
Parameter | |
---|---|
Name | Description |
settings |
SiteSearchEngineServiceSettings |
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceClient |
Exceptions | |
---|---|
Type | Description |
IOException |
create(SiteSearchEngineServiceStub stub)
public static final SiteSearchEngineServiceClient create(SiteSearchEngineServiceStub stub)
Constructs an instance of SiteSearchEngineServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(SiteSearchEngineServiceSettings).
Parameter | |
---|---|
Name | Description |
stub |
SiteSearchEngineServiceStub |
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceClient |
Constructors
SiteSearchEngineServiceClient(SiteSearchEngineServiceSettings settings)
protected SiteSearchEngineServiceClient(SiteSearchEngineServiceSettings settings)
Constructs an instance of SiteSearchEngineServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.
Parameter | |
---|---|
Name | Description |
settings |
SiteSearchEngineServiceSettings |
SiteSearchEngineServiceClient(SiteSearchEngineServiceStub stub)
protected SiteSearchEngineServiceClient(SiteSearchEngineServiceStub stub)
Parameter | |
---|---|
Name | Description |
stub |
SiteSearchEngineServiceStub |
Methods
awaitTermination(long duration, TimeUnit unit)
public boolean awaitTermination(long duration, TimeUnit unit)
Parameters | |
---|---|
Name | Description |
duration |
long |
unit |
TimeUnit |
Returns | |
---|---|
Type | Description |
boolean |
Exceptions | |
---|---|
Type | Description |
InterruptedException |
batchCreateTargetSitesAsync(BatchCreateTargetSitesRequest request)
public final OperationFuture<BatchCreateTargetSitesResponse,BatchCreateTargetSiteMetadata> batchCreateTargetSitesAsync(BatchCreateTargetSitesRequest request)
Creates TargetSite in a batch.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
BatchCreateTargetSitesRequest request =
BatchCreateTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.addAllRequests(new ArrayList<CreateTargetSiteRequest>())
.build();
BatchCreateTargetSitesResponse response =
siteSearchEngineServiceClient.batchCreateTargetSitesAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
BatchCreateTargetSitesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<BatchCreateTargetSitesResponse,BatchCreateTargetSiteMetadata> |
batchCreateTargetSitesCallable()
public final UnaryCallable<BatchCreateTargetSitesRequest,Operation> batchCreateTargetSitesCallable()
Creates TargetSite in a batch.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
BatchCreateTargetSitesRequest request =
BatchCreateTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.addAllRequests(new ArrayList<CreateTargetSiteRequest>())
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.batchCreateTargetSitesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<BatchCreateTargetSitesRequest,Operation> |
batchCreateTargetSitesOperationCallable()
public final OperationCallable<BatchCreateTargetSitesRequest,BatchCreateTargetSitesResponse,BatchCreateTargetSiteMetadata> batchCreateTargetSitesOperationCallable()
Creates TargetSite in a batch.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
BatchCreateTargetSitesRequest request =
BatchCreateTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.addAllRequests(new ArrayList<CreateTargetSiteRequest>())
.build();
OperationFuture<BatchCreateTargetSitesResponse, BatchCreateTargetSiteMetadata> future =
siteSearchEngineServiceClient
.batchCreateTargetSitesOperationCallable()
.futureCall(request);
// Do something.
BatchCreateTargetSitesResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<BatchCreateTargetSitesRequest,BatchCreateTargetSitesResponse,BatchCreateTargetSiteMetadata> |
batchVerifyTargetSitesAsync(BatchVerifyTargetSitesRequest request)
public final OperationFuture<BatchVerifyTargetSitesResponse,BatchVerifyTargetSitesMetadata> batchVerifyTargetSitesAsync(BatchVerifyTargetSitesRequest request)
Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
BatchVerifyTargetSitesRequest request =
BatchVerifyTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationCollectionDataStoreName(
"[PROJECT]", "[LOCATION]", "[COLLECTION]", "[DATA_STORE]")
.toString())
.build();
BatchVerifyTargetSitesResponse response =
siteSearchEngineServiceClient.batchVerifyTargetSitesAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
BatchVerifyTargetSitesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<BatchVerifyTargetSitesResponse,BatchVerifyTargetSitesMetadata> |
batchVerifyTargetSitesCallable()
public final UnaryCallable<BatchVerifyTargetSitesRequest,Operation> batchVerifyTargetSitesCallable()
Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
BatchVerifyTargetSitesRequest request =
BatchVerifyTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationCollectionDataStoreName(
"[PROJECT]", "[LOCATION]", "[COLLECTION]", "[DATA_STORE]")
.toString())
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.batchVerifyTargetSitesCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<BatchVerifyTargetSitesRequest,Operation> |
batchVerifyTargetSitesOperationCallable()
public final OperationCallable<BatchVerifyTargetSitesRequest,BatchVerifyTargetSitesResponse,BatchVerifyTargetSitesMetadata> batchVerifyTargetSitesOperationCallable()
Verify target sites' ownership and validity. This API sends all the target sites under site search engine for verification.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
BatchVerifyTargetSitesRequest request =
BatchVerifyTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationCollectionDataStoreName(
"[PROJECT]", "[LOCATION]", "[COLLECTION]", "[DATA_STORE]")
.toString())
.build();
OperationFuture<BatchVerifyTargetSitesResponse, BatchVerifyTargetSitesMetadata> future =
siteSearchEngineServiceClient
.batchVerifyTargetSitesOperationCallable()
.futureCall(request);
// Do something.
BatchVerifyTargetSitesResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<BatchVerifyTargetSitesRequest,BatchVerifyTargetSitesResponse,BatchVerifyTargetSitesMetadata> |
close()
public final void close()
createTargetSiteAsync(CreateTargetSiteRequest request)
public final OperationFuture<TargetSite,CreateTargetSiteMetadata> createTargetSiteAsync(CreateTargetSiteRequest request)
Creates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
CreateTargetSiteRequest request =
CreateTargetSiteRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.setTargetSite(TargetSite.newBuilder().build())
.build();
TargetSite response = siteSearchEngineServiceClient.createTargetSiteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
CreateTargetSiteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<TargetSite,CreateTargetSiteMetadata> |
createTargetSiteAsync(SiteSearchEngineName parent, TargetSite targetSite)
public final OperationFuture<TargetSite,CreateTargetSiteMetadata> createTargetSiteAsync(SiteSearchEngineName parent, TargetSite targetSite)
Creates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
SiteSearchEngineName parent =
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]");
TargetSite targetSite = TargetSite.newBuilder().build();
TargetSite response =
siteSearchEngineServiceClient.createTargetSiteAsync(parent, targetSite).get();
}
Parameters | |
---|---|
Name | Description |
parent |
SiteSearchEngineName Required. Parent resource name of
TargetSite, such as
|
targetSite |
TargetSite Required. The TargetSite to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<TargetSite,CreateTargetSiteMetadata> |
createTargetSiteAsync(String parent, TargetSite targetSite)
public final OperationFuture<TargetSite,CreateTargetSiteMetadata> createTargetSiteAsync(String parent, TargetSite targetSite)
Creates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
String parent =
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString();
TargetSite targetSite = TargetSite.newBuilder().build();
TargetSite response =
siteSearchEngineServiceClient.createTargetSiteAsync(parent, targetSite).get();
}
Parameters | |
---|---|
Name | Description |
parent |
String Required. Parent resource name of
TargetSite, such as
|
targetSite |
TargetSite Required. The TargetSite to create. |
Returns | |
---|---|
Type | Description |
OperationFuture<TargetSite,CreateTargetSiteMetadata> |
createTargetSiteCallable()
public final UnaryCallable<CreateTargetSiteRequest,Operation> createTargetSiteCallable()
Creates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
CreateTargetSiteRequest request =
CreateTargetSiteRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.setTargetSite(TargetSite.newBuilder().build())
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.createTargetSiteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<CreateTargetSiteRequest,Operation> |
createTargetSiteOperationCallable()
public final OperationCallable<CreateTargetSiteRequest,TargetSite,CreateTargetSiteMetadata> createTargetSiteOperationCallable()
Creates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
CreateTargetSiteRequest request =
CreateTargetSiteRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.setTargetSite(TargetSite.newBuilder().build())
.build();
OperationFuture<TargetSite, CreateTargetSiteMetadata> future =
siteSearchEngineServiceClient.createTargetSiteOperationCallable().futureCall(request);
// Do something.
TargetSite response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<CreateTargetSiteRequest,TargetSite,CreateTargetSiteMetadata> |
deleteTargetSiteAsync(DeleteTargetSiteRequest request)
public final OperationFuture<Empty,DeleteTargetSiteMetadata> deleteTargetSiteAsync(DeleteTargetSiteRequest request)
Deletes a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
DeleteTargetSiteRequest request =
DeleteTargetSiteRequest.newBuilder()
.setName(
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]")
.toString())
.build();
siteSearchEngineServiceClient.deleteTargetSiteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DeleteTargetSiteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,DeleteTargetSiteMetadata> |
deleteTargetSiteAsync(TargetSiteName name)
public final OperationFuture<Empty,DeleteTargetSiteMetadata> deleteTargetSiteAsync(TargetSiteName name)
Deletes a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
TargetSiteName name =
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
siteSearchEngineServiceClient.deleteTargetSiteAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
TargetSiteName Required. Full resource name of
TargetSite, such as
If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,DeleteTargetSiteMetadata> |
deleteTargetSiteAsync(String name)
public final OperationFuture<Empty,DeleteTargetSiteMetadata> deleteTargetSiteAsync(String name)
Deletes a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
String name =
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]")
.toString();
siteSearchEngineServiceClient.deleteTargetSiteAsync(name).get();
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Full resource name of
TargetSite, such as
If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. |
Returns | |
---|---|
Type | Description |
OperationFuture<Empty,DeleteTargetSiteMetadata> |
deleteTargetSiteCallable()
public final UnaryCallable<DeleteTargetSiteRequest,Operation> deleteTargetSiteCallable()
Deletes a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
DeleteTargetSiteRequest request =
DeleteTargetSiteRequest.newBuilder()
.setName(
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]")
.toString())
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.deleteTargetSiteCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DeleteTargetSiteRequest,Operation> |
deleteTargetSiteOperationCallable()
public final OperationCallable<DeleteTargetSiteRequest,Empty,DeleteTargetSiteMetadata> deleteTargetSiteOperationCallable()
Deletes a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
DeleteTargetSiteRequest request =
DeleteTargetSiteRequest.newBuilder()
.setName(
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]")
.toString())
.build();
OperationFuture<Empty, DeleteTargetSiteMetadata> future =
siteSearchEngineServiceClient.deleteTargetSiteOperationCallable().futureCall(request);
// Do something.
future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DeleteTargetSiteRequest,Empty,DeleteTargetSiteMetadata> |
disableAdvancedSiteSearchAsync(DisableAdvancedSiteSearchRequest request)
public final OperationFuture<DisableAdvancedSiteSearchResponse,DisableAdvancedSiteSearchMetadata> disableAdvancedSiteSearchAsync(DisableAdvancedSiteSearchRequest request)
Downgrade from advanced site search to basic site search.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
DisableAdvancedSiteSearchRequest request =
DisableAdvancedSiteSearchRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
DisableAdvancedSiteSearchResponse response =
siteSearchEngineServiceClient.disableAdvancedSiteSearchAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
DisableAdvancedSiteSearchRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<DisableAdvancedSiteSearchResponse,DisableAdvancedSiteSearchMetadata> |
disableAdvancedSiteSearchCallable()
public final UnaryCallable<DisableAdvancedSiteSearchRequest,Operation> disableAdvancedSiteSearchCallable()
Downgrade from advanced site search to basic site search.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
DisableAdvancedSiteSearchRequest request =
DisableAdvancedSiteSearchRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.disableAdvancedSiteSearchCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<DisableAdvancedSiteSearchRequest,Operation> |
disableAdvancedSiteSearchOperationCallable()
public final OperationCallable<DisableAdvancedSiteSearchRequest,DisableAdvancedSiteSearchResponse,DisableAdvancedSiteSearchMetadata> disableAdvancedSiteSearchOperationCallable()
Downgrade from advanced site search to basic site search.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
DisableAdvancedSiteSearchRequest request =
DisableAdvancedSiteSearchRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
OperationFuture<DisableAdvancedSiteSearchResponse, DisableAdvancedSiteSearchMetadata> future =
siteSearchEngineServiceClient
.disableAdvancedSiteSearchOperationCallable()
.futureCall(request);
// Do something.
DisableAdvancedSiteSearchResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<DisableAdvancedSiteSearchRequest,DisableAdvancedSiteSearchResponse,DisableAdvancedSiteSearchMetadata> |
enableAdvancedSiteSearchAsync(EnableAdvancedSiteSearchRequest request)
public final OperationFuture<EnableAdvancedSiteSearchResponse,EnableAdvancedSiteSearchMetadata> enableAdvancedSiteSearchAsync(EnableAdvancedSiteSearchRequest request)
Upgrade from basic site search to advanced site search.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
EnableAdvancedSiteSearchRequest request =
EnableAdvancedSiteSearchRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
EnableAdvancedSiteSearchResponse response =
siteSearchEngineServiceClient.enableAdvancedSiteSearchAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
EnableAdvancedSiteSearchRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<EnableAdvancedSiteSearchResponse,EnableAdvancedSiteSearchMetadata> |
enableAdvancedSiteSearchCallable()
public final UnaryCallable<EnableAdvancedSiteSearchRequest,Operation> enableAdvancedSiteSearchCallable()
Upgrade from basic site search to advanced site search.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
EnableAdvancedSiteSearchRequest request =
EnableAdvancedSiteSearchRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.enableAdvancedSiteSearchCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<EnableAdvancedSiteSearchRequest,Operation> |
enableAdvancedSiteSearchOperationCallable()
public final OperationCallable<EnableAdvancedSiteSearchRequest,EnableAdvancedSiteSearchResponse,EnableAdvancedSiteSearchMetadata> enableAdvancedSiteSearchOperationCallable()
Upgrade from basic site search to advanced site search.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
EnableAdvancedSiteSearchRequest request =
EnableAdvancedSiteSearchRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
OperationFuture<EnableAdvancedSiteSearchResponse, EnableAdvancedSiteSearchMetadata> future =
siteSearchEngineServiceClient
.enableAdvancedSiteSearchOperationCallable()
.futureCall(request);
// Do something.
EnableAdvancedSiteSearchResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<EnableAdvancedSiteSearchRequest,EnableAdvancedSiteSearchResponse,EnableAdvancedSiteSearchMetadata> |
fetchDomainVerificationStatus(FetchDomainVerificationStatusRequest request)
public final SiteSearchEngineServiceClient.FetchDomainVerificationStatusPagedResponse fetchDomainVerificationStatus(FetchDomainVerificationStatusRequest request)
Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
FetchDomainVerificationStatusRequest request =
FetchDomainVerificationStatusRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationCollectionDataStoreName(
"[PROJECT]", "[LOCATION]", "[COLLECTION]", "[DATA_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (TargetSite element :
siteSearchEngineServiceClient.fetchDomainVerificationStatus(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
FetchDomainVerificationStatusRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceClient.FetchDomainVerificationStatusPagedResponse |
fetchDomainVerificationStatusCallable()
public final UnaryCallable<FetchDomainVerificationStatusRequest,FetchDomainVerificationStatusResponse> fetchDomainVerificationStatusCallable()
Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
FetchDomainVerificationStatusRequest request =
FetchDomainVerificationStatusRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationCollectionDataStoreName(
"[PROJECT]", "[LOCATION]", "[COLLECTION]", "[DATA_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
FetchDomainVerificationStatusResponse response =
siteSearchEngineServiceClient.fetchDomainVerificationStatusCallable().call(request);
for (TargetSite element : response.getTargetSitesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<FetchDomainVerificationStatusRequest,FetchDomainVerificationStatusResponse> |
fetchDomainVerificationStatusPagedCallable()
public final UnaryCallable<FetchDomainVerificationStatusRequest,SiteSearchEngineServiceClient.FetchDomainVerificationStatusPagedResponse> fetchDomainVerificationStatusPagedCallable()
Returns list of target sites with its domain verification status. This method can only be called under data store with BASIC_SITE_SEARCH state at the moment.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
FetchDomainVerificationStatusRequest request =
FetchDomainVerificationStatusRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationCollectionDataStoreName(
"[PROJECT]", "[LOCATION]", "[COLLECTION]", "[DATA_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<TargetSite> future =
siteSearchEngineServiceClient
.fetchDomainVerificationStatusPagedCallable()
.futureCall(request);
// Do something.
for (TargetSite element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<FetchDomainVerificationStatusRequest,FetchDomainVerificationStatusPagedResponse> |
getHttpJsonOperationsClient()
public final OperationsClient getHttpJsonOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getOperationsClient()
public final OperationsClient getOperationsClient()
Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
Returns | |
---|---|
Type | Description |
OperationsClient |
getSettings()
public final SiteSearchEngineServiceSettings getSettings()
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceSettings |
getSiteSearchEngine(GetSiteSearchEngineRequest request)
public final SiteSearchEngine getSiteSearchEngine(GetSiteSearchEngineRequest request)
Gets the SiteSearchEngine.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
GetSiteSearchEngineRequest request =
GetSiteSearchEngineRequest.newBuilder()
.setName(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
SiteSearchEngine response = siteSearchEngineServiceClient.getSiteSearchEngine(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetSiteSearchEngineRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SiteSearchEngine |
getSiteSearchEngine(SiteSearchEngineName name)
public final SiteSearchEngine getSiteSearchEngine(SiteSearchEngineName name)
Gets the SiteSearchEngine.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
SiteSearchEngineName name =
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]");
SiteSearchEngine response = siteSearchEngineServiceClient.getSiteSearchEngine(name);
}
Parameter | |
---|---|
Name | Description |
name |
SiteSearchEngineName Required. Resource name of
SiteSearchEngine, such as
If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
Returns | |
---|---|
Type | Description |
SiteSearchEngine |
getSiteSearchEngine(String name)
public final SiteSearchEngine getSiteSearchEngine(String name)
Gets the SiteSearchEngine.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
String name =
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString();
SiteSearchEngine response = siteSearchEngineServiceClient.getSiteSearchEngine(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Resource name of
SiteSearchEngine, such as
If the caller does not have permission to access the [SiteSearchEngine], regardless of whether or not it exists, a PERMISSION_DENIED error is returned. |
Returns | |
---|---|
Type | Description |
SiteSearchEngine |
getSiteSearchEngineCallable()
public final UnaryCallable<GetSiteSearchEngineRequest,SiteSearchEngine> getSiteSearchEngineCallable()
Gets the SiteSearchEngine.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
GetSiteSearchEngineRequest request =
GetSiteSearchEngineRequest.newBuilder()
.setName(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.build();
ApiFuture<SiteSearchEngine> future =
siteSearchEngineServiceClient.getSiteSearchEngineCallable().futureCall(request);
// Do something.
SiteSearchEngine response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetSiteSearchEngineRequest,SiteSearchEngine> |
getStub()
public SiteSearchEngineServiceStub getStub()
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceStub |
getTargetSite(GetTargetSiteRequest request)
public final TargetSite getTargetSite(GetTargetSiteRequest request)
Gets a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
GetTargetSiteRequest request =
GetTargetSiteRequest.newBuilder()
.setName(
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]")
.toString())
.build();
TargetSite response = siteSearchEngineServiceClient.getTargetSite(request);
}
Parameter | |
---|---|
Name | Description |
request |
GetTargetSiteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
TargetSite |
getTargetSite(TargetSiteName name)
public final TargetSite getTargetSite(TargetSiteName name)
Gets a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
TargetSiteName name =
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]");
TargetSite response = siteSearchEngineServiceClient.getTargetSite(name);
}
Parameter | |
---|---|
Name | Description |
name |
TargetSiteName Required. Full resource name of
TargetSite, such as
If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. |
Returns | |
---|---|
Type | Description |
TargetSite |
getTargetSite(String name)
public final TargetSite getTargetSite(String name)
Gets a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
String name =
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]")
.toString();
TargetSite response = siteSearchEngineServiceClient.getTargetSite(name);
}
Parameter | |
---|---|
Name | Description |
name |
String Required. Full resource name of
TargetSite, such as
If the caller does not have permission to access the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the requested TargetSite does not exist, a NOT_FOUND error is returned. |
Returns | |
---|---|
Type | Description |
TargetSite |
getTargetSiteCallable()
public final UnaryCallable<GetTargetSiteRequest,TargetSite> getTargetSiteCallable()
Gets a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
GetTargetSiteRequest request =
GetTargetSiteRequest.newBuilder()
.setName(
TargetSiteName.ofProjectLocationDataStoreTargetSiteName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]", "[TARGET_SITE]")
.toString())
.build();
ApiFuture<TargetSite> future =
siteSearchEngineServiceClient.getTargetSiteCallable().futureCall(request);
// Do something.
TargetSite response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<GetTargetSiteRequest,TargetSite> |
isShutdown()
public boolean isShutdown()
Returns | |
---|---|
Type | Description |
boolean |
isTerminated()
public boolean isTerminated()
Returns | |
---|---|
Type | Description |
boolean |
listTargetSites(ListTargetSitesRequest request)
public final SiteSearchEngineServiceClient.ListTargetSitesPagedResponse listTargetSites(ListTargetSitesRequest request)
Gets a list of TargetSites.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
ListTargetSitesRequest request =
ListTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (TargetSite element :
siteSearchEngineServiceClient.listTargetSites(request).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
request |
ListTargetSitesRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceClient.ListTargetSitesPagedResponse |
listTargetSites(SiteSearchEngineName parent)
public final SiteSearchEngineServiceClient.ListTargetSitesPagedResponse listTargetSites(SiteSearchEngineName parent)
Gets a list of TargetSites.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
SiteSearchEngineName parent =
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]");
for (TargetSite element :
siteSearchEngineServiceClient.listTargetSites(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
SiteSearchEngineName Required. The parent site search engine resource name, such as
If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. |
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceClient.ListTargetSitesPagedResponse |
listTargetSites(String parent)
public final SiteSearchEngineServiceClient.ListTargetSitesPagedResponse listTargetSites(String parent)
Gets a list of TargetSites.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
String parent =
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString();
for (TargetSite element :
siteSearchEngineServiceClient.listTargetSites(parent).iterateAll()) {
// doThingsWith(element);
}
}
Parameter | |
---|---|
Name | Description |
parent |
String Required. The parent site search engine resource name, such as
If the caller does not have permission to list TargetSites under this site search engine, regardless of whether or not this branch exists, a PERMISSION_DENIED error is returned. |
Returns | |
---|---|
Type | Description |
SiteSearchEngineServiceClient.ListTargetSitesPagedResponse |
listTargetSitesCallable()
public final UnaryCallable<ListTargetSitesRequest,ListTargetSitesResponse> listTargetSitesCallable()
Gets a list of TargetSites.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
ListTargetSitesRequest request =
ListTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListTargetSitesResponse response =
siteSearchEngineServiceClient.listTargetSitesCallable().call(request);
for (TargetSite element : response.getTargetSitesList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListTargetSitesRequest,ListTargetSitesResponse> |
listTargetSitesPagedCallable()
public final UnaryCallable<ListTargetSitesRequest,SiteSearchEngineServiceClient.ListTargetSitesPagedResponse> listTargetSitesPagedCallable()
Gets a list of TargetSites.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
ListTargetSitesRequest request =
ListTargetSitesRequest.newBuilder()
.setParent(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<TargetSite> future =
siteSearchEngineServiceClient.listTargetSitesPagedCallable().futureCall(request);
// Do something.
for (TargetSite element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
Returns | |
---|---|
Type | Description |
UnaryCallable<ListTargetSitesRequest,ListTargetSitesPagedResponse> |
recrawlUrisAsync(RecrawlUrisRequest request)
public final OperationFuture<RecrawlUrisResponse,RecrawlUrisMetadata> recrawlUrisAsync(RecrawlUrisRequest request)
Request on-demand recrawl for a list of URIs.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
RecrawlUrisRequest request =
RecrawlUrisRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.addAllUris(new ArrayList<String>())
.setSiteCredential("siteCredential-751929602")
.build();
RecrawlUrisResponse response = siteSearchEngineServiceClient.recrawlUrisAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
RecrawlUrisRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<RecrawlUrisResponse,RecrawlUrisMetadata> |
recrawlUrisCallable()
public final UnaryCallable<RecrawlUrisRequest,Operation> recrawlUrisCallable()
Request on-demand recrawl for a list of URIs.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
RecrawlUrisRequest request =
RecrawlUrisRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.addAllUris(new ArrayList<String>())
.setSiteCredential("siteCredential-751929602")
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.recrawlUrisCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<RecrawlUrisRequest,Operation> |
recrawlUrisOperationCallable()
public final OperationCallable<RecrawlUrisRequest,RecrawlUrisResponse,RecrawlUrisMetadata> recrawlUrisOperationCallable()
Request on-demand recrawl for a list of URIs.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
RecrawlUrisRequest request =
RecrawlUrisRequest.newBuilder()
.setSiteSearchEngine(
SiteSearchEngineName.ofProjectLocationDataStoreName(
"[PROJECT]", "[LOCATION]", "[DATA_STORE]")
.toString())
.addAllUris(new ArrayList<String>())
.setSiteCredential("siteCredential-751929602")
.build();
OperationFuture<RecrawlUrisResponse, RecrawlUrisMetadata> future =
siteSearchEngineServiceClient.recrawlUrisOperationCallable().futureCall(request);
// Do something.
RecrawlUrisResponse response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<RecrawlUrisRequest,RecrawlUrisResponse,RecrawlUrisMetadata> |
shutdown()
public void shutdown()
shutdownNow()
public void shutdownNow()
updateTargetSiteAsync(TargetSite targetSite)
public final OperationFuture<TargetSite,UpdateTargetSiteMetadata> updateTargetSiteAsync(TargetSite targetSite)
Updates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
TargetSite targetSite = TargetSite.newBuilder().build();
TargetSite response = siteSearchEngineServiceClient.updateTargetSiteAsync(targetSite).get();
}
Parameter | |
---|---|
Name | Description |
targetSite |
TargetSite Required. The target site to update. If the caller does not have permission to update the TargetSite, regardless of whether or not it exists, a PERMISSION_DENIED error is returned. If the TargetSite to update does not exist, a NOT_FOUND error is returned. |
Returns | |
---|---|
Type | Description |
OperationFuture<TargetSite,UpdateTargetSiteMetadata> |
updateTargetSiteAsync(UpdateTargetSiteRequest request)
public final OperationFuture<TargetSite,UpdateTargetSiteMetadata> updateTargetSiteAsync(UpdateTargetSiteRequest request)
Updates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
UpdateTargetSiteRequest request =
UpdateTargetSiteRequest.newBuilder()
.setTargetSite(TargetSite.newBuilder().build())
.build();
TargetSite response = siteSearchEngineServiceClient.updateTargetSiteAsync(request).get();
}
Parameter | |
---|---|
Name | Description |
request |
UpdateTargetSiteRequest The request object containing all of the parameters for the API call. |
Returns | |
---|---|
Type | Description |
OperationFuture<TargetSite,UpdateTargetSiteMetadata> |
updateTargetSiteCallable()
public final UnaryCallable<UpdateTargetSiteRequest,Operation> updateTargetSiteCallable()
Updates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
UpdateTargetSiteRequest request =
UpdateTargetSiteRequest.newBuilder()
.setTargetSite(TargetSite.newBuilder().build())
.build();
ApiFuture<Operation> future =
siteSearchEngineServiceClient.updateTargetSiteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
Returns | |
---|---|
Type | Description |
UnaryCallable<UpdateTargetSiteRequest,Operation> |
updateTargetSiteOperationCallable()
public final OperationCallable<UpdateTargetSiteRequest,TargetSite,UpdateTargetSiteMetadata> updateTargetSiteOperationCallable()
Updates a TargetSite.
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 (SiteSearchEngineServiceClient siteSearchEngineServiceClient =
SiteSearchEngineServiceClient.create()) {
UpdateTargetSiteRequest request =
UpdateTargetSiteRequest.newBuilder()
.setTargetSite(TargetSite.newBuilder().build())
.build();
OperationFuture<TargetSite, UpdateTargetSiteMetadata> future =
siteSearchEngineServiceClient.updateTargetSiteOperationCallable().futureCall(request);
// Do something.
TargetSite response = future.get();
}
Returns | |
---|---|
Type | Description |
OperationCallable<UpdateTargetSiteRequest,TargetSite,UpdateTargetSiteMetadata> |