@Generated(value="by gapic-generator-java") public class RegionUrlMapsClient 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String urlMap = "urlMap-836780691";
UrlMap response = regionUrlMapsClient.get(project, region, urlMap);
}
Note: close() needs to be called on the RegionUrlMapsClient 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 |
|---|---|---|
Delete |
Deletes the specified UrlMap 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.
|
Get |
Returns the specified UrlMap 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.
|
Insert |
Creates a UrlMap resource in the specified project using the data included in the request. |
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.
|
List |
Retrieves the list of UrlMap resources available to the specified project in the specified region. |
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.
|
Patch |
Patches the specified UrlMap resource with the data included in the request. This method supports PATCH semantics and uses JSON merge patch format and processing rules. |
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.
|
Update |
Updates the specified UrlMap resource with the data included in the request. |
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.
|
Validate |
Runs static validation for the UrlMap. In particular, the tests of the provided UrlMap will be run. Calling this method does NOT create the UrlMap. |
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.
|
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 RegionUrlMapsSettings 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
RegionUrlMapsSettings regionUrlMapsSettings =
RegionUrlMapsSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create(regionUrlMapsSettings);
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
RegionUrlMapsSettings regionUrlMapsSettings =
RegionUrlMapsSettings.newBuilder().setEndpoint(myEndpoint).build();
RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create(regionUrlMapsSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
RegionUrlMapsClient.ListFixedSizeCollection |
static class |
RegionUrlMapsClient.ListPage |
static class |
RegionUrlMapsClient.ListPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
RegionUrlMapsClient(RegionUrlMapsSettings settings)
Constructs an instance of RegionUrlMapsClient, using the given settings.
|
protected |
RegionUrlMapsClient(RegionUrlMapsStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static RegionUrlMapsClient |
create()
Constructs an instance of RegionUrlMapsClient with default settings.
|
static RegionUrlMapsClient |
create(RegionUrlMapsSettings settings)
Constructs an instance of RegionUrlMapsClient, using the given settings.
|
static RegionUrlMapsClient |
create(RegionUrlMapsStub stub)
Constructs an instance of RegionUrlMapsClient, using the given stub for making calls.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
deleteAsync(DeleteRegionUrlMapRequest request)
Deletes the specified UrlMap resource.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
deleteAsync(String project,
String region,
String urlMap)
Deletes the specified UrlMap resource.
|
com.google.api.gax.rpc.UnaryCallable<DeleteRegionUrlMapRequest,Operation> |
deleteCallable()
Deletes the specified UrlMap resource.
|
com.google.api.gax.rpc.OperationCallable<DeleteRegionUrlMapRequest,Operation,Operation> |
deleteOperationCallable()
Deletes the specified UrlMap resource.
|
UrlMap |
get(GetRegionUrlMapRequest request)
Returns the specified UrlMap resource.
|
UrlMap |
get(String project,
String region,
String urlMap)
Returns the specified UrlMap resource.
|
com.google.api.gax.rpc.UnaryCallable<GetRegionUrlMapRequest,UrlMap> |
getCallable()
Returns the specified UrlMap resource.
|
RegionUrlMapsSettings |
getSettings() |
RegionUrlMapsStub |
getStub() |
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
insertAsync(InsertRegionUrlMapRequest request)
Creates a UrlMap resource in the specified project using the data included in the request.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
insertAsync(String project,
String region,
UrlMap urlMapResource)
Creates a UrlMap resource in the specified project using the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<InsertRegionUrlMapRequest,Operation> |
insertCallable()
Creates a UrlMap resource in the specified project using the data included in the request.
|
com.google.api.gax.rpc.OperationCallable<InsertRegionUrlMapRequest,Operation,Operation> |
insertOperationCallable()
Creates a UrlMap resource in the specified project using the data included in the request.
|
boolean |
isShutdown() |
boolean |
isTerminated() |
RegionUrlMapsClient.ListPagedResponse |
list(ListRegionUrlMapsRequest request)
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
RegionUrlMapsClient.ListPagedResponse |
list(String project,
String region)
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
com.google.api.gax.rpc.UnaryCallable<ListRegionUrlMapsRequest,UrlMapList> |
listCallable()
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
com.google.api.gax.rpc.UnaryCallable<ListRegionUrlMapsRequest,RegionUrlMapsClient.ListPagedResponse> |
listPagedCallable()
Retrieves the list of UrlMap resources available to the specified project in the specified
region.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
patchAsync(PatchRegionUrlMapRequest request)
Patches the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
patchAsync(String project,
String region,
String urlMap,
UrlMap urlMapResource)
Patches the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<PatchRegionUrlMapRequest,Operation> |
patchCallable()
Patches the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.rpc.OperationCallable<PatchRegionUrlMapRequest,Operation,Operation> |
patchOperationCallable()
Patches the specified UrlMap resource with the data included in the request.
|
void |
shutdown() |
void |
shutdownNow() |
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
updateAsync(String project,
String region,
String urlMap,
UrlMap urlMapResource)
Updates the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.longrunning.OperationFuture<Operation,Operation> |
updateAsync(UpdateRegionUrlMapRequest request)
Updates the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.rpc.UnaryCallable<UpdateRegionUrlMapRequest,Operation> |
updateCallable()
Updates the specified UrlMap resource with the data included in the request.
|
com.google.api.gax.rpc.OperationCallable<UpdateRegionUrlMapRequest,Operation,Operation> |
updateOperationCallable()
Updates the specified UrlMap resource with the data included in the request.
|
UrlMapsValidateResponse |
validate(String project,
String region,
String urlMap,
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)
Runs static validation for the UrlMap.
|
UrlMapsValidateResponse |
validate(ValidateRegionUrlMapRequest request)
Runs static validation for the UrlMap.
|
com.google.api.gax.rpc.UnaryCallable<ValidateRegionUrlMapRequest,UrlMapsValidateResponse> |
validateCallable()
Runs static validation for the UrlMap.
|
protected RegionUrlMapsClient(RegionUrlMapsSettings settings) throws IOException
IOExceptionprotected RegionUrlMapsClient(RegionUrlMapsStub stub)
public static final RegionUrlMapsClient create() throws IOException
IOExceptionpublic static final RegionUrlMapsClient create(RegionUrlMapsSettings settings) throws IOException
IOExceptionpublic static final RegionUrlMapsClient create(RegionUrlMapsStub stub)
public final RegionUrlMapsSettings getSettings()
public RegionUrlMapsStub getStub()
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> deleteAsync(String project, String region, String urlMap)
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String urlMap = "urlMap-836780691";
Operation response = regionUrlMapsClient.deleteAsync(project, region, urlMap).get();
}
project - Project ID for this request.region - Name of the region scoping this request.urlMap - Name of the UrlMap resource to delete.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> deleteAsync(DeleteRegionUrlMapRequest 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
DeleteRegionUrlMapRequest request =
DeleteRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.build();
Operation response = regionUrlMapsClient.deleteAsync(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<DeleteRegionUrlMapRequest,Operation,Operation> deleteOperationCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
DeleteRegionUrlMapRequest request =
DeleteRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.build();
OperationFuture<Operation, Operation> future =
regionUrlMapsClient.deleteOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<DeleteRegionUrlMapRequest,Operation> deleteCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
DeleteRegionUrlMapRequest request =
DeleteRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.build();
ApiFuture<Operation> future = regionUrlMapsClient.deleteCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final UrlMap get(String project, String region, String urlMap)
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String urlMap = "urlMap-836780691";
UrlMap response = regionUrlMapsClient.get(project, region, urlMap);
}
project - Project ID for this request.region - Name of the region scoping this request.urlMap - Name of the UrlMap resource to return.com.google.api.gax.rpc.ApiException - if the remote call failspublic final UrlMap get(GetRegionUrlMapRequest 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
GetRegionUrlMapRequest request =
GetRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setUrlMap("urlMap-836780691")
.build();
UrlMap response = regionUrlMapsClient.get(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<GetRegionUrlMapRequest,UrlMap> getCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
GetRegionUrlMapRequest request =
GetRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setUrlMap("urlMap-836780691")
.build();
ApiFuture<UrlMap> future = regionUrlMapsClient.getCallable().futureCall(request);
// Do something.
UrlMap response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> insertAsync(String project, String region, UrlMap urlMapResource)
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
UrlMap urlMapResource = UrlMap.newBuilder().build();
Operation response = regionUrlMapsClient.insertAsync(project, region, urlMapResource).get();
}
project - Project ID for this request.region - Name of the region scoping this request.urlMapResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> insertAsync(InsertRegionUrlMapRequest 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
InsertRegionUrlMapRequest request =
InsertRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
Operation response = regionUrlMapsClient.insertAsync(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<InsertRegionUrlMapRequest,Operation,Operation> insertOperationCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
InsertRegionUrlMapRequest request =
InsertRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
OperationFuture<Operation, Operation> future =
regionUrlMapsClient.insertOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<InsertRegionUrlMapRequest,Operation> insertCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
InsertRegionUrlMapRequest request =
InsertRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
ApiFuture<Operation> future = regionUrlMapsClient.insertCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final RegionUrlMapsClient.ListPagedResponse list(String project, String region)
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
for (UrlMap element : regionUrlMapsClient.list(project, region).iterateAll()) {
// doThingsWith(element);
}
}
project - Project ID for this request.region - Name of the region scoping this request.com.google.api.gax.rpc.ApiException - if the remote call failspublic final RegionUrlMapsClient.ListPagedResponse list(ListRegionUrlMapsRequest 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
ListRegionUrlMapsRequest request =
ListRegionUrlMapsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
for (UrlMap element : regionUrlMapsClient.list(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<ListRegionUrlMapsRequest,RegionUrlMapsClient.ListPagedResponse> listPagedCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
ListRegionUrlMapsRequest request =
ListRegionUrlMapsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
ApiFuture<UrlMap> future = regionUrlMapsClient.listPagedCallable().futureCall(request);
// Do something.
for (UrlMap element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListRegionUrlMapsRequest,UrlMapList> listCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
ListRegionUrlMapsRequest request =
ListRegionUrlMapsRequest.newBuilder()
.setFilter("filter-1274492040")
.setMaxResults(1128457243)
.setOrderBy("orderBy-1207110587")
.setPageToken("pageToken873572522")
.setProject("project-309310695")
.setRegion("region-934795532")
.setReturnPartialSuccess(true)
.build();
while (true) {
UrlMapList response = regionUrlMapsClient.listCallable().call(request);
for (UrlMap element : response.getItemsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> patchAsync(String project, String region, String urlMap, UrlMap urlMapResource)
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String urlMap = "urlMap-836780691";
UrlMap urlMapResource = UrlMap.newBuilder().build();
Operation response =
regionUrlMapsClient.patchAsync(project, region, urlMap, urlMapResource).get();
}
project - Project ID for this request.region - Name of the region scoping this request.urlMap - Name of the UrlMap resource to patch.urlMapResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> patchAsync(PatchRegionUrlMapRequest 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
PatchRegionUrlMapRequest request =
PatchRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
Operation response = regionUrlMapsClient.patchAsync(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<PatchRegionUrlMapRequest,Operation,Operation> patchOperationCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
PatchRegionUrlMapRequest request =
PatchRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
OperationFuture<Operation, Operation> future =
regionUrlMapsClient.patchOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<PatchRegionUrlMapRequest,Operation> patchCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
PatchRegionUrlMapRequest request =
PatchRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
ApiFuture<Operation> future = regionUrlMapsClient.patchCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> updateAsync(String project, String region, String urlMap, UrlMap urlMapResource)
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String urlMap = "urlMap-836780691";
UrlMap urlMapResource = UrlMap.newBuilder().build();
Operation response =
regionUrlMapsClient.updateAsync(project, region, urlMap, urlMapResource).get();
}
project - Project ID for this request.region - Name of the region scoping this request.urlMap - Name of the UrlMap resource to update.urlMapResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.longrunning.OperationFuture<Operation,Operation> updateAsync(UpdateRegionUrlMapRequest 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
UpdateRegionUrlMapRequest request =
UpdateRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
Operation response = regionUrlMapsClient.updateAsync(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<UpdateRegionUrlMapRequest,Operation,Operation> updateOperationCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
UpdateRegionUrlMapRequest request =
UpdateRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
OperationFuture<Operation, Operation> future =
regionUrlMapsClient.updateOperationCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final com.google.api.gax.rpc.UnaryCallable<UpdateRegionUrlMapRequest,Operation> updateCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
UpdateRegionUrlMapRequest request =
UpdateRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRequestId("requestId693933066")
.setUrlMap("urlMap-836780691")
.setUrlMapResource(UrlMap.newBuilder().build())
.build();
ApiFuture<Operation> future = regionUrlMapsClient.updateCallable().futureCall(request);
// Do something.
Operation response = future.get();
}
public final UrlMapsValidateResponse validate(String project, String region, String urlMap, RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
String project = "project-309310695";
String region = "region-934795532";
String urlMap = "urlMap-836780691";
RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource =
RegionUrlMapsValidateRequest.newBuilder().build();
UrlMapsValidateResponse response =
regionUrlMapsClient.validate(
project, region, urlMap, regionUrlMapsValidateRequestResource);
}
project - Project ID for this request.region - Name of the region scoping this request.urlMap - Name of the UrlMap resource to be validated as.regionUrlMapsValidateRequestResource - The body resource for this requestcom.google.api.gax.rpc.ApiException - if the remote call failspublic final UrlMapsValidateResponse validate(ValidateRegionUrlMapRequest 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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
ValidateRegionUrlMapRequest request =
ValidateRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionUrlMapsValidateRequestResource(
RegionUrlMapsValidateRequest.newBuilder().build())
.setUrlMap("urlMap-836780691")
.build();
UrlMapsValidateResponse response = regionUrlMapsClient.validate(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<ValidateRegionUrlMapRequest,UrlMapsValidateResponse> validateCallable()
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 (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
ValidateRegionUrlMapRequest request =
ValidateRegionUrlMapRequest.newBuilder()
.setProject("project-309310695")
.setRegion("region-934795532")
.setRegionUrlMapsValidateRequestResource(
RegionUrlMapsValidateRequest.newBuilder().build())
.setUrlMap("urlMap-836780691")
.build();
ApiFuture<UrlMapsValidateResponse> future =
regionUrlMapsClient.validateCallable().futureCall(request);
// Do something.
UrlMapsValidateResponse 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.