Class PublicAdvertisedPrefixesClient

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

    @Generated("by gapic-generator-java")
    public class PublicAdvertisedPrefixesClient
    extends Object
    implements com.google.api.gax.core.BackgroundResource
    Service Description: The PublicAdvertisedPrefixes 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
         PublicAdvertisedPrefixesClient.create()) {
       String project = "project-309310695";
       String publicAdvertisedPrefix = "publicAdvertisedPrefix1506440856";
       PublicAdvertisedPrefix response =
           publicAdvertisedPrefixesClient.get(project, publicAdvertisedPrefix);
     }
     

    Note: close() needs to be called on the PublicAdvertisedPrefixesClient 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 PublicAdvertisedPrefixesSettings 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
     PublicAdvertisedPrefixesSettings publicAdvertisedPrefixesSettings =
         PublicAdvertisedPrefixesSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
         PublicAdvertisedPrefixesClient.create(publicAdvertisedPrefixesSettings);
     

    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
     PublicAdvertisedPrefixesSettings publicAdvertisedPrefixesSettings =
         PublicAdvertisedPrefixesSettings.newBuilder().setEndpoint(myEndpoint).build();
     PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
         PublicAdvertisedPrefixesClient.create(publicAdvertisedPrefixesSettings);
     

    Please refer to the GitHub repository's samples for more quickstart code snippets.

    • Constructor Detail

      • PublicAdvertisedPrefixesClient

        protected PublicAdvertisedPrefixesClient​(PublicAdvertisedPrefixesSettings settings)
                                          throws IOException
        Constructs an instance of PublicAdvertisedPrefixesClient, 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

      • deleteAsync

        public final com.google.api.gax.longrunning.OperationFuture<Operation,​Operation> deleteAsync​(String project,
                                                                                                           String publicAdvertisedPrefix)
        Deletes the specified PublicAdvertisedPrefix

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           String project = "project-309310695";
           String publicAdvertisedPrefix = "publicAdvertisedPrefix1506440856";
           Operation response =
               publicAdvertisedPrefixesClient.deleteAsync(project, publicAdvertisedPrefix).get();
         }
         
        Parameters:
        project - Project ID for this request.
        publicAdvertisedPrefix - Name of the PublicAdvertisedPrefix 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​(DeletePublicAdvertisedPrefixeRequest request)
        Deletes the specified PublicAdvertisedPrefix

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           DeletePublicAdvertisedPrefixeRequest request =
               DeletePublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .setRequestId("requestId693933066")
                   .build();
           Operation response = publicAdvertisedPrefixesClient.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<DeletePublicAdvertisedPrefixeRequest,​Operation,​Operation> deleteOperationCallable()
        Deletes the specified PublicAdvertisedPrefix

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           DeletePublicAdvertisedPrefixeRequest request =
               DeletePublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .setRequestId("requestId693933066")
                   .build();
           OperationFuture<Operation, Operation> future =
               publicAdvertisedPrefixesClient.deleteOperationCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • deleteCallable

        public final com.google.api.gax.rpc.UnaryCallable<DeletePublicAdvertisedPrefixeRequest,​Operation> deleteCallable()
        Deletes the specified PublicAdvertisedPrefix

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           DeletePublicAdvertisedPrefixeRequest request =
               DeletePublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<Operation> future =
               publicAdvertisedPrefixesClient.deleteCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • get

        public final PublicAdvertisedPrefix get​(String project,
                                                String publicAdvertisedPrefix)
        Returns the specified PublicAdvertisedPrefix 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           String project = "project-309310695";
           String publicAdvertisedPrefix = "publicAdvertisedPrefix1506440856";
           PublicAdvertisedPrefix response =
               publicAdvertisedPrefixesClient.get(project, publicAdvertisedPrefix);
         }
         
        Parameters:
        project - Project ID for this request.
        publicAdvertisedPrefix - Name of the PublicAdvertisedPrefix resource to return.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • get

        public final PublicAdvertisedPrefix get​(GetPublicAdvertisedPrefixeRequest request)
        Returns the specified PublicAdvertisedPrefix 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           GetPublicAdvertisedPrefixeRequest request =
               GetPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .build();
           PublicAdvertisedPrefix response = publicAdvertisedPrefixesClient.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<GetPublicAdvertisedPrefixeRequest,​PublicAdvertisedPrefix> getCallable()
        Returns the specified PublicAdvertisedPrefix 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           GetPublicAdvertisedPrefixeRequest request =
               GetPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .build();
           ApiFuture<PublicAdvertisedPrefix> future =
               publicAdvertisedPrefixesClient.getCallable().futureCall(request);
           // Do something.
           PublicAdvertisedPrefix response = future.get();
         }
         
      • insertAsync

        public final com.google.api.gax.longrunning.OperationFuture<Operation,​Operation> insertAsync​(String project,
                                                                                                           PublicAdvertisedPrefix publicAdvertisedPrefixResource)
        Creates a PublicAdvertisedPrefix in the specified project using the parameters that are 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           String project = "project-309310695";
           PublicAdvertisedPrefix publicAdvertisedPrefixResource =
               PublicAdvertisedPrefix.newBuilder().build();
           Operation response =
               publicAdvertisedPrefixesClient.insertAsync(project, publicAdvertisedPrefixResource).get();
         }
         
        Parameters:
        project - Project ID for this request.
        publicAdvertisedPrefixResource - 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​(InsertPublicAdvertisedPrefixeRequest request)
        Creates a PublicAdvertisedPrefix in the specified project using the parameters that are 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           InsertPublicAdvertisedPrefixeRequest request =
               InsertPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           Operation response = publicAdvertisedPrefixesClient.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<InsertPublicAdvertisedPrefixeRequest,​Operation,​Operation> insertOperationCallable()
        Creates a PublicAdvertisedPrefix in the specified project using the parameters that are 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           InsertPublicAdvertisedPrefixeRequest request =
               InsertPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           OperationFuture<Operation, Operation> future =
               publicAdvertisedPrefixesClient.insertOperationCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • insertCallable

        public final com.google.api.gax.rpc.UnaryCallable<InsertPublicAdvertisedPrefixeRequest,​Operation> insertCallable()
        Creates a PublicAdvertisedPrefix in the specified project using the parameters that are 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           InsertPublicAdvertisedPrefixeRequest request =
               InsertPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<Operation> future =
               publicAdvertisedPrefixesClient.insertCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • list

        public final PublicAdvertisedPrefixesClient.ListPagedResponse list​(String project)
        Lists the PublicAdvertisedPrefixes for a project.

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           String project = "project-309310695";
           for (PublicAdvertisedPrefix element :
               publicAdvertisedPrefixesClient.list(project).iterateAll()) {
             // doThingsWith(element);
           }
         }
         
        Parameters:
        project - Project ID for this request.
        Throws:
        com.google.api.gax.rpc.ApiException - if the remote call fails
      • list

        public final PublicAdvertisedPrefixesClient.ListPagedResponse list​(ListPublicAdvertisedPrefixesRequest request)
        Lists the PublicAdvertisedPrefixes for a project.

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           ListPublicAdvertisedPrefixesRequest request =
               ListPublicAdvertisedPrefixesRequest.newBuilder()
                   .setFilter("filter-1274492040")
                   .setMaxResults(1128457243)
                   .setOrderBy("orderBy-1207110587")
                   .setPageToken("pageToken873572522")
                   .setProject("project-309310695")
                   .setReturnPartialSuccess(true)
                   .build();
           for (PublicAdvertisedPrefix element :
               publicAdvertisedPrefixesClient.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<ListPublicAdvertisedPrefixesRequest,​PublicAdvertisedPrefixesClient.ListPagedResponse> listPagedCallable()
        Lists the PublicAdvertisedPrefixes for a project.

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           ListPublicAdvertisedPrefixesRequest request =
               ListPublicAdvertisedPrefixesRequest.newBuilder()
                   .setFilter("filter-1274492040")
                   .setMaxResults(1128457243)
                   .setOrderBy("orderBy-1207110587")
                   .setPageToken("pageToken873572522")
                   .setProject("project-309310695")
                   .setReturnPartialSuccess(true)
                   .build();
           ApiFuture<PublicAdvertisedPrefix> future =
               publicAdvertisedPrefixesClient.listPagedCallable().futureCall(request);
           // Do something.
           for (PublicAdvertisedPrefix element : future.get().iterateAll()) {
             // doThingsWith(element);
           }
         }
         
      • listCallable

        public final com.google.api.gax.rpc.UnaryCallable<ListPublicAdvertisedPrefixesRequest,​PublicAdvertisedPrefixList> listCallable()
        Lists the PublicAdvertisedPrefixes for a project.

        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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           ListPublicAdvertisedPrefixesRequest request =
               ListPublicAdvertisedPrefixesRequest.newBuilder()
                   .setFilter("filter-1274492040")
                   .setMaxResults(1128457243)
                   .setOrderBy("orderBy-1207110587")
                   .setPageToken("pageToken873572522")
                   .setProject("project-309310695")
                   .setReturnPartialSuccess(true)
                   .build();
           while (true) {
             PublicAdvertisedPrefixList response =
                 publicAdvertisedPrefixesClient.listCallable().call(request);
             for (PublicAdvertisedPrefix 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 publicAdvertisedPrefix,
                                                                                                          PublicAdvertisedPrefix publicAdvertisedPrefixResource)
        Patches the specified Router 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           String project = "project-309310695";
           String publicAdvertisedPrefix = "publicAdvertisedPrefix1506440856";
           PublicAdvertisedPrefix publicAdvertisedPrefixResource =
               PublicAdvertisedPrefix.newBuilder().build();
           Operation response =
               publicAdvertisedPrefixesClient
                   .patchAsync(project, publicAdvertisedPrefix, publicAdvertisedPrefixResource)
                   .get();
         }
         
        Parameters:
        project - Project ID for this request.
        publicAdvertisedPrefix - Name of the PublicAdvertisedPrefix resource to patch.
        publicAdvertisedPrefixResource - 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​(PatchPublicAdvertisedPrefixeRequest request)
        Patches the specified Router 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           PatchPublicAdvertisedPrefixeRequest request =
               PatchPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           Operation response = publicAdvertisedPrefixesClient.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<PatchPublicAdvertisedPrefixeRequest,​Operation,​Operation> patchOperationCallable()
        Patches the specified Router 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           PatchPublicAdvertisedPrefixeRequest request =
               PatchPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           OperationFuture<Operation, Operation> future =
               publicAdvertisedPrefixesClient.patchOperationCallable().futureCall(request);
           // Do something.
           Operation response = future.get();
         }
         
      • patchCallable

        public final com.google.api.gax.rpc.UnaryCallable<PatchPublicAdvertisedPrefixeRequest,​Operation> patchCallable()
        Patches the specified Router 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 (PublicAdvertisedPrefixesClient publicAdvertisedPrefixesClient =
             PublicAdvertisedPrefixesClient.create()) {
           PatchPublicAdvertisedPrefixeRequest request =
               PatchPublicAdvertisedPrefixeRequest.newBuilder()
                   .setProject("project-309310695")
                   .setPublicAdvertisedPrefix("publicAdvertisedPrefix1506440856")
                   .setPublicAdvertisedPrefixResource(PublicAdvertisedPrefix.newBuilder().build())
                   .setRequestId("requestId693933066")
                   .build();
           ApiFuture<Operation> future =
               publicAdvertisedPrefixesClient.patchCallable().futureCall(request);
           // Do something.
           Operation 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