blob: fb5998b25d064662dd2ad0cbdc53d19c85cf53f2 [file] [log] [blame]
yoshi-code-bota8b35b92021-03-31 13:33:30 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<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>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#batchCreate">batchCreate(parent, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.</p>
80<p class="toc_element">
81 <code><a href="#close">close()</a></code></p>
82<p class="firstline">Close httplib2 connections.</p>
83<p class="toc_element">
84 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
85<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>
86<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<h3>Method Details</h3>
90<div class="method">
91 <code class="details" id="batchCreate">batchCreate(parent, body=None, x__xgafv=None)</code>
92 <pre>Batch ingests messages to conversation. Customers can use this RPC to ingest historical messages to conversation.
93
94Args:
95 parent: string, Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`. (required)
96 body: object, The request body.
97 The object takes the form of:
98
99{ # The request message for Conversations.BatchCreateMessagesRequest.
100 &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.
101 { # The request message to create one Message. Currently it is only used in BatchCreateMessagesRequest.
102 &quot;message&quot;: { # Represents a message posted into a conversation. # Required. The message to create. Message.participant is required.
103 &quot;content&quot;: &quot;A String&quot;, # Required. The message content.
104 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
105 &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;.
106 &quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
107 &quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
108 &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].
109 { # 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.
110 &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.
111 &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; }
112 &quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
113 },
114 ],
115 },
116 &quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
117 &quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
118 &quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
119 &quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent.
120 &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.
121 &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`.
122 &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).
123 &quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
124 },
125 },
126 },
127 &quot;parent&quot;: &quot;A String&quot;, # Required. Resource identifier of the conversation to create message. Format: `projects//locations//conversations/`.
128 },
129 ],
130}
131
132 x__xgafv: string, V1 error format.
133 Allowed values
134 1 - v1 error format
135 2 - v2 error format
136
137Returns:
138 An object of the form:
139
140 { # The request message for Conversations.BatchCreateMessagesResponse.
141 &quot;messages&quot;: [ # Messages created.
142 { # Represents a message posted into a conversation.
143 &quot;content&quot;: &quot;A String&quot;, # Required. The message content.
144 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
145 &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;.
146 &quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
147 &quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
148 &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].
149 { # 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.
150 &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.
151 &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; }
152 &quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
153 },
154 ],
155 },
156 &quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
157 &quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
158 &quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
159 &quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent.
160 &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.
161 &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`.
162 &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).
163 &quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
164 },
165 },
166 },
167 ],
168}</pre>
169</div>
170
171<div class="method">
172 <code class="details" id="close">close()</code>
173 <pre>Close httplib2 connections.</pre>
174</div>
175
176<div class="method">
177 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
178 <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.
179
180Args:
181 parent: string, Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` (required)
Anthonios Partheniou10f4b672021-04-13 14:47:53 -0400182 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).
yoshi-code-bota8b35b92021-03-31 13:33:30 -0700183 pageSize: integer, Optional. The maximum number of items to return in a single page. By default 100 and at most 1000.
184 pageToken: string, Optional. The next_page_token value returned from a previous list request.
185 x__xgafv: string, V1 error format.
186 Allowed values
187 1 - v1 error format
188 2 - v2 error format
189
190Returns:
191 An object of the form:
192
193 { # The response message for Conversations.ListMessages.
194 &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.
195 { # Represents a message posted into a conversation.
196 &quot;content&quot;: &quot;A String&quot;, # Required. The message content.
197 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The time when the message was created in Contact Center AI.
198 &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;.
199 &quot;messageAnnotation&quot;: { # Represents the result of annotation for the message. # Output only. The annotation for the message.
200 &quot;containEntities&quot;: True or False, # Required. Indicates whether the text message contains entities.
201 &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].
202 { # 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.
203 &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.
204 &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; }
205 &quot;text&quot;: &quot;A String&quot;, # Required. A part of a message possibly annotated with an entity.
206 },
207 ],
208 },
209 &quot;name&quot;: &quot;A String&quot;, # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`.
210 &quot;participant&quot;: &quot;A String&quot;, # Output only. The participant that sends this message.
211 &quot;participantRole&quot;: &quot;A String&quot;, # Output only. The role of the participant.
212 &quot;sendTime&quot;: &quot;A String&quot;, # Optional. The time when the message was sent.
213 &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.
214 &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`.
215 &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).
216 &quot;score&quot;: 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
217 },
218 },
219 },
220 ],
221 &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.
222}</pre>
223</div>
224
225<div class="method">
226 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
227 <pre>Retrieves the next page of results.
228
229Args:
230 previous_request: The request for the previous page. (required)
231 previous_response: The response from the request for the previous page. (required)
232
233Returns:
234 A request object that you can call &#x27;execute()&#x27; on to request the next
235 page. Returns None if there are no more items in the collection.
236 </pre>
237</div>
238
239</body></html>