@Generated(value="by gapic-generator-java") public class SecuritySettingsServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
SecuritySettings response =
securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
}
Note: close() needs to be called on the SecuritySettingsServiceClient 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 |
|---|---|---|
CreateSecuritySettings |
Create security settings in the specified location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetSecuritySettings |
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. The returned settings may be stale by up to 1 minute. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
UpdateSecuritySettings |
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
ListSecuritySettings |
Returns the list of all security settings in the specified location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
DeleteSecuritySettings |
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings]. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
"Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
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.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
GetLocation |
Gets information about a location. |
Request object method variants only take one parameter, a request object, which must be constructed before the call.
Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service.
|
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of SecuritySettingsServiceSettings 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
SecuritySettingsServiceSettings securitySettingsServiceSettings =
SecuritySettingsServiceSettings.newBuilder()
.setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
.build();
SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create(securitySettingsServiceSettings);
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
SecuritySettingsServiceSettings securitySettingsServiceSettings =
SecuritySettingsServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create(securitySettingsServiceSettings);
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
SecuritySettingsServiceSettings securitySettingsServiceSettings =
SecuritySettingsServiceSettings.newHttpJsonBuilder().build();
SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create(securitySettingsServiceSettings);
Please refer to the GitHub repository's samples for more quickstart code snippets.
| Modifier and Type | Class and Description |
|---|---|
static class |
SecuritySettingsServiceClient.ListLocationsFixedSizeCollection |
static class |
SecuritySettingsServiceClient.ListLocationsPage |
static class |
SecuritySettingsServiceClient.ListLocationsPagedResponse |
static class |
SecuritySettingsServiceClient.ListSecuritySettingsFixedSizeCollection |
static class |
SecuritySettingsServiceClient.ListSecuritySettingsPage |
static class |
SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse |
| Modifier | Constructor and Description |
|---|---|
protected |
SecuritySettingsServiceClient(SecuritySettingsServiceSettings settings)
Constructs an instance of SecuritySettingsServiceClient, using the given settings.
|
protected |
SecuritySettingsServiceClient(SecuritySettingsServiceStub stub) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long duration,
TimeUnit unit) |
void |
close() |
static SecuritySettingsServiceClient |
create()
Constructs an instance of SecuritySettingsServiceClient with default settings.
|
static SecuritySettingsServiceClient |
create(SecuritySettingsServiceSettings settings)
Constructs an instance of SecuritySettingsServiceClient, using the given settings.
|
static SecuritySettingsServiceClient |
create(SecuritySettingsServiceStub stub)
Constructs an instance of SecuritySettingsServiceClient, using the given stub for making calls.
|
SecuritySettings |
createSecuritySettings(CreateSecuritySettingsRequest request)
Create security settings in the specified location.
|
SecuritySettings |
createSecuritySettings(LocationName parent,
SecuritySettings securitySettings)
Create security settings in the specified location.
|
SecuritySettings |
createSecuritySettings(String parent,
SecuritySettings securitySettings)
Create security settings in the specified location.
|
com.google.api.gax.rpc.UnaryCallable<CreateSecuritySettingsRequest,SecuritySettings> |
createSecuritySettingsCallable()
Create security settings in the specified location.
|
void |
deleteSecuritySettings(DeleteSecuritySettingsRequest request)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
void |
deleteSecuritySettings(SecuritySettingsName name)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
void |
deleteSecuritySettings(String name)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
com.google.api.gax.rpc.UnaryCallable<DeleteSecuritySettingsRequest,com.google.protobuf.Empty> |
deleteSecuritySettingsCallable()
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
com.google.cloud.location.Location |
getLocation(com.google.cloud.location.GetLocationRequest request)
Gets information about a location.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> |
getLocationCallable()
Gets information about a location.
|
SecuritySettings |
getSecuritySettings(GetSecuritySettingsRequest request)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
SecuritySettings |
getSecuritySettings(SecuritySettingsName name)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
SecuritySettings |
getSecuritySettings(String name)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
com.google.api.gax.rpc.UnaryCallable<GetSecuritySettingsRequest,SecuritySettings> |
getSecuritySettingsCallable()
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
SecuritySettingsServiceSettings |
getSettings() |
SecuritySettingsServiceStub |
getStub() |
boolean |
isShutdown() |
boolean |
isTerminated() |
SecuritySettingsServiceClient.ListLocationsPagedResponse |
listLocations(com.google.cloud.location.ListLocationsRequest request)
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> |
listLocationsCallable()
Lists information about the supported locations for this service.
|
com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,SecuritySettingsServiceClient.ListLocationsPagedResponse> |
listLocationsPagedCallable()
Lists information about the supported locations for this service.
|
SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse |
listSecuritySettings(ListSecuritySettingsRequest request)
Returns the list of all security settings in the specified location.
|
SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse |
listSecuritySettings(LocationName parent)
Returns the list of all security settings in the specified location.
|
SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse |
listSecuritySettings(String parent)
Returns the list of all security settings in the specified location.
|
com.google.api.gax.rpc.UnaryCallable<ListSecuritySettingsRequest,ListSecuritySettingsResponse> |
listSecuritySettingsCallable()
Returns the list of all security settings in the specified location.
|
com.google.api.gax.rpc.UnaryCallable<ListSecuritySettingsRequest,SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse> |
listSecuritySettingsPagedCallable()
Returns the list of all security settings in the specified location.
|
void |
shutdown() |
void |
shutdownNow() |
SecuritySettings |
updateSecuritySettings(SecuritySettings securitySettings,
com.google.protobuf.FieldMask updateMask)
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
SecuritySettings |
updateSecuritySettings(UpdateSecuritySettingsRequest request)
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
com.google.api.gax.rpc.UnaryCallable<UpdateSecuritySettingsRequest,SecuritySettings> |
updateSecuritySettingsCallable()
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings].
|
protected SecuritySettingsServiceClient(SecuritySettingsServiceSettings settings) throws IOException
IOExceptionprotected SecuritySettingsServiceClient(SecuritySettingsServiceStub stub)
public static final SecuritySettingsServiceClient create() throws IOException
IOExceptionpublic static final SecuritySettingsServiceClient create(SecuritySettingsServiceSettings settings) throws IOException
IOExceptionpublic static final SecuritySettingsServiceClient create(SecuritySettingsServiceStub stub)
public final SecuritySettingsServiceSettings getSettings()
public SecuritySettingsServiceStub getStub()
public final SecuritySettings createSecuritySettings(LocationName parent, SecuritySettings securitySettings)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
SecuritySettings response =
securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
}
parent - Required. The location to create an
[SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. Format:
`projects/<ProjectID>/locations/<LocationID>`.securitySettings - Required. The security settings to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SecuritySettings createSecuritySettings(String parent, SecuritySettings securitySettings)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
SecuritySettings response =
securitySettingsServiceClient.createSecuritySettings(parent, securitySettings);
}
parent - Required. The location to create an
[SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] for. Format:
`projects/<ProjectID>/locations/<LocationID>`.securitySettings - Required. The security settings to create.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SecuritySettings createSecuritySettings(CreateSecuritySettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
CreateSecuritySettingsRequest request =
CreateSecuritySettingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setSecuritySettings(SecuritySettings.newBuilder().build())
.build();
SecuritySettings response = securitySettingsServiceClient.createSecuritySettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<CreateSecuritySettingsRequest,SecuritySettings> createSecuritySettingsCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
CreateSecuritySettingsRequest request =
CreateSecuritySettingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setSecuritySettings(SecuritySettings.newBuilder().build())
.build();
ApiFuture<SecuritySettings> future =
securitySettingsServiceClient.createSecuritySettingsCallable().futureCall(request);
// Do something.
SecuritySettings response = future.get();
}
public final SecuritySettings getSecuritySettings(SecuritySettingsName name)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
SecuritySettingsName name =
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]");
SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(name);
}
name - Required. Resource name of the settings. Format:
`projects/<ProjectID>/locations/<LocationID>/securitySettings/<securitysettingsID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SecuritySettings getSecuritySettings(String name)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
String name =
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(name);
}
name - Required. Resource name of the settings. Format:
`projects/<ProjectID>/locations/<LocationID>/securitySettings/<securitysettingsID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SecuritySettings getSecuritySettings(GetSecuritySettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
GetSecuritySettingsRequest request =
GetSecuritySettingsRequest.newBuilder()
.setName(
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
.toString())
.build();
SecuritySettings response = securitySettingsServiceClient.getSecuritySettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<GetSecuritySettingsRequest,SecuritySettings> getSecuritySettingsCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
GetSecuritySettingsRequest request =
GetSecuritySettingsRequest.newBuilder()
.setName(
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
.toString())
.build();
ApiFuture<SecuritySettings> future =
securitySettingsServiceClient.getSecuritySettingsCallable().futureCall(request);
// Do something.
SecuritySettings response = future.get();
}
public final SecuritySettings updateSecuritySettings(SecuritySettings securitySettings, com.google.protobuf.FieldMask updateMask)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
SecuritySettings securitySettings = SecuritySettings.newBuilder().build();
FieldMask updateMask = FieldMask.newBuilder().build();
SecuritySettings response =
securitySettingsServiceClient.updateSecuritySettings(securitySettings, updateMask);
}
securitySettings - Required. [SecuritySettings] object that contains values for each of
the fields to update.updateMask - Required. The mask to control which fields get updated. If the mask is not
present, all fields will be updated.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SecuritySettings updateSecuritySettings(UpdateSecuritySettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
UpdateSecuritySettingsRequest request =
UpdateSecuritySettingsRequest.newBuilder()
.setSecuritySettings(SecuritySettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
SecuritySettings response = securitySettingsServiceClient.updateSecuritySettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<UpdateSecuritySettingsRequest,SecuritySettings> updateSecuritySettingsCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
UpdateSecuritySettingsRequest request =
UpdateSecuritySettingsRequest.newBuilder()
.setSecuritySettings(SecuritySettings.newBuilder().build())
.setUpdateMask(FieldMask.newBuilder().build())
.build();
ApiFuture<SecuritySettings> future =
securitySettingsServiceClient.updateSecuritySettingsCallable().futureCall(request);
// Do something.
SecuritySettings response = future.get();
}
public final SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse listSecuritySettings(LocationName parent)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
for (SecuritySettings element :
securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The location to list all security settings for. Format:
`projects/<ProjectID>/locations/<LocationID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse listSecuritySettings(String parent)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
for (SecuritySettings element :
securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) {
// doThingsWith(element);
}
}
parent - Required. The location to list all security settings for. Format:
`projects/<ProjectID>/locations/<LocationID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse listSecuritySettings(ListSecuritySettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
ListSecuritySettingsRequest request =
ListSecuritySettingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (SecuritySettings element :
securitySettingsServiceClient.listSecuritySettings(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<ListSecuritySettingsRequest,SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse> listSecuritySettingsPagedCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
ListSecuritySettingsRequest request =
ListSecuritySettingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<SecuritySettings> future =
securitySettingsServiceClient.listSecuritySettingsPagedCallable().futureCall(request);
// Do something.
for (SecuritySettings element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<ListSecuritySettingsRequest,ListSecuritySettingsResponse> listSecuritySettingsCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
ListSecuritySettingsRequest request =
ListSecuritySettingsRequest.newBuilder()
.setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListSecuritySettingsResponse response =
securitySettingsServiceClient.listSecuritySettingsCallable().call(request);
for (SecuritySettings element : response.getSecuritySettingsList()) {
// doThingsWith(element);
}
String nextPageToken = response.getNextPageToken();
if (!Strings.isNullOrEmpty(nextPageToken)) {
request = request.toBuilder().setPageToken(nextPageToken).build();
} else {
break;
}
}
}
public final void deleteSecuritySettings(SecuritySettingsName name)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
SecuritySettingsName name =
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]");
securitySettingsServiceClient.deleteSecuritySettings(name);
}
name - Required. The name of the
[SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. Format:
`projects/<ProjectID>/locations/<LocationID>/securitySettings/<SecuritySettingsID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSecuritySettings(String name)
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
String name =
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString();
securitySettingsServiceClient.deleteSecuritySettings(name);
}
name - Required. The name of the
[SecuritySettings][google.cloud.dialogflow.cx.v3.SecuritySettings] to delete. Format:
`projects/<ProjectID>/locations/<LocationID>/securitySettings/<SecuritySettingsID>`.com.google.api.gax.rpc.ApiException - if the remote call failspublic final void deleteSecuritySettings(DeleteSecuritySettingsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
DeleteSecuritySettingsRequest request =
DeleteSecuritySettingsRequest.newBuilder()
.setName(
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
.toString())
.build();
securitySettingsServiceClient.deleteSecuritySettings(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<DeleteSecuritySettingsRequest,com.google.protobuf.Empty> deleteSecuritySettingsCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
DeleteSecuritySettingsRequest request =
DeleteSecuritySettingsRequest.newBuilder()
.setName(
SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]")
.toString())
.build();
ApiFuture<Empty> future =
securitySettingsServiceClient.deleteSecuritySettingsCallable().futureCall(request);
// Do something.
future.get();
}
public final SecuritySettingsServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.ListLocationsRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
for (Location element : securitySettingsServiceClient.listLocations(request).iterateAll()) {
// doThingsWith(element);
}
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,SecuritySettingsServiceClient.ListLocationsPagedResponse> listLocationsPagedCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
ApiFuture<Location> future =
securitySettingsServiceClient.listLocationsPagedCallable().futureCall(request);
// Do something.
for (Location element : future.get().iterateAll()) {
// doThingsWith(element);
}
}
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse> listLocationsCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
ListLocationsRequest request =
ListLocationsRequest.newBuilder()
.setName("name3373707")
.setFilter("filter-1274492040")
.setPageSize(883849137)
.setPageToken("pageToken873572522")
.build();
while (true) {
ListLocationsResponse response =
securitySettingsServiceClient.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;
}
}
}
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.GetLocationRequest request)
Sample code:
// This snippet has been automatically generated and should be regarded as a code template only.
// It will require modifications to work:
// - It may require correct/in-range values for request initialization.
// - It may require specifying regional endpoints when creating the service client as shown in
// https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
try (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
Location response = securitySettingsServiceClient.getLocation(request);
}
request - The request object containing all of the parameters for the API call.com.google.api.gax.rpc.ApiException - if the remote call failspublic final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location> getLocationCallable()
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 (SecuritySettingsServiceClient securitySettingsServiceClient =
SecuritySettingsServiceClient.create()) {
GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
ApiFuture<Location> future =
securitySettingsServiceClient.getLocationCallable().futureCall(request);
// Do something.
Location response = future.get();
}
public final void close()
close in interface AutoCloseablepublic void shutdown()
shutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isShutdown()
isShutdown in interface com.google.api.gax.core.BackgroundResourcepublic boolean isTerminated()
isTerminated in interface com.google.api.gax.core.BackgroundResourcepublic void shutdownNow()
shutdownNow in interface com.google.api.gax.core.BackgroundResourcepublic boolean awaitTermination(long duration,
TimeUnit unit)
throws InterruptedException
awaitTermination in interface com.google.api.gax.core.BackgroundResourceInterruptedExceptionCopyright © 2025 Google LLC. All rights reserved.