| <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. |
| "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. |
| { # The request message to create one Message. Currently it is only used in BatchCreateMessagesRequest. |
| "message": { # Represents a message posted into a conversation. # Required. The message to create. Message.participant is required. |
| "content": "A String", # Required. The message content. |
| "createTime": "A String", # Output only. The time when the message was created in Contact Center AI. |
| "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". |
| "messageAnnotation": { # Represents the result of annotation for the message. # Output only. The annotation for the message. |
| "containEntities": True or False, # Required. Indicates whether the text message contains entities. |
| "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]. |
| { # 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. |
| "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. |
| "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" } |
| "text": "A String", # Required. A part of a message possibly annotated with an entity. |
| }, |
| ], |
| }, |
| "name": "A String", # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. |
| "participant": "A String", # Output only. The participant that sends this message. |
| "participantRole": "A String", # Output only. The role of the participant. |
| "sendTime": "A String", # Optional. The time when the message was sent. |
| "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. |
| "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`. |
| "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). |
| "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| }, |
| }, |
| }, |
| "parent": "A String", # 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. |
| "messages": [ # Messages created. |
| { # Represents a message posted into a conversation. |
| "content": "A String", # Required. The message content. |
| "createTime": "A String", # Output only. The time when the message was created in Contact Center AI. |
| "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". |
| "messageAnnotation": { # Represents the result of annotation for the message. # Output only. The annotation for the message. |
| "containEntities": True or False, # Required. Indicates whether the text message contains entities. |
| "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]. |
| { # 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. |
| "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. |
| "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" } |
| "text": "A String", # Required. A part of a message possibly annotated with an entity. |
| }, |
| ], |
| }, |
| "name": "A String", # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. |
| "participant": "A String", # Output only. The participant that sends this message. |
| "participantRole": "A String", # Output only. The role of the participant. |
| "sendTime": "A String", # Optional. The time when the message was sent. |
| "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. |
| "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`. |
| "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). |
| "score": 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 > [first item'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 > 1551790877964485` or `create_time > "2017-01-15T01:30:15.01Z"`. 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. |
| "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. |
| { # Represents a message posted into a conversation. |
| "content": "A String", # Required. The message content. |
| "createTime": "A String", # Output only. The time when the message was created in Contact Center AI. |
| "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". |
| "messageAnnotation": { # Represents the result of annotation for the message. # Output only. The annotation for the message. |
| "containEntities": True or False, # Required. Indicates whether the text message contains entities. |
| "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]. |
| { # 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. |
| "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. |
| "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" } |
| "text": "A String", # Required. A part of a message possibly annotated with an entity. |
| }, |
| ], |
| }, |
| "name": "A String", # Optional. The unique identifier of the message. Format: `projects//locations//conversations//messages/`. |
| "participant": "A String", # Output only. The participant that sends this message. |
| "participantRole": "A String", # Output only. The role of the participant. |
| "sendTime": "A String", # Optional. The time when the message was sent. |
| "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. |
| "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`. |
| "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). |
| "score": 3.14, # Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment). |
| }, |
| }, |
| }, |
| ], |
| "nextPageToken": "A String", # 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 'execute()' on to request the next |
| page. Returns None if there are no more items in the collection. |
| </pre> |
| </div> |
| |
| </body></html> |