Class OrganizationSecurityProfileGroupServiceClient

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

@Generated("by gapic-generator-java") public class OrganizationSecurityProfileGroupServiceClient extends Object implements BackgroundResource
Service Description: Organization SecurityProfileGroup is created under organization.

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 (OrganizationSecurityProfileGroupServiceClient
     organizationSecurityProfileGroupServiceClient =
         OrganizationSecurityProfileGroupServiceClient.create()) {
   SecurityProfileGroupName name =
       SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
           "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]");
   SecurityProfileGroup response =
       organizationSecurityProfileGroupServiceClient.getSecurityProfileGroup(name);
 }
 

Note: close() needs to be called on the OrganizationSecurityProfileGroupServiceClient 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

ListSecurityProfileGroups

Lists SecurityProfileGroups in a given organization and location.

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

  • listSecurityProfileGroups(ListSecurityProfileGroupsRequest request)

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

  • listSecurityProfileGroups(LocationName parent)

  • listSecurityProfileGroups(OrganizationLocationName parent)

  • listSecurityProfileGroups(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.

  • listSecurityProfileGroupsPagedCallable()

  • listSecurityProfileGroupsCallable()

GetSecurityProfileGroup

Gets details of a single SecurityProfileGroup.

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

  • getSecurityProfileGroup(GetSecurityProfileGroupRequest request)

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

  • getSecurityProfileGroup(SecurityProfileGroupName name)

  • getSecurityProfileGroup(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.

  • getSecurityProfileGroupCallable()

CreateSecurityProfileGroup

Creates a new SecurityProfileGroup in a given organization and location.

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

  • createSecurityProfileGroupAsync(CreateSecurityProfileGroupRequest request)

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

  • createSecurityProfileGroupAsync(LocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)

  • createSecurityProfileGroupAsync(OrganizationLocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)

  • createSecurityProfileGroupAsync(String parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)

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

  • createSecurityProfileGroupOperationCallable()

  • createSecurityProfileGroupCallable()

UpdateSecurityProfileGroup

Updates the parameters of a single SecurityProfileGroup.

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

  • updateSecurityProfileGroupAsync(UpdateSecurityProfileGroupRequest request)

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

  • updateSecurityProfileGroupAsync(SecurityProfileGroup securityProfileGroup, 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.

  • updateSecurityProfileGroupOperationCallable()

  • updateSecurityProfileGroupCallable()

DeleteSecurityProfileGroup

Deletes a single SecurityProfileGroup.

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

  • deleteSecurityProfileGroupAsync(DeleteSecurityProfileGroupRequest request)

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

  • deleteSecurityProfileGroupAsync(SecurityProfileGroupName name)

  • deleteSecurityProfileGroupAsync(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.

  • deleteSecurityProfileGroupOperationCallable()

  • deleteSecurityProfileGroupCallable()

ListSecurityProfiles

Lists SecurityProfiles in a given organization and location.

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

  • listSecurityProfiles(ListSecurityProfilesRequest request)

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

  • listSecurityProfiles(LocationName parent)

  • listSecurityProfiles(OrganizationLocationName parent)

  • listSecurityProfiles(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.

  • listSecurityProfilesPagedCallable()

  • listSecurityProfilesCallable()

GetSecurityProfile

Gets details of a single SecurityProfile.

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

  • getSecurityProfile(GetSecurityProfileRequest request)

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

  • getSecurityProfile(SecurityProfileName name)

  • getSecurityProfile(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.

  • getSecurityProfileCallable()

CreateSecurityProfile

Creates a new SecurityProfile in a given organization and location.

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

  • createSecurityProfileAsync(CreateSecurityProfileRequest request)

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

  • createSecurityProfileAsync(LocationName parent, SecurityProfile securityProfile, String securityProfileId)

  • createSecurityProfileAsync(OrganizationLocationName parent, SecurityProfile securityProfile, String securityProfileId)

  • createSecurityProfileAsync(String parent, SecurityProfile securityProfile, String securityProfileId)

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

  • createSecurityProfileOperationCallable()

  • createSecurityProfileCallable()

UpdateSecurityProfile

Updates the parameters of a single SecurityProfile.

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

  • updateSecurityProfileAsync(UpdateSecurityProfileRequest request)

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

  • updateSecurityProfileAsync(SecurityProfile securityProfile, 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.

  • updateSecurityProfileOperationCallable()

  • updateSecurityProfileCallable()

DeleteSecurityProfile

Deletes a single SecurityProfile.

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

  • deleteSecurityProfileAsync(DeleteSecurityProfileRequest request)

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

  • deleteSecurityProfileAsync(SecurityProfileName name)

  • deleteSecurityProfileAsync(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.

  • deleteSecurityProfileOperationCallable()

  • deleteSecurityProfileCallable()

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 OrganizationSecurityProfileGroupServiceSettings 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
 OrganizationSecurityProfileGroupServiceSettings
     organizationSecurityProfileGroupServiceSettings =
         OrganizationSecurityProfileGroupServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
 OrganizationSecurityProfileGroupServiceClient organizationSecurityProfileGroupServiceClient =
     OrganizationSecurityProfileGroupServiceClient.create(
         organizationSecurityProfileGroupServiceSettings);
 

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
 OrganizationSecurityProfileGroupServiceSettings
     organizationSecurityProfileGroupServiceSettings =
         OrganizationSecurityProfileGroupServiceSettings.newBuilder()
             .setEndpoint(myEndpoint)
             .build();
 OrganizationSecurityProfileGroupServiceClient organizationSecurityProfileGroupServiceClient =
     OrganizationSecurityProfileGroupServiceClient.create(
         organizationSecurityProfileGroupServiceSettings);
 

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

  • Constructor Details

    • OrganizationSecurityProfileGroupServiceClient

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

      protected OrganizationSecurityProfileGroupServiceClient(OrganizationSecurityProfileGroupServiceStub stub)
  • Method Details

    • create

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

      Constructs an instance of OrganizationSecurityProfileGroupServiceClient, 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

      Constructs an instance of OrganizationSecurityProfileGroupServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(OrganizationSecurityProfileGroupServiceSettings).
    • getSettings

    • 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.
    • listSecurityProfileGroups

      Lists SecurityProfileGroups 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (SecurityProfileGroup element :
             organizationSecurityProfileGroupServiceClient
                 .listSecurityProfileGroups(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project or organization and location from which the SecurityProfileGroups should be listed, specified in the format `projects|organizations/*/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listSecurityProfileGroups

      Lists SecurityProfileGroups 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (SecurityProfileGroup element :
             organizationSecurityProfileGroupServiceClient
                 .listSecurityProfileGroups(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project or organization and location from which the SecurityProfileGroups should be listed, specified in the format `projects|organizations/*/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listSecurityProfileGroups

      Lists SecurityProfileGroups 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (SecurityProfileGroup element :
             organizationSecurityProfileGroupServiceClient
                 .listSecurityProfileGroups(parent)
                 .iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project or organization and location from which the SecurityProfileGroups should be listed, specified in the format `projects|organizations/*/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listSecurityProfileGroups

      Lists SecurityProfileGroups 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListSecurityProfileGroupsRequest request =
             ListSecurityProfileGroupsRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (SecurityProfileGroup element :
             organizationSecurityProfileGroupServiceClient
                 .listSecurityProfileGroups(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
    • listSecurityProfileGroupsPagedCallable

      Lists SecurityProfileGroups 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListSecurityProfileGroupsRequest request =
             ListSecurityProfileGroupsRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<SecurityProfileGroup> future =
             organizationSecurityProfileGroupServiceClient
                 .listSecurityProfileGroupsPagedCallable()
                 .futureCall(request);
         // Do something.
         for (SecurityProfileGroup element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSecurityProfileGroupsCallable

      public final UnaryCallable<ListSecurityProfileGroupsRequest,ListSecurityProfileGroupsResponse> listSecurityProfileGroupsCallable()
      Lists SecurityProfileGroups 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListSecurityProfileGroupsRequest request =
             ListSecurityProfileGroupsRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListSecurityProfileGroupsResponse response =
               organizationSecurityProfileGroupServiceClient
                   .listSecurityProfileGroupsCallable()
                   .call(request);
           for (SecurityProfileGroup element : response.getSecurityProfileGroupsList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getSecurityProfileGroup

      public final SecurityProfileGroup getSecurityProfileGroup(SecurityProfileGroupName name)
      Gets details of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         SecurityProfileGroupName name =
             SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                 "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]");
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient.getSecurityProfileGroup(name);
       }
       
      Parameters:
      name - Required. A name of the SecurityProfileGroup to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.
      Throws:
      ApiException - if the remote call fails
    • getSecurityProfileGroup

      public final SecurityProfileGroup getSecurityProfileGroup(String name)
      Gets details of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String name =
             SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                     "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
                 .toString();
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient.getSecurityProfileGroup(name);
       }
       
      Parameters:
      name - Required. A name of the SecurityProfileGroup to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.
      Throws:
      ApiException - if the remote call fails
    • getSecurityProfileGroup

      public final SecurityProfileGroup getSecurityProfileGroup(GetSecurityProfileGroupRequest request)
      Gets details of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetSecurityProfileGroupRequest request =
             GetSecurityProfileGroupRequest.newBuilder()
                 .setName(
                     SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
                         .toString())
                 .build();
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient.getSecurityProfileGroup(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSecurityProfileGroupCallable

      public final UnaryCallable<GetSecurityProfileGroupRequest,SecurityProfileGroup> getSecurityProfileGroupCallable()
      Gets details of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetSecurityProfileGroupRequest request =
             GetSecurityProfileGroupRequest.newBuilder()
                 .setName(
                     SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
                         .toString())
                 .build();
         ApiFuture<SecurityProfileGroup> future =
             organizationSecurityProfileGroupServiceClient
                 .getSecurityProfileGroupCallable()
                 .futureCall(request);
         // Do something.
         SecurityProfileGroup response = future.get();
       }
       
    • createSecurityProfileGroupAsync

      public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(LocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)
      Creates a new SecurityProfileGroup 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
         String securityProfileGroupId = "securityProfileGroupId-357991055";
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileGroupAsync(parent, securityProfileGroup, securityProfileGroupId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the SecurityProfileGroup. Must be in the format `projects|organizations/*/locations/{location}`.
      securityProfileGroup - Required. SecurityProfileGroup resource to be created.
      securityProfileGroupId - Required. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile_group1".
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileGroupAsync

      public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(OrganizationLocationName parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)
      Creates a new SecurityProfileGroup 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
         String securityProfileGroupId = "securityProfileGroupId-357991055";
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileGroupAsync(parent, securityProfileGroup, securityProfileGroupId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the SecurityProfileGroup. Must be in the format `projects|organizations/*/locations/{location}`.
      securityProfileGroup - Required. SecurityProfileGroup resource to be created.
      securityProfileGroupId - Required. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile_group1".
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileGroupAsync

      public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(String parent, SecurityProfileGroup securityProfileGroup, String securityProfileGroupId)
      Creates a new SecurityProfileGroup 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
         String securityProfileGroupId = "securityProfileGroupId-357991055";
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileGroupAsync(parent, securityProfileGroup, securityProfileGroupId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the SecurityProfileGroup. Must be in the format `projects|organizations/*/locations/{location}`.
      securityProfileGroup - Required. SecurityProfileGroup resource to be created.
      securityProfileGroupId - Required. Short name of the SecurityProfileGroup resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile_group1".
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileGroupAsync

      public final OperationFuture<SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupAsync(CreateSecurityProfileGroupRequest request)
      Creates a new SecurityProfileGroup 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         CreateSecurityProfileGroupRequest request =
             CreateSecurityProfileGroupRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityProfileGroupId("securityProfileGroupId-357991055")
                 .setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
                 .build();
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileGroupAsync(request)
                 .get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileGroupOperationCallable

      public final OperationCallable<CreateSecurityProfileGroupRequest,SecurityProfileGroup,OperationMetadata> createSecurityProfileGroupOperationCallable()
      Creates a new SecurityProfileGroup 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         CreateSecurityProfileGroupRequest request =
             CreateSecurityProfileGroupRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityProfileGroupId("securityProfileGroupId-357991055")
                 .setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
                 .build();
         OperationFuture<SecurityProfileGroup, OperationMetadata> future =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileGroupOperationCallable()
                 .futureCall(request);
         // Do something.
         SecurityProfileGroup response = future.get();
       }
       
    • createSecurityProfileGroupCallable

      public final UnaryCallable<CreateSecurityProfileGroupRequest,Operation> createSecurityProfileGroupCallable()
      Creates a new SecurityProfileGroup 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         CreateSecurityProfileGroupRequest request =
             CreateSecurityProfileGroupRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityProfileGroupId("securityProfileGroupId-357991055")
                 .setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileGroupCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateSecurityProfileGroupAsync

      public final OperationFuture<SecurityProfileGroup,OperationMetadata> updateSecurityProfileGroupAsync(SecurityProfileGroup securityProfileGroup, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         SecurityProfileGroup securityProfileGroup = SecurityProfileGroup.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient
                 .updateSecurityProfileGroupAsync(securityProfileGroup, updateMask)
                 .get();
       }
       
      Parameters:
      securityProfileGroup - Required. Updated SecurityProfileGroup resource.
      updateMask - Required. Field mask is used to specify the fields to be overwritten in the SecurityProfileGroup 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.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityProfileGroupAsync

      public final OperationFuture<SecurityProfileGroup,OperationMetadata> updateSecurityProfileGroupAsync(UpdateSecurityProfileGroupRequest request)
      Updates the parameters of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         UpdateSecurityProfileGroupRequest request =
             UpdateSecurityProfileGroupRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
                 .build();
         SecurityProfileGroup response =
             organizationSecurityProfileGroupServiceClient
                 .updateSecurityProfileGroupAsync(request)
                 .get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityProfileGroupOperationCallable

      public final OperationCallable<UpdateSecurityProfileGroupRequest,SecurityProfileGroup,OperationMetadata> updateSecurityProfileGroupOperationCallable()
      Updates the parameters of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         UpdateSecurityProfileGroupRequest request =
             UpdateSecurityProfileGroupRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
                 .build();
         OperationFuture<SecurityProfileGroup, OperationMetadata> future =
             organizationSecurityProfileGroupServiceClient
                 .updateSecurityProfileGroupOperationCallable()
                 .futureCall(request);
         // Do something.
         SecurityProfileGroup response = future.get();
       }
       
    • updateSecurityProfileGroupCallable

      public final UnaryCallable<UpdateSecurityProfileGroupRequest,Operation> updateSecurityProfileGroupCallable()
      Updates the parameters of a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         UpdateSecurityProfileGroupRequest request =
             UpdateSecurityProfileGroupRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityProfileGroup(SecurityProfileGroup.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             organizationSecurityProfileGroupServiceClient
                 .updateSecurityProfileGroupCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteSecurityProfileGroupAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSecurityProfileGroupAsync(SecurityProfileGroupName name)
      Deletes a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         SecurityProfileGroupName name =
             SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                 "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]");
         organizationSecurityProfileGroupServiceClient.deleteSecurityProfileGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the SecurityProfileGroup to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityProfileGroupAsync

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

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String name =
             SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                     "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
                 .toString();
         organizationSecurityProfileGroupServiceClient.deleteSecurityProfileGroupAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the SecurityProfileGroup to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfileGroups/{security_profile_group}`.
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityProfileGroupAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSecurityProfileGroupAsync(DeleteSecurityProfileGroupRequest request)
      Deletes a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         DeleteSecurityProfileGroupRequest request =
             DeleteSecurityProfileGroupRequest.newBuilder()
                 .setName(
                     SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
                         .toString())
                 .setEtag("etag3123477")
                 .build();
         organizationSecurityProfileGroupServiceClient.deleteSecurityProfileGroupAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityProfileGroupOperationCallable

      public final OperationCallable<DeleteSecurityProfileGroupRequest,com.google.protobuf.Empty,OperationMetadata> deleteSecurityProfileGroupOperationCallable()
      Deletes a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         DeleteSecurityProfileGroupRequest request =
             DeleteSecurityProfileGroupRequest.newBuilder()
                 .setName(
                     SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
                         .toString())
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             organizationSecurityProfileGroupServiceClient
                 .deleteSecurityProfileGroupOperationCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteSecurityProfileGroupCallable

      public final UnaryCallable<DeleteSecurityProfileGroupRequest,Operation> deleteSecurityProfileGroupCallable()
      Deletes a single SecurityProfileGroup.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         DeleteSecurityProfileGroupRequest request =
             DeleteSecurityProfileGroupRequest.newBuilder()
                 .setName(
                     SecurityProfileGroupName.ofOrganizationLocationSecurityProfileGroupName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE_GROUP]")
                         .toString())
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             organizationSecurityProfileGroupServiceClient
                 .deleteSecurityProfileGroupCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • listSecurityProfiles

      Lists SecurityProfiles 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         for (SecurityProfile element :
             organizationSecurityProfileGroupServiceClient.listSecurityProfiles(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project or organization and location from which the SecurityProfiles should be listed, specified in the format `projects|organizations/*/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listSecurityProfiles

      Lists SecurityProfiles 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         for (SecurityProfile element :
             organizationSecurityProfileGroupServiceClient.listSecurityProfiles(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project or organization and location from which the SecurityProfiles should be listed, specified in the format `projects|organizations/*/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listSecurityProfiles

      Lists SecurityProfiles 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         for (SecurityProfile element :
             organizationSecurityProfileGroupServiceClient.listSecurityProfiles(parent).iterateAll()) {
           // doThingsWith(element);
         }
       }
       
      Parameters:
      parent - Required. The project or organization and location from which the SecurityProfiles should be listed, specified in the format `projects|organizations/*/locations/{location}`.
      Throws:
      ApiException - if the remote call fails
    • listSecurityProfiles

      Lists SecurityProfiles 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListSecurityProfilesRequest request =
             ListSecurityProfilesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (SecurityProfile element :
             organizationSecurityProfileGroupServiceClient
                 .listSecurityProfiles(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
    • listSecurityProfilesPagedCallable

      Lists SecurityProfiles 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListSecurityProfilesRequest request =
             ListSecurityProfilesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<SecurityProfile> future =
             organizationSecurityProfileGroupServiceClient
                 .listSecurityProfilesPagedCallable()
                 .futureCall(request);
         // Do something.
         for (SecurityProfile element : future.get().iterateAll()) {
           // doThingsWith(element);
         }
       }
       
    • listSecurityProfilesCallable

      public final UnaryCallable<ListSecurityProfilesRequest,ListSecurityProfilesResponse> listSecurityProfilesCallable()
      Lists SecurityProfiles 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListSecurityProfilesRequest request =
             ListSecurityProfilesRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListSecurityProfilesResponse response =
               organizationSecurityProfileGroupServiceClient
                   .listSecurityProfilesCallable()
                   .call(request);
           for (SecurityProfile element : response.getSecurityProfilesList()) {
             // doThingsWith(element);
           }
           String nextPageToken = response.getNextPageToken();
           if (!Strings.isNullOrEmpty(nextPageToken)) {
             request = request.toBuilder().setPageToken(nextPageToken).build();
           } else {
             break;
           }
         }
       }
       
    • getSecurityProfile

      public final SecurityProfile getSecurityProfile(SecurityProfileName name)
      Gets details of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         SecurityProfileName name =
             SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                 "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]");
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient.getSecurityProfile(name);
       }
       
      Parameters:
      name - Required. A name of the SecurityProfile to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.
      Throws:
      ApiException - if the remote call fails
    • getSecurityProfile

      public final SecurityProfile getSecurityProfile(String name)
      Gets details of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String name =
             SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                     "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
                 .toString();
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient.getSecurityProfile(name);
       }
       
      Parameters:
      name - Required. A name of the SecurityProfile to get. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.
      Throws:
      ApiException - if the remote call fails
    • getSecurityProfile

      public final SecurityProfile getSecurityProfile(GetSecurityProfileRequest request)
      Gets details of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetSecurityProfileRequest request =
             GetSecurityProfileRequest.newBuilder()
                 .setName(
                     SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
                         .toString())
                 .build();
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient.getSecurityProfile(request);
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • getSecurityProfileCallable

      public final UnaryCallable<GetSecurityProfileRequest,SecurityProfile> getSecurityProfileCallable()
      Gets details of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetSecurityProfileRequest request =
             GetSecurityProfileRequest.newBuilder()
                 .setName(
                     SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
                         .toString())
                 .build();
         ApiFuture<SecurityProfile> future =
             organizationSecurityProfileGroupServiceClient
                 .getSecurityProfileCallable()
                 .futureCall(request);
         // Do something.
         SecurityProfile response = future.get();
       }
       
    • createSecurityProfileAsync

      public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(LocationName parent, SecurityProfile securityProfile, String securityProfileId)
      Creates a new SecurityProfile 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
         SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
         String securityProfileId = "securityProfileId-1121673916";
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileAsync(parent, securityProfile, securityProfileId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the SecurityProfile. Must be in the format `projects|organizations/*/locations/{location}`.
      securityProfile - Required. SecurityProfile resource to be created.
      securityProfileId - Required. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile1".
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileAsync

      public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(OrganizationLocationName parent, SecurityProfile securityProfile, String securityProfileId)
      Creates a new SecurityProfile 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         OrganizationLocationName parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]");
         SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
         String securityProfileId = "securityProfileId-1121673916";
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileAsync(parent, securityProfile, securityProfileId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the SecurityProfile. Must be in the format `projects|organizations/*/locations/{location}`.
      securityProfile - Required. SecurityProfile resource to be created.
      securityProfileId - Required. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile1".
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileAsync

      public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(String parent, SecurityProfile securityProfile, String securityProfileId)
      Creates a new SecurityProfile 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String parent = OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString();
         SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
         String securityProfileId = "securityProfileId-1121673916";
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileAsync(parent, securityProfile, securityProfileId)
                 .get();
       }
       
      Parameters:
      parent - Required. The parent resource of the SecurityProfile. Must be in the format `projects|organizations/*/locations/{location}`.
      securityProfile - Required. SecurityProfile resource to be created.
      securityProfileId - Required. Short name of the SecurityProfile resource to be created. This value should be 1-63 characters long, containing only letters, numbers, hyphens, and underscores, and should not start with a number. E.g. "security_profile1".
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileAsync

      public final OperationFuture<SecurityProfile,OperationMetadata> createSecurityProfileAsync(CreateSecurityProfileRequest request)
      Creates a new SecurityProfile 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         CreateSecurityProfileRequest request =
             CreateSecurityProfileRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityProfileId("securityProfileId-1121673916")
                 .setSecurityProfile(SecurityProfile.newBuilder().build())
                 .build();
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient.createSecurityProfileAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • createSecurityProfileOperationCallable

      public final OperationCallable<CreateSecurityProfileRequest,SecurityProfile,OperationMetadata> createSecurityProfileOperationCallable()
      Creates a new SecurityProfile 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         CreateSecurityProfileRequest request =
             CreateSecurityProfileRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityProfileId("securityProfileId-1121673916")
                 .setSecurityProfile(SecurityProfile.newBuilder().build())
                 .build();
         OperationFuture<SecurityProfile, OperationMetadata> future =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileOperationCallable()
                 .futureCall(request);
         // Do something.
         SecurityProfile response = future.get();
       }
       
    • createSecurityProfileCallable

      public final UnaryCallable<CreateSecurityProfileRequest,Operation> createSecurityProfileCallable()
      Creates a new SecurityProfile 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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         CreateSecurityProfileRequest request =
             CreateSecurityProfileRequest.newBuilder()
                 .setParent(OrganizationLocationName.of("[ORGANIZATION]", "[LOCATION]").toString())
                 .setSecurityProfileId("securityProfileId-1121673916")
                 .setSecurityProfile(SecurityProfile.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             organizationSecurityProfileGroupServiceClient
                 .createSecurityProfileCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • updateSecurityProfileAsync

      public final OperationFuture<SecurityProfile,OperationMetadata> updateSecurityProfileAsync(SecurityProfile securityProfile, com.google.protobuf.FieldMask updateMask)
      Updates the parameters of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         SecurityProfile securityProfile = SecurityProfile.newBuilder().build();
         FieldMask updateMask = FieldMask.newBuilder().build();
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient
                 .updateSecurityProfileAsync(securityProfile, updateMask)
                 .get();
       }
       
      Parameters:
      securityProfile - Required. Updated SecurityProfile resource.
      updateMask - Required. Field mask is used to specify the fields to be overwritten in the SecurityProfile 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.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityProfileAsync

      public final OperationFuture<SecurityProfile,OperationMetadata> updateSecurityProfileAsync(UpdateSecurityProfileRequest request)
      Updates the parameters of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         UpdateSecurityProfileRequest request =
             UpdateSecurityProfileRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityProfile(SecurityProfile.newBuilder().build())
                 .build();
         SecurityProfile response =
             organizationSecurityProfileGroupServiceClient.updateSecurityProfileAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • updateSecurityProfileOperationCallable

      public final OperationCallable<UpdateSecurityProfileRequest,SecurityProfile,OperationMetadata> updateSecurityProfileOperationCallable()
      Updates the parameters of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         UpdateSecurityProfileRequest request =
             UpdateSecurityProfileRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityProfile(SecurityProfile.newBuilder().build())
                 .build();
         OperationFuture<SecurityProfile, OperationMetadata> future =
             organizationSecurityProfileGroupServiceClient
                 .updateSecurityProfileOperationCallable()
                 .futureCall(request);
         // Do something.
         SecurityProfile response = future.get();
       }
       
    • updateSecurityProfileCallable

      public final UnaryCallable<UpdateSecurityProfileRequest,Operation> updateSecurityProfileCallable()
      Updates the parameters of a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         UpdateSecurityProfileRequest request =
             UpdateSecurityProfileRequest.newBuilder()
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .setSecurityProfile(SecurityProfile.newBuilder().build())
                 .build();
         ApiFuture<Operation> future =
             organizationSecurityProfileGroupServiceClient
                 .updateSecurityProfileCallable()
                 .futureCall(request);
         // Do something.
         Operation response = future.get();
       }
       
    • deleteSecurityProfileAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSecurityProfileAsync(SecurityProfileName name)
      Deletes a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         SecurityProfileName name =
             SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                 "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]");
         organizationSecurityProfileGroupServiceClient.deleteSecurityProfileAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the SecurityProfile to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityProfileAsync

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

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         String name =
             SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                     "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
                 .toString();
         organizationSecurityProfileGroupServiceClient.deleteSecurityProfileAsync(name).get();
       }
       
      Parameters:
      name - Required. A name of the SecurityProfile to delete. Must be in the format `projects|organizations/*/locations/{location}/securityProfiles/{security_profile_id}`.
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityProfileAsync

      public final OperationFuture<com.google.protobuf.Empty,OperationMetadata> deleteSecurityProfileAsync(DeleteSecurityProfileRequest request)
      Deletes a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         DeleteSecurityProfileRequest request =
             DeleteSecurityProfileRequest.newBuilder()
                 .setName(
                     SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
                         .toString())
                 .setEtag("etag3123477")
                 .build();
         organizationSecurityProfileGroupServiceClient.deleteSecurityProfileAsync(request).get();
       }
       
      Parameters:
      request - The request object containing all of the parameters for the API call.
      Throws:
      ApiException - if the remote call fails
    • deleteSecurityProfileOperationCallable

      public final OperationCallable<DeleteSecurityProfileRequest,com.google.protobuf.Empty,OperationMetadata> deleteSecurityProfileOperationCallable()
      Deletes a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         DeleteSecurityProfileRequest request =
             DeleteSecurityProfileRequest.newBuilder()
                 .setName(
                     SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
                         .toString())
                 .setEtag("etag3123477")
                 .build();
         OperationFuture<Empty, OperationMetadata> future =
             organizationSecurityProfileGroupServiceClient
                 .deleteSecurityProfileOperationCallable()
                 .futureCall(request);
         // Do something.
         future.get();
       }
       
    • deleteSecurityProfileCallable

      public final UnaryCallable<DeleteSecurityProfileRequest,Operation> deleteSecurityProfileCallable()
      Deletes a single SecurityProfile.

      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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         DeleteSecurityProfileRequest request =
             DeleteSecurityProfileRequest.newBuilder()
                 .setName(
                     SecurityProfileName.ofOrganizationLocationSecurityProfileName(
                             "[ORGANIZATION]", "[LOCATION]", "[SECURITY_PROFILE]")
                         .toString())
                 .setEtag("etag3123477")
                 .build();
         ApiFuture<Operation> future =
             organizationSecurityProfileGroupServiceClient
                 .deleteSecurityProfileCallable()
                 .futureCall(request);
         // Do something.
         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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         for (Location element :
             organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         ApiFuture<Location> future =
             organizationSecurityProfileGroupServiceClient
                 .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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         ListLocationsRequest request =
             ListLocationsRequest.newBuilder()
                 .setName("name3373707")
                 .setFilter("filter-1274492040")
                 .setPageSize(883849137)
                 .setPageToken("pageToken873572522")
                 .build();
         while (true) {
           ListLocationsResponse response =
               organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         Location response = organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
         ApiFuture<Location> future =
             organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         SetIamPolicyRequest request =
             SetIamPolicyRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .setPolicy(Policy.newBuilder().build())
                 .setUpdateMask(FieldMask.newBuilder().build())
                 .build();
         Policy response = organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.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 =
             organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         Policy response = organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         GetIamPolicyRequest request =
             GetIamPolicyRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .setOptions(GetPolicyOptions.newBuilder().build())
                 .build();
         ApiFuture<Policy> future =
             organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         TestIamPermissionsResponse response =
             organizationSecurityProfileGroupServiceClient.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 (OrganizationSecurityProfileGroupServiceClient
           organizationSecurityProfileGroupServiceClient =
               OrganizationSecurityProfileGroupServiceClient.create()) {
         TestIamPermissionsRequest request =
             TestIamPermissionsRequest.newBuilder()
                 .setResource(
                     AddressGroupName.ofProjectLocationAddressGroupName(
                             "[PROJECT]", "[LOCATION]", "[ADDRESS_GROUP]")
                         .toString())
                 .addAllPermissions(new ArrayList<String>())
                 .build();
         ApiFuture<TestIamPermissionsResponse> future =
             organizationSecurityProfileGroupServiceClient
                 .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