Class ConversationProfilesClient (4.7.3)

public class ConversationProfilesClient implements BackgroundResource

Service Description: Service for managing ConversationProfiles.

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 for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ConversationProfileName name =
       ConversationProfileName.ofProjectConversationProfileName(
           "[PROJECT]", "[CONVERSATION_PROFILE]");
   ConversationProfile response = conversationProfilesClient.getConversationProfile(name);
 }
 

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

  1. 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.
  2. 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.
  3. 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 ConversationProfilesSettings to create(). For example:

To customize credentials:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 ConversationProfilesSettings conversationProfilesSettings =
     ConversationProfilesSettings.newBuilder()
         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
         .build();
 ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create(conversationProfilesSettings);
 

To customize the endpoint:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 ConversationProfilesSettings conversationProfilesSettings =
     ConversationProfilesSettings.newBuilder().setEndpoint(myEndpoint).build();
 ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create(conversationProfilesSettings);
 

To use REST (HTTP1.1/JSON) transport (instead of gRPC) for sending and receiving requests over the wire:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 ConversationProfilesSettings conversationProfilesSettings =
     ConversationProfilesSettings.newBuilder()
         .setTransportChannelProvider(
             ConversationProfilesSettings.defaultHttpJsonTransportProviderBuilder().build())
         .build();
 ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create(conversationProfilesSettings);
 

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

Inheritance

java.lang.Object > ConversationProfilesClient

Implements

BackgroundResource

Static Methods

create()

public static final ConversationProfilesClient create()

Constructs an instance of ConversationProfilesClient with default settings.

Returns
TypeDescription
ConversationProfilesClient
Exceptions
TypeDescription
IOException

create(ConversationProfilesSettings settings)

public static final ConversationProfilesClient create(ConversationProfilesSettings settings)

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

Parameter
NameDescription
settingsConversationProfilesSettings
Returns
TypeDescription
ConversationProfilesClient
Exceptions
TypeDescription
IOException

create(ConversationProfilesStub stub)

public static final ConversationProfilesClient create(ConversationProfilesStub stub)

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

Parameter
NameDescription
stubConversationProfilesStub
Returns
TypeDescription
ConversationProfilesClient

Constructors

ConversationProfilesClient(ConversationProfilesSettings settings)

protected ConversationProfilesClient(ConversationProfilesSettings settings)

Constructs an instance of ConversationProfilesClient, 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
NameDescription
settingsConversationProfilesSettings

ConversationProfilesClient(ConversationProfilesStub stub)

protected ConversationProfilesClient(ConversationProfilesStub stub)
Parameter
NameDescription
stubConversationProfilesStub

Methods

awaitTermination(long duration, TimeUnit unit)

public boolean awaitTermination(long duration, TimeUnit unit)
Parameters
NameDescription
durationlong
unitTimeUnit
Returns
TypeDescription
boolean
Exceptions
TypeDescription
InterruptedException

clearSuggestionFeatureConfigAsync(ClearSuggestionFeatureConfigRequest request)

public final OperationFuture<ConversationProfile,ClearSuggestionFeatureConfigOperationMetadata> clearSuggestionFeatureConfigAsync(ClearSuggestionFeatureConfigRequest request)

Clears a suggestion feature from a conversation profile for the given participant role.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: ClearSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    ClearSuggestionFeatureConfigRequest request =
        ClearSuggestionFeatureConfigRequest.newBuilder()
            .setConversationProfile("conversationProfile1691597734")
            .build();
    ConversationProfile response =
        conversationProfilesClient.clearSuggestionFeatureConfigAsync(request).get();
    }
    
Parameter
NameDescription
requestClearSuggestionFeatureConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ConversationProfile,ClearSuggestionFeatureConfigOperationMetadata>

clearSuggestionFeatureConfigAsync(String conversationProfile)

public final OperationFuture<ConversationProfile,ClearSuggestionFeatureConfigOperationMetadata> clearSuggestionFeatureConfigAsync(String conversationProfile)

Clears a suggestion feature from a conversation profile for the given participant role.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: ClearSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    String conversationProfile = "conversationProfile1691597734";
    ConversationProfile response =
        conversationProfilesClient.clearSuggestionFeatureConfigAsync(conversationProfile).get();
    }
    
Parameter
NameDescription
conversationProfileString

Required. The Conversation Profile to add or update the suggestion feature config. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

Returns
TypeDescription
OperationFuture<ConversationProfile,ClearSuggestionFeatureConfigOperationMetadata>

clearSuggestionFeatureConfigCallable()

public final UnaryCallable<ClearSuggestionFeatureConfigRequest,Operation> clearSuggestionFeatureConfigCallable()

Clears a suggestion feature from a conversation profile for the given participant role.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: ClearSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    ClearSuggestionFeatureConfigRequest request =
        ClearSuggestionFeatureConfigRequest.newBuilder()
            .setConversationProfile("conversationProfile1691597734")
            .build();
    ApiFuture<Operation> future =
        conversationProfilesClient.clearSuggestionFeatureConfigCallable().futureCall(request);
    // Do something.
    Operation response = future.get();
    }
    
Returns
TypeDescription
UnaryCallable<ClearSuggestionFeatureConfigRequest,Operation>

clearSuggestionFeatureConfigOperationCallable()

public final OperationCallable<ClearSuggestionFeatureConfigRequest,ConversationProfile,ClearSuggestionFeatureConfigOperationMetadata> clearSuggestionFeatureConfigOperationCallable()

Clears a suggestion feature from a conversation profile for the given participant role.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: ClearSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    ClearSuggestionFeatureConfigRequest request =
        ClearSuggestionFeatureConfigRequest.newBuilder()
            .setConversationProfile("conversationProfile1691597734")
            .build();
    OperationFuture<ConversationProfile, ClearSuggestionFeatureConfigOperationMetadata> future =
        conversationProfilesClient
            .clearSuggestionFeatureConfigOperationCallable()
            .futureCall(request);
    // Do something.
    ConversationProfile response = future.get();
    }
    
Returns
TypeDescription
OperationCallable<ClearSuggestionFeatureConfigRequest,ConversationProfile,ClearSuggestionFeatureConfigOperationMetadata>

close()

public final void close()

createConversationProfile(CreateConversationProfileRequest request)

public final ConversationProfile createConversationProfile(CreateConversationProfileRequest request)

Creates a conversation profile in the specified project.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   CreateConversationProfileRequest request =
       CreateConversationProfileRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setConversationProfile(ConversationProfile.newBuilder().build())
           .build();
   ConversationProfile response = conversationProfilesClient.createConversationProfile(request);
 }
 
Parameter
NameDescription
requestCreateConversationProfileRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ConversationProfile

createConversationProfile(LocationName parent, ConversationProfile conversationProfile)

public final ConversationProfile createConversationProfile(LocationName parent, ConversationProfile conversationProfile)

Creates a conversation profile in the specified project.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   ConversationProfile conversationProfile = ConversationProfile.newBuilder().build();
   ConversationProfile response =
       conversationProfilesClient.createConversationProfile(parent, conversationProfile);
 }
 
Parameters
NameDescription
parentLocationName

Required. The project to create a conversation profile for. Format: projects/<Project ID>/locations/<Location ID>.

conversationProfileConversationProfile

Required. The conversation profile to create.

Returns
TypeDescription
ConversationProfile

createConversationProfile(ProjectName parent, ConversationProfile conversationProfile)

public final ConversationProfile createConversationProfile(ProjectName parent, ConversationProfile conversationProfile)

Creates a conversation profile in the specified project.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   ConversationProfile conversationProfile = ConversationProfile.newBuilder().build();
   ConversationProfile response =
       conversationProfilesClient.createConversationProfile(parent, conversationProfile);
 }
 
Parameters
NameDescription
parentProjectName

Required. The project to create a conversation profile for. Format: projects/<Project ID>/locations/<Location ID>.

conversationProfileConversationProfile

Required. The conversation profile to create.

Returns
TypeDescription
ConversationProfile

createConversationProfile(String parent, ConversationProfile conversationProfile)

public final ConversationProfile createConversationProfile(String parent, ConversationProfile conversationProfile)

Creates a conversation profile in the specified project.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   ConversationProfile conversationProfile = ConversationProfile.newBuilder().build();
   ConversationProfile response =
       conversationProfilesClient.createConversationProfile(parent, conversationProfile);
 }
 
Parameters
NameDescription
parentString

Required. The project to create a conversation profile for. Format: projects/<Project ID>/locations/<Location ID>.

conversationProfileConversationProfile

Required. The conversation profile to create.

Returns
TypeDescription
ConversationProfile

createConversationProfileCallable()

public final UnaryCallable<CreateConversationProfileRequest,ConversationProfile> createConversationProfileCallable()

Creates a conversation profile in the specified project.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   CreateConversationProfileRequest request =
       CreateConversationProfileRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setConversationProfile(ConversationProfile.newBuilder().build())
           .build();
   ApiFuture<ConversationProfile> future =
       conversationProfilesClient.createConversationProfileCallable().futureCall(request);
   // Do something.
   ConversationProfile response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<CreateConversationProfileRequest,ConversationProfile>

deleteConversationProfile(ConversationProfileName name)

public final void deleteConversationProfile(ConversationProfileName name)

Deletes the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ConversationProfileName name =
       ConversationProfileName.ofProjectConversationProfileName(
           "[PROJECT]", "[CONVERSATION_PROFILE]");
   conversationProfilesClient.deleteConversationProfile(name);
 }
 
Parameter
NameDescription
nameConversationProfileName

Required. The name of the conversation profile to delete. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

deleteConversationProfile(DeleteConversationProfileRequest request)

public final void deleteConversationProfile(DeleteConversationProfileRequest request)

Deletes the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   DeleteConversationProfileRequest request =
       DeleteConversationProfileRequest.newBuilder()
           .setName(
               ConversationProfileName.ofProjectConversationProfileName(
                       "[PROJECT]", "[CONVERSATION_PROFILE]")
                   .toString())
           .build();
   conversationProfilesClient.deleteConversationProfile(request);
 }
 
Parameter
NameDescription
requestDeleteConversationProfileRequest

The request object containing all of the parameters for the API call.

deleteConversationProfile(String name)

public final void deleteConversationProfile(String name)

Deletes the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   String name =
       ConversationProfileName.ofProjectConversationProfileName(
               "[PROJECT]", "[CONVERSATION_PROFILE]")
           .toString();
   conversationProfilesClient.deleteConversationProfile(name);
 }
 
Parameter
NameDescription
nameString

Required. The name of the conversation profile to delete. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

deleteConversationProfileCallable()

public final UnaryCallable<DeleteConversationProfileRequest,Empty> deleteConversationProfileCallable()

Deletes the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   DeleteConversationProfileRequest request =
       DeleteConversationProfileRequest.newBuilder()
           .setName(
               ConversationProfileName.ofProjectConversationProfileName(
                       "[PROJECT]", "[CONVERSATION_PROFILE]")
                   .toString())
           .build();
   ApiFuture<Empty> future =
       conversationProfilesClient.deleteConversationProfileCallable().futureCall(request);
   // Do something.
   future.get();
 }
 
Returns
TypeDescription
UnaryCallable<DeleteConversationProfileRequest,Empty>

getConversationProfile(ConversationProfileName name)

public final ConversationProfile getConversationProfile(ConversationProfileName name)

Retrieves the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ConversationProfileName name =
       ConversationProfileName.ofProjectConversationProfileName(
           "[PROJECT]", "[CONVERSATION_PROFILE]");
   ConversationProfile response = conversationProfilesClient.getConversationProfile(name);
 }
 
Parameter
NameDescription
nameConversationProfileName

Required. The resource name of the conversation profile. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

Returns
TypeDescription
ConversationProfile

getConversationProfile(GetConversationProfileRequest request)

public final ConversationProfile getConversationProfile(GetConversationProfileRequest request)

Retrieves the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   GetConversationProfileRequest request =
       GetConversationProfileRequest.newBuilder()
           .setName(
               ConversationProfileName.ofProjectConversationProfileName(
                       "[PROJECT]", "[CONVERSATION_PROFILE]")
                   .toString())
           .build();
   ConversationProfile response = conversationProfilesClient.getConversationProfile(request);
 }
 
Parameter
NameDescription
requestGetConversationProfileRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ConversationProfile

getConversationProfile(String name)

public final ConversationProfile getConversationProfile(String name)

Retrieves the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   String name =
       ConversationProfileName.ofProjectConversationProfileName(
               "[PROJECT]", "[CONVERSATION_PROFILE]")
           .toString();
   ConversationProfile response = conversationProfilesClient.getConversationProfile(name);
 }
 
Parameter
NameDescription
nameString

Required. The resource name of the conversation profile. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

Returns
TypeDescription
ConversationProfile

getConversationProfileCallable()

public final UnaryCallable<GetConversationProfileRequest,ConversationProfile> getConversationProfileCallable()

Retrieves the specified conversation profile.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   GetConversationProfileRequest request =
       GetConversationProfileRequest.newBuilder()
           .setName(
               ConversationProfileName.ofProjectConversationProfileName(
                       "[PROJECT]", "[CONVERSATION_PROFILE]")
                   .toString())
           .build();
   ApiFuture<ConversationProfile> future =
       conversationProfilesClient.getConversationProfileCallable().futureCall(request);
   // Do something.
   ConversationProfile response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<GetConversationProfileRequest,ConversationProfile>

getHttpJsonOperationsClient()

public final OperationsClient getHttpJsonOperationsClient()

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

Returns
TypeDescription
OperationsClient

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
TypeDescription
OperationsClient

getSettings()

public final ConversationProfilesSettings getSettings()
Returns
TypeDescription
ConversationProfilesSettings

getStub()

public ConversationProfilesStub getStub()
Returns
TypeDescription
ConversationProfilesStub

isShutdown()

public boolean isShutdown()
Returns
TypeDescription
boolean

isTerminated()

public boolean isTerminated()
Returns
TypeDescription
boolean

listConversationProfiles(ListConversationProfilesRequest request)

public final ConversationProfilesClient.ListConversationProfilesPagedResponse listConversationProfiles(ListConversationProfilesRequest request)

Returns the list of all conversation profiles in the specified project.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ListConversationProfilesRequest request =
       ListConversationProfilesRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   for (ConversationProfile element :
       conversationProfilesClient.listConversationProfiles(request).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
requestListConversationProfilesRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ConversationProfilesClient.ListConversationProfilesPagedResponse

listConversationProfiles(LocationName parent)

public final ConversationProfilesClient.ListConversationProfilesPagedResponse listConversationProfiles(LocationName parent)

Returns the list of all conversation profiles in the specified project.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
   for (ConversationProfile element :
       conversationProfilesClient.listConversationProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentLocationName

Required. The project to list all conversation profiles from. Format: projects/<Project ID>/locations/<Location ID>.

Returns
TypeDescription
ConversationProfilesClient.ListConversationProfilesPagedResponse

listConversationProfiles(ProjectName parent)

public final ConversationProfilesClient.ListConversationProfilesPagedResponse listConversationProfiles(ProjectName parent)

Returns the list of all conversation profiles in the specified project.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ProjectName parent = ProjectName.of("[PROJECT]");
   for (ConversationProfile element :
       conversationProfilesClient.listConversationProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentProjectName

Required. The project to list all conversation profiles from. Format: projects/<Project ID>/locations/<Location ID>.

Returns
TypeDescription
ConversationProfilesClient.ListConversationProfilesPagedResponse

listConversationProfiles(String parent)

public final ConversationProfilesClient.ListConversationProfilesPagedResponse listConversationProfiles(String parent)

Returns the list of all conversation profiles in the specified project.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   String parent = ProjectName.of("[PROJECT]").toString();
   for (ConversationProfile element :
       conversationProfilesClient.listConversationProfiles(parent).iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Parameter
NameDescription
parentString

Required. The project to list all conversation profiles from. Format: projects/<Project ID>/locations/<Location ID>.

Returns
TypeDescription
ConversationProfilesClient.ListConversationProfilesPagedResponse

listConversationProfilesCallable()

public final UnaryCallable<ListConversationProfilesRequest,ListConversationProfilesResponse> listConversationProfilesCallable()

Returns the list of all conversation profiles in the specified project.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ListConversationProfilesRequest request =
       ListConversationProfilesRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   while (true) {
     ListConversationProfilesResponse response =
         conversationProfilesClient.listConversationProfilesCallable().call(request);
     for (ConversationProfile element : response.getConversationProfilesList()) {
       // doThingsWith(element);
     }
     String nextPageToken = response.getNextPageToken();
     if (!Strings.isNullOrEmpty(nextPageToken)) {
       request = request.toBuilder().setPageToken(nextPageToken).build();
     } else {
       break;
     }
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListConversationProfilesRequest,ListConversationProfilesResponse>

listConversationProfilesPagedCallable()

public final UnaryCallable<ListConversationProfilesRequest,ConversationProfilesClient.ListConversationProfilesPagedResponse> listConversationProfilesPagedCallable()

Returns the list of all conversation profiles in the specified project.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ListConversationProfilesRequest request =
       ListConversationProfilesRequest.newBuilder()
           .setParent(ProjectName.of("[PROJECT]").toString())
           .setPageSize(883849137)
           .setPageToken("pageToken873572522")
           .build();
   ApiFuture<ConversationProfile> future =
       conversationProfilesClient.listConversationProfilesPagedCallable().futureCall(request);
   // Do something.
   for (ConversationProfile element : future.get().iterateAll()) {
     // doThingsWith(element);
   }
 }
 
Returns
TypeDescription
UnaryCallable<ListConversationProfilesRequest,ListConversationProfilesPagedResponse>

setSuggestionFeatureConfigAsync(SetSuggestionFeatureConfigRequest request)

public final OperationFuture<ConversationProfile,SetSuggestionFeatureConfigOperationMetadata> setSuggestionFeatureConfigAsync(SetSuggestionFeatureConfigRequest request)

Adds or updates a suggestion feature in a conversation profile. If the conversation profile contains the type of suggestion feature for the participant role, it will update it. Otherwise it will insert the suggestion feature.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: SetSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    If a long running operation to add or update suggestion feature config for the same conversation profile, participant role and suggestion feature type exists, please cancel the existing long running operation before sending such request, otherwise the request will be rejected.

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    SetSuggestionFeatureConfigRequest request =
        SetSuggestionFeatureConfigRequest.newBuilder()
            .setConversationProfile("conversationProfile1691597734")
            .setSuggestionFeatureConfig(
                HumanAgentAssistantConfig.SuggestionFeatureConfig.newBuilder().build())
            .build();
    ConversationProfile response =
        conversationProfilesClient.setSuggestionFeatureConfigAsync(request).get();
    }
    
Parameter
NameDescription
requestSetSuggestionFeatureConfigRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
OperationFuture<ConversationProfile,SetSuggestionFeatureConfigOperationMetadata>

setSuggestionFeatureConfigAsync(String conversationProfile)

public final OperationFuture<ConversationProfile,SetSuggestionFeatureConfigOperationMetadata> setSuggestionFeatureConfigAsync(String conversationProfile)

Adds or updates a suggestion feature in a conversation profile. If the conversation profile contains the type of suggestion feature for the participant role, it will update it. Otherwise it will insert the suggestion feature.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: SetSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    If a long running operation to add or update suggestion feature config for the same conversation profile, participant role and suggestion feature type exists, please cancel the existing long running operation before sending such request, otherwise the request will be rejected.

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    String conversationProfile = "conversationProfile1691597734";
    ConversationProfile response =
        conversationProfilesClient.setSuggestionFeatureConfigAsync(conversationProfile).get();
    }
    
Parameter
NameDescription
conversationProfileString

Required. The Conversation Profile to add or update the suggestion feature config. Format: projects/<Project ID>/locations/<Location ID>/conversationProfiles/<Conversation Profile ID>.

Returns
TypeDescription
OperationFuture<ConversationProfile,SetSuggestionFeatureConfigOperationMetadata>

setSuggestionFeatureConfigCallable()

public final UnaryCallable<SetSuggestionFeatureConfigRequest,Operation> setSuggestionFeatureConfigCallable()

Adds or updates a suggestion feature in a conversation profile. If the conversation profile contains the type of suggestion feature for the participant role, it will update it. Otherwise it will insert the suggestion feature.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: SetSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    If a long running operation to add or update suggestion feature config for the same conversation profile, participant role and suggestion feature type exists, please cancel the existing long running operation before sending such request, otherwise the request will be rejected.

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    SetSuggestionFeatureConfigRequest request =
        SetSuggestionFeatureConfigRequest.newBuilder()
            .setConversationProfile("conversationProfile1691597734")
            .setSuggestionFeatureConfig(
                HumanAgentAssistantConfig.SuggestionFeatureConfig.newBuilder().build())
            .build();
    ApiFuture<Operation> future =
        conversationProfilesClient.setSuggestionFeatureConfigCallable().futureCall(request);
    // Do something.
    Operation response = future.get();
    }
    
Returns
TypeDescription
UnaryCallable<SetSuggestionFeatureConfigRequest,Operation>

setSuggestionFeatureConfigOperationCallable()

public final OperationCallable<SetSuggestionFeatureConfigRequest,ConversationProfile,SetSuggestionFeatureConfigOperationMetadata> setSuggestionFeatureConfigOperationCallable()

Adds or updates a suggestion feature in a conversation profile. If the conversation profile contains the type of suggestion feature for the participant role, it will update it. Otherwise it will insert the suggestion feature.

This method is a long-running operation. The returned Operation type has the following method-specific fields:

- metadata: SetSuggestionFeatureConfigOperationMetadata

  • response: ConversationProfile

    If a long running operation to add or update suggestion feature config for the same conversation profile, participant role and suggestion feature type exists, please cancel the existing long running operation before sending such request, otherwise the request will be rejected.

    Sample code:

    
    // This snippet has been automatically generated for illustrative purposes only.
    // It may require modifications to work in your environment.
    try (ConversationProfilesClient conversationProfilesClient =
      ConversationProfilesClient.create()) {
    SetSuggestionFeatureConfigRequest request =
        SetSuggestionFeatureConfigRequest.newBuilder()
            .setConversationProfile("conversationProfile1691597734")
            .setSuggestionFeatureConfig(
                HumanAgentAssistantConfig.SuggestionFeatureConfig.newBuilder().build())
            .build();
    OperationFuture<ConversationProfile, SetSuggestionFeatureConfigOperationMetadata> future =
        conversationProfilesClient
            .setSuggestionFeatureConfigOperationCallable()
            .futureCall(request);
    // Do something.
    ConversationProfile response = future.get();
    }
    
Returns
TypeDescription
OperationCallable<SetSuggestionFeatureConfigRequest,ConversationProfile,SetSuggestionFeatureConfigOperationMetadata>

shutdown()

public void shutdown()

shutdownNow()

public void shutdownNow()

updateConversationProfile(ConversationProfile conversationProfile, FieldMask updateMask)

public final ConversationProfile updateConversationProfile(ConversationProfile conversationProfile, FieldMask updateMask)

Updates the specified conversation profile.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   ConversationProfile conversationProfile = ConversationProfile.newBuilder().build();
   FieldMask updateMask = FieldMask.newBuilder().build();
   ConversationProfile response =
       conversationProfilesClient.updateConversationProfile(conversationProfile, updateMask);
 }
 
Parameters
NameDescription
conversationProfileConversationProfile

Required. The conversation profile to update.

updateMaskFieldMask

Required. The mask to control which fields to update.

Returns
TypeDescription
ConversationProfile

updateConversationProfile(UpdateConversationProfileRequest request)

public final ConversationProfile updateConversationProfile(UpdateConversationProfileRequest request)

Updates the specified conversation profile.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   UpdateConversationProfileRequest request =
       UpdateConversationProfileRequest.newBuilder()
           .setConversationProfile(ConversationProfile.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ConversationProfile response = conversationProfilesClient.updateConversationProfile(request);
 }
 
Parameter
NameDescription
requestUpdateConversationProfileRequest

The request object containing all of the parameters for the API call.

Returns
TypeDescription
ConversationProfile

updateConversationProfileCallable()

public final UnaryCallable<UpdateConversationProfileRequest,ConversationProfile> updateConversationProfileCallable()

Updates the specified conversation profile.

[ConversationProfile.CreateTime][] and [ConversationProfile.UpdateTime][] aren't populated in the response. You can retrieve them via GetConversationProfile API.

Sample code:


 // This snippet has been automatically generated for illustrative purposes only.
 // It may require modifications to work in your environment.
 try (ConversationProfilesClient conversationProfilesClient =
     ConversationProfilesClient.create()) {
   UpdateConversationProfileRequest request =
       UpdateConversationProfileRequest.newBuilder()
           .setConversationProfile(ConversationProfile.newBuilder().build())
           .setUpdateMask(FieldMask.newBuilder().build())
           .build();
   ApiFuture<ConversationProfile> future =
       conversationProfilesClient.updateConversationProfileCallable().futureCall(request);
   // Do something.
   ConversationProfile response = future.get();
 }
 
Returns
TypeDescription
UnaryCallable<UpdateConversationProfileRequest,ConversationProfile>