Class SecuritySettingsServiceClient
- java.lang.Object
-
- com.google.cloud.dialogflow.cx.v3beta1.SecuritySettingsServiceClient
-
- All Implemented Interfaces:
com.google.api.gax.core.BackgroundResource
,AutoCloseable
@BetaApi @Generated("by gapic-generator-java") public class SecuritySettingsServiceClient extends Object implements com.google.api.gax.core.BackgroundResource
Service Description: Service for managing security settings for Dialogflow.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().
The surface of this class includes several types of Java methods for each of the API's methods:
- A "flattened" method. With this type of method, the fields of the request type have been converted into function parameters. It may be the case that not all fields are available as parameters, and not every API method will have a flattened method entry point.
- A "request object" method. This type of method only takes one parameter, a request object, which must be constructed before the call. Not every API method will have a request object method.
- A "callable" method. This type of method takes no parameters and returns an immutable API callable object, which can be used to initiate calls to the service.
See the individual methods for example code.
Many parameters require resource names to be formatted in a particular way. To assist with these names, this class includes a format method for each type of name, and additionally a parse method to extract the individual identifiers contained within names that are returned.
This class can be customized by passing in a custom instance of 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class 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
-
Constructor Summary
Constructors Modifier Constructor Description protected
SecuritySettingsServiceClient(SecuritySettingsServiceSettings settings)
Constructs an instance of SecuritySettingsServiceClient, using the given settings.protected
SecuritySettingsServiceClient(SecuritySettingsServiceStub stub)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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.v3beta1.SecuritySettings].void
deleteSecuritySettings(SecuritySettingsName name)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].void
deleteSecuritySettings(String name)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].com.google.api.gax.rpc.UnaryCallable<DeleteSecuritySettingsRequest,com.google.protobuf.Empty>
deleteSecuritySettingsCallable()
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SecuritySettings].SecuritySettings
getSecuritySettings(SecuritySettingsName name)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].SecuritySettings
getSecuritySettings(String name)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].com.google.api.gax.rpc.UnaryCallable<GetSecuritySettingsRequest,SecuritySettings>
getSecuritySettingsCallable()
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.SecuritySettings].SecuritySettings
updateSecuritySettings(UpdateSecuritySettingsRequest request)
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].com.google.api.gax.rpc.UnaryCallable<UpdateSecuritySettingsRequest,SecuritySettings>
updateSecuritySettingsCallable()
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings].
-
-
-
Constructor Detail
-
SecuritySettingsServiceClient
protected SecuritySettingsServiceClient(SecuritySettingsServiceSettings settings) throws IOException
Constructs an instance of SecuritySettingsServiceClient, using the given settings. This is protected so that it is easy to make a subclass, but otherwise, the static factory methods should be preferred.- Throws:
IOException
-
SecuritySettingsServiceClient
protected SecuritySettingsServiceClient(SecuritySettingsServiceStub stub)
-
-
Method Detail
-
create
public static final SecuritySettingsServiceClient create() throws IOException
Constructs an instance of SecuritySettingsServiceClient with default settings.- Throws:
IOException
-
create
public static final SecuritySettingsServiceClient create(SecuritySettingsServiceSettings settings) throws IOException
Constructs an instance of SecuritySettingsServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set.- Throws:
IOException
-
create
public static final SecuritySettingsServiceClient create(SecuritySettingsServiceStub stub)
Constructs an instance of SecuritySettingsServiceClient, using the given stub for making calls. This is for advanced usage - prefer using create(SecuritySettingsServiceSettings).
-
getSettings
public final SecuritySettingsServiceSettings getSettings()
-
getStub
public SecuritySettingsServiceStub getStub()
-
createSecuritySettings
public final SecuritySettings createSecuritySettings(LocationName parent, SecuritySettings securitySettings)
Create security settings in the specified 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 (SecuritySettingsServiceClient securitySettingsServiceClient = SecuritySettingsServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); SecuritySettings securitySettings = SecuritySettings.newBuilder().build(); SecuritySettings response = securitySettingsServiceClient.createSecuritySettings(parent, securitySettings); }
- Parameters:
parent
- Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] for. Format: `projects/<Project ID>/locations/<Location ID>`.securitySettings
- Required. The security settings to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createSecuritySettings
public final SecuritySettings createSecuritySettings(String parent, SecuritySettings securitySettings)
Create security settings in the specified 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 (SecuritySettingsServiceClient securitySettingsServiceClient = SecuritySettingsServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); SecuritySettings securitySettings = SecuritySettings.newBuilder().build(); SecuritySettings response = securitySettingsServiceClient.createSecuritySettings(parent, securitySettings); }
- Parameters:
parent
- Required. The location to create an [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] for. Format: `projects/<Project ID>/locations/<Location ID>`.securitySettings
- Required. The security settings to create.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createSecuritySettings
public final SecuritySettings createSecuritySettings(CreateSecuritySettingsRequest request)
Create security settings in the specified 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 (SecuritySettingsServiceClient securitySettingsServiceClient = SecuritySettingsServiceClient.create()) { CreateSecuritySettingsRequest request = CreateSecuritySettingsRequest.newBuilder() .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString()) .setSecuritySettings(SecuritySettings.newBuilder().build()) .build(); SecuritySettings response = securitySettingsServiceClient.createSecuritySettings(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
createSecuritySettingsCallable
public final com.google.api.gax.rpc.UnaryCallable<CreateSecuritySettingsRequest,SecuritySettings> createSecuritySettingsCallable()
Create security settings in the specified 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 (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(); }
-
getSecuritySettings
public final SecuritySettings getSecuritySettings(SecuritySettingsName name)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. The returned settings may be stale by up to 1 minute.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); }
- Parameters:
name
- Required. Resource name of the settings. Format: `projects/<Project ID>/locations/<Location ID>/securitySettings/<security settings ID>`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getSecuritySettings
public final SecuritySettings getSecuritySettings(String name)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. The returned settings may be stale by up to 1 minute.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); }
- Parameters:
name
- Required. Resource name of the settings. Format: `projects/<Project ID>/locations/<Location ID>/securitySettings/<security settings ID>`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getSecuritySettings
public final SecuritySettings getSecuritySettings(GetSecuritySettingsRequest request)
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. The returned settings may be stale by up to 1 minute.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); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getSecuritySettingsCallable
public final com.google.api.gax.rpc.UnaryCallable<GetSecuritySettingsRequest,SecuritySettings> getSecuritySettingsCallable()
Retrieves the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings]. The returned settings may be stale by up to 1 minute.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(); }
-
updateSecuritySettings
public final SecuritySettings updateSecuritySettings(SecuritySettings securitySettings, com.google.protobuf.FieldMask updateMask)
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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()) { SecuritySettings securitySettings = SecuritySettings.newBuilder().build(); FieldMask updateMask = FieldMask.newBuilder().build(); SecuritySettings response = securitySettingsServiceClient.updateSecuritySettings(securitySettings, updateMask); }
- Parameters:
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.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateSecuritySettings
public final SecuritySettings updateSecuritySettings(UpdateSecuritySettingsRequest request)
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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()) { UpdateSecuritySettingsRequest request = UpdateSecuritySettingsRequest.newBuilder() .setSecuritySettings(SecuritySettings.newBuilder().build()) .setUpdateMask(FieldMask.newBuilder().build()) .build(); SecuritySettings response = securitySettingsServiceClient.updateSecuritySettings(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
updateSecuritySettingsCallable
public final com.google.api.gax.rpc.UnaryCallable<UpdateSecuritySettingsRequest,SecuritySettings> updateSecuritySettingsCallable()
Updates the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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()) { 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(); }
-
listSecuritySettings
public final SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse listSecuritySettings(LocationName parent)
Returns the list of all security settings in the specified 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 (SecuritySettingsServiceClient securitySettingsServiceClient = SecuritySettingsServiceClient.create()) { LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]"); for (SecuritySettings element : securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The location to list all security settings for. Format: `projects/<Project ID>/locations/<Location ID>`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listSecuritySettings
public final SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse listSecuritySettings(String parent)
Returns the list of all security settings in the specified 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 (SecuritySettingsServiceClient securitySettingsServiceClient = SecuritySettingsServiceClient.create()) { String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString(); for (SecuritySettings element : securitySettingsServiceClient.listSecuritySettings(parent).iterateAll()) { // doThingsWith(element); } }
- Parameters:
parent
- Required. The location to list all security settings for. Format: `projects/<Project ID>/locations/<Location ID>`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listSecuritySettings
public final SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse listSecuritySettings(ListSecuritySettingsRequest request)
Returns the list of all security settings in the specified 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 (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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listSecuritySettingsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<ListSecuritySettingsRequest,SecuritySettingsServiceClient.ListSecuritySettingsPagedResponse> listSecuritySettingsPagedCallable()
Returns the list of all security settings in the specified 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 (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); } }
-
listSecuritySettingsCallable
public final com.google.api.gax.rpc.UnaryCallable<ListSecuritySettingsRequest,ListSecuritySettingsResponse> listSecuritySettingsCallable()
Returns the list of all security settings in the specified 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 (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; } } }
-
deleteSecuritySettings
public final void deleteSecuritySettings(SecuritySettingsName name)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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()) { SecuritySettingsName name = SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]"); securitySettingsServiceClient.deleteSecuritySettings(name); }
- Parameters:
name
- Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] to delete. Format: `projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteSecuritySettings
public final void deleteSecuritySettings(String name)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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 name = SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]").toString(); securitySettingsServiceClient.deleteSecuritySettings(name); }
- Parameters:
name
- Required. The name of the [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.SecuritySettings] to delete. Format: `projects/<Project ID>/locations/<Location ID>/securitySettings/<Security Settings ID>`.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteSecuritySettings
public final void deleteSecuritySettings(DeleteSecuritySettingsRequest request)
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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()) { DeleteSecuritySettingsRequest request = DeleteSecuritySettingsRequest.newBuilder() .setName( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) .build(); securitySettingsServiceClient.deleteSecuritySettings(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
deleteSecuritySettingsCallable
public final com.google.api.gax.rpc.UnaryCallable<DeleteSecuritySettingsRequest,com.google.protobuf.Empty> deleteSecuritySettingsCallable()
Deletes the specified [SecuritySettings][google.cloud.dialogflow.cx.v3beta1.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()) { DeleteSecuritySettingsRequest request = DeleteSecuritySettingsRequest.newBuilder() .setName( SecuritySettingsName.of("[PROJECT]", "[LOCATION]", "[SECURITY_SETTINGS]") .toString()) .build(); ApiFuture<Empty> future = securitySettingsServiceClient.deleteSecuritySettingsCallable().futureCall(request); // Do something. future.get(); }
-
listLocations
public final SecuritySettingsServiceClient.ListLocationsPagedResponse listLocations(com.google.cloud.location.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 (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); } }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
listLocationsPagedCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.ListLocationsRequest,SecuritySettingsServiceClient.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 (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); } }
-
listLocationsCallable
public final 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.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; } } }
-
getLocation
public final com.google.cloud.location.Location getLocation(com.google.cloud.location.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 (SecuritySettingsServiceClient securitySettingsServiceClient = SecuritySettingsServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); Location response = securitySettingsServiceClient.getLocation(request); }
- Parameters:
request
- The request object containing all of the parameters for the API call.- Throws:
com.google.api.gax.rpc.ApiException
- if the remote call fails
-
getLocationCallable
public final com.google.api.gax.rpc.UnaryCallable<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.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 (SecuritySettingsServiceClient securitySettingsServiceClient = SecuritySettingsServiceClient.create()) { GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build(); ApiFuture<Location> future = securitySettingsServiceClient.getLocationCallable().futureCall(request); // Do something. Location response = future.get(); }
-
close
public final void close()
- Specified by:
close
in interfaceAutoCloseable
-
shutdown
public void shutdown()
- Specified by:
shutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isShutdown
public boolean isShutdown()
- Specified by:
isShutdown
in interfacecom.google.api.gax.core.BackgroundResource
-
isTerminated
public boolean isTerminated()
- Specified by:
isTerminated
in interfacecom.google.api.gax.core.BackgroundResource
-
shutdownNow
public void shutdownNow()
- Specified by:
shutdownNow
in interfacecom.google.api.gax.core.BackgroundResource
-
awaitTermination
public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException
- Specified by:
awaitTermination
in interfacecom.google.api.gax.core.BackgroundResource
- Throws:
InterruptedException
-
-