Class StreamingDetectIntentResponse (0.13.0)

public final class StreamingDetectIntentResponse extends GeneratedMessageV3 implements StreamingDetectIntentResponseOrBuilder

The top-level message returned from the StreamingDetectIntent method. Multiple response messages (N) can be returned in order. The first (N-1) responses set either the recognition_result or detect_intent_response field, depending on the request:

  • If the StreamingDetectIntentRequest.query_input.audio field was set, and the StreamingDetectIntentRequest.enable_partial_response field was false, the recognition_result field is populated for each of the (N-1) responses. See the StreamingRecognitionResult message for details about the result message sequence.
  • If the StreamingDetectIntentRequest.enable_partial_response field was true, the detect_intent_response field is populated for each of the (N-1) responses, where 1 <= N <= 4. These responses set the DetectIntentResponse.response_type field to PARTIAL. For the final Nth response message, the detect_intent_response is fully populated, and DetectIntentResponse.response_type is set to FINAL.

Protobuf type google.cloud.dialogflow.cx.v3.StreamingDetectIntentResponse

Static Fields

DETECT_INTENT_RESPONSE_FIELD_NUMBER

public static final int DETECT_INTENT_RESPONSE_FIELD_NUMBER
Field Value
TypeDescription
int

RECOGNITION_RESULT_FIELD_NUMBER

public static final int RECOGNITION_RESULT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static StreamingDetectIntentResponse getDefaultInstance()
Returns
TypeDescription
StreamingDetectIntentResponse

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static StreamingDetectIntentResponse.Builder newBuilder()
Returns
TypeDescription
StreamingDetectIntentResponse.Builder

newBuilder(StreamingDetectIntentResponse prototype)

public static StreamingDetectIntentResponse.Builder newBuilder(StreamingDetectIntentResponse prototype)
Parameter
NameDescription
prototypeStreamingDetectIntentResponse
Returns
TypeDescription
StreamingDetectIntentResponse.Builder

parseDelimitedFrom(InputStream input)

public static StreamingDetectIntentResponse parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingDetectIntentResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static StreamingDetectIntentResponse parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StreamingDetectIntentResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StreamingDetectIntentResponse parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StreamingDetectIntentResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StreamingDetectIntentResponse parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingDetectIntentResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static StreamingDetectIntentResponse parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StreamingDetectIntentResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static StreamingDetectIntentResponse parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StreamingDetectIntentResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
StreamingDetectIntentResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<StreamingDetectIntentResponse> parser()
Returns
TypeDescription
Parser<StreamingDetectIntentResponse>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public StreamingDetectIntentResponse getDefaultInstanceForType()
Returns
TypeDescription
StreamingDetectIntentResponse

getDetectIntentResponse()

public DetectIntentResponse getDetectIntentResponse()

The response from detect intent.

.google.cloud.dialogflow.cx.v3.DetectIntentResponse detect_intent_response = 2;

Returns
TypeDescription
DetectIntentResponse

The detectIntentResponse.

getDetectIntentResponseOrBuilder()

public DetectIntentResponseOrBuilder getDetectIntentResponseOrBuilder()

The response from detect intent.

.google.cloud.dialogflow.cx.v3.DetectIntentResponse detect_intent_response = 2;

Returns
TypeDescription
DetectIntentResponseOrBuilder

getParserForType()

public Parser<StreamingDetectIntentResponse> getParserForType()
Returns
TypeDescription
Parser<StreamingDetectIntentResponse>
Overrides

getRecognitionResult()

public StreamingRecognitionResult getRecognitionResult()

The result of speech recognition.

.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult recognition_result = 1;

Returns
TypeDescription
StreamingRecognitionResult

The recognitionResult.

getRecognitionResultOrBuilder()

public StreamingRecognitionResultOrBuilder getRecognitionResultOrBuilder()

The result of speech recognition.

.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult recognition_result = 1;

Returns
TypeDescription
StreamingRecognitionResultOrBuilder

getResponseCase()

public StreamingDetectIntentResponse.ResponseCase getResponseCase()
Returns
TypeDescription
StreamingDetectIntentResponse.ResponseCase

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasDetectIntentResponse()

public boolean hasDetectIntentResponse()

The response from detect intent.

.google.cloud.dialogflow.cx.v3.DetectIntentResponse detect_intent_response = 2;

Returns
TypeDescription
boolean

Whether the detectIntentResponse field is set.

hasRecognitionResult()

public boolean hasRecognitionResult()

The result of speech recognition.

.google.cloud.dialogflow.cx.v3.StreamingRecognitionResult recognition_result = 1;

Returns
TypeDescription
boolean

Whether the recognitionResult field is set.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public StreamingDetectIntentResponse.Builder newBuilderForType()
Returns
TypeDescription
StreamingDetectIntentResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StreamingDetectIntentResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
StreamingDetectIntentResponse.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public StreamingDetectIntentResponse.Builder toBuilder()
Returns
TypeDescription
StreamingDetectIntentResponse.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides Exceptions
TypeDescription
IOException