yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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 | |
| 94 | Args: |
| 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 | "requests": [ # 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 | "message": { # Represents a message posted into a conversation. # Required. The message to create. Message.participant is required. |
| 103 | "content": "A String", # Required. The message content. |
| 104 | "createTime": "A String", # Output only. The time when the message was created in Contact Center AI. |
| 105 | "languageCode": "A String", # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". |
| 106 | "messageAnnotation": { # Represents the result of annotation for the message. # Output only. The annotation for the message. |
| 107 | "containEntities": True or False, # Required. Indicates whether the text message contains entities. |
| 108 | "parts": [ # 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 | "entityType": "A String", # 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 | "formattedValue": "", # 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: { "amount": 5, "currency": "USD" } |
| 112 | "text": "A String", # Required. A part of a message possibly annotated with an entity. |
| 113 | }, |
| 114 | ], |
| 115 | }, |
| 116 | "name": "A String", # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. |
| 117 | "participant": "A String", # Output only. The participant that sends this message. |
| 118 | "participantRole": "A String", # Output only. The role of the participant. |
| 119 | "sendTime": "A String", # Optional. The time when the message was sent. |
| 120 | "sentimentAnalysis": { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user'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 | "queryTextSentiment": { # 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 | "magnitude": 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 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 124 | }, |
| 125 | }, |
| 126 | }, |
| 127 | "parent": "A String", # 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 | |
| 137 | Returns: |
| 138 | An object of the form: |
| 139 | |
| 140 | { # The request message for Conversations.BatchCreateMessagesResponse. |
| 141 | "messages": [ # Messages created. |
| 142 | { # Represents a message posted into a conversation. |
| 143 | "content": "A String", # Required. The message content. |
| 144 | "createTime": "A String", # Output only. The time when the message was created in Contact Center AI. |
| 145 | "languageCode": "A String", # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". |
| 146 | "messageAnnotation": { # Represents the result of annotation for the message. # Output only. The annotation for the message. |
| 147 | "containEntities": True or False, # Required. Indicates whether the text message contains entities. |
| 148 | "parts": [ # 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 | "entityType": "A String", # 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 | "formattedValue": "", # 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: { "amount": 5, "currency": "USD" } |
| 152 | "text": "A String", # Required. A part of a message possibly annotated with an entity. |
| 153 | }, |
| 154 | ], |
| 155 | }, |
| 156 | "name": "A String", # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. |
| 157 | "participant": "A String", # Output only. The participant that sends this message. |
| 158 | "participantRole": "A String", # Output only. The role of the participant. |
| 159 | "sendTime": "A String", # Optional. The time when the message was sent. |
| 160 | "sentimentAnalysis": { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user'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 | "queryTextSentiment": { # 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 | "magnitude": 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 | "score": 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 > [first item's create_time of previous request]` and empty page_token. |
| 179 | |
| 180 | Args: |
| 181 | parent: string, Required. The name of the conversation to list messages for. Format: `projects//locations//conversations/` (required) |
Anthonios Partheniou | 10f4b67 | 2021-04-13 14:47:53 -0400 | [diff] [blame] | 182 | 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 > 1551790877964485` or `create_time > "2017-01-15T01:30:15.01Z"`. For more information about filtering, see [API Filtering](https://aip.dev/160). |
yoshi-code-bot | a8b35b9 | 2021-03-31 13:33:30 -0700 | [diff] [blame] | 183 | 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 | |
| 190 | Returns: |
| 191 | An object of the form: |
| 192 | |
| 193 | { # The response message for Conversations.ListMessages. |
| 194 | "messages": [ # 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 | "content": "A String", # Required. The message content. |
| 197 | "createTime": "A String", # Output only. The time when the message was created in Contact Center AI. |
| 198 | "languageCode": "A String", # Optional. The message language. This should be a [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language tag. Example: "en-US". |
| 199 | "messageAnnotation": { # Represents the result of annotation for the message. # Output only. The annotation for the message. |
| 200 | "containEntities": True or False, # Required. Indicates whether the text message contains entities. |
| 201 | "parts": [ # 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 | "entityType": "A String", # 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 | "formattedValue": "", # 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: { "amount": 5, "currency": "USD" } |
| 205 | "text": "A String", # Required. A part of a message possibly annotated with an entity. |
| 206 | }, |
| 207 | ], |
| 208 | }, |
| 209 | "name": "A String", # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. |
| 210 | "participant": "A String", # Output only. The participant that sends this message. |
| 211 | "participantRole": "A String", # Output only. The role of the participant. |
| 212 | "sendTime": "A String", # Optional. The time when the message was sent. |
| 213 | "sentimentAnalysis": { # The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user'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 | "queryTextSentiment": { # 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 | "magnitude": 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 | "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| 217 | }, |
| 218 | }, |
| 219 | }, |
| 220 | ], |
| 221 | "nextPageToken": "A String", # 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 | |
| 229 | Args: |
| 230 | previous_request: The request for the previous page. (required) |
| 231 | previous_response: The response from the request for the previous page. (required) |
| 232 | |
| 233 | Returns: |
| 234 | A request object that you can call 'execute()' 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> |