# Class DataChatServiceClient (0.21.0)

0.21.0 (latest) 0.19.0 0.16.0 0.15.0 0.13.0 0.11.0 0.10.0 0.9.0 0.8.0 0.6.0 0.4.0 0.3.0 0.2.0 0.1.0

|---|---|---|
| [GitHub Repository](https://github.com/googleapis/google-cloud-java/tree/main/java-geminidataanalytics/google-cloud-geminidataanalytics/src/main/java/com/google/cloud/geminidataanalytics/v1/DataChatServiceClient.java) | [Product Reference](https://cloud.google.com/gemini/docs/conversational-analytics-api/overview) | [RPC Documentation](https://cloud.google.com/gemini/docs/conversational-analytics-api/reference) |

Service Description: Service to ask a natural language question on top of BigQuery and Looker
Studio datasources to get back streamed responses of various kinds to help provide a rich
conversational answer.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       Conversation conversation = Conversation.newBuilder().build();
       String conversationId = "conversationId-1676095234";
       Conversation response =
           dataChatServiceClient.createConversation(parent, conversation, conversationId);
     }
     
Note: close() needs to be called on the DataChatServiceClient 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 |
|---|---|---|
| Chat | Answers a data question by generating a stream of Message objects. | Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - chatCallable() |
| CreateConversation | Creates a new conversation to persist the conversation history. Each conversation will have multiple messages associated with it. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - createConversation(CreateConversationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - createConversation(LocationName parent, Conversation conversation, String conversationId) - createConversation(String parent, Conversation conversation, String conversationId) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - createConversationCallable() |
| DeleteConversation | Deletes a conversation. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - deleteConversation(DeleteConversationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - deleteConversation(ConversationName name) - deleteConversation(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - deleteConversationCallable() |
| GetConversation | Gets details of a single conversation by using conversation id and parent. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getConversation(GetConversationRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - getConversation(ConversationName name) - getConversation(String name) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getConversationCallable() |
| ListConversations | Lists all conversations for a given parent. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listConversations(ListConversationsRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listConversations(LocationName parent) - listConversations(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listConversationsPagedCallable() - listConversationsCallable() |
| ListMessages | Lists all messages for a given conversation. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listMessages(ListMessagesRequest request) "Flattened" method variants have converted the fields of the request object into function parameters to enable multiple ways to call the same method. - listMessages(ConversationName parent) - listMessages(String parent) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listMessagesPagedCallable() - listMessagesCallable() |
| ListLocations | Lists information about the supported locations for this service. This method lists locations based on the resource scope provided inthe ListLocationsRequest.name field: \*\*\*Global locations\*\*: If `name` is empty, the method lists thepublic locations available to all projects. \* \*\*Project-specificlocations\*\*: If `name` follows the format`projects/{project}`, the method lists locations visible to thatspecific project. This includes public, private, or otherproject-specific locations enabled for the project. For gRPC and client library implementations, the resource name ispassed as the `name` field. For direct service calls, the resourcename isincorporated into the request path based on the specific serviceimplementation and version. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - listLocations(ListLocationsRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - listLocationsPagedCallable() - listLocationsCallable() |
| GetLocation | Gets information about a location. | Request object method variants only take one parameter, a request object, which must be constructed before the call. - getLocation(GetLocationRequest request) Callable method variants take no parameters and return an immutable API callable object, which can be used to initiate calls to the service. - getLocationCallable() |
[Methods]

See the individual methods for example code.

Many parameters require resource names to be formatted in a particular way. To assist with
these names, this class includes a format method for each type of name, and additionally a parse
method to extract the individual identifiers contained within names that are returned.

This class can be customized by passing in a custom instance of DataChatServiceSettings 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
     DataChatServiceSettings dataChatServiceSettings =
         DataChatServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
             .build();
     DataChatServiceClient dataChatServiceClient =
         DataChatServiceClient.create(dataChatServiceSettings);
     
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
     DataChatServiceSettings dataChatServiceSettings =
         DataChatServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     DataChatServiceClient dataChatServiceClient =
         DataChatServiceClient.create(dataChatServiceSettings);
     
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
     DataChatServiceSettings dataChatServiceSettings =
         DataChatServiceSettings.newHttpJsonBuilder().build();
     DataChatServiceClient dataChatServiceClient =
         DataChatServiceClient.create(dataChatServiceSettings);
     
Please refer to the GitHub repository's samples for more quickstart code snippets.

## Inheritance

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

## Static Methods

### create()

    public static final DataChatServiceClient create()

Constructs an instance of DataChatServiceClient with default settings.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient` |   |

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

### create(DataChatServiceSettings settings)

    public static final DataChatServiceClient create(DataChatServiceSettings settings)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceSettings` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient` |   |

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

### create(DataChatServiceStub stub)

    public static final DataChatServiceClient create(DataChatServiceStub stub)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.stub.DataChatServiceStub` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient` |   |

## Constructors

### DataChatServiceClient(DataChatServiceSettings settings)

    protected DataChatServiceClient(DataChatServiceSettings settings)

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

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `settings` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceSettings` |

### DataChatServiceClient(DataChatServiceStub stub)

    protected DataChatServiceClient(DataChatServiceStub stub)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `stub` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.stub.DataChatServiceStub` |

## Methods

### awaitTermination(long duration, TimeUnit unit)

    public boolean awaitTermination(long duration, TimeUnit unit)

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

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

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

### chatCallable()

    public final ServerStreamingCallable<ChatRequest,Message> chatCallable()

Answers a data question by generating a stream of
Message objects.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ChatRequest request =
           ChatRequest.newBuilder()
               .setParent("parent-995424086")
               .addAllMessages(new ArrayList<Message>())
               .setCredentials(Credentials.newBuilder().build())
               .build();
       ServerStream<Message> stream = dataChatServiceClient.chatCallable().call(request);
       for (Message response : stream) {
         // Do something when a response is received.
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.ServerStreamingCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ChatRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Message>` |   |

### close()

    public final void close()

### createConversation(CreateConversationRequest request)

    public final Conversation createConversation(CreateConversationRequest request)

Creates a new conversation to persist the conversation history. Each conversation will have
multiple messages associated with it.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       CreateConversationRequest request =
           CreateConversationRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setConversationId("conversationId-1676095234")
               .setConversation(Conversation.newBuilder().build())
               .setRequestId("requestId693933066")
               .build();
       Conversation response = dataChatServiceClient.createConversation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.CreateConversationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` |   |

### createConversation(LocationName parent, Conversation conversation, String conversationId)

    public final Conversation createConversation(LocationName parent, Conversation conversation, String conversationId)

Creates a new conversation to persist the conversation history. Each conversation will have
multiple messages associated with it.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       Conversation conversation = Conversation.newBuilder().build();
       String conversationId = "conversationId-1676095234";
       Conversation response =
           dataChatServiceClient.createConversation(parent, conversation, conversationId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.LocationName` Required. Parent value for CreateConversationRequest. Format: `projects/{project}/locations/{location}` |
| `conversation` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` Required. The conversation to create. |
| `conversationId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Optional. The conversation id of the conversation to create. Must be unique within the parent. The allowed format is: `^https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/[a-z0-9-]{0,61}[a-z0-9]?$`. If not provided, the server will auto-generate a value for the id. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` |   |

### createConversation(String parent, Conversation conversation, String conversationId)

    public final Conversation createConversation(String parent, Conversation conversation, String conversationId)

Creates a new conversation to persist the conversation history. Each conversation will have
multiple messages associated with it.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       Conversation conversation = Conversation.newBuilder().build();
       String conversationId = "conversationId-1676095234";
       Conversation response =
           dataChatServiceClient.createConversation(parent, conversation, conversationId);
     }
     
| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Parent value for CreateConversationRequest. Format: `projects/{project}/locations/{location}` |
| `conversation` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` Required. The conversation to create. |
| `conversationId` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Optional. The conversation id of the conversation to create. Must be unique within the parent. The allowed format is: `^https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/[a-z0-9-]{0,61}[a-z0-9]?$`. If not provided, the server will auto-generate a value for the id. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` |   |

### createConversationCallable()

    public final UnaryCallable<CreateConversationRequest,Conversation> createConversationCallable()

Creates a new conversation to persist the conversation history. Each conversation will have
multiple messages associated with it.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       CreateConversationRequest request =
           CreateConversationRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setConversationId("conversationId-1676095234")
               .setConversation(Conversation.newBuilder().build())
               .setRequestId("requestId693933066")
               .build();
       ApiFuture<Conversation> future =
           dataChatServiceClient.createConversationCallable().futureCall(request);
       // Do something.
       Conversation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.CreateConversationRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation>` |   |

### deleteConversation(ConversationName name)

    public final void deleteConversation(ConversationName name)

Deletes a conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]");
       dataChatServiceClient.deleteConversation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ConversationName` Required. Name of the resource. Format: `projects/{project}/locations/{location}/conversations/{conversation}` |

### deleteConversation(DeleteConversationRequest request)

    public final void deleteConversation(DeleteConversationRequest request)

Deletes a conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       DeleteConversationRequest request =
           DeleteConversationRequest.newBuilder()
               .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
               .build();
       dataChatServiceClient.deleteConversation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest` The request object containing all of the parameters for the API call. |

### deleteConversation(String name)

    public final void deleteConversation(String name)

Deletes a conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       String name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
       dataChatServiceClient.deleteConversation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Name of the resource. Format: `projects/{project}/locations/{location}/conversations/{conversation}` |

### deleteConversationCallable()

    public final UnaryCallable<DeleteConversationRequest,Empty> deleteConversationCallable()

Deletes a conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       DeleteConversationRequest request =
           DeleteConversationRequest.newBuilder()
               .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
               .build();
       ApiFuture<Empty> future =
           dataChatServiceClient.deleteConversationCallable().futureCall(request);
       // Do something.
       future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DeleteConversationRequest,https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Empty.html>` |   |

### getConversation(ConversationName name)

    public final Conversation getConversation(ConversationName name)

Gets details of a single conversation by using conversation id and 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ConversationName name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]");
       Conversation response = dataChatServiceClient.getConversation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ConversationName` Required. Name of the resource. Format: `projects/{project}/locations/{location}/conversations/{conversation}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` |   |

### getConversation(GetConversationRequest request)

    public final Conversation getConversation(GetConversationRequest request)

Gets details of a single conversation by using conversation id and 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       GetConversationRequest request =
           GetConversationRequest.newBuilder()
               .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
               .build();
       Conversation response = dataChatServiceClient.getConversation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.GetConversationRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` |   |

### getConversation(String name)

    public final Conversation getConversation(String name)

Gets details of a single conversation by using conversation id and 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       String name = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
       Conversation response = dataChatServiceClient.getConversation(name);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `name` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Name of the resource. Format: `projects/{project}/locations/{location}/conversations/{conversation}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation` |   |

### getConversationCallable()

    public final UnaryCallable<GetConversationRequest,Conversation> getConversationCallable()

Gets details of a single conversation by using conversation id and 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       GetConversationRequest request =
           GetConversationRequest.newBuilder()
               .setName(ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
               .build();
       ApiFuture<Conversation> future =
           dataChatServiceClient.getConversationCallable().futureCall(request);
       // Do something.
       Conversation response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.GetConversationRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.Conversation>` |   |

### getLocation(GetLocationRequest request)

    public final Location getLocation(GetLocationRequest request)

Gets information about a location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       Location response = dataChatServiceClient.getLocation(request);
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.GetLocationRequest` The request object containing all of the parameters for the API call. |

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

### getLocationCallable()

    public final UnaryCallable<GetLocationRequest,Location> getLocationCallable()

Gets information about a location.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       GetLocationRequest request = GetLocationRequest.newBuilder().setName("name3373707").build();
       ApiFuture<Location> future = dataChatServiceClient.getLocationCallable().futureCall(request);
       // Do something.
       Location response = future.get();
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.GetLocationRequest,com.google.cloud.location.Location>` |   |

### getSettings()

    public final DataChatServiceSettings getSettings()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceSettings` |   |

### getStub()

    public DataChatServiceStub getStub()

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.stub.DataChatServiceStub` |   |

### isShutdown()

    public boolean isShutdown()

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

### isTerminated()

    public boolean isTerminated()

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

### listConversations(ListConversationsRequest request)

    public final DataChatServiceClient.ListConversationsPagedResponse listConversations(ListConversationsRequest request)

Lists all conversations for a given 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListConversationsRequest request =
           ListConversationsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       for (Conversation element : dataChatServiceClient.listConversations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListConversationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse` |   |

### listConversations(LocationName parent)

    public final DataChatServiceClient.ListConversationsPagedResponse listConversations(LocationName parent)

Lists all conversations for a given 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Conversation element : dataChatServiceClient.listConversations(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.LocationName` Required. Parent value for ListConversationsRequest. Format: `projects/{project}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse` |   |

### listConversations(String parent)

    public final DataChatServiceClient.ListConversationsPagedResponse listConversations(String parent)

Lists all conversations for a given 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Conversation element : dataChatServiceClient.listConversations(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. Parent value for ListConversationsRequest. Format: `projects/{project}/locations/{location}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse` |   |

### listConversationsCallable()

    public final UnaryCallable<ListConversationsRequest,ListConversationsResponse> listConversationsCallable()

Lists all conversations for a given 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListConversationsRequest request =
           ListConversationsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       while (true) {
         ListConversationsResponse response =
             dataChatServiceClient.listConversationsCallable().call(request);
         for (Conversation element : response.getConversationsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListConversationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListConversationsResponse>` |   |

### listConversationsPagedCallable()

    public final UnaryCallable<ListConversationsRequest,DataChatServiceClient.ListConversationsPagedResponse> listConversationsPagedCallable()

Lists all conversations for a given 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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListConversationsRequest request =
           ListConversationsRequest.newBuilder()
               .setParent(LocationName.of("[PROJECT]", "[LOCATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       ApiFuture<Conversation> future =
           dataChatServiceClient.listConversationsPagedCallable().futureCall(request);
       // Do something.
       for (Conversation element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListConversationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListConversationsPagedResponse>` |   |

### listLocations(ListLocationsRequest request)

    public final DataChatServiceClient.ListLocationsPagedResponse listLocations(ListLocationsRequest request)

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
\*\*\*Global locations\*\*: If `name` is empty, the method lists thepublic
locations available to all projects. \* \*\*Project-specificlocations\*\*: If
`name` follows the format`projects/{project}`, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       for (Location element : dataChatServiceClient.listLocations(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `com.google.cloud.location.ListLocationsRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse` |   |

### listLocationsCallable()

    public final UnaryCallable<ListLocationsRequest,ListLocationsResponse> listLocationsCallable()

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
\*\*\*Global locations\*\*: If `name` is empty, the method lists thepublic
locations available to all projects. \* \*\*Project-specificlocations\*\*: If
`name` follows the format`projects/{project}`, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       while (true) {
         ListLocationsResponse response =
             dataChatServiceClient.listLocationsCallable().call(request);
         for (Location element : response.getLocationsList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,com.google.cloud.location.ListLocationsResponse>` |   |

### listLocationsPagedCallable()

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

Lists information about the supported locations for this service.

This method lists locations based on the resource scope provided inthe
ListLocationsRequest.name field:
\*\*\*Global locations\*\*: If `name` is empty, the method lists thepublic
locations available to all projects. \* \*\*Project-specificlocations\*\*: If
`name` follows the format`projects/{project}`, the method lists locations visible to
thatspecific project. This includes public, private, or otherproject-specific locations enabled
for the project.

For gRPC and client library implementations, the resource name ispassed as the `name` field.
For direct service calls, the resourcename isincorporated into the request path based on the
specific serviceimplementation and version.

Sample code:


     // This snippet has been automatically generated and should be regarded as a code template only.
     // It will require modifications to work:
     // - It may require correct/in-range values for request initialization.
     // - It may require specifying regional endpoints when creating the service client as shown in
     // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListLocationsRequest request =
           ListLocationsRequest.newBuilder()
               .setName("name3373707")
               .setFilter("filter-1274492040")
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .build();
       ApiFuture<Location> future =
           dataChatServiceClient.listLocationsPagedCallable().futureCall(request);
       // Do something.
       for (Location element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<com.google.cloud.location.ListLocationsRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListLocationsPagedResponse>` |   |

### listMessages(ConversationName parent)

    public final DataChatServiceClient.ListMessagesPagedResponse listMessages(ConversationName parent)

Lists all messages for a given conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ConversationName parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]");
       for (StorageMessage element : dataChatServiceClient.listMessages(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ConversationName` Required. The conversation to list messages under. Format: `projects/{project}/locations/{location}/conversations/{conversation_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse` |   |

### listMessages(ListMessagesRequest request)

    public final DataChatServiceClient.ListMessagesPagedResponse listMessages(ListMessagesRequest request)

Lists all messages for a given conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListMessagesRequest request =
           ListMessagesRequest.newBuilder()
               .setParent(
                   ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       for (StorageMessage element : dataChatServiceClient.listMessages(request).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `request` | `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListMessagesRequest` The request object containing all of the parameters for the API call. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse` |   |

### listMessages(String parent)

    public final DataChatServiceClient.ListMessagesPagedResponse listMessages(String parent)

Lists all messages for a given conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       String parent = ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString();
       for (StorageMessage element : dataChatServiceClient.listMessages(parent).iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `parent` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` Required. The conversation to list messages under. Format: `projects/{project}/locations/{location}/conversations/{conversation_id}` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse` |   |

### listMessagesCallable()

    public final UnaryCallable<ListMessagesRequest,ListMessagesResponse> listMessagesCallable()

Lists all messages for a given conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListMessagesRequest request =
           ListMessagesRequest.newBuilder()
               .setParent(
                   ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       while (true) {
         ListMessagesResponse response = dataChatServiceClient.listMessagesCallable().call(request);
         for (StorageMessage element : response.getMessagesList()) {
           // doThingsWith(element);
         }
         String nextPageToken = response.getNextPageToken();
         if (!Strings.isNullOrEmpty(nextPageToken)) {
           request = request.toBuilder().setPageToken(nextPageToken).build();
         } else {
           break;
         }
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListMessagesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListMessagesResponse>` |   |

### listMessagesPagedCallable()

    public final UnaryCallable<ListMessagesRequest,DataChatServiceClient.ListMessagesPagedResponse> listMessagesPagedCallable()

Lists all messages for a given conversation.

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 (DataChatServiceClient dataChatServiceClient = DataChatServiceClient.create()) {
       ListMessagesRequest request =
           ListMessagesRequest.newBuilder()
               .setParent(
                   ConversationName.of("[PROJECT]", "[LOCATION]", "[CONVERSATION]").toString())
               .setPageSize(883849137)
               .setPageToken("pageToken873572522")
               .setFilter("filter-1274492040")
               .build();
       ApiFuture<StorageMessage> future =
           dataChatServiceClient.listMessagesPagedCallable().futureCall(request);
       // Do something.
       for (StorageMessage element : future.get().iterateAll()) {
         // doThingsWith(element);
       }
     }
     
| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/gax/latest/com.google.api.gax.rpc.UnaryCallable.html<https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.ListMessagesRequest,https://docs.cloud.google.com/java/docs/reference/google-cloud-geminidataanalytics/latest/com.google.cloud.geminidataanalytics.v1.DataChatServiceClient.ListMessagesPagedResponse>` |   |

### shutdown()

    public void shutdown()

### shutdownNow()

    public void shutdownNow()