Dialogflow v3 API - Class QueryResult (2.17.0)

public sealed class QueryResult : IMessage<QueryResult>, IEquatable<QueryResult>, IDeepCloneable<QueryResult>, IBufferMessage, IMessage

Reference documentation and code samples for the Dialogflow v3 API class QueryResult.

Represents the result of a conversational query.

Inheritance

object > QueryResult

Namespace

Google.Cloud.Dialogflow.Cx.V3

Assembly

Google.Cloud.Dialogflow.Cx.V3.dll

Constructors

QueryResult()

public QueryResult()

QueryResult(QueryResult)

public QueryResult(QueryResult other)
Parameter
NameDescription
otherQueryResult

Properties

AdvancedSettings

public AdvancedSettings AdvancedSettings { get; set; }

Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding.

Property Value
TypeDescription
AdvancedSettings

AllowAnswerFeedback

public bool AllowAnswerFeedback { get; set; }

Indicates whether the Thumbs up/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget.

Property Value
TypeDescription
bool

CurrentFlow

public Flow CurrentFlow { get; set; }

The current [Flow][google.cloud.dialogflow.cx.v3.Flow]. Some, not all fields are filled in this message, including but not limited to name and display_name.

Property Value
TypeDescription
Flow

CurrentPage

public Page CurrentPage { get; set; }

The current [Page][google.cloud.dialogflow.cx.v3.Page]. Some, not all fields are filled in this message, including but not limited to name and display_name.

Property Value
TypeDescription
Page

DiagnosticInfo

public Struct DiagnosticInfo { get; set; }

The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure.

One of the fields is called "Alternative Matched Intents", which may aid with debugging. The following describes these intent results:

  • The list is empty if no intent was matched to end-user input.
  • Only intents that are referenced in the currently active flow are included.
  • The matched intent is included.
  • Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of scope, are included.
  • Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score.
Property Value
TypeDescription
Struct

Dtmf

public DtmfInput Dtmf { get; set; }

If a [DTMF][google.cloud.dialogflow.cx.v3.DtmfInput] was provided as input, this field will contain a copy of the [DtmfInput][google.cloud.dialogflow.cx.v3.DtmfInput].

Property Value
TypeDescription
DtmfInput

HasText

public bool HasText { get; }

Gets whether the "text" field is set

Property Value
TypeDescription
bool

HasTranscript

public bool HasTranscript { get; }

Gets whether the "transcript" field is set

Property Value
TypeDescription
bool

HasTriggerEvent

public bool HasTriggerEvent { get; }

Gets whether the "trigger_event" field is set

Property Value
TypeDescription
bool

HasTriggerIntent

public bool HasTriggerIntent { get; }

Gets whether the "trigger_intent" field is set

Property Value
TypeDescription
bool

Intent

[Obsolete]
public Intent Intent { get; set; }

The [Intent][google.cloud.dialogflow.cx.v3.Intent] that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: name and display_name. This field is deprecated, please use [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] instead.

Property Value
TypeDescription
Intent

IntentDetectionConfidence

[Obsolete]
public float IntentDetectionConfidence { get; set; }

The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. This field is deprecated, please use [QueryResult.match][google.cloud.dialogflow.cx.v3.QueryResult.match] instead.

Property Value
TypeDescription
float

LanguageCode

public string LanguageCode { get; set; }

The language that was triggered during intent detection. See Language Support for a list of the currently supported language codes.

Property Value
TypeDescription
string

Match

public Match Match { get; set; }

Intent match result, could be an intent or an event.

Property Value
TypeDescription
Match

Parameters

public Struct Parameters { get; set; }

The collected [session parameters][google.cloud.dialogflow.cx.v3.SessionInfo.parameters].

Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:

  • MapKey type: string
  • MapKey value: parameter name
  • MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
  • MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
Property Value
TypeDescription
Struct

QueryCase

public QueryResult.QueryOneofCase QueryCase { get; }
Property Value
TypeDescription
QueryResultQueryOneofCase

ResponseMessages

public RepeatedField<ResponseMessage> ResponseMessages { get; }

The list of rich messages returned to the client. Responses vary from simple text messages to more sophisticated, structured payloads used to drive complex logic.

Property Value
TypeDescription
RepeatedFieldResponseMessage

SentimentAnalysisResult

public SentimentAnalysisResult SentimentAnalysisResult { get; set; }

The sentiment analyss result, which depends on [analyze_query_text_sentiment] [google.cloud.dialogflow.cx.v3.QueryParameters.analyze_query_text_sentiment], specified in the request.

Property Value
TypeDescription
SentimentAnalysisResult

Text

public string Text { get; set; }

If [natural language text][google.cloud.dialogflow.cx.v3.TextInput] was provided as input, this field will contain a copy of the text.

Property Value
TypeDescription
string

Transcript

public string Transcript { get; set; }

If [natural language speech audio][google.cloud.dialogflow.cx.v3.AudioInput] was provided as input, this field will contain the transcript for the audio.

Property Value
TypeDescription
string

TriggerEvent

public string TriggerEvent { get; set; }

If an [event][google.cloud.dialogflow.cx.v3.EventInput] was provided as input, this field will contain the name of the event.

Property Value
TypeDescription
string

TriggerIntent

public string TriggerIntent { get; set; }

If an [intent][google.cloud.dialogflow.cx.v3.IntentInput] was provided as input, this field will contain a copy of the intent identifier. Format: projects/<Project ID>/locations/<Location ID>/agents/<Agent ID>/intents/<Intent ID>.

Property Value
TypeDescription
string

TriggerIntentAsIntentName

public IntentName TriggerIntentAsIntentName { get; set; }

IntentName-typed view over the TriggerIntent resource name property.

Property Value
TypeDescription
IntentName

WebhookDisplayNames

public RepeatedField<string> WebhookDisplayNames { get; }

The list of webhook display names in the order of call sequence.

Property Value
TypeDescription
RepeatedFieldstring

WebhookIds

public RepeatedField<string> WebhookIds { get; }

The list of webhook ids in the order of call sequence.

Property Value
TypeDescription
RepeatedFieldstring

WebhookLatencies

public RepeatedField<Duration> WebhookLatencies { get; }

The list of webhook latencies in the order of call sequence.

Property Value
TypeDescription
RepeatedFieldDuration

WebhookPayloads

public RepeatedField<Struct> WebhookPayloads { get; }

The list of webhook payload in [WebhookResponse.payload][google.cloud.dialogflow.cx.v3.WebhookResponse.payload], in the order of call sequence. If some webhook call fails or doesn't return any payload, an empty Struct would be used instead.

Property Value
TypeDescription
RepeatedFieldStruct

WebhookStatuses

public RepeatedField<Status> WebhookStatuses { get; }

The list of webhook call status in the order of call sequence.

Property Value
TypeDescription
RepeatedFieldStatus

WebhookTags

public RepeatedField<string> WebhookTags { get; }

The list of webhook tags in the order of call sequence.

Property Value
TypeDescription
RepeatedFieldstring