# Class NetworkSecurityClient (0.96.0)

0.96.0 (latest) 0.94.0 0.91.0 0.90.0 0.88.0 0.86.0 0.85.0 0.83.0 0.81.0 0.79.0 0.78.0 0.77.0 0.76.0 0.75.0 0.73.0 0.71.0 0.70.0 0.67.0 0.66.0 0.65.0 0.63.0 0.62.0 0.61.0 0.60.0 0.59.0 0.58.0 0.57.0 0.56.0 0.55.0 0.54.0 0.52.0 0.51.0 0.50.0 0.49.0 0.48.0 0.47.0 0.46.0 0.45.0 0.44.0 0.43.0 0.42.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.35.0 0.34.0 0.33.0 0.32.0 0.31.0 0.30.0 0.27.0 0.26.0 0.25.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.14.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.4 0.5.1 0.4.4

> [!WARNING]
> **Beta**
>
>
> This library is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1)
> of the Terms of Service. Pre-GA libraries might have limited support,
> and changes to pre-GA libraries might not be compatible with other pre-GA versions.
> For more information, see the
> [launch stage descriptions](https://docs.cloud.google.com/products#product-launch-stages).

|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-network-security/google-cloud-network-security/src/main/java/com/google/cloud/networksecurity/v1beta1/NetworkSecurityClient.java) | [Product Reference](https://cloud.google.com/traffic-director/docs/reference/network-security/rest) |

Service Description: Network Security API provides resources to configure authentication and
authorization policies. Refer to per API resource documentation for more information.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       AuthorizationPolicyName name =
           AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
       AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
     }
     
Note: close() needs to be called on the NetworkSecurityClient object to clean up resources
such as threads. In the example above, try-with-resources is used, which automatically calls
close().

| Method | Description | Method Variants |
|---|---|---|
| ListAuthorizationPolicies | Lists AuthorizationPolicies in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listAuthorizationPolicies(ListAuthorizationPoliciesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listAuthorizationPolicies(LocationName parent) - listAuthorizationPolicies(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. - listAuthorizationPoliciesPagedCallable() - listAuthorizationPoliciesCallable() |
| GetAuthorizationPolicy | Gets details of a single AuthorizationPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getAuthorizationPolicy(GetAuthorizationPolicyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getAuthorizationPolicy(AuthorizationPolicyName name) - getAuthorizationPolicy(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. - getAuthorizationPolicyCallable() |
| CreateAuthorizationPolicy | Creates a new AuthorizationPolicy in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createAuthorizationPolicyAsync(LocationName parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId) - createAuthorizationPolicyAsync(String parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createAuthorizationPolicyOperationCallable() - createAuthorizationPolicyCallable() |
| UpdateAuthorizationPolicy | Updates the parameters of a single AuthorizationPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - updateAuthorizationPolicyAsync(AuthorizationPolicy authorizationPolicy, 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. - updateAuthorizationPolicyOperationCallable() - updateAuthorizationPolicyCallable() |
| DeleteAuthorizationPolicy | Deletes a single AuthorizationPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteAuthorizationPolicyAsync(AuthorizationPolicyName name) - deleteAuthorizationPolicyAsync(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. - deleteAuthorizationPolicyOperationCallable() - deleteAuthorizationPolicyCallable() |
| ListServerTlsPolicies | Lists ServerTlsPolicies in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listServerTlsPolicies(ListServerTlsPoliciesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listServerTlsPolicies(LocationName parent) - listServerTlsPolicies(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. - listServerTlsPoliciesPagedCallable() - listServerTlsPoliciesCallable() |
| GetServerTlsPolicy | Gets details of a single ServerTlsPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getServerTlsPolicy(GetServerTlsPolicyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getServerTlsPolicy(ServerTlsPolicyName name) - getServerTlsPolicy(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. - getServerTlsPolicyCallable() |
| CreateServerTlsPolicy | Creates a new ServerTlsPolicy in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createServerTlsPolicyAsync(CreateServerTlsPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createServerTlsPolicyAsync(LocationName parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId) - createServerTlsPolicyAsync(String parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createServerTlsPolicyOperationCallable() - createServerTlsPolicyCallable() |
| UpdateServerTlsPolicy | Updates the parameters of a single ServerTlsPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - updateServerTlsPolicyAsync(ServerTlsPolicy serverTlsPolicy, 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. - updateServerTlsPolicyOperationCallable() - updateServerTlsPolicyCallable() |
| DeleteServerTlsPolicy | Deletes a single ServerTlsPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteServerTlsPolicyAsync(ServerTlsPolicyName name) - deleteServerTlsPolicyAsync(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. - deleteServerTlsPolicyOperationCallable() - deleteServerTlsPolicyCallable() |
| ListClientTlsPolicies | Lists ClientTlsPolicies in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listClientTlsPolicies(ListClientTlsPoliciesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listClientTlsPolicies(LocationName parent) - listClientTlsPolicies(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. - listClientTlsPoliciesPagedCallable() - listClientTlsPoliciesCallable() |
| GetClientTlsPolicy | Gets details of a single ClientTlsPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getClientTlsPolicy(GetClientTlsPolicyRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getClientTlsPolicy(ClientTlsPolicyName name) - getClientTlsPolicy(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. - getClientTlsPolicyCallable() |
| CreateClientTlsPolicy | Creates a new ClientTlsPolicy in a given project and location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createClientTlsPolicyAsync(CreateClientTlsPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - createClientTlsPolicyAsync(LocationName parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId) - createClientTlsPolicyAsync(String parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createClientTlsPolicyOperationCallable() - createClientTlsPolicyCallable() |
| UpdateClientTlsPolicy | Updates the parameters of a single ClientTlsPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - updateClientTlsPolicyAsync(ClientTlsPolicy clientTlsPolicy, 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. - updateClientTlsPolicyOperationCallable() - updateClientTlsPolicyCallable() |
| DeleteClientTlsPolicy | Deletes a single ClientTlsPolicy. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest request) Methods that return long-running operations have "Async" method variants that return `OperationFuture`, which is used to track polling of the service. - deleteClientTlsPolicyAsync(ClientTlsPolicyName name) - deleteClientTlsPolicyAsync(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. - deleteClientTlsPolicyOperationCallable() - deleteClientTlsPolicyCallable() |
| ListLocations | Lists information about the supported locations for this service. | 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() |
[Methods]

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 NetworkSecuritySettings 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
     NetworkSecuritySettings networkSecuritySettings =
         NetworkSecuritySettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     NetworkSecurityClient networkSecurityClient =
         NetworkSecurityClient.create(networkSecuritySettings);
     
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
     NetworkSecuritySettings networkSecuritySettings =
         NetworkSecuritySettings.newBuilder().setEndpoint(myEndpoint).build();
     NetworkSecurityClient networkSecurityClient =
         NetworkSecurityClient.create(networkSecuritySettings);
     
To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over
the wire:


     // 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
     NetworkSecuritySettings networkSecuritySettings =
         NetworkSecuritySettings.newHttpJsonBuilder().build();
     NetworkSecurityClient networkSecurityClient =
         NetworkSecurityClient.create(networkSecuritySettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> NetworkSecurityClient

## Static Methods

### create()

    public static final NetworkSecurityClient create()

Constructs an instance of NetworkSecurityClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(NetworkSecuritySettings settings)

    public static final NetworkSecurityClient create(NetworkSecuritySettings settings)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecuritySettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html` |   |

### create(NetworkSecurityStub stub)

    public static final NetworkSecurityClient create(NetworkSecurityStub stub)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.stub.NetworkSecurityStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient` |   |

## Constructors

### NetworkSecurityClient(NetworkSecuritySettings settings)

    protected NetworkSecurityClient(NetworkSecuritySettings settings)

Constructs an instance of NetworkSecurityClient, using the given settings. This is protected so
that it is easy to make a subclass, but otherwise, the static factory methods should be
preferred.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecuritySettings` |

### NetworkSecurityClient(NetworkSecurityStub stub)

    protected NetworkSecurityClient(NetworkSecurityStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.stub.NetworkSecurityStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `duration` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |
| `unit` | `https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/TimeUnit.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

| **Exceptions** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/InterruptedException.html` |   |

### close()

    public final void close()

### createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest request)

    public final OperationFuture<AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyAsync(CreateAuthorizationPolicyRequest request)

Creates a new AuthorizationPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateAuthorizationPolicyRequest request =
           CreateAuthorizationPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setAuthorizationPolicyId("authorizationPolicyId1314252166")
               .setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
               .build();
       AuthorizationPolicy response =
           networkSecurityClient.createAuthorizationPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createAuthorizationPolicyAsync(LocationName parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)

    public final OperationFuture<AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyAsync(LocationName parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)

Creates a new AuthorizationPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       AuthorizationPolicy authorizationPolicy = AuthorizationPolicy.newBuilder().build();
       String authorizationPolicyId = "authorizationPolicyId1314252166";
       AuthorizationPolicy response =
           networkSecurityClient
               .createAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.LocationName` Required. The parent resource of the AuthorizationPolicy. Must be in the format `projects/{project}/locations/{location}`. |
| `authorizationPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy` Required. AuthorizationPolicy resource to be created. |
| `authorizationPolicyId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Short name of the AuthorizationPolicy 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. "authz_policy". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createAuthorizationPolicyAsync(String parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)

    public final OperationFuture<AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyAsync(String parent, AuthorizationPolicy authorizationPolicy, String authorizationPolicyId)

Creates a new AuthorizationPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       AuthorizationPolicy authorizationPolicy = AuthorizationPolicy.newBuilder().build();
       String authorizationPolicyId = "authorizationPolicyId1314252166";
       AuthorizationPolicy response =
           networkSecurityClient
               .createAuthorizationPolicyAsync(parent, authorizationPolicy, authorizationPolicyId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource of the AuthorizationPolicy. Must be in the format `projects/{project}/locations/{location}`. |
| `authorizationPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy` Required. AuthorizationPolicy resource to be created. |
| `authorizationPolicyId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Short name of the AuthorizationPolicy 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. "authz_policy". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createAuthorizationPolicyCallable()

    public final UnaryCallable<CreateAuthorizationPolicyRequest,Operation> createAuthorizationPolicyCallable()

Creates a new AuthorizationPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateAuthorizationPolicyRequest request =
           CreateAuthorizationPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setAuthorizationPolicyId("authorizationPolicyId1314252166")
               .setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.createAuthorizationPolicyCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createAuthorizationPolicyOperationCallable()

    public final OperationCallable<CreateAuthorizationPolicyRequest,AuthorizationPolicy,OperationMetadata> createAuthorizationPolicyOperationCallable()

Creates a new AuthorizationPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateAuthorizationPolicyRequest request =
           CreateAuthorizationPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setAuthorizationPolicyId("authorizationPolicyId1314252166")
               .setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
               .build();
       OperationFuture<AuthorizationPolicy, OperationMetadata> future =
           networkSecurityClient.createAuthorizationPolicyOperationCallable().futureCall(request);
       // Do something.
       AuthorizationPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateAuthorizationPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createClientTlsPolicyAsync(CreateClientTlsPolicyRequest request)

    public final OperationFuture<ClientTlsPolicy,OperationMetadata> createClientTlsPolicyAsync(CreateClientTlsPolicyRequest request)

Creates a new ClientTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateClientTlsPolicyRequest request =
           CreateClientTlsPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setClientTlsPolicyId("clientTlsPolicyId-188933315")
               .setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
               .build();
       ClientTlsPolicy response = networkSecurityClient.createClientTlsPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createClientTlsPolicyAsync(LocationName parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)

    public final OperationFuture<ClientTlsPolicy,OperationMetadata> createClientTlsPolicyAsync(LocationName parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)

Creates a new ClientTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       ClientTlsPolicy clientTlsPolicy = ClientTlsPolicy.newBuilder().build();
       String clientTlsPolicyId = "clientTlsPolicyId-188933315";
       ClientTlsPolicy response =
           networkSecurityClient
               .createClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.LocationName` Required. The parent resource of the ClientTlsPolicy. Must be in the format `projects/*/locations/{location}`. |
| `clientTlsPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy` Required. ClientTlsPolicy resource to be created. |
| `clientTlsPolicyId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Short name of the ClientTlsPolicy 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. "client_mtls_policy". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createClientTlsPolicyAsync(String parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)

    public final OperationFuture<ClientTlsPolicy,OperationMetadata> createClientTlsPolicyAsync(String parent, ClientTlsPolicy clientTlsPolicy, String clientTlsPolicyId)

Creates a new ClientTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       ClientTlsPolicy clientTlsPolicy = ClientTlsPolicy.newBuilder().build();
       String clientTlsPolicyId = "clientTlsPolicyId-188933315";
       ClientTlsPolicy response =
           networkSecurityClient
               .createClientTlsPolicyAsync(parent, clientTlsPolicy, clientTlsPolicyId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource of the ClientTlsPolicy. Must be in the format `projects/*/locations/{location}`. |
| `clientTlsPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy` Required. ClientTlsPolicy resource to be created. |
| `clientTlsPolicyId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Short name of the ClientTlsPolicy 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. "client_mtls_policy". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createClientTlsPolicyCallable()

    public final UnaryCallable<CreateClientTlsPolicyRequest,Operation> createClientTlsPolicyCallable()

Creates a new ClientTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateClientTlsPolicyRequest request =
           CreateClientTlsPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setClientTlsPolicyId("clientTlsPolicyId-188933315")
               .setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.createClientTlsPolicyCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createClientTlsPolicyOperationCallable()

    public final OperationCallable<CreateClientTlsPolicyRequest,ClientTlsPolicy,OperationMetadata> createClientTlsPolicyOperationCallable()

Creates a new ClientTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateClientTlsPolicyRequest request =
           CreateClientTlsPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setClientTlsPolicyId("clientTlsPolicyId-188933315")
               .setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
               .build();
       OperationFuture<ClientTlsPolicy, OperationMetadata> future =
           networkSecurityClient.createClientTlsPolicyOperationCallable().futureCall(request);
       // Do something.
       ClientTlsPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateClientTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createServerTlsPolicyAsync(CreateServerTlsPolicyRequest request)

    public final OperationFuture<ServerTlsPolicy,OperationMetadata> createServerTlsPolicyAsync(CreateServerTlsPolicyRequest request)

Creates a new ServerTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateServerTlsPolicyRequest request =
           CreateServerTlsPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setServerTlsPolicyId("serverTlsPolicyId-1966046011")
               .setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
               .build();
       ServerTlsPolicy response = networkSecurityClient.createServerTlsPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createServerTlsPolicyAsync(LocationName parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)

    public final OperationFuture<ServerTlsPolicy,OperationMetadata> createServerTlsPolicyAsync(LocationName parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)

Creates a new ServerTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       ServerTlsPolicy serverTlsPolicy = ServerTlsPolicy.newBuilder().build();
       String serverTlsPolicyId = "serverTlsPolicyId-1966046011";
       ServerTlsPolicy response =
           networkSecurityClient
               .createServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.LocationName` Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`. |
| `serverTlsPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy` Required. ServerTlsPolicy resource to be created. |
| `serverTlsPolicyId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Short name of the ServerTlsPolicy 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. "server_mtls_policy". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createServerTlsPolicyAsync(String parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)

    public final OperationFuture<ServerTlsPolicy,OperationMetadata> createServerTlsPolicyAsync(String parent, ServerTlsPolicy serverTlsPolicy, String serverTlsPolicyId)

Creates a new ServerTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       ServerTlsPolicy serverTlsPolicy = ServerTlsPolicy.newBuilder().build();
       String serverTlsPolicyId = "serverTlsPolicyId-1966046011";
       ServerTlsPolicy response =
           networkSecurityClient
               .createServerTlsPolicyAsync(parent, serverTlsPolicy, serverTlsPolicyId)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The parent resource of the ServerTlsPolicy. Must be in the format `projects/*/locations/{location}`. |
| `serverTlsPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy` Required. ServerTlsPolicy resource to be created. |
| `serverTlsPolicyId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Short name of the ServerTlsPolicy 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. "server_mtls_policy". |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### createServerTlsPolicyCallable()

    public final UnaryCallable<CreateServerTlsPolicyRequest,Operation> createServerTlsPolicyCallable()

Creates a new ServerTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateServerTlsPolicyRequest request =
           CreateServerTlsPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setServerTlsPolicyId("serverTlsPolicyId-1966046011")
               .setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.createServerTlsPolicyCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### createServerTlsPolicyOperationCallable()

    public final OperationCallable<CreateServerTlsPolicyRequest,ServerTlsPolicy,OperationMetadata> createServerTlsPolicyOperationCallable()

Creates a new ServerTlsPolicy in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       CreateServerTlsPolicyRequest request =
           CreateServerTlsPolicyRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setServerTlsPolicyId("serverTlsPolicyId-1966046011")
               .setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
               .build();
       OperationFuture<ServerTlsPolicy, OperationMetadata> future =
           networkSecurityClient.createServerTlsPolicyOperationCallable().futureCall(request);
       // Do something.
       ServerTlsPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.CreateServerTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteAuthorizationPolicyAsync(AuthorizationPolicyName name)

    public final OperationFuture<Empty,OperationMetadata> deleteAuthorizationPolicyAsync(AuthorizationPolicyName name)

Deletes a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       AuthorizationPolicyName name =
           AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
       networkSecurityClient.deleteAuthorizationPolicyAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicyName` Required. A name of the AuthorizationPolicy to delete. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest request)

    public final OperationFuture<Empty,OperationMetadata> deleteAuthorizationPolicyAsync(DeleteAuthorizationPolicyRequest request)

Deletes a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteAuthorizationPolicyRequest request =
           DeleteAuthorizationPolicyRequest.newBuilder()
               .setName(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .build();
       networkSecurityClient.deleteAuthorizationPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteAuthorizationPolicyAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deleteAuthorizationPolicyAsync(String name)

Deletes a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String name =
           AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
               .toString();
       networkSecurityClient.deleteAuthorizationPolicyAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. A name of the AuthorizationPolicy to delete. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteAuthorizationPolicyCallable()

    public final UnaryCallable<DeleteAuthorizationPolicyRequest,Operation> deleteAuthorizationPolicyCallable()

Deletes a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteAuthorizationPolicyRequest request =
           DeleteAuthorizationPolicyRequest.newBuilder()
               .setName(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.deleteAuthorizationPolicyCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteAuthorizationPolicyOperationCallable()

    public final OperationCallable<DeleteAuthorizationPolicyRequest,Empty,OperationMetadata> deleteAuthorizationPolicyOperationCallable()

Deletes a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteAuthorizationPolicyRequest request =
           DeleteAuthorizationPolicyRequest.newBuilder()
               .setName(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .build();
       OperationFuture<Empty, OperationMetadata> future =
           networkSecurityClient.deleteAuthorizationPolicyOperationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteAuthorizationPolicyRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteClientTlsPolicyAsync(ClientTlsPolicyName name)

    public final OperationFuture<Empty,OperationMetadata> deleteClientTlsPolicyAsync(ClientTlsPolicyName name)

Deletes a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ClientTlsPolicyName name =
           ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
       networkSecurityClient.deleteClientTlsPolicyAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicyName` Required. A name of the ClientTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest request)

    public final OperationFuture<Empty,OperationMetadata> deleteClientTlsPolicyAsync(DeleteClientTlsPolicyRequest request)

Deletes a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteClientTlsPolicyRequest request =
           DeleteClientTlsPolicyRequest.newBuilder()
               .setName(
                   ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
                       .toString())
               .build();
       networkSecurityClient.deleteClientTlsPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteClientTlsPolicyAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deleteClientTlsPolicyAsync(String name)

Deletes a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String name =
           ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]").toString();
       networkSecurityClient.deleteClientTlsPolicyAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. A name of the ClientTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteClientTlsPolicyCallable()

    public final UnaryCallable<DeleteClientTlsPolicyRequest,Operation> deleteClientTlsPolicyCallable()

Deletes a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteClientTlsPolicyRequest request =
           DeleteClientTlsPolicyRequest.newBuilder()
               .setName(
                   ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
                       .toString())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.deleteClientTlsPolicyCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteClientTlsPolicyOperationCallable()

    public final OperationCallable<DeleteClientTlsPolicyRequest,Empty,OperationMetadata> deleteClientTlsPolicyOperationCallable()

Deletes a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteClientTlsPolicyRequest request =
           DeleteClientTlsPolicyRequest.newBuilder()
               .setName(
                   ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
                       .toString())
               .build();
       OperationFuture<Empty, OperationMetadata> future =
           networkSecurityClient.deleteClientTlsPolicyOperationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteClientTlsPolicyRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest request)

    public final OperationFuture<Empty,OperationMetadata> deleteServerTlsPolicyAsync(DeleteServerTlsPolicyRequest request)

Deletes a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteServerTlsPolicyRequest request =
           DeleteServerTlsPolicyRequest.newBuilder()
               .setName(
                   ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
                       .toString())
               .build();
       networkSecurityClient.deleteServerTlsPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteServerTlsPolicyAsync(ServerTlsPolicyName name)

    public final OperationFuture<Empty,OperationMetadata> deleteServerTlsPolicyAsync(ServerTlsPolicyName name)

Deletes a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ServerTlsPolicyName name =
           ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
       networkSecurityClient.deleteServerTlsPolicyAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicyName` Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteServerTlsPolicyAsync(String name)

    public final OperationFuture<Empty,OperationMetadata> deleteServerTlsPolicyAsync(String name)

Deletes a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String name =
           ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]").toString();
       networkSecurityClient.deleteServerTlsPolicyAsync(name).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. A name of the ServerTlsPolicy to delete. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### deleteServerTlsPolicyCallable()

    public final UnaryCallable<DeleteServerTlsPolicyRequest,Operation> deleteServerTlsPolicyCallable()

Deletes a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteServerTlsPolicyRequest request =
           DeleteServerTlsPolicyRequest.newBuilder()
               .setName(
                   ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
                       .toString())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.deleteServerTlsPolicyCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### deleteServerTlsPolicyOperationCallable()

    public final OperationCallable<DeleteServerTlsPolicyRequest,Empty,OperationMetadata> deleteServerTlsPolicyOperationCallable()

Deletes a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       DeleteServerTlsPolicyRequest request =
           DeleteServerTlsPolicyRequest.newBuilder()
               .setName(
                   ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
                       .toString())
               .build();
       OperationFuture<Empty, OperationMetadata> future =
           networkSecurityClient.deleteServerTlsPolicyOperationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.DeleteServerTlsPolicyRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### getAuthorizationPolicy(AuthorizationPolicyName name)

    public final AuthorizationPolicy getAuthorizationPolicy(AuthorizationPolicyName name)

Gets details of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       AuthorizationPolicyName name =
           AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]");
       AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicyName` Required. A name of the AuthorizationPolicy to get. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy` |   |

### getAuthorizationPolicy(GetAuthorizationPolicyRequest request)

    public final AuthorizationPolicy getAuthorizationPolicy(GetAuthorizationPolicyRequest request)

Gets details of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetAuthorizationPolicyRequest request =
           GetAuthorizationPolicyRequest.newBuilder()
               .setName(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .build();
       AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy` |   |

### getAuthorizationPolicy(String name)

    public final AuthorizationPolicy getAuthorizationPolicy(String name)

Gets details of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String name =
           AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
               .toString();
       AuthorizationPolicy response = networkSecurityClient.getAuthorizationPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. A name of the AuthorizationPolicy to get. Must be in the format `projects/{project}/locations/{location}/authorizationPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy` |   |

### getAuthorizationPolicyCallable()

    public final UnaryCallable<GetAuthorizationPolicyRequest,AuthorizationPolicy> getAuthorizationPolicyCallable()

Gets details of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetAuthorizationPolicyRequest request =
           GetAuthorizationPolicyRequest.newBuilder()
               .setName(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .build();
       ApiFuture<AuthorizationPolicy> future =
           networkSecurityClient.getAuthorizationPolicyCallable().futureCall(request);
       // Do something.
       AuthorizationPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.GetAuthorizationPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy>` |   |

### getClientTlsPolicy(ClientTlsPolicyName name)

    public final ClientTlsPolicy getClientTlsPolicy(ClientTlsPolicyName name)

Gets details of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ClientTlsPolicyName name =
           ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]");
       ClientTlsPolicy response = networkSecurityClient.getClientTlsPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicyName` Required. A name of the ClientTlsPolicy to get. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy` |   |

### getClientTlsPolicy(GetClientTlsPolicyRequest request)

    public final ClientTlsPolicy getClientTlsPolicy(GetClientTlsPolicyRequest request)

Gets details of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetClientTlsPolicyRequest request =
           GetClientTlsPolicyRequest.newBuilder()
               .setName(
                   ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
                       .toString())
               .build();
       ClientTlsPolicy response = networkSecurityClient.getClientTlsPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy` |   |

### getClientTlsPolicy(String name)

    public final ClientTlsPolicy getClientTlsPolicy(String name)

Gets details of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String name =
           ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]").toString();
       ClientTlsPolicy response = networkSecurityClient.getClientTlsPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. A name of the ClientTlsPolicy to get. Must be in the format `projects/*/locations/{location}/clientTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy` |   |

### getClientTlsPolicyCallable()

    public final UnaryCallable<GetClientTlsPolicyRequest,ClientTlsPolicy> getClientTlsPolicyCallable()

Gets details of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetClientTlsPolicyRequest request =
           GetClientTlsPolicyRequest.newBuilder()
               .setName(
                   ClientTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[CLIENT_TLS_POLICY]")
                       .toString())
               .build();
       ApiFuture<ClientTlsPolicy> future =
           networkSecurityClient.getClientTlsPolicyCallable().futureCall(request);
       // Do something.
       ClientTlsPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.GetClientTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy>` |   |

### getHttpJsonOperationsClient()

    public final OperationsClient getHttpJsonOperationsClient()

> [!WARNING]
> **Beta**
>
> This feature is covered by the [Pre-GA Offerings Terms](https://docs.cloud.google.com/terms/service-terms#1) of the Terms of Service. Pre-GA libraries might have limited support, and changes to pre-GA libraries might not be compatible with other pre-GA versions. For more information, see the launch stage descriptions.

Returns the OperationsClient that can be used to query the status of a long-running operation
returned by another API method call.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.httpjson.longrunning.OperationsClient.html` |   |

### getIamPolicy(GetIamPolicyRequest request)

    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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetIamPolicyRequest request =
           GetIamPolicyRequest.newBuilder()
               .setResource(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .setOptions(GetPolicyOptions.newBuilder().build())
               .build();
       Policy response = networkSecurityClient.getIamPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.GetIamPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.Policy` |   |

### 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetIamPolicyRequest request =
           GetIamPolicyRequest.newBuilder()
               .setResource(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .setOptions(GetPolicyOptions.newBuilder().build())
               .build();
       ApiFuture<Policy> future = networkSecurityClient.getIamPolicyCallable().futureCall(request);
       // Do something.
       Policy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.GetIamPolicyRequest,com.google.iam.v1.Policy>` |   |

### getLocation(GetLocationRequest request)

    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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       Location response = networkSecurityClient.getLocation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.GetLocationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.cloud.location.Location` |   |

### 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Location> future = networkSecurityClient.getLocationCallable().futureCall(request);
       // Do something.
       Location response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>` |   |

### 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.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.OperationsClient.html` |   |

### getServerTlsPolicy(GetServerTlsPolicyRequest request)

    public final ServerTlsPolicy getServerTlsPolicy(GetServerTlsPolicyRequest request)

Gets details of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetServerTlsPolicyRequest request =
           GetServerTlsPolicyRequest.newBuilder()
               .setName(
                   ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
                       .toString())
               .build();
       ServerTlsPolicy response = networkSecurityClient.getServerTlsPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy` |   |

### getServerTlsPolicy(ServerTlsPolicyName name)

    public final ServerTlsPolicy getServerTlsPolicy(ServerTlsPolicyName name)

Gets details of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ServerTlsPolicyName name =
           ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]");
       ServerTlsPolicy response = networkSecurityClient.getServerTlsPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicyName` Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy` |   |

### getServerTlsPolicy(String name)

    public final ServerTlsPolicy getServerTlsPolicy(String name)

Gets details of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String name =
           ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]").toString();
       ServerTlsPolicy response = networkSecurityClient.getServerTlsPolicy(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. A name of the ServerTlsPolicy to get. Must be in the format `projects/*/locations/{location}/serverTlsPolicies/*`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy` |   |

### getServerTlsPolicyCallable()

    public final UnaryCallable<GetServerTlsPolicyRequest,ServerTlsPolicy> getServerTlsPolicyCallable()

Gets details of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       GetServerTlsPolicyRequest request =
           GetServerTlsPolicyRequest.newBuilder()
               .setName(
                   ServerTlsPolicyName.of("[PROJECT]", "[LOCATION]", "[SERVER_TLS_POLICY]")
                       .toString())
               .build();
       ApiFuture<ServerTlsPolicy> future =
           networkSecurityClient.getServerTlsPolicyCallable().futureCall(request);
       // Do something.
       ServerTlsPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.GetServerTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy>` |   |

### getSettings()

    public final NetworkSecuritySettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecuritySettings` |   |

### getStub()

    public NetworkSecurityStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.stub.NetworkSecurityStub` |   |

### isShutdown()

    public boolean isShutdown()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### isTerminated()

    public boolean isTerminated()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### listAuthorizationPolicies(ListAuthorizationPoliciesRequest request)

    public final NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse listAuthorizationPolicies(ListAuthorizationPoliciesRequest request)

Lists AuthorizationPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListAuthorizationPoliciesRequest request =
           ListAuthorizationPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (AuthorizationPolicy element :
           networkSecurityClient.listAuthorizationPolicies(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse` |   |

### listAuthorizationPolicies(LocationName parent)

    public final NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse listAuthorizationPolicies(LocationName parent)

Lists AuthorizationPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (AuthorizationPolicy element :
           networkSecurityClient.listAuthorizationPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.LocationName` Required. The project and location from which the AuthorizationPolicies should be listed, specified in the format `projects/{project}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse` |   |

### listAuthorizationPolicies(String parent)

    public final NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse listAuthorizationPolicies(String parent)

Lists AuthorizationPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (AuthorizationPolicy element :
           networkSecurityClient.listAuthorizationPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The project and location from which the AuthorizationPolicies should be listed, specified in the format `projects/{project}/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse` |   |

### listAuthorizationPoliciesCallable()

    public final UnaryCallable<ListAuthorizationPoliciesRequest,ListAuthorizationPoliciesResponse> listAuthorizationPoliciesCallable()

Lists AuthorizationPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListAuthorizationPoliciesRequest request =
           ListAuthorizationPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListAuthorizationPoliciesResponse response =
             networkSecurityClient.listAuthorizationPoliciesCallable().call(request);
         for (AuthorizationPolicy element : response.getAuthorizationPoliciesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesResponse>` |   |

### listAuthorizationPoliciesPagedCallable()

    public final UnaryCallable<ListAuthorizationPoliciesRequest,NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse> listAuthorizationPoliciesPagedCallable()

Lists AuthorizationPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListAuthorizationPoliciesRequest request =
           ListAuthorizationPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<AuthorizationPolicy> future =
           networkSecurityClient.listAuthorizationPoliciesPagedCallable().futureCall(request);
       // Do something.
       for (AuthorizationPolicy element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListAuthorizationPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListAuthorizationPoliciesPagedResponse>` |   |

### listClientTlsPolicies(ListClientTlsPoliciesRequest request)

    public final NetworkSecurityClient.ListClientTlsPoliciesPagedResponse listClientTlsPolicies(ListClientTlsPoliciesRequest request)

Lists ClientTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListClientTlsPoliciesRequest request =
           ListClientTlsPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (ClientTlsPolicy element :
           networkSecurityClient.listClientTlsPolicies(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListClientTlsPoliciesPagedResponse` |   |

### listClientTlsPolicies(LocationName parent)

    public final NetworkSecurityClient.ListClientTlsPoliciesPagedResponse listClientTlsPolicies(LocationName parent)

Lists ClientTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (ClientTlsPolicy element :
           networkSecurityClient.listClientTlsPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.LocationName` Required. The project and location from which the ClientTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListClientTlsPoliciesPagedResponse` |   |

### listClientTlsPolicies(String parent)

    public final NetworkSecurityClient.ListClientTlsPoliciesPagedResponse listClientTlsPolicies(String parent)

Lists ClientTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (ClientTlsPolicy element :
           networkSecurityClient.listClientTlsPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The project and location from which the ClientTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListClientTlsPoliciesPagedResponse` |   |

### listClientTlsPoliciesCallable()

    public final UnaryCallable<ListClientTlsPoliciesRequest,ListClientTlsPoliciesResponse> listClientTlsPoliciesCallable()

Lists ClientTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListClientTlsPoliciesRequest request =
           ListClientTlsPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListClientTlsPoliciesResponse response =
             networkSecurityClient.listClientTlsPoliciesCallable().call(request);
         for (ClientTlsPolicy element : response.getClientTlsPoliciesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesResponse>` |   |

### listClientTlsPoliciesPagedCallable()

    public final UnaryCallable<ListClientTlsPoliciesRequest,NetworkSecurityClient.ListClientTlsPoliciesPagedResponse> listClientTlsPoliciesPagedCallable()

Lists ClientTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListClientTlsPoliciesRequest request =
           ListClientTlsPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<ClientTlsPolicy> future =
           networkSecurityClient.listClientTlsPoliciesPagedCallable().futureCall(request);
       // Do something.
       for (ClientTlsPolicy element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListClientTlsPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListClientTlsPoliciesPagedResponse>` |   |

### listLocations(ListLocationsRequest request)

    public final NetworkSecurityClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Location element : networkSecurityClient.listLocations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.ListLocationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListLocationsPagedResponse` |   |

### listLocationsCallable()

    public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListLocationsResponse response =
             networkSecurityClient.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;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>` |   |

### listLocationsPagedCallable()

    public final UnaryCallable<ListLocationsRequest,NetworkSecurityClient.ListLocationsPagedResponse> listLocationsPagedCallable()

Lists information about the supported locations for this service.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Location> future =
           networkSecurityClient.listLocationsPagedCallable().futureCall(request);
       // Do something.
       for (Location element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListLocationsPagedResponse>` |   |

### listServerTlsPolicies(ListServerTlsPoliciesRequest request)

    public final NetworkSecurityClient.ListServerTlsPoliciesPagedResponse listServerTlsPolicies(ListServerTlsPoliciesRequest request)

Lists ServerTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListServerTlsPoliciesRequest request =
           ListServerTlsPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (ServerTlsPolicy element :
           networkSecurityClient.listServerTlsPolicies(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListServerTlsPoliciesPagedResponse` |   |

### listServerTlsPolicies(LocationName parent)

    public final NetworkSecurityClient.ListServerTlsPoliciesPagedResponse listServerTlsPolicies(LocationName parent)

Lists ServerTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (ServerTlsPolicy element :
           networkSecurityClient.listServerTlsPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.LocationName` Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListServerTlsPoliciesPagedResponse` |   |

### listServerTlsPolicies(String parent)

    public final NetworkSecurityClient.ListServerTlsPoliciesPagedResponse listServerTlsPolicies(String parent)

Lists ServerTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (ServerTlsPolicy element :
           networkSecurityClient.listServerTlsPolicies(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The project and location from which the ServerTlsPolicies should be listed, specified in the format `projects/*/locations/{location}`. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListServerTlsPoliciesPagedResponse` |   |

### listServerTlsPoliciesCallable()

    public final UnaryCallable<ListServerTlsPoliciesRequest,ListServerTlsPoliciesResponse> listServerTlsPoliciesCallable()

Lists ServerTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListServerTlsPoliciesRequest request =
           ListServerTlsPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListServerTlsPoliciesResponse response =
             networkSecurityClient.listServerTlsPoliciesCallable().call(request);
         for (ServerTlsPolicy element : response.getServerTlsPoliciesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesResponse>` |   |

### listServerTlsPoliciesPagedCallable()

    public final UnaryCallable<ListServerTlsPoliciesRequest,NetworkSecurityClient.ListServerTlsPoliciesPagedResponse> listServerTlsPoliciesPagedCallable()

Lists ServerTlsPolicies in a given project and location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ListServerTlsPoliciesRequest request =
           ListServerTlsPoliciesRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<ServerTlsPolicy> future =
           networkSecurityClient.listServerTlsPoliciesPagedCallable().futureCall(request);
       // Do something.
       for (ServerTlsPolicy element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ListServerTlsPoliciesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.NetworkSecurityClient.ListServerTlsPoliciesPagedResponse>` |   |

### setIamPolicy(SetIamPolicyRequest request)

    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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       SetIamPolicyRequest request =
           SetIamPolicyRequest.newBuilder()
               .setResource(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .setPolicy(Policy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       Policy response = networkSecurityClient.setIamPolicy(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.SetIamPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.Policy` |   |

### 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       SetIamPolicyRequest request =
           SetIamPolicyRequest.newBuilder()
               .setResource(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .setPolicy(Policy.newBuilder().build())
               .setUpdateMask(FieldMask.newBuilder().build())
               .build();
       ApiFuture<Policy> future = networkSecurityClient.setIamPolicyCallable().futureCall(request);
       // Do something.
       Policy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.SetIamPolicyRequest,com.google.iam.v1.Policy>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()

### testIamPermissions(TestIamPermissionsRequest request)

    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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       TestIamPermissionsRequest request =
           TestIamPermissionsRequest.newBuilder()
               .setResource(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .addAllPermissions(new ArrayList<String>())
               .build();
       TestIamPermissionsResponse response = networkSecurityClient.testIamPermissions(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.iam.v1.TestIamPermissionsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.iam.v1.TestIamPermissionsResponse` |   |

### 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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       TestIamPermissionsRequest request =
           TestIamPermissionsRequest.newBuilder()
               .setResource(
                   AuthorizationPolicyName.of("[PROJECT]", "[LOCATION]", "[AUTHORIZATION_POLICY]")
                       .toString())
               .addAllPermissions(new ArrayList<String>())
               .build();
       ApiFuture<TestIamPermissionsResponse> future =
           networkSecurityClient.testIamPermissionsCallable().futureCall(request);
       // Do something.
       TestIamPermissionsResponse response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.iam.v1.TestIamPermissionsRequest,com.google.iam.v1.TestIamPermissionsResponse>` |   |

### updateAuthorizationPolicyAsync(AuthorizationPolicy authorizationPolicy, FieldMask updateMask)

    public final OperationFuture<AuthorizationPolicy,OperationMetadata> updateAuthorizationPolicyAsync(AuthorizationPolicy authorizationPolicy, FieldMask updateMask)

Updates the parameters of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       AuthorizationPolicy authorizationPolicy = AuthorizationPolicy.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       AuthorizationPolicy response =
           networkSecurityClient
               .updateAuthorizationPolicyAsync(authorizationPolicy, updateMask)
               .get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `authorizationPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy` Required. Updated AuthorizationPolicy resource. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. Field mask is used to specify the fields to be overwritten in the AuthorizationPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest request)

    public final OperationFuture<AuthorizationPolicy,OperationMetadata> updateAuthorizationPolicyAsync(UpdateAuthorizationPolicyRequest request)

Updates the parameters of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateAuthorizationPolicyRequest request =
           UpdateAuthorizationPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
               .build();
       AuthorizationPolicy response =
           networkSecurityClient.updateAuthorizationPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateAuthorizationPolicyCallable()

    public final UnaryCallable<UpdateAuthorizationPolicyRequest,Operation> updateAuthorizationPolicyCallable()

Updates the parameters of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateAuthorizationPolicyRequest request =
           UpdateAuthorizationPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.updateAuthorizationPolicyCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### updateAuthorizationPolicyOperationCallable()

    public final OperationCallable<UpdateAuthorizationPolicyRequest,AuthorizationPolicy,OperationMetadata> updateAuthorizationPolicyOperationCallable()

Updates the parameters of a single AuthorizationPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateAuthorizationPolicyRequest request =
           UpdateAuthorizationPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setAuthorizationPolicy(AuthorizationPolicy.newBuilder().build())
               .build();
       OperationFuture<AuthorizationPolicy, OperationMetadata> future =
           networkSecurityClient.updateAuthorizationPolicyOperationCallable().futureCall(request);
       // Do something.
       AuthorizationPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateAuthorizationPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.AuthorizationPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateClientTlsPolicyAsync(ClientTlsPolicy clientTlsPolicy, FieldMask updateMask)

    public final OperationFuture<ClientTlsPolicy,OperationMetadata> updateClientTlsPolicyAsync(ClientTlsPolicy clientTlsPolicy, FieldMask updateMask)

Updates the parameters of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ClientTlsPolicy clientTlsPolicy = ClientTlsPolicy.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       ClientTlsPolicy response =
           networkSecurityClient.updateClientTlsPolicyAsync(clientTlsPolicy, updateMask).get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `clientTlsPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy` Required. Updated ClientTlsPolicy resource. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. Field mask is used to specify the fields to be overwritten in the ClientTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest request)

    public final OperationFuture<ClientTlsPolicy,OperationMetadata> updateClientTlsPolicyAsync(UpdateClientTlsPolicyRequest request)

Updates the parameters of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateClientTlsPolicyRequest request =
           UpdateClientTlsPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
               .build();
       ClientTlsPolicy response = networkSecurityClient.updateClientTlsPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateClientTlsPolicyCallable()

    public final UnaryCallable<UpdateClientTlsPolicyRequest,Operation> updateClientTlsPolicyCallable()

Updates the parameters of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateClientTlsPolicyRequest request =
           UpdateClientTlsPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.updateClientTlsPolicyCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### updateClientTlsPolicyOperationCallable()

    public final OperationCallable<UpdateClientTlsPolicyRequest,ClientTlsPolicy,OperationMetadata> updateClientTlsPolicyOperationCallable()

Updates the parameters of a single ClientTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateClientTlsPolicyRequest request =
           UpdateClientTlsPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setClientTlsPolicy(ClientTlsPolicy.newBuilder().build())
               .build();
       OperationFuture<ClientTlsPolicy, OperationMetadata> future =
           networkSecurityClient.updateClientTlsPolicyOperationCallable().futureCall(request);
       // Do something.
       ClientTlsPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateClientTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ClientTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateServerTlsPolicyAsync(ServerTlsPolicy serverTlsPolicy, FieldMask updateMask)

    public final OperationFuture<ServerTlsPolicy,OperationMetadata> updateServerTlsPolicyAsync(ServerTlsPolicy serverTlsPolicy, FieldMask updateMask)

Updates the parameters of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       ServerTlsPolicy serverTlsPolicy = ServerTlsPolicy.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       ServerTlsPolicy response =
           networkSecurityClient.updateServerTlsPolicyAsync(serverTlsPolicy, updateMask).get();
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `serverTlsPolicy` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy` Required. Updated ServerTlsPolicy resource. |
| `updateMask` | `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.FieldMask.html` Optional. Field mask is used to specify the fields to be overwritten in the ServerTlsPolicy resource by the update. The fields specified in the update_mask are relative to the resource, not the full request. A field will be overwritten if it is in the mask. If the user does not provide a mask then all fields will be overwritten. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest request)

    public final OperationFuture<ServerTlsPolicy,OperationMetadata> updateServerTlsPolicyAsync(UpdateServerTlsPolicyRequest request)

Updates the parameters of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateServerTlsPolicyRequest request =
           UpdateServerTlsPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
               .build();
       ServerTlsPolicy response = networkSecurityClient.updateServerTlsPolicyAsync(request).get();
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.longrunning.OperationFuture.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |

### updateServerTlsPolicyCallable()

    public final UnaryCallable<UpdateServerTlsPolicyRequest,Operation> updateServerTlsPolicyCallable()

Updates the parameters of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateServerTlsPolicyRequest request =
           UpdateServerTlsPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
               .build();
       ApiFuture<Operation> future =
           networkSecurityClient.updateServerTlsPolicyCallable().futureCall(request);
       // Do something.
       Operation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.longrunning.Operation.html>` |   |

### updateServerTlsPolicyOperationCallable()

    public final OperationCallable<UpdateServerTlsPolicyRequest,ServerTlsPolicy,OperationMetadata> updateServerTlsPolicyOperationCallable()

Updates the parameters of a single ServerTlsPolicy.

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 (NetworkSecurityClient networkSecurityClient = NetworkSecurityClient.create()) {
       UpdateServerTlsPolicyRequest request =
           UpdateServerTlsPolicyRequest.newBuilder()
               .setUpdateMask(FieldMask.newBuilder().build())
               .setServerTlsPolicy(ServerTlsPolicy.newBuilder().build())
               .build();
       OperationFuture<ServerTlsPolicy, OperationMetadata> future =
           networkSecurityClient.updateServerTlsPolicyOperationCallable().futureCall(request);
       // Do something.
       ServerTlsPolicy response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.OperationCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.UpdateServerTlsPolicyRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.ServerTlsPolicy,https://docs.cloud.google.com/java/docs/reference/google-cloud-network-security/latest/com.google.cloud.networksecurity.v1beta1.OperationMetadata>` |   |