blob: fb5998b25d064662dd2ad0cbdc53d19c85cf53f2 [file] [log] [blame]
<html><body>
<style>
body, h1, h2, h3, div, span, p, pre, a {
margin: 0;
padding: 0;
border: 0;
font-weight: inherit;
font-style: inherit;
font-size: 100%;
font-family: inherit;
vertical-align: baseline;
}
body {
font-size: 13px;
padding: 1em;
}
h1 {
font-size: 26px;
margin-bottom: 1em;
}
h2 {
font-size: 24px;
margin-bottom: 1em;
}
h3 {
font-size: 20px;
margin-bottom: 1em;
margin-top: 1em;
}
pre, code {
line-height: 1.5;
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
}
pre {
margin-top: 0.5em;
}
h1, h2, h3, p {
font-family: Arial, sans serif;
}
h1, h2, h3 {
border-bottom: solid #CCC 1px;
}
.toc_element {
margin-top: 0.5em;
}
.firstline {
margin-left: 2 em;
}
.method {
margin-top: 1em;
border: solid 1px #CCC;
padding: 1em;
background: #EEE;
}
.details {
font-weight: bold;
font-size: 14px;
}
</style>
<h1><a href="dialogflow_v2beta1.html">Dialogflow API</a> . <a href="dialogflow_v2beta1.projects.html">projects</a> . <a href="dialogflow_v2beta1.projects.conversations.html">conversations</a> . <a href="dialogflow_v2beta1.projects.conversations.messages.html">messages</a></h1>
<h2>Instance Methods</h2>
<p class="toc_element">
<code><a href="#batchCreate">batchCreate(parent, body=None, x__xgafv=None)</a></code></p>
<p class="firstline">Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.</p>
<p class="toc_element">
<code><a href="#close">close()</a></code></p>
<p class="firstline">Close httplib2 connections.</p>
<p class="toc_element">
<code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
<p class="firstline">Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds > [first item's create_time of previous request]` and empty page_token.</p>
<p class="toc_element">
<code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
<p class="firstline">Retrieves the next page of results.</p>
<h3>Method Details</h3>
<div class="method">
<code class="details" id="batchCreate">batchCreate(parent, body=None, x__xgafv=None)</code>
<pre>Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.
Args:
parent: string, Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. (required)
body: object, The request body.
The object takes the form of:
{ # The request message for Conversations.BatchCreateMessagesRequest.
&quot;requests&quot;: [ # Required. A maximum of 1000 Messages can be created in a batch. CreateMessageRequest.message.send_time is required. All created messages will have identical Message.create_time.
{ # The request message to create one Message. Currently it is only used in BatchCreateMessagesRequest.
&quot;message&quot;: { # Represents a message posted into a conversation. # Required. The message to create. Message.participant is required.
&quot;content&quot;: &quot;A String&quot;, # Required. The message content.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
&quot;languageCode&quot;: &quot;A String&quot;, # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: &quot;en-US&quot;.
&quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
&quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
&quot;parts&quot;: [ # Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
{ # Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.
&quot;entityType&quot;: &quot;A String&quot;, # Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
&quot;formattedValue&quot;: &quot;&quot;, # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { &quot;amount&quot;: 5, &quot;currency&quot;: &quot;USD&quot; }
&quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
},
],
},
&quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
&quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
&quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
&quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent.
&quot;sentimentAnalysis&quot;: { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user&#x27;s attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config # Output only. The sentiment analysis result for the message.
&quot;queryTextSentiment&quot;: { # The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. # The sentiment analysis result for `query_text`.
&quot;magnitude&quot;: 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
&quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
},
},
},
&quot;parent&quot;: &quot;A String&quot;, # Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`.
},
],
}
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The request message for Conversations.BatchCreateMessagesResponse.
&quot;messages&quot;: [ # Messages created.
{ # Represents a message posted into a conversation.
&quot;content&quot;: &quot;A String&quot;, # Required. The message content.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
&quot;languageCode&quot;: &quot;A String&quot;, # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: &quot;en-US&quot;.
&quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
&quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
&quot;parts&quot;: [ # Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
{ # Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.
&quot;entityType&quot;: &quot;A String&quot;, # Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
&quot;formattedValue&quot;: &quot;&quot;, # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { &quot;amount&quot;: 5, &quot;currency&quot;: &quot;USD&quot; }
&quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
},
],
},
&quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
&quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
&quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
&quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent.
&quot;sentimentAnalysis&quot;: { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user&#x27;s attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config # Output only. The sentiment analysis result for the message.
&quot;queryTextSentiment&quot;: { # The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. # The sentiment analysis result for `query_text`.
&quot;magnitude&quot;: 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
&quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
},
},
},
],
}</pre>
</div>
<div class="method">
<code class="details" id="close">close()</code>
<pre>Close httplib2 connections.</pre>
</div>
<div class="method">
<code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
<pre>Lists messages that belong to a given conversation. `messages` are ordered by `create_time` in descending order. To fetch updates without duplication, send request with filter `create_time_epoch_microseconds &gt; [first item&#x27;s create_time of previous request]` and empty page_token.
Args:
parent: string, Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` (required)
filter: string, Optional. Filter on message fields. Currently predicates on `create_time` and `create_time_epoch_microseconds` are supported. `create_time` only support milliseconds accuracy. E.g., `create_time_epoch_microseconds &gt; 1551790877964485` or `create_time &gt; &quot;2017-01-15T01:30:15.01Z&quot;`. For more information about filtering, see [API Filtering](https://aip.dev/160).
pageSize: integer, Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
pageToken: string, Optional. The next_page_token value returned from a previous list request.
x__xgafv: string, V1 error format.
Allowed values
1 - v1 error format
2 - v2 error format
Returns:
An object of the form:
{ # The response message for Conversations.ListMessages.
&quot;messages&quot;: [ # Required. The list of messages. There will be a maximum number of items returned based on the page_size field in the request. `messages` is sorted by `create_time` in descending order.
{ # Represents a message posted into a conversation.
&quot;content&quot;: &quot;A String&quot;, # Required. The message content.
&quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
&quot;languageCode&quot;: &quot;A String&quot;, # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: &quot;en-US&quot;.
&quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
&quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
&quot;parts&quot;: [ # Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
{ # Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start/end.
&quot;entityType&quot;: &quot;A String&quot;, # Optional. The [Dialogflow system entity type](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
&quot;formattedValue&quot;: &quot;&quot;, # Optional. The [Dialogflow system entity formatted value ](https://cloud.google.com/dialogflow/docs/reference/system-entities) of this message part. For example for a system entity of type `@sys.unit-currency`, this may contain: { &quot;amount&quot;: 5, &quot;currency&quot;: &quot;USD&quot; }
&quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
},
],
},
&quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
&quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
&quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
&quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent.
&quot;sentimentAnalysis&quot;: { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user&#x27;s attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query_params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query_params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human_agent_assistant_config # Output only. The sentiment analysis result for the message.
&quot;queryTextSentiment&quot;: { # The sentiment, such as positive/negative feeling or association, for a unit of analysis, such as the query text. # The sentiment analysis result for `query_text`.
&quot;magnitude&quot;: 3.14, # A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
&quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
},
},
},
],
&quot;nextPageToken&quot;: &quot;A String&quot;, # Optional. Token to retrieve the next page of results, or empty if there are no more results in the list.
}</pre>
</div>
<div class="method">
<code class="details" id="list_next">list_next(previous_request, previous_response)</code>
<pre>Retrieves the next page of results.
Args:
previous_request: The request for the previous page. (required)
previous_response: The response from the request for the previous page. (required)
Returns:
A request object that you can call &#x27;execute()&#x27; on to request the next
page. Returns None if there are no more items in the collection.
</pre>
</div>
</body></html>