Class FirewallActivationClient

java.lang.Object
com.google.cloud.networksecurity.v1.FirewallActivationClient
All Implemented Interfaces:
BackgroundResource, AutoCloseable

@Generated("by gapic-generator-java") public class FirewallActivationClient extends Object implements BackgroundResource
Service Description: Service for managing Firewall Endpoints and Associations.

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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
   FirewallEndpointName name =
       FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
           "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]");
   FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(name);
 }
 

Note: close() needs to be called on the FirewallActivationClient object to clean up resources such as threads. In the example above, try-with-resources is used, which automatically calls close().

Methods
Method Description Method Variants

ListFirewallEndpoints

Lists FirewallEndpoints in a given organization and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFirewallEndpoints(ListFirewallEndpointsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listFirewallEndpoints(LocationName parent)

  • listFirewallEndpoints(OrganizationLocationName parent)

  • listFirewallEndpoints(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFirewallEndpointsPagedCallable()

  • listFirewallEndpointsCallable()

GetFirewallEndpoint

Gets details of a single org Endpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFirewallEndpoint(GetFirewallEndpointRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFirewallEndpoint(FirewallEndpointName name)

  • getFirewallEndpoint(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFirewallEndpointCallable()

CreateFirewallEndpoint

Creates a new FirewallEndpoint in a given organization and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFirewallEndpointAsync(CreateFirewallEndpointRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createFirewallEndpointAsync(LocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)

  • createFirewallEndpointAsync(OrganizationLocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)

  • createFirewallEndpointAsync(String parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFirewallEndpointOperationCallable()

  • createFirewallEndpointCallable()

DeleteFirewallEndpoint

Deletes a single org Endpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteFirewallEndpointAsync(DeleteFirewallEndpointRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteFirewallEndpointAsync(FirewallEndpointName name)

  • deleteFirewallEndpointAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteFirewallEndpointOperationCallable()

  • deleteFirewallEndpointCallable()

UpdateFirewallEndpoint

Update a single org Endpoint.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFirewallEndpointAsync(UpdateFirewallEndpointRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateFirewallEndpointAsync(FirewallEndpoint firewallEndpoint, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFirewallEndpointOperationCallable()

  • updateFirewallEndpointCallable()

ListFirewallEndpointAssociations

Lists Associations in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listFirewallEndpointAssociations(ListFirewallEndpointAssociationsRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • listFirewallEndpointAssociations(LocationName parent)

  • listFirewallEndpointAssociations(String parent)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listFirewallEndpointAssociationsPagedCallable()

  • listFirewallEndpointAssociationsCallable()

GetFirewallEndpointAssociation

Gets details of a single FirewallEndpointAssociation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getFirewallEndpointAssociation(GetFirewallEndpointAssociationRequest request)

"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.

  • getFirewallEndpointAssociation(FirewallEndpointAssociationName name)

  • getFirewallEndpointAssociation(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getFirewallEndpointAssociationCallable()

CreateFirewallEndpointAssociation

Creates a new FirewallEndpointAssociation in a given project and location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • createFirewallEndpointAssociationAsync(CreateFirewallEndpointAssociationRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • createFirewallEndpointAssociationAsync(LocationName parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId)

  • createFirewallEndpointAssociationAsync(String parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • createFirewallEndpointAssociationOperationCallable()

  • createFirewallEndpointAssociationCallable()

DeleteFirewallEndpointAssociation

Deletes a single FirewallEndpointAssociation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • deleteFirewallEndpointAssociationAsync(DeleteFirewallEndpointAssociationRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • deleteFirewallEndpointAssociationAsync(FirewallEndpointAssociationName name)

  • deleteFirewallEndpointAssociationAsync(String name)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • deleteFirewallEndpointAssociationOperationCallable()

  • deleteFirewallEndpointAssociationCallable()

UpdateFirewallEndpointAssociation

Update a single FirewallEndpointAssociation.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • updateFirewallEndpointAssociationAsync(UpdateFirewallEndpointAssociationRequest request)

Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service.

  • updateFirewallEndpointAssociationAsync(FirewallEndpointAssociation firewallEndpointAssociation, FieldMask updateMask)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • updateFirewallEndpointAssociationOperationCallable()

  • updateFirewallEndpointAssociationCallable()

ListLocations

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

* **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • listLocations(ListLocationsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • listLocationsPagedCallable()

  • listLocationsCallable()

GetLocation

Gets information about a location.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getLocation(GetLocationRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getLocationCallable()

SetIamPolicy

Sets the access control policy on the specified resource. Replacesany existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • setIamPolicy(SetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • setIamPolicyCallable()

GetIamPolicy

Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • getIamPolicy(GetIamPolicyRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • getIamPolicyCallable()

TestIamPermissions

Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

Request object method variants only take one parameter, a request object, which must be constructed before the call.

  • testIamPermissions(TestIamPermissionsRequest request)

Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.

  • testIamPermissionsCallable()

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 FirewallActivationSettings 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
 FirewallActivationSettings firewallActivationSettings =
     FirewallActivationSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 FirewallActivationClient firewallActivationClient =
     FirewallActivationClient.create(firewallActivationSettings);
 

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
 FirewallActivationSettings firewallActivationSettings =
     FirewallActivationSettings.newBuilder().setEndpoint(myEndpoint).build();
 FirewallActivationClient firewallActivationClient =
     FirewallActivationClient.create(firewallActivationSettings);
 

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

  • Constructor Details

    • FirewallActivationClient

      protected FirewallActivationClient(FirewallActivationSettings settings) throws IOException
      Constructs an instance of FirewallActivationClient, 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
    • FirewallActivationClient

      protected FirewallActivationClient(FirewallActivationStub stub)
  • Method Details

    • create

      public static final FirewallActivationClient create() throws IOException
      Constructs an instance of FirewallActivationClient with default settings.
      Throws:
      IOException
    • create

      public static final FirewallActivationClient create(FirewallActivationSettings settings) throws IOException
      Constructs an instance of FirewallActivationClient, 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 FirewallActivationClient create(FirewallActivationStub stub)
      Constructs an instance of FirewallActivationClient, using the given stub for making calls. This is for advanced usage - prefer using create(FirewallActivationSettings).
    • getSettings

      public final FirewallActivationSettings getSettings()
    • getStub

      public FirewallActivationStub getStub()
    • getOperationsClient

      public final OperationsClient getOperationsClient()
      Returns the OperationsClient that can be used to query the status of a long-running operation returned by another API method call.
    • listFirewallEndpoints

      Lists FirewallEndpoints in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (FirewallEndpoint element :
             firewallActivationClient.listFirewallEndpoints(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListEndpointsRequest
      Throws:
      ApiException - if the remote call fails
    • listFirewallEndpoints

      Lists FirewallEndpoints in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (FirewallEndpoint element :
             firewallActivationClient.listFirewallEndpoints(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListEndpointsRequest
      Throws:
      ApiException - if the remote call fails
    • listFirewallEndpoints

      public final FirewallActivationClient.ListFirewallEndpointsPagedResponse listFirewallEndpoints(String parent)
      Lists FirewallEndpoints in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (FirewallEndpoint element :
             firewallActivationClient.listFirewallEndpoints(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListEndpointsRequest
      Throws:
      ApiException - if the remote call fails
    • listFirewallEndpoints

      Lists FirewallEndpoints in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListFirewallEndpointsRequest request =
             ListFirewallEndpointsRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (FirewallEndpoint element :
             firewallActivationClient.listFirewallEndpoints(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listFirewallEndpointsPagedCallable

      Lists FirewallEndpoints in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListFirewallEndpointsRequest request =
             ListFirewallEndpointsRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<FirewallEndpoint> future =
             firewallActivationClient.listFirewallEndpointsPagedCallable().futureCall(request);
         // Do something.
         for (FirewallEndpoint element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listFirewallEndpointsCallable

      public final UnaryCallable<ListFirewallEndpointsRequest,ListFirewallEndpointsResponse> listFirewallEndpointsCallable()
      Lists FirewallEndpoints in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListFirewallEndpointsRequest request =
             ListFirewallEndpointsRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListFirewallEndpointsResponse response =
               firewallActivationClient.listFirewallEndpointsCallable().call(request);
           for (FirewallEndpoint element : response.getFirewallEndpointsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getFirewallEndpoint

      public final FirewallEndpoint getFirewallEndpoint(FirewallEndpointName name)
      Gets details of a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         FirewallEndpointName name =
             FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                 "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]");
         FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(name);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getFirewallEndpoint

      public final FirewallEndpoint getFirewallEndpoint(String name)
      Gets details of a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String name =
             FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                     "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]")
                 .toString();
         FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(name);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getFirewallEndpoint

      public final FirewallEndpoint getFirewallEndpoint(GetFirewallEndpointRequest request)
      Gets details of a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetFirewallEndpointRequest request =
             GetFirewallEndpointRequest.newBuilder()
                 .setName(
                     FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                             "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]")
                         .toString())
                 .build();
         FirewallEndpoint response = firewallActivationClient.getFirewallEndpoint(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getFirewallEndpointCallable

      public final UnaryCallable<GetFirewallEndpointRequest,FirewallEndpoint> getFirewallEndpointCallable()
      Gets details of a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetFirewallEndpointRequest request =
             GetFirewallEndpointRequest.newBuilder()
                 .setName(
                     FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                             "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]")
                         .toString())
                 .build();
         ApiFuture<FirewallEndpoint> future =
             firewallActivationClient.getFirewallEndpointCallable().futureCall(request);
         // Do something.
         FirewallEndpoint response = future.get();
       }
       
    • createFirewallEndpointAsync

      public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(LocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)
      Creates a new FirewallEndpoint in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build();
         String firewallEndpointId = "firewallEndpointId-993710416";
         FirewallEndpoint response =
             firewallActivationClient
                 .createFirewallEndpointAsync(parent, firewallEndpoint, firewallEndpointId)
                 .get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      firewallEndpoint - Required. The resource being created
      firewallEndpointId - Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.
      Throws:
      ApiException - if the remote call fails
    • createFirewallEndpointAsync

      public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(OrganizationLocationName parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)
      Creates a new FirewallEndpoint in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build();
         String firewallEndpointId = "firewallEndpointId-993710416";
         FirewallEndpoint response =
             firewallActivationClient
                 .createFirewallEndpointAsync(parent, firewallEndpoint, firewallEndpointId)
                 .get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      firewallEndpoint - Required. The resource being created
      firewallEndpointId - Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.
      Throws:
      ApiException - if the remote call fails
    • createFirewallEndpointAsync

      public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(String parent, FirewallEndpoint firewallEndpoint, String firewallEndpointId)
      Creates a new FirewallEndpoint in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build();
         String firewallEndpointId = "firewallEndpointId-993710416";
         FirewallEndpoint response =
             firewallActivationClient
                 .createFirewallEndpointAsync(parent, firewallEndpoint, firewallEndpointId)
                 .get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      firewallEndpoint - Required. The resource being created
      firewallEndpointId - Required. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_id from the method_signature of Create RPC.
      Throws:
      ApiException - if the remote call fails
    • createFirewallEndpointAsync

      public final OperationFuture<FirewallEndpoint,OperationMetadata> createFirewallEndpointAsync(CreateFirewallEndpointRequest request)
      Creates a new FirewallEndpoint in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         CreateFirewallEndpointRequest request =
             CreateFirewallEndpointRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setFirewallEndpointId("firewallEndpointId-993710416")
                 .setFirewallEndpoint(FirewallEndpoint.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         FirewallEndpoint response =
             firewallActivationClient.createFirewallEndpointAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createFirewallEndpointOperationCallable

      public final OperationCallable<CreateFirewallEndpointRequest,FirewallEndpoint,OperationMetadata> createFirewallEndpointOperationCallable()
      Creates a new FirewallEndpoint in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         CreateFirewallEndpointRequest request =
             CreateFirewallEndpointRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setFirewallEndpointId("firewallEndpointId-993710416")
                 .setFirewallEndpoint(FirewallEndpoint.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<FirewallEndpoint, OperationMetadata> future =
             firewallActivationClient.createFirewallEndpointOperationCallable().futureCall(request);
         // Do something.
         FirewallEndpoint response = future.get();
       }
       
    • createFirewallEndpointCallable

      public final UnaryCallable<CreateFirewallEndpointRequest,Operation> createFirewallEndpointCallable()
      Creates a new FirewallEndpoint in a given organization and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         CreateFirewallEndpointRequest request =
             CreateFirewallEndpointRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setFirewallEndpointId("firewallEndpointId-993710416")
                 .setFirewallEndpoint(FirewallEndpoint.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             firewallActivationClient.createFirewallEndpointCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteFirewallEndpointAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAsync(FirewallEndpointName name)
      Deletes a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         FirewallEndpointName name =
             FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                 "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]");
         firewallActivationClient.deleteFirewallEndpointAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteFirewallEndpointAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAsync(String name)
      Deletes a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String name =
             FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                     "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]")
                 .toString();
         firewallActivationClient.deleteFirewallEndpointAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteFirewallEndpointAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAsync(DeleteFirewallEndpointRequest request)
      Deletes a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         DeleteFirewallEndpointRequest request =
             DeleteFirewallEndpointRequest.newBuilder()
                 .setName(
                     FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                             "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         firewallActivationClient.deleteFirewallEndpointAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteFirewallEndpointOperationCallable

      public final OperationCallable<DeleteFirewallEndpointRequest,com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointOperationCallable()
      Deletes a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         DeleteFirewallEndpointRequest request =
             DeleteFirewallEndpointRequest.newBuilder()
                 .setName(
                     FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                             "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             firewallActivationClient.deleteFirewallEndpointOperationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteFirewallEndpointCallable

      public final UnaryCallable<DeleteFirewallEndpointRequest,Operation> deleteFirewallEndpointCallable()
      Deletes a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         DeleteFirewallEndpointRequest request =
             DeleteFirewallEndpointRequest.newBuilder()
                 .setName(
                     FirewallEndpointName.ofOrganizationLocationFirewallEndpointName(
                             "[ORGANIZATION]", "[LOCATION]", "[FIREWALL_ENDPOINT]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             firewallActivationClient.deleteFirewallEndpointCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • updateFirewallEndpointAsync

      public final OperationFuture<FirewallEndpoint,OperationMetadata> updateFirewallEndpointAsync(FirewallEndpoint firewallEndpoint, com.google.protobuf.FieldMask updateMask)
      Update a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         FirewallEndpoint firewallEndpoint = FirewallEndpoint.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         FirewallEndpoint response =
             firewallActivationClient.updateFirewallEndpointAsync(firewallEndpoint, updateMask).get();
       }
       
      Parameters:
      firewallEndpoint - Required. The resource being updated
      updateMask - Required. Field mask is used to specify the fields to be overwritten in the Endpoint resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateFirewallEndpointAsync

      public final OperationFuture<FirewallEndpoint,OperationMetadata> updateFirewallEndpointAsync(UpdateFirewallEndpointRequest request)
      Update a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         UpdateFirewallEndpointRequest request =
             UpdateFirewallEndpointRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setFirewallEndpoint(FirewallEndpoint.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         FirewallEndpoint response =
             firewallActivationClient.updateFirewallEndpointAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateFirewallEndpointOperationCallable

      public final OperationCallable<UpdateFirewallEndpointRequest,FirewallEndpoint,OperationMetadata> updateFirewallEndpointOperationCallable()
      Update a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         UpdateFirewallEndpointRequest request =
             UpdateFirewallEndpointRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setFirewallEndpoint(FirewallEndpoint.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<FirewallEndpoint, OperationMetadata> future =
             firewallActivationClient.updateFirewallEndpointOperationCallable().futureCall(request);
         // Do something.
         FirewallEndpoint response = future.get();
       }
       
    • updateFirewallEndpointCallable

      public final UnaryCallable<UpdateFirewallEndpointRequest,Operation> updateFirewallEndpointCallable()
      Update a single org Endpoint.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         UpdateFirewallEndpointRequest request =
             UpdateFirewallEndpointRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setFirewallEndpoint(FirewallEndpoint.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             firewallActivationClient.updateFirewallEndpointCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listFirewallEndpointAssociations

      public final FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse listFirewallEndpointAssociations(LocationName parent)
      Lists Associations in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (FirewallEndpointAssociation element :
             firewallActivationClient.listFirewallEndpointAssociations(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListAssociationsRequest
      Throws:
      ApiException - if the remote call fails
    • listFirewallEndpointAssociations

      public final FirewallActivationClient.ListFirewallEndpointAssociationsPagedResponse listFirewallEndpointAssociations(String parent)
      Lists Associations in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         for (FirewallEndpointAssociation element :
             firewallActivationClient.listFirewallEndpointAssociations(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. Parent value for ListAssociationsRequest
      Throws:
      ApiException - if the remote call fails
    • listFirewallEndpointAssociations

      Lists Associations in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListFirewallEndpointAssociationsRequest request =
             ListFirewallEndpointAssociationsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         for (FirewallEndpointAssociation element :
             firewallActivationClient.listFirewallEndpointAssociations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listFirewallEndpointAssociationsPagedCallable

      Lists Associations in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListFirewallEndpointAssociationsRequest request =
             ListFirewallEndpointAssociationsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         ApiFuture<FirewallEndpointAssociation> future =
             firewallActivationClient
                 .listFirewallEndpointAssociationsPagedCallable()
                 .futureCall(request);
         // Do something.
         for (FirewallEndpointAssociation element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listFirewallEndpointAssociationsCallable

      Lists Associations in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListFirewallEndpointAssociationsRequest request =
             ListFirewallEndpointAssociationsRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .setFilter("filter-1274492040")
                 .setOrderBy("orderBy-1207110587")
                 .build();
         while (true) {
           ListFirewallEndpointAssociationsResponse response =
               firewallActivationClient.listFirewallEndpointAssociationsCallable().call(request);
           for (FirewallEndpointAssociation element : response.getFirewallEndpointAssociationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getFirewallEndpointAssociation

      public final FirewallEndpointAssociation getFirewallEndpointAssociation(FirewallEndpointAssociationName name)
      Gets details of a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         FirewallEndpointAssociationName name =
             FirewallEndpointAssociationName.of(
                 "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]");
         FirewallEndpointAssociation response =
             firewallActivationClient.getFirewallEndpointAssociation(name);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getFirewallEndpointAssociation

      public final FirewallEndpointAssociation getFirewallEndpointAssociation(String name)
      Gets details of a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String name =
             FirewallEndpointAssociationName.of(
                     "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
                 .toString();
         FirewallEndpointAssociation response =
             firewallActivationClient.getFirewallEndpointAssociation(name);
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • getFirewallEndpointAssociation

      public final FirewallEndpointAssociation getFirewallEndpointAssociation(GetFirewallEndpointAssociationRequest request)
      Gets details of a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetFirewallEndpointAssociationRequest request =
             GetFirewallEndpointAssociationRequest.newBuilder()
                 .setName(
                     FirewallEndpointAssociationName.of(
                             "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
                         .toString())
                 .build();
         FirewallEndpointAssociation response =
             firewallActivationClient.getFirewallEndpointAssociation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getFirewallEndpointAssociationCallable

      public final UnaryCallable<GetFirewallEndpointAssociationRequest,FirewallEndpointAssociation> getFirewallEndpointAssociationCallable()
      Gets details of a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetFirewallEndpointAssociationRequest request =
             GetFirewallEndpointAssociationRequest.newBuilder()
                 .setName(
                     FirewallEndpointAssociationName.of(
                             "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
                         .toString())
                 .build();
         ApiFuture<FirewallEndpointAssociation> future =
             firewallActivationClient.getFirewallEndpointAssociationCallable().futureCall(request);
         // Do something.
         FirewallEndpointAssociation response = future.get();
       }
       
    • createFirewallEndpointAssociationAsync

      public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationAsync(LocationName parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId)
      Creates a new FirewallEndpointAssociation in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         FirewallEndpointAssociation firewallEndpointAssociation =
             FirewallEndpointAssociation.newBuilder().build();
         String firewallEndpointAssociationId = "firewallEndpointAssociationId-891991865";
         FirewallEndpointAssociation response =
             firewallActivationClient
                 .createFirewallEndpointAssociationAsync(
                     parent, firewallEndpointAssociation, firewallEndpointAssociationId)
                 .get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      firewallEndpointAssociation - Required. The resource being created
      firewallEndpointAssociationId - Optional. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_association_id from the method_signature of Create RPC.
      Throws:
      ApiException - if the remote call fails
    • createFirewallEndpointAssociationAsync

      public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationAsync(String parent, FirewallEndpointAssociation firewallEndpointAssociation, String firewallEndpointAssociationId)
      Creates a new FirewallEndpointAssociation in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
         FirewallEndpointAssociation firewallEndpointAssociation =
             FirewallEndpointAssociation.newBuilder().build();
         String firewallEndpointAssociationId = "firewallEndpointAssociationId-891991865";
         FirewallEndpointAssociation response =
             firewallActivationClient
                 .createFirewallEndpointAssociationAsync(
                     parent, firewallEndpointAssociation, firewallEndpointAssociationId)
                 .get();
       }
       
      Parameters:
      parent - Required. Value for parent.
      firewallEndpointAssociation - Required. The resource being created
      firewallEndpointAssociationId - Optional. Id of the requesting object. If auto-generating Id server-side, remove this field and firewall_endpoint_association_id from the method_signature of Create RPC.
      Throws:
      ApiException - if the remote call fails
    • createFirewallEndpointAssociationAsync

      public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationAsync(CreateFirewallEndpointAssociationRequest request)
      Creates a new FirewallEndpointAssociation in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         CreateFirewallEndpointAssociationRequest request =
             CreateFirewallEndpointAssociationRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFirewallEndpointAssociationId("firewallEndpointAssociationId-891991865")
                 .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         FirewallEndpointAssociation response =
             firewallActivationClient.createFirewallEndpointAssociationAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createFirewallEndpointAssociationOperationCallable

      public final OperationCallable<CreateFirewallEndpointAssociationRequest,FirewallEndpointAssociation,OperationMetadata> createFirewallEndpointAssociationOperationCallable()
      Creates a new FirewallEndpointAssociation in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         CreateFirewallEndpointAssociationRequest request =
             CreateFirewallEndpointAssociationRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFirewallEndpointAssociationId("firewallEndpointAssociationId-891991865")
                 .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<FirewallEndpointAssociation, OperationMetadata> future =
             firewallActivationClient
                 .createFirewallEndpointAssociationOperationCallable()
                 .futureCall(request);
         // Do something.
         FirewallEndpointAssociation response = future.get();
       }
       
    • createFirewallEndpointAssociationCallable

      public final UnaryCallable<CreateFirewallEndpointAssociationRequest,Operation> createFirewallEndpointAssociationCallable()
      Creates a new FirewallEndpointAssociation in a given project and location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         CreateFirewallEndpointAssociationRequest request =
             CreateFirewallEndpointAssociationRequest.newBuilder()
                 .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
                 .setFirewallEndpointAssociationId("firewallEndpointAssociationId-891991865")
                 .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             firewallActivationClient.createFirewallEndpointAssociationCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteFirewallEndpointAssociationAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAssociationAsync(FirewallEndpointAssociationName name)
      Deletes a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         FirewallEndpointAssociationName name =
             FirewallEndpointAssociationName.of(
                 "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]");
         firewallActivationClient.deleteFirewallEndpointAssociationAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteFirewallEndpointAssociationAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAssociationAsync(String name)
      Deletes a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         String name =
             FirewallEndpointAssociationName.of(
                     "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
                 .toString();
         firewallActivationClient.deleteFirewallEndpointAssociationAsync(name).get();
       }
       
      Parameters:
      name - Required. Name of the resource
      Throws:
      ApiException - if the remote call fails
    • deleteFirewallEndpointAssociationAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAssociationAsync(DeleteFirewallEndpointAssociationRequest request)
      Deletes a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         DeleteFirewallEndpointAssociationRequest request =
             DeleteFirewallEndpointAssociationRequest.newBuilder()
                 .setName(
                     FirewallEndpointAssociationName.of(
                             "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         firewallActivationClient.deleteFirewallEndpointAssociationAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteFirewallEndpointAssociationOperationCallable

      public final OperationCallable<DeleteFirewallEndpointAssociationRequest,com.google.protobuf.Empty,OperationMetadata> deleteFirewallEndpointAssociationOperationCallable()
      Deletes a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         DeleteFirewallEndpointAssociationRequest request =
             DeleteFirewallEndpointAssociationRequest.newBuilder()
                 .setName(
                     FirewallEndpointAssociationName.of(
                             "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             firewallActivationClient
                 .deleteFirewallEndpointAssociationOperationCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteFirewallEndpointAssociationCallable

      public final UnaryCallable<DeleteFirewallEndpointAssociationRequest,Operation> deleteFirewallEndpointAssociationCallable()
      Deletes a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         DeleteFirewallEndpointAssociationRequest request =
             DeleteFirewallEndpointAssociationRequest.newBuilder()
                 .setName(
                     FirewallEndpointAssociationName.of(
                             "[PROJECT]", "[LOCATION]", "[FIREWALL_ENDPOINT_ASSOCIATION]")
                         .toString())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             firewallActivationClient.deleteFirewallEndpointAssociationCallable().futureCall(request);
         // Do something.
         future.get();
       }
       
    • updateFirewallEndpointAssociationAsync

      public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> updateFirewallEndpointAssociationAsync(FirewallEndpointAssociation firewallEndpointAssociation, com.google.protobuf.FieldMask updateMask)
      Update a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         FirewallEndpointAssociation firewallEndpointAssociation =
             FirewallEndpointAssociation.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         FirewallEndpointAssociation response =
             firewallActivationClient
                 .updateFirewallEndpointAssociationAsync(firewallEndpointAssociation, updateMask)
                 .get();
       }
       
      Parameters:
      firewallEndpointAssociation - Required. The resource being updated
      updateMask - Required. Field mask is used to specify the fields to be overwritten in the Association resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten.
      Throws:
      ApiException - if the remote call fails
    • updateFirewallEndpointAssociationAsync

      public final OperationFuture<FirewallEndpointAssociation,OperationMetadata> updateFirewallEndpointAssociationAsync(UpdateFirewallEndpointAssociationRequest request)
      Update a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         UpdateFirewallEndpointAssociationRequest request =
             UpdateFirewallEndpointAssociationRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         FirewallEndpointAssociation response =
             firewallActivationClient.updateFirewallEndpointAssociationAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateFirewallEndpointAssociationOperationCallable

      public final OperationCallable<UpdateFirewallEndpointAssociationRequest,FirewallEndpointAssociation,OperationMetadata> updateFirewallEndpointAssociationOperationCallable()
      Update a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         UpdateFirewallEndpointAssociationRequest request =
             UpdateFirewallEndpointAssociationRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         OperationFuture<FirewallEndpointAssociation, OperationMetadata> future =
             firewallActivationClient
                 .updateFirewallEndpointAssociationOperationCallable()
                 .futureCall(request);
         // Do something.
         FirewallEndpointAssociation response = future.get();
       }
       
    • updateFirewallEndpointAssociationCallable

      public final UnaryCallable<UpdateFirewallEndpointAssociationRequest,Operation> updateFirewallEndpointAssociationCallable()
      Update a single FirewallEndpointAssociation.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         UpdateFirewallEndpointAssociationRequest request =
             UpdateFirewallEndpointAssociationRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setFirewallEndpointAssociation(FirewallEndpointAssociation.newBuilder().build())
                 .setRequestId("requestId693933066")
                 .build();
         ApiFuture<Operation> future =
             firewallActivationClient.updateFirewallEndpointAssociationCallable().futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • listLocations

      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element : firewallActivationClient.listLocations(request).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • listLocationsPagedCallable

      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             firewallActivationClient.listLocationsPagedCallable().futureCall(request);
         // Do something.
         for (Location element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listLocationsCallable

      public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()
      Lists information about the supported locations for this service.

      This method lists locations based on the resource scope provided inthe [ListLocationsRequest.name] field:

      * **Global locations**: If `name` is empty, the method lists thepublic locations available to all projects. * **Project-specificlocations**: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project.

      For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               firewallActivationClient.listLocationsCallable().call(request);
           for (Location element : response.getLocationsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getLocation

      public final Location getLocation(GetLocationRequest request)
      Gets information about a location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = firewallActivationClient.getLocation(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getLocationCallable

      public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()
      Gets information about a location.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             firewallActivationClient.getLocationCallable().futureCall(request);
         // Do something.
         Location response = future.get();
       }
       
    • setIamPolicy

      public final Policy setIamPolicy(SetIamPolicyRequest request)
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = firewallActivationClient.setIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • setIamPolicyCallable

      public final UnaryCallable<SetIamPolicyRequest,Policy> setIamPolicyCallable()
      Sets the access control policy on the specified resource. Replacesany existing policy.

      Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED`errors.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             firewallActivationClient.setIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • getIamPolicy

      public final Policy getIamPolicy(GetIamPolicyRequest request)
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = firewallActivationClient.getIamPolicy(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getIamPolicyCallable

      public final UnaryCallable<GetIamPolicyRequest,Policy> getIamPolicyCallable()
      Gets the access control policy for a resource. Returns an empty policyif the resource exists and does not have a policy set.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             firewallActivationClient.getIamPolicyCallable().futureCall(request);
         // Do something.
         Policy response = future.get();
       }
       
    • testIamPermissions

      public final TestIamPermissionsResponse testIamPermissions(TestIamPermissionsRequest request)
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response = firewallActivationClient.testIamPermissions(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • testIamPermissionsCallable

      public final UnaryCallable<TestIamPermissionsRequest,TestIamPermissionsResponse> testIamPermissionsCallable()
      Returns permissions that a caller has on the specified resource. If theresource does not exist, this will return an empty set ofpermissions, not a `NOT_FOUND` error.

      Note: This operation is designed to be used for buildingpermission-aware UIs and command-line tools, not for authorizationchecking. This operation may "fail open" without warning.

      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 (FirewallActivationClient firewallActivationClient = FirewallActivationClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             firewallActivationClient.testIamPermissionsCallable().futureCall(request);
         // Do something.
         TestIamPermissionsResponse response = future.get();
       }
       
    • close

      public final void close()
      Specified by:
      close in interface AutoCloseable
    • shutdown

      public void shutdown()
      Specified by:
      shutdown in interface BackgroundResource
    • isShutdown

      public boolean isShutdown()
      Specified by:
      isShutdown in interface BackgroundResource
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface BackgroundResource
    • shutdownNow

      public void shutdownNow()
      Specified by:
      shutdownNow in interface BackgroundResource
    • awaitTermination

      public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
      Specified by:
      awaitTermination in interface BackgroundResource
      Throws:
      InterruptedException