Class RegionUrlMapsClient (1.39.0)

public class RegionUrlMapsClient implements BackgroundResource

Service Description: The RegionUrlMaps API.

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

The surface of this class includes several types of Java methods for each of the API's methods:

  1. A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
  2. A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
  3. A "callable" method. This type of method takes no parameters and returns 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.

Inheritance

java.lang.Object > RegionUrlMapsClient

Implements

BackgroundResource

Static Methods

create()

public static final RegionUrlMapsClient create()

Constructs an instance of RegionUrlMapsClient with default settings.

Returns
TypeDescription
RegionUrlMapsClient
Exceptions
TypeDescription
IOException

create(RegionUrlMapsSettings settings)

public static final RegionUrlMapsClient create(RegionUrlMapsSettings settings)

Constructs an instance of RegionUrlMapsClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.

Parameter
NameDescription
settingsRegionUrlMapsSettings
Returns
TypeDescription
RegionUrlMapsClient
Exceptions
TypeDescription
IOException

create(RegionUrlMapsStub stub)

public static final RegionUrlMapsClient create(RegionUrlMapsStub stub)

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

Parameter
NameDescription
stubRegionUrlMapsStub
Returns
TypeDescription
RegionUrlMapsClient

Constructors

RegionUrlMapsClient(RegionUrlMapsSettings settings)

protected RegionUrlMapsClient(RegionUrlMapsSettings settings)

Constructs an instance of RegionUrlMapsClient, 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
NameDescription
settingsRegionUrlMapsSettings

RegionUrlMapsClient(RegionUrlMapsStub stub)

protected RegionUrlMapsClient(RegionUrlMapsStub stub)
Parameter
NameDescription
stubRegionUrlMapsStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

close()

public final void close()

deleteAsync(DeleteRegionUrlMapRequest request)

public final OperationFuture<Operation,Operation> deleteAsync(DeleteRegionUrlMapRequest request)

Deletes the specified UrlMap resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (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();
 }
 
Parameter
NameDescription
requestDeleteRegionUrlMapRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteAsync(String project, String region, String urlMap)

public final OperationFuture<Operation,Operation> deleteAsync(String project, String region, String urlMap)

Deletes the specified UrlMap resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String urlMap = "urlMap-836780691";
   Operation response = regionUrlMapsClient.deleteAsync(project, region, urlMap).get();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

urlMapString

Name of the UrlMap resource to delete.

Returns
TypeDescription
OperationFuture<Operation,Operation>

deleteCallable()

public final UnaryCallable<DeleteRegionUrlMapRequest,Operation> deleteCallable()

Deletes the specified UrlMap resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (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();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteRegionUrlMapRequest,Operation>

deleteOperationCallable()

public final OperationCallable<DeleteRegionUrlMapRequest,Operation,Operation> deleteOperationCallable()

Deletes the specified UrlMap resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (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();
 }
 
Returns
TypeDescription
OperationCallable<DeleteRegionUrlMapRequest,Operation,Operation>

get(GetRegionUrlMapRequest request)

public final UrlMap get(GetRegionUrlMapRequest request)

Returns the specified UrlMap resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
   GetRegionUrlMapRequest request =
       GetRegionUrlMapRequest.newBuilder()
           .setProject("project-309310695")
           .setRegion("region-934795532")
           .setUrlMap("urlMap-836780691")
           .build();
   UrlMap response = regionUrlMapsClient.get(request);
 }
 
Parameter
NameDescription
requestGetRegionUrlMapRequest

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

Returns
TypeDescription
UrlMap

get(String project, String region, String urlMap)

public final UrlMap get(String project, String region, String urlMap)

Returns the specified UrlMap resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (RegionUrlMapsClient regionUrlMapsClient = RegionUrlMapsClient.create()) {
   String project = "project-309310695";
   String region = "region-934795532";
   String urlMap = "urlMap-836780691";
   UrlMap response = regionUrlMapsClient.get(project, region, urlMap);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

urlMapString

Name of the UrlMap resource to return.

Returns
TypeDescription
UrlMap

getCallable()

public final UnaryCallable<GetRegionUrlMapRequest,UrlMap> getCallable()

Returns the specified UrlMap resource.

Sample code:


 // This snippet has been automatically generated and should be regarded as a code template only.
 // It will require modifications to work:
 // - It may require correct/in-range values for request initialization.
 // - It may require specifying regional endpoints when creating the service client as shown in
 // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
 try (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();
 }
 
Returns
TypeDescription
UnaryCallable<GetRegionUrlMapRequest,UrlMap>

getSettings()

public final RegionUrlMapsSettings getSettings()
Returns
TypeDescription
RegionUrlMapsSettings

getStub()

public RegionUrlMapsStub getStub()
Returns
TypeDescription
RegionUrlMapsStub

insertAsync(InsertRegionUrlMapRequest request)

public final OperationFuture<Operation,Operation> insertAsync(InsertRegionUrlMapRequest request)

Creates a UrlMap resource in the specified project using the data included in the 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();
 }
 
Parameter
NameDescription
requestInsertRegionUrlMapRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertAsync(String project, String region, UrlMap urlMapResource)

public final 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.

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();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

urlMapResourceUrlMap

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

insertCallable()

public final UnaryCallable<InsertRegionUrlMapRequest,Operation> insertCallable()

Creates a UrlMap resource in the specified project using the data included in the 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();
   ApiFuture<Operation> future = regionUrlMapsClient.insertCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<InsertRegionUrlMapRequest,Operation>

insertOperationCallable()

public final OperationCallable<InsertRegionUrlMapRequest,Operation,Operation> insertOperationCallable()

Creates a UrlMap resource in the specified project using the data included in the 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();
   OperationFuture<Operation, Operation> future =
       regionUrlMapsClient.insertOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<InsertRegionUrlMapRequest,Operation,Operation>

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

list(ListRegionUrlMapsRequest request)

public final RegionUrlMapsClient.ListPagedResponse list(ListRegionUrlMapsRequest request)

Retrieves the list of UrlMap resources available to the specified project in the specified 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()) {
   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);
   }
 }
 
Parameter
NameDescription
requestListRegionUrlMapsRequest

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

Returns
TypeDescription
RegionUrlMapsClient.ListPagedResponse

list(String project, String region)

public final RegionUrlMapsClient.ListPagedResponse list(String project, String region)

Retrieves the list of UrlMap resources available to the specified project in the specified 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);
   }
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

Returns
TypeDescription
RegionUrlMapsClient.ListPagedResponse

listCallable()

public final UnaryCallable<ListRegionUrlMapsRequest,UrlMapList> listCallable()

Retrieves the list of UrlMap resources available to the specified project in the specified 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()) {
   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;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRegionUrlMapsRequest,UrlMapList>

listPagedCallable()

public final UnaryCallable<ListRegionUrlMapsRequest,RegionUrlMapsClient.ListPagedResponse> listPagedCallable()

Retrieves the list of UrlMap resources available to the specified project in the specified 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()) {
   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);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListRegionUrlMapsRequest,ListPagedResponse>

patchAsync(PatchRegionUrlMapRequest request)

public final OperationFuture<Operation,Operation> patchAsync(PatchRegionUrlMapRequest request)

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.

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();
 }
 
Parameter
NameDescription
requestPatchRegionUrlMapRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchAsync(String project, String region, String urlMap, UrlMap urlMapResource)

public final OperationFuture<Operation,Operation> patchAsync(String project, String region, String urlMap, UrlMap urlMapResource)

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.

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();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

urlMapString

Name of the UrlMap resource to patch.

urlMapResourceUrlMap

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

patchCallable()

public final UnaryCallable<PatchRegionUrlMapRequest,Operation> patchCallable()

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.

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();
 }
 
Returns
TypeDescription
UnaryCallable<PatchRegionUrlMapRequest,Operation>

patchOperationCallable()

public final OperationCallable<PatchRegionUrlMapRequest,Operation,Operation> patchOperationCallable()

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.

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();
 }
 
Returns
TypeDescription
OperationCallable<PatchRegionUrlMapRequest,Operation,Operation>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateAsync(UpdateRegionUrlMapRequest request)

public final OperationFuture<Operation,Operation> updateAsync(UpdateRegionUrlMapRequest request)

Updates the specified UrlMap resource with the data included in the 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();
 }
 
Parameter
NameDescription
requestUpdateRegionUrlMapRequest

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

Returns
TypeDescription
OperationFuture<Operation,Operation>

updateAsync(String project, String region, String urlMap, UrlMap urlMapResource)

public final OperationFuture<Operation,Operation> updateAsync(String project, String region, String urlMap, UrlMap urlMapResource)

Updates the specified UrlMap resource with the data included in the 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()) {
   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();
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

urlMapString

Name of the UrlMap resource to update.

urlMapResourceUrlMap

The body resource for this request

Returns
TypeDescription
OperationFuture<Operation,Operation>

updateCallable()

public final UnaryCallable<UpdateRegionUrlMapRequest,Operation> updateCallable()

Updates the specified UrlMap resource with the data included in the 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();
   ApiFuture<Operation> future = regionUrlMapsClient.updateCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateRegionUrlMapRequest,Operation>

updateOperationCallable()

public final OperationCallable<UpdateRegionUrlMapRequest,Operation,Operation> updateOperationCallable()

Updates the specified UrlMap resource with the data included in the 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();
   OperationFuture<Operation, Operation> future =
       regionUrlMapsClient.updateOperationCallable().futureCall(request);
   // Do something.
   Operation response = future.get();
 }
 
Returns
TypeDescription
OperationCallable<UpdateRegionUrlMapRequest,Operation,Operation>

validate(ValidateRegionUrlMapRequest request)

public final UrlMapsValidateResponse validate(ValidateRegionUrlMapRequest request)

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.

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);
 }
 
Parameter
NameDescription
requestValidateRegionUrlMapRequest

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

Returns
TypeDescription
UrlMapsValidateResponse

validate(String project, String region, String urlMap, RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)

public final UrlMapsValidateResponse validate(String project, String region, String urlMap, RegionUrlMapsValidateRequest regionUrlMapsValidateRequestResource)

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.

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);
 }
 
Parameters
NameDescription
projectString

Project ID for this request.

regionString

Name of the region scoping this request.

urlMapString

Name of the UrlMap resource to be validated as.

regionUrlMapsValidateRequestResourceRegionUrlMapsValidateRequest

The body resource for this request

Returns
TypeDescription
UrlMapsValidateResponse

validateCallable()

public final UnaryCallable<ValidateRegionUrlMapRequest,UrlMapsValidateResponse> validateCallable()

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.

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();
 }
 
Returns
TypeDescription
UnaryCallable<ValidateRegionUrlMapRequest,UrlMapsValidateResponse>