Class RegionUrlMapsClient

  • All Implemented Interfaces:
    com.google.api.gax.core.BackgroundResource, AutoCloseable

    @Generated("by gapic-generator-java")
    public class RegionUrlMapsClient
    extends Object
    implements com.google.api.gax.core.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.

    • Constructor Detail

      • RegionUrlMapsClient

        protected RegionUrlMapsClient​(RegionUrlMapsSettings settings)
                               throws IOException
        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.
        Throws:
        IOException
    • Method Detail

      • create

        public static final RegionUrlMapsClient create​(RegionUrlMapsSettings settings)
                                                throws IOException
        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.
        Throws:
        IOException
      • create

        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).
      • deleteAsync

        public final com.google.api.gax.longrunning.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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        urlMap - Name of the UrlMap resource to delete.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • deleteOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • deleteCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • get

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        urlMap - Name of the UrlMap resource to return.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • get

        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);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • getCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • insertAsync

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

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        urlMapResource - The body resource for this request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • insertAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final 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.

        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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • insertOperationCallable

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

        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();
         }
         
      • insertCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • list

        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:
        project - Project ID for this request.
        region - Name of the region scoping this request.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • list

        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);
           }
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • listPagedCallable

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

        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);
           }
         }
         
      • listCallable

        public final com.google.api.gax.rpc.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;
             }
           }
         }
         
      • patchAsync

        public final 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. 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:
        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 request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • patchAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • patchOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • patchCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • updateAsync

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

        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:
        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 request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateAsync

        @BetaApi("The surface for long-running operations is not stable yet and may change in the future.")
        public final com.google.api.gax.longrunning.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();
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • updateOperationCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • updateCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • validate

        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:
        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 request
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • validate

        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);
         }
         
        Parameters:
        request - The request object containing all of the parameters for the API call.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • validateCallable

        public final com.google.api.gax.rpc.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();
         }
         
      • shutdown

        public void shutdown()
        Specified by:
        shutdown in interface com.google.api.gax.core.BackgroundResource
      • isShutdown

        public boolean isShutdown()
        Specified by:
        isShutdown in interface com.google.api.gax.core.BackgroundResource
      • isTerminated

        public boolean isTerminated()
        Specified by:
        isTerminated in interface com.google.api.gax.core.BackgroundResource
      • shutdownNow

        public void shutdownNow()
        Specified by:
        shutdownNow in interface com.google.api.gax.core.BackgroundResource