com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-dialogflow-v2 Show documentation
Show all versions of proto-google-cloud-dialogflow-v2 Show documentation
PROTO library for proto-google-cloud-dialogflow-v2
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/dialogflow/v2/participant.proto
// Protobuf Java Version: 3.25.4
package com.google.cloud.dialogflow.v2;
/**
*
*
*
* The top-level message sent by the client to the
* [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
* method.
*
* Multiple request messages should be sent in order:
*
* 1. The first message must contain
* [participant][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.participant],
* [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config]
* and optionally
* [query_params][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.query_params].
* If you want to receive an audio response, it should also contain
* [reply_audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.reply_audio_config].
* The message must not contain
* [input][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input].
*
* 2. If
* [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in
* the first message
* was set to
* [audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.audio_config],
* all subsequent messages must contain
* [input_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_audio]
* to continue with Speech recognition. However, note that:
*
* * Dialogflow will bill you for the audio so far.
* * Dialogflow discards all Speech recognition results in favor of the
* text input.
*
* 3. If
* [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config]
* in the first message was set
* to
* [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.text_config],
* then the second message must contain only
* [input_text][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_text].
* Moreover, you must not send more than two messages.
*
* After you sent all input, you must half-close or abort the request stream.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest}
*/
public final class StreamingAnalyzeContentRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest)
StreamingAnalyzeContentRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use StreamingAnalyzeContentRequest.newBuilder() to construct.
private StreamingAnalyzeContentRequest(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private StreamingAnalyzeContentRequest() {
participant_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new StreamingAnalyzeContentRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_StreamingAnalyzeContentRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_StreamingAnalyzeContentRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.class,
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.Builder.class);
}
private int bitField0_;
private int configCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object config_;
public enum ConfigCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
AUDIO_CONFIG(2),
TEXT_CONFIG(3),
CONFIG_NOT_SET(0);
private final int value;
private ConfigCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ConfigCase valueOf(int value) {
return forNumber(value);
}
public static ConfigCase forNumber(int value) {
switch (value) {
case 2:
return AUDIO_CONFIG;
case 3:
return TEXT_CONFIG;
case 0:
return CONFIG_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public ConfigCase getConfigCase() {
return ConfigCase.forNumber(configCase_);
}
private int inputCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object input_;
public enum InputCase
implements
com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INPUT_AUDIO(5),
INPUT_TEXT(6),
INPUT_DTMF(9),
INPUT_NOT_SET(0);
private final int value;
private InputCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static InputCase valueOf(int value) {
return forNumber(value);
}
public static InputCase forNumber(int value) {
switch (value) {
case 5:
return INPUT_AUDIO;
case 6:
return INPUT_TEXT;
case 9:
return INPUT_DTMF;
case 0:
return INPUT_NOT_SET;
default:
return null;
}
}
public int getNumber() {
return this.value;
}
};
public InputCase getInputCase() {
return InputCase.forNumber(inputCase_);
}
public static final int PARTICIPANT_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object participant_ = "";
/**
*
*
*
* Required. The name of the participant this text comes from.
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
*
*
*
* string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The participant.
*/
@java.lang.Override
public java.lang.String getParticipant() {
java.lang.Object ref = participant_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
participant_ = s;
return s;
}
}
/**
*
*
*
* Required. The name of the participant this text comes from.
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
*
*
*
* string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for participant.
*/
@java.lang.Override
public com.google.protobuf.ByteString getParticipantBytes() {
java.lang.Object ref = participant_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
participant_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int AUDIO_CONFIG_FIELD_NUMBER = 2;
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*
* @return Whether the audioConfig field is set.
*/
@java.lang.Override
public boolean hasAudioConfig() {
return configCase_ == 2;
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*
* @return The audioConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputAudioConfig getAudioConfig() {
if (configCase_ == 2) {
return (com.google.cloud.dialogflow.v2.InputAudioConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputAudioConfig.getDefaultInstance();
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputAudioConfigOrBuilder getAudioConfigOrBuilder() {
if (configCase_ == 2) {
return (com.google.cloud.dialogflow.v2.InputAudioConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputAudioConfig.getDefaultInstance();
}
public static final int TEXT_CONFIG_FIELD_NUMBER = 3;
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*
* @return Whether the textConfig field is set.
*/
@java.lang.Override
public boolean hasTextConfig() {
return configCase_ == 3;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*
* @return The textConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputTextConfig getTextConfig() {
if (configCase_ == 3) {
return (com.google.cloud.dialogflow.v2.InputTextConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputTextConfig.getDefaultInstance();
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputTextConfigOrBuilder getTextConfigOrBuilder() {
if (configCase_ == 3) {
return (com.google.cloud.dialogflow.v2.InputTextConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputTextConfig.getDefaultInstance();
}
public static final int REPLY_AUDIO_CONFIG_FIELD_NUMBER = 4;
private com.google.cloud.dialogflow.v2.OutputAudioConfig replyAudioConfig_;
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*
* @return Whether the replyAudioConfig field is set.
*/
@java.lang.Override
public boolean hasReplyAudioConfig() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*
* @return The replyAudioConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.OutputAudioConfig getReplyAudioConfig() {
return replyAudioConfig_ == null
? com.google.cloud.dialogflow.v2.OutputAudioConfig.getDefaultInstance()
: replyAudioConfig_;
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.OutputAudioConfigOrBuilder getReplyAudioConfigOrBuilder() {
return replyAudioConfig_ == null
? com.google.cloud.dialogflow.v2.OutputAudioConfig.getDefaultInstance()
: replyAudioConfig_;
}
public static final int INPUT_AUDIO_FIELD_NUMBER = 5;
/**
*
*
*
* The input audio content to be recognized. Must be sent if `audio_config`
* is set in the first message. The complete audio over all streaming
* messages must not exceed 1 minute.
*
*
* bytes input_audio = 5;
*
* @return Whether the inputAudio field is set.
*/
@java.lang.Override
public boolean hasInputAudio() {
return inputCase_ == 5;
}
/**
*
*
*
* The input audio content to be recognized. Must be sent if `audio_config`
* is set in the first message. The complete audio over all streaming
* messages must not exceed 1 minute.
*
*
* bytes input_audio = 5;
*
* @return The inputAudio.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInputAudio() {
if (inputCase_ == 5) {
return (com.google.protobuf.ByteString) input_;
}
return com.google.protobuf.ByteString.EMPTY;
}
public static final int INPUT_TEXT_FIELD_NUMBER = 6;
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @return Whether the inputText field is set.
*/
public boolean hasInputText() {
return inputCase_ == 6;
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @return The inputText.
*/
public java.lang.String getInputText() {
java.lang.Object ref = "";
if (inputCase_ == 6) {
ref = input_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (inputCase_ == 6) {
input_ = s;
}
return s;
}
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @return The bytes for inputText.
*/
public com.google.protobuf.ByteString getInputTextBytes() {
java.lang.Object ref = "";
if (inputCase_ == 6) {
ref = input_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (inputCase_ == 6) {
input_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INPUT_DTMF_FIELD_NUMBER = 9;
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*
* @return Whether the inputDtmf field is set.
*/
@java.lang.Override
public boolean hasInputDtmf() {
return inputCase_ == 9;
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*
* @return The inputDtmf.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TelephonyDtmfEvents getInputDtmf() {
if (inputCase_ == 9) {
return (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_;
}
return com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.getDefaultInstance();
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TelephonyDtmfEventsOrBuilder getInputDtmfOrBuilder() {
if (inputCase_ == 9) {
return (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_;
}
return com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.getDefaultInstance();
}
public static final int QUERY_PARAMS_FIELD_NUMBER = 7;
private com.google.cloud.dialogflow.v2.QueryParameters queryParams_;
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*
* @return Whether the queryParams field is set.
*/
@java.lang.Override
public boolean hasQueryParams() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*
* @return The queryParams.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.QueryParameters getQueryParams() {
return queryParams_ == null
? com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance()
: queryParams_;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.QueryParametersOrBuilder getQueryParamsOrBuilder() {
return queryParams_ == null
? com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance()
: queryParams_;
}
public static final int ASSIST_QUERY_PARAMS_FIELD_NUMBER = 8;
private com.google.cloud.dialogflow.v2.AssistQueryParameters assistQueryParams_;
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*
* @return Whether the assistQueryParams field is set.
*/
@java.lang.Override
public boolean hasAssistQueryParams() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*
* @return The assistQueryParams.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.AssistQueryParameters getAssistQueryParams() {
return assistQueryParams_ == null
? com.google.cloud.dialogflow.v2.AssistQueryParameters.getDefaultInstance()
: assistQueryParams_;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.AssistQueryParametersOrBuilder
getAssistQueryParamsOrBuilder() {
return assistQueryParams_ == null
? com.google.cloud.dialogflow.v2.AssistQueryParameters.getDefaultInstance()
: assistQueryParams_;
}
public static final int CX_PARAMETERS_FIELD_NUMBER = 13;
private com.google.protobuf.Struct cxParameters_;
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*
* @return Whether the cxParameters field is set.
*/
@java.lang.Override
public boolean hasCxParameters() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*
* @return The cxParameters.
*/
@java.lang.Override
public com.google.protobuf.Struct getCxParameters() {
return cxParameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : cxParameters_;
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() {
return cxParameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : cxParameters_;
}
public static final int ENABLE_EXTENDED_STREAMING_FIELD_NUMBER = 11;
private boolean enableExtendedStreaming_ = false;
/**
*
*
*
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
*
*
* bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The enableExtendedStreaming.
*/
@java.lang.Override
public boolean getEnableExtendedStreaming() {
return enableExtendedStreaming_;
}
public static final int ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER = 12;
private boolean enablePartialAutomatedAgentReply_ = false;
/**
*
*
*
* Enable partial virtual agent responses. If this flag is not enabled,
* response stream still contains only one final response even if some
* `Fulfillment`s in Dialogflow virtual agent have been configured to return
* partial responses.
*
*
* bool enable_partial_automated_agent_reply = 12;
*
* @return The enablePartialAutomatedAgentReply.
*/
@java.lang.Override
public boolean getEnablePartialAutomatedAgentReply() {
return enablePartialAutomatedAgentReply_;
}
public static final int ENABLE_DEBUGGING_INFO_FIELD_NUMBER = 19;
private boolean enableDebuggingInfo_ = false;
/**
*
*
*
* If true, `StreamingAnalyzeContentResponse.debugging_info` will get
* populated.
*
*
* bool enable_debugging_info = 19;
*
* @return The enableDebuggingInfo.
*/
@java.lang.Override
public boolean getEnableDebuggingInfo() {
return enableDebuggingInfo_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, participant_);
}
if (configCase_ == 2) {
output.writeMessage(2, (com.google.cloud.dialogflow.v2.InputAudioConfig) config_);
}
if (configCase_ == 3) {
output.writeMessage(3, (com.google.cloud.dialogflow.v2.InputTextConfig) config_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(4, getReplyAudioConfig());
}
if (inputCase_ == 5) {
output.writeBytes(5, (com.google.protobuf.ByteString) input_);
}
if (inputCase_ == 6) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, input_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getQueryParams());
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(8, getAssistQueryParams());
}
if (inputCase_ == 9) {
output.writeMessage(9, (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_);
}
if (enableExtendedStreaming_ != false) {
output.writeBool(11, enableExtendedStreaming_);
}
if (enablePartialAutomatedAgentReply_ != false) {
output.writeBool(12, enablePartialAutomatedAgentReply_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(13, getCxParameters());
}
if (enableDebuggingInfo_ != false) {
output.writeBool(19, enableDebuggingInfo_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(participant_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, participant_);
}
if (configCase_ == 2) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
2, (com.google.cloud.dialogflow.v2.InputAudioConfig) config_);
}
if (configCase_ == 3) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
3, (com.google.cloud.dialogflow.v2.InputTextConfig) config_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getReplyAudioConfig());
}
if (inputCase_ == 5) {
size +=
com.google.protobuf.CodedOutputStream.computeBytesSize(
5, (com.google.protobuf.ByteString) input_);
}
if (inputCase_ == 6) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, input_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getQueryParams());
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getAssistQueryParams());
}
if (inputCase_ == 9) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
9, (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_);
}
if (enableExtendedStreaming_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, enableExtendedStreaming_);
}
if (enablePartialAutomatedAgentReply_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
12, enablePartialAutomatedAgentReply_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getCxParameters());
}
if (enableDebuggingInfo_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(19, enableDebuggingInfo_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest other =
(com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest) obj;
if (!getParticipant().equals(other.getParticipant())) return false;
if (hasReplyAudioConfig() != other.hasReplyAudioConfig()) return false;
if (hasReplyAudioConfig()) {
if (!getReplyAudioConfig().equals(other.getReplyAudioConfig())) return false;
}
if (hasQueryParams() != other.hasQueryParams()) return false;
if (hasQueryParams()) {
if (!getQueryParams().equals(other.getQueryParams())) return false;
}
if (hasAssistQueryParams() != other.hasAssistQueryParams()) return false;
if (hasAssistQueryParams()) {
if (!getAssistQueryParams().equals(other.getAssistQueryParams())) return false;
}
if (hasCxParameters() != other.hasCxParameters()) return false;
if (hasCxParameters()) {
if (!getCxParameters().equals(other.getCxParameters())) return false;
}
if (getEnableExtendedStreaming() != other.getEnableExtendedStreaming()) return false;
if (getEnablePartialAutomatedAgentReply() != other.getEnablePartialAutomatedAgentReply())
return false;
if (getEnableDebuggingInfo() != other.getEnableDebuggingInfo()) return false;
if (!getConfigCase().equals(other.getConfigCase())) return false;
switch (configCase_) {
case 2:
if (!getAudioConfig().equals(other.getAudioConfig())) return false;
break;
case 3:
if (!getTextConfig().equals(other.getTextConfig())) return false;
break;
case 0:
default:
}
if (!getInputCase().equals(other.getInputCase())) return false;
switch (inputCase_) {
case 5:
if (!getInputAudio().equals(other.getInputAudio())) return false;
break;
case 6:
if (!getInputText().equals(other.getInputText())) return false;
break;
case 9:
if (!getInputDtmf().equals(other.getInputDtmf())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PARTICIPANT_FIELD_NUMBER;
hash = (53 * hash) + getParticipant().hashCode();
if (hasReplyAudioConfig()) {
hash = (37 * hash) + REPLY_AUDIO_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getReplyAudioConfig().hashCode();
}
if (hasQueryParams()) {
hash = (37 * hash) + QUERY_PARAMS_FIELD_NUMBER;
hash = (53 * hash) + getQueryParams().hashCode();
}
if (hasAssistQueryParams()) {
hash = (37 * hash) + ASSIST_QUERY_PARAMS_FIELD_NUMBER;
hash = (53 * hash) + getAssistQueryParams().hashCode();
}
if (hasCxParameters()) {
hash = (37 * hash) + CX_PARAMETERS_FIELD_NUMBER;
hash = (53 * hash) + getCxParameters().hashCode();
}
hash = (37 * hash) + ENABLE_EXTENDED_STREAMING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableExtendedStreaming());
hash = (37 * hash) + ENABLE_PARTIAL_AUTOMATED_AGENT_REPLY_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashBoolean(getEnablePartialAutomatedAgentReply());
hash = (37 * hash) + ENABLE_DEBUGGING_INFO_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDebuggingInfo());
switch (configCase_) {
case 2:
hash = (37 * hash) + AUDIO_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getAudioConfig().hashCode();
break;
case 3:
hash = (37 * hash) + TEXT_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + getTextConfig().hashCode();
break;
case 0:
default:
}
switch (inputCase_) {
case 5:
hash = (37 * hash) + INPUT_AUDIO_FIELD_NUMBER;
hash = (53 * hash) + getInputAudio().hashCode();
break;
case 6:
hash = (37 * hash) + INPUT_TEXT_FIELD_NUMBER;
hash = (53 * hash) + getInputText().hashCode();
break;
case 9:
hash = (37 * hash) + INPUT_DTMF_FIELD_NUMBER;
hash = (53 * hash) + getInputDtmf().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* The top-level message sent by the client to the
* [Participants.StreamingAnalyzeContent][google.cloud.dialogflow.v2.Participants.StreamingAnalyzeContent]
* method.
*
* Multiple request messages should be sent in order:
*
* 1. The first message must contain
* [participant][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.participant],
* [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config]
* and optionally
* [query_params][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.query_params].
* If you want to receive an audio response, it should also contain
* [reply_audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.reply_audio_config].
* The message must not contain
* [input][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input].
*
* 2. If
* [config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config] in
* the first message
* was set to
* [audio_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.audio_config],
* all subsequent messages must contain
* [input_audio][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_audio]
* to continue with Speech recognition. However, note that:
*
* * Dialogflow will bill you for the audio so far.
* * Dialogflow discards all Speech recognition results in favor of the
* text input.
*
* 3. If
* [StreamingAnalyzeContentRequest.config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.config]
* in the first message was set
* to
* [StreamingAnalyzeContentRequest.text_config][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.text_config],
* then the second message must contain only
* [input_text][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.input_text].
* Moreover, you must not send more than two messages.
*
* After you sent all input, you must half-close or abort the request stream.
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest)
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_StreamingAnalyzeContentRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_StreamingAnalyzeContentRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.class,
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getReplyAudioConfigFieldBuilder();
getQueryParamsFieldBuilder();
getAssistQueryParamsFieldBuilder();
getCxParametersFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
participant_ = "";
if (audioConfigBuilder_ != null) {
audioConfigBuilder_.clear();
}
if (textConfigBuilder_ != null) {
textConfigBuilder_.clear();
}
replyAudioConfig_ = null;
if (replyAudioConfigBuilder_ != null) {
replyAudioConfigBuilder_.dispose();
replyAudioConfigBuilder_ = null;
}
if (inputDtmfBuilder_ != null) {
inputDtmfBuilder_.clear();
}
queryParams_ = null;
if (queryParamsBuilder_ != null) {
queryParamsBuilder_.dispose();
queryParamsBuilder_ = null;
}
assistQueryParams_ = null;
if (assistQueryParamsBuilder_ != null) {
assistQueryParamsBuilder_.dispose();
assistQueryParamsBuilder_ = null;
}
cxParameters_ = null;
if (cxParametersBuilder_ != null) {
cxParametersBuilder_.dispose();
cxParametersBuilder_ = null;
}
enableExtendedStreaming_ = false;
enablePartialAutomatedAgentReply_ = false;
enableDebuggingInfo_ = false;
configCase_ = 0;
config_ = null;
inputCase_ = 0;
input_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_StreamingAnalyzeContentRequest_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest
getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest build() {
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest buildPartial() {
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest result =
new com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.participant_ = participant_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.replyAudioConfig_ =
replyAudioConfigBuilder_ == null ? replyAudioConfig_ : replyAudioConfigBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.queryParams_ =
queryParamsBuilder_ == null ? queryParams_ : queryParamsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.assistQueryParams_ =
assistQueryParamsBuilder_ == null
? assistQueryParams_
: assistQueryParamsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.cxParameters_ =
cxParametersBuilder_ == null ? cxParameters_ : cxParametersBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.enableExtendedStreaming_ = enableExtendedStreaming_;
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.enablePartialAutomatedAgentReply_ = enablePartialAutomatedAgentReply_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.enableDebuggingInfo_ = enableDebuggingInfo_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(
com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest result) {
result.configCase_ = configCase_;
result.config_ = this.config_;
if (configCase_ == 2 && audioConfigBuilder_ != null) {
result.config_ = audioConfigBuilder_.build();
}
if (configCase_ == 3 && textConfigBuilder_ != null) {
result.config_ = textConfigBuilder_.build();
}
result.inputCase_ = inputCase_;
result.input_ = this.input_;
if (inputCase_ == 9 && inputDtmfBuilder_ != null) {
result.input_ = inputDtmfBuilder_.build();
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest) {
return mergeFrom((com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest other) {
if (other
== com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest.getDefaultInstance())
return this;
if (!other.getParticipant().isEmpty()) {
participant_ = other.participant_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.hasReplyAudioConfig()) {
mergeReplyAudioConfig(other.getReplyAudioConfig());
}
if (other.hasQueryParams()) {
mergeQueryParams(other.getQueryParams());
}
if (other.hasAssistQueryParams()) {
mergeAssistQueryParams(other.getAssistQueryParams());
}
if (other.hasCxParameters()) {
mergeCxParameters(other.getCxParameters());
}
if (other.getEnableExtendedStreaming() != false) {
setEnableExtendedStreaming(other.getEnableExtendedStreaming());
}
if (other.getEnablePartialAutomatedAgentReply() != false) {
setEnablePartialAutomatedAgentReply(other.getEnablePartialAutomatedAgentReply());
}
if (other.getEnableDebuggingInfo() != false) {
setEnableDebuggingInfo(other.getEnableDebuggingInfo());
}
switch (other.getConfigCase()) {
case AUDIO_CONFIG:
{
mergeAudioConfig(other.getAudioConfig());
break;
}
case TEXT_CONFIG:
{
mergeTextConfig(other.getTextConfig());
break;
}
case CONFIG_NOT_SET:
{
break;
}
}
switch (other.getInputCase()) {
case INPUT_AUDIO:
{
setInputAudio(other.getInputAudio());
break;
}
case INPUT_TEXT:
{
inputCase_ = 6;
input_ = other.input_;
onChanged();
break;
}
case INPUT_DTMF:
{
mergeInputDtmf(other.getInputDtmf());
break;
}
case INPUT_NOT_SET:
{
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
participant_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(getAudioConfigFieldBuilder().getBuilder(), extensionRegistry);
configCase_ = 2;
break;
} // case 18
case 26:
{
input.readMessage(getTextConfigFieldBuilder().getBuilder(), extensionRegistry);
configCase_ = 3;
break;
} // case 26
case 34:
{
input.readMessage(
getReplyAudioConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 34
case 42:
{
input_ = input.readBytes();
inputCase_ = 5;
break;
} // case 42
case 50:
{
java.lang.String s = input.readStringRequireUtf8();
inputCase_ = 6;
input_ = s;
break;
} // case 50
case 58:
{
input.readMessage(getQueryParamsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 58
case 66:
{
input.readMessage(
getAssistQueryParamsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 66
case 74:
{
input.readMessage(getInputDtmfFieldBuilder().getBuilder(), extensionRegistry);
inputCase_ = 9;
break;
} // case 74
case 88:
{
enableExtendedStreaming_ = input.readBool();
bitField0_ |= 0x00000400;
break;
} // case 88
case 96:
{
enablePartialAutomatedAgentReply_ = input.readBool();
bitField0_ |= 0x00000800;
break;
} // case 96
case 106:
{
input.readMessage(getCxParametersFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000200;
break;
} // case 106
case 152:
{
enableDebuggingInfo_ = input.readBool();
bitField0_ |= 0x00001000;
break;
} // case 152
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int configCase_ = 0;
private java.lang.Object config_;
public ConfigCase getConfigCase() {
return ConfigCase.forNumber(configCase_);
}
public Builder clearConfig() {
configCase_ = 0;
config_ = null;
onChanged();
return this;
}
private int inputCase_ = 0;
private java.lang.Object input_;
public InputCase getInputCase() {
return InputCase.forNumber(inputCase_);
}
public Builder clearInput() {
inputCase_ = 0;
input_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object participant_ = "";
/**
*
*
*
* Required. The name of the participant this text comes from.
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
*
*
*
* string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The participant.
*/
public java.lang.String getParticipant() {
java.lang.Object ref = participant_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
participant_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Required. The name of the participant this text comes from.
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
*
*
*
* string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return The bytes for participant.
*/
public com.google.protobuf.ByteString getParticipantBytes() {
java.lang.Object ref = participant_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
participant_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Required. The name of the participant this text comes from.
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
*
*
*
* string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The participant to set.
* @return This builder for chaining.
*/
public Builder setParticipant(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
participant_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the participant this text comes from.
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
*
*
*
* string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @return This builder for chaining.
*/
public Builder clearParticipant() {
participant_ = getDefaultInstance().getParticipant();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Required. The name of the participant this text comes from.
* Format: `projects/<Project ID>/locations/<Location
* ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
*
*
*
* string participant = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
*
*
* @param value The bytes for participant to set.
* @return This builder for chaining.
*/
public Builder setParticipantBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
participant_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.InputAudioConfig,
com.google.cloud.dialogflow.v2.InputAudioConfig.Builder,
com.google.cloud.dialogflow.v2.InputAudioConfigOrBuilder>
audioConfigBuilder_;
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*
* @return Whether the audioConfig field is set.
*/
@java.lang.Override
public boolean hasAudioConfig() {
return configCase_ == 2;
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*
* @return The audioConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputAudioConfig getAudioConfig() {
if (audioConfigBuilder_ == null) {
if (configCase_ == 2) {
return (com.google.cloud.dialogflow.v2.InputAudioConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputAudioConfig.getDefaultInstance();
} else {
if (configCase_ == 2) {
return audioConfigBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.InputAudioConfig.getDefaultInstance();
}
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
public Builder setAudioConfig(com.google.cloud.dialogflow.v2.InputAudioConfig value) {
if (audioConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
config_ = value;
onChanged();
} else {
audioConfigBuilder_.setMessage(value);
}
configCase_ = 2;
return this;
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
public Builder setAudioConfig(
com.google.cloud.dialogflow.v2.InputAudioConfig.Builder builderForValue) {
if (audioConfigBuilder_ == null) {
config_ = builderForValue.build();
onChanged();
} else {
audioConfigBuilder_.setMessage(builderForValue.build());
}
configCase_ = 2;
return this;
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
public Builder mergeAudioConfig(com.google.cloud.dialogflow.v2.InputAudioConfig value) {
if (audioConfigBuilder_ == null) {
if (configCase_ == 2
&& config_ != com.google.cloud.dialogflow.v2.InputAudioConfig.getDefaultInstance()) {
config_ =
com.google.cloud.dialogflow.v2.InputAudioConfig.newBuilder(
(com.google.cloud.dialogflow.v2.InputAudioConfig) config_)
.mergeFrom(value)
.buildPartial();
} else {
config_ = value;
}
onChanged();
} else {
if (configCase_ == 2) {
audioConfigBuilder_.mergeFrom(value);
} else {
audioConfigBuilder_.setMessage(value);
}
}
configCase_ = 2;
return this;
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
public Builder clearAudioConfig() {
if (audioConfigBuilder_ == null) {
if (configCase_ == 2) {
configCase_ = 0;
config_ = null;
onChanged();
}
} else {
if (configCase_ == 2) {
configCase_ = 0;
config_ = null;
}
audioConfigBuilder_.clear();
}
return this;
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
public com.google.cloud.dialogflow.v2.InputAudioConfig.Builder getAudioConfigBuilder() {
return getAudioConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputAudioConfigOrBuilder getAudioConfigOrBuilder() {
if ((configCase_ == 2) && (audioConfigBuilder_ != null)) {
return audioConfigBuilder_.getMessageOrBuilder();
} else {
if (configCase_ == 2) {
return (com.google.cloud.dialogflow.v2.InputAudioConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputAudioConfig.getDefaultInstance();
}
}
/**
*
*
*
* Instructs the speech recognizer how to process the speech audio.
*
*
* .google.cloud.dialogflow.v2.InputAudioConfig audio_config = 2;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.InputAudioConfig,
com.google.cloud.dialogflow.v2.InputAudioConfig.Builder,
com.google.cloud.dialogflow.v2.InputAudioConfigOrBuilder>
getAudioConfigFieldBuilder() {
if (audioConfigBuilder_ == null) {
if (!(configCase_ == 2)) {
config_ = com.google.cloud.dialogflow.v2.InputAudioConfig.getDefaultInstance();
}
audioConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.InputAudioConfig,
com.google.cloud.dialogflow.v2.InputAudioConfig.Builder,
com.google.cloud.dialogflow.v2.InputAudioConfigOrBuilder>(
(com.google.cloud.dialogflow.v2.InputAudioConfig) config_,
getParentForChildren(),
isClean());
config_ = null;
}
configCase_ = 2;
onChanged();
return audioConfigBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.InputTextConfig,
com.google.cloud.dialogflow.v2.InputTextConfig.Builder,
com.google.cloud.dialogflow.v2.InputTextConfigOrBuilder>
textConfigBuilder_;
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*
* @return Whether the textConfig field is set.
*/
@java.lang.Override
public boolean hasTextConfig() {
return configCase_ == 3;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*
* @return The textConfig.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputTextConfig getTextConfig() {
if (textConfigBuilder_ == null) {
if (configCase_ == 3) {
return (com.google.cloud.dialogflow.v2.InputTextConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputTextConfig.getDefaultInstance();
} else {
if (configCase_ == 3) {
return textConfigBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.InputTextConfig.getDefaultInstance();
}
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
public Builder setTextConfig(com.google.cloud.dialogflow.v2.InputTextConfig value) {
if (textConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
config_ = value;
onChanged();
} else {
textConfigBuilder_.setMessage(value);
}
configCase_ = 3;
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
public Builder setTextConfig(
com.google.cloud.dialogflow.v2.InputTextConfig.Builder builderForValue) {
if (textConfigBuilder_ == null) {
config_ = builderForValue.build();
onChanged();
} else {
textConfigBuilder_.setMessage(builderForValue.build());
}
configCase_ = 3;
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
public Builder mergeTextConfig(com.google.cloud.dialogflow.v2.InputTextConfig value) {
if (textConfigBuilder_ == null) {
if (configCase_ == 3
&& config_ != com.google.cloud.dialogflow.v2.InputTextConfig.getDefaultInstance()) {
config_ =
com.google.cloud.dialogflow.v2.InputTextConfig.newBuilder(
(com.google.cloud.dialogflow.v2.InputTextConfig) config_)
.mergeFrom(value)
.buildPartial();
} else {
config_ = value;
}
onChanged();
} else {
if (configCase_ == 3) {
textConfigBuilder_.mergeFrom(value);
} else {
textConfigBuilder_.setMessage(value);
}
}
configCase_ = 3;
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
public Builder clearTextConfig() {
if (textConfigBuilder_ == null) {
if (configCase_ == 3) {
configCase_ = 0;
config_ = null;
onChanged();
}
} else {
if (configCase_ == 3) {
configCase_ = 0;
config_ = null;
}
textConfigBuilder_.clear();
}
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
public com.google.cloud.dialogflow.v2.InputTextConfig.Builder getTextConfigBuilder() {
return getTextConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.InputTextConfigOrBuilder getTextConfigOrBuilder() {
if ((configCase_ == 3) && (textConfigBuilder_ != null)) {
return textConfigBuilder_.getMessageOrBuilder();
} else {
if (configCase_ == 3) {
return (com.google.cloud.dialogflow.v2.InputTextConfig) config_;
}
return com.google.cloud.dialogflow.v2.InputTextConfig.getDefaultInstance();
}
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.InputTextConfig text_config = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.InputTextConfig,
com.google.cloud.dialogflow.v2.InputTextConfig.Builder,
com.google.cloud.dialogflow.v2.InputTextConfigOrBuilder>
getTextConfigFieldBuilder() {
if (textConfigBuilder_ == null) {
if (!(configCase_ == 3)) {
config_ = com.google.cloud.dialogflow.v2.InputTextConfig.getDefaultInstance();
}
textConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.InputTextConfig,
com.google.cloud.dialogflow.v2.InputTextConfig.Builder,
com.google.cloud.dialogflow.v2.InputTextConfigOrBuilder>(
(com.google.cloud.dialogflow.v2.InputTextConfig) config_,
getParentForChildren(),
isClean());
config_ = null;
}
configCase_ = 3;
onChanged();
return textConfigBuilder_;
}
private com.google.cloud.dialogflow.v2.OutputAudioConfig replyAudioConfig_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.OutputAudioConfig,
com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder,
com.google.cloud.dialogflow.v2.OutputAudioConfigOrBuilder>
replyAudioConfigBuilder_;
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*
* @return Whether the replyAudioConfig field is set.
*/
public boolean hasReplyAudioConfig() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*
* @return The replyAudioConfig.
*/
public com.google.cloud.dialogflow.v2.OutputAudioConfig getReplyAudioConfig() {
if (replyAudioConfigBuilder_ == null) {
return replyAudioConfig_ == null
? com.google.cloud.dialogflow.v2.OutputAudioConfig.getDefaultInstance()
: replyAudioConfig_;
} else {
return replyAudioConfigBuilder_.getMessage();
}
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
public Builder setReplyAudioConfig(com.google.cloud.dialogflow.v2.OutputAudioConfig value) {
if (replyAudioConfigBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
replyAudioConfig_ = value;
} else {
replyAudioConfigBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
public Builder setReplyAudioConfig(
com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder builderForValue) {
if (replyAudioConfigBuilder_ == null) {
replyAudioConfig_ = builderForValue.build();
} else {
replyAudioConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
public Builder mergeReplyAudioConfig(com.google.cloud.dialogflow.v2.OutputAudioConfig value) {
if (replyAudioConfigBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)
&& replyAudioConfig_ != null
&& replyAudioConfig_
!= com.google.cloud.dialogflow.v2.OutputAudioConfig.getDefaultInstance()) {
getReplyAudioConfigBuilder().mergeFrom(value);
} else {
replyAudioConfig_ = value;
}
} else {
replyAudioConfigBuilder_.mergeFrom(value);
}
if (replyAudioConfig_ != null) {
bitField0_ |= 0x00000008;
onChanged();
}
return this;
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
public Builder clearReplyAudioConfig() {
bitField0_ = (bitField0_ & ~0x00000008);
replyAudioConfig_ = null;
if (replyAudioConfigBuilder_ != null) {
replyAudioConfigBuilder_.dispose();
replyAudioConfigBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
public com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder getReplyAudioConfigBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getReplyAudioConfigFieldBuilder().getBuilder();
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
public com.google.cloud.dialogflow.v2.OutputAudioConfigOrBuilder
getReplyAudioConfigOrBuilder() {
if (replyAudioConfigBuilder_ != null) {
return replyAudioConfigBuilder_.getMessageOrBuilder();
} else {
return replyAudioConfig_ == null
? com.google.cloud.dialogflow.v2.OutputAudioConfig.getDefaultInstance()
: replyAudioConfig_;
}
}
/**
*
*
*
* Speech synthesis configuration.
* The speech synthesis settings for a virtual agent that may be configured
* for the associated conversation profile are not used when calling
* StreamingAnalyzeContent. If this configuration is not supplied, speech
* synthesis is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.OutputAudioConfig,
com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder,
com.google.cloud.dialogflow.v2.OutputAudioConfigOrBuilder>
getReplyAudioConfigFieldBuilder() {
if (replyAudioConfigBuilder_ == null) {
replyAudioConfigBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.OutputAudioConfig,
com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder,
com.google.cloud.dialogflow.v2.OutputAudioConfigOrBuilder>(
getReplyAudioConfig(), getParentForChildren(), isClean());
replyAudioConfig_ = null;
}
return replyAudioConfigBuilder_;
}
/**
*
*
*
* The input audio content to be recognized. Must be sent if `audio_config`
* is set in the first message. The complete audio over all streaming
* messages must not exceed 1 minute.
*
*
* bytes input_audio = 5;
*
* @return Whether the inputAudio field is set.
*/
public boolean hasInputAudio() {
return inputCase_ == 5;
}
/**
*
*
*
* The input audio content to be recognized. Must be sent if `audio_config`
* is set in the first message. The complete audio over all streaming
* messages must not exceed 1 minute.
*
*
* bytes input_audio = 5;
*
* @return The inputAudio.
*/
public com.google.protobuf.ByteString getInputAudio() {
if (inputCase_ == 5) {
return (com.google.protobuf.ByteString) input_;
}
return com.google.protobuf.ByteString.EMPTY;
}
/**
*
*
*
* The input audio content to be recognized. Must be sent if `audio_config`
* is set in the first message. The complete audio over all streaming
* messages must not exceed 1 minute.
*
*
* bytes input_audio = 5;
*
* @param value The inputAudio to set.
* @return This builder for chaining.
*/
public Builder setInputAudio(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
inputCase_ = 5;
input_ = value;
onChanged();
return this;
}
/**
*
*
*
* The input audio content to be recognized. Must be sent if `audio_config`
* is set in the first message. The complete audio over all streaming
* messages must not exceed 1 minute.
*
*
* bytes input_audio = 5;
*
* @return This builder for chaining.
*/
public Builder clearInputAudio() {
if (inputCase_ == 5) {
inputCase_ = 0;
input_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @return Whether the inputText field is set.
*/
@java.lang.Override
public boolean hasInputText() {
return inputCase_ == 6;
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @return The inputText.
*/
@java.lang.Override
public java.lang.String getInputText() {
java.lang.Object ref = "";
if (inputCase_ == 6) {
ref = input_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (inputCase_ == 6) {
input_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @return The bytes for inputText.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInputTextBytes() {
java.lang.Object ref = "";
if (inputCase_ == 6) {
ref = input_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
if (inputCase_ == 6) {
input_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @param value The inputText to set.
* @return This builder for chaining.
*/
public Builder setInputText(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
inputCase_ = 6;
input_ = value;
onChanged();
return this;
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @return This builder for chaining.
*/
public Builder clearInputText() {
if (inputCase_ == 6) {
inputCase_ = 0;
input_ = null;
onChanged();
}
return this;
}
/**
*
*
*
* The UTF-8 encoded natural language text to be processed. Must be sent if
* `text_config` is set in the first message. Text length must not exceed
* 256 bytes for virtual agent interactions. The `input_text` field can be
* only sent once, and would cancel the speech recognition if any ongoing.
*
*
* string input_text = 6;
*
* @param value The bytes for inputText to set.
* @return This builder for chaining.
*/
public Builder setInputTextBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
inputCase_ = 6;
input_ = value;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents,
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.Builder,
com.google.cloud.dialogflow.v2.TelephonyDtmfEventsOrBuilder>
inputDtmfBuilder_;
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*
* @return Whether the inputDtmf field is set.
*/
@java.lang.Override
public boolean hasInputDtmf() {
return inputCase_ == 9;
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*
* @return The inputDtmf.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TelephonyDtmfEvents getInputDtmf() {
if (inputDtmfBuilder_ == null) {
if (inputCase_ == 9) {
return (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_;
}
return com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.getDefaultInstance();
} else {
if (inputCase_ == 9) {
return inputDtmfBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.getDefaultInstance();
}
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
public Builder setInputDtmf(com.google.cloud.dialogflow.v2.TelephonyDtmfEvents value) {
if (inputDtmfBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
} else {
inputDtmfBuilder_.setMessage(value);
}
inputCase_ = 9;
return this;
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
public Builder setInputDtmf(
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.Builder builderForValue) {
if (inputDtmfBuilder_ == null) {
input_ = builderForValue.build();
onChanged();
} else {
inputDtmfBuilder_.setMessage(builderForValue.build());
}
inputCase_ = 9;
return this;
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
public Builder mergeInputDtmf(com.google.cloud.dialogflow.v2.TelephonyDtmfEvents value) {
if (inputDtmfBuilder_ == null) {
if (inputCase_ == 9
&& input_ != com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.getDefaultInstance()) {
input_ =
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.newBuilder(
(com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_)
.mergeFrom(value)
.buildPartial();
} else {
input_ = value;
}
onChanged();
} else {
if (inputCase_ == 9) {
inputDtmfBuilder_.mergeFrom(value);
} else {
inputDtmfBuilder_.setMessage(value);
}
}
inputCase_ = 9;
return this;
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
public Builder clearInputDtmf() {
if (inputDtmfBuilder_ == null) {
if (inputCase_ == 9) {
inputCase_ = 0;
input_ = null;
onChanged();
}
} else {
if (inputCase_ == 9) {
inputCase_ = 0;
input_ = null;
}
inputDtmfBuilder_.clear();
}
return this;
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
public com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.Builder getInputDtmfBuilder() {
return getInputDtmfFieldBuilder().getBuilder();
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TelephonyDtmfEventsOrBuilder getInputDtmfOrBuilder() {
if ((inputCase_ == 9) && (inputDtmfBuilder_ != null)) {
return inputDtmfBuilder_.getMessageOrBuilder();
} else {
if (inputCase_ == 9) {
return (com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_;
}
return com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.getDefaultInstance();
}
}
/**
*
*
*
* The DTMF digits used to invoke intent and fill in parameter value.
*
* This input is ignored if the previous response indicated that DTMF input
* is not accepted.
*
*
* .google.cloud.dialogflow.v2.TelephonyDtmfEvents input_dtmf = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents,
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.Builder,
com.google.cloud.dialogflow.v2.TelephonyDtmfEventsOrBuilder>
getInputDtmfFieldBuilder() {
if (inputDtmfBuilder_ == null) {
if (!(inputCase_ == 9)) {
input_ = com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.getDefaultInstance();
}
inputDtmfBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents,
com.google.cloud.dialogflow.v2.TelephonyDtmfEvents.Builder,
com.google.cloud.dialogflow.v2.TelephonyDtmfEventsOrBuilder>(
(com.google.cloud.dialogflow.v2.TelephonyDtmfEvents) input_,
getParentForChildren(),
isClean());
input_ = null;
}
inputCase_ = 9;
onChanged();
return inputDtmfBuilder_;
}
private com.google.cloud.dialogflow.v2.QueryParameters queryParams_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.QueryParameters,
com.google.cloud.dialogflow.v2.QueryParameters.Builder,
com.google.cloud.dialogflow.v2.QueryParametersOrBuilder>
queryParamsBuilder_;
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*
* @return Whether the queryParams field is set.
*/
public boolean hasQueryParams() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*
* @return The queryParams.
*/
public com.google.cloud.dialogflow.v2.QueryParameters getQueryParams() {
if (queryParamsBuilder_ == null) {
return queryParams_ == null
? com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance()
: queryParams_;
} else {
return queryParamsBuilder_.getMessage();
}
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
public Builder setQueryParams(com.google.cloud.dialogflow.v2.QueryParameters value) {
if (queryParamsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
queryParams_ = value;
} else {
queryParamsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
public Builder setQueryParams(
com.google.cloud.dialogflow.v2.QueryParameters.Builder builderForValue) {
if (queryParamsBuilder_ == null) {
queryParams_ = builderForValue.build();
} else {
queryParamsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
public Builder mergeQueryParams(com.google.cloud.dialogflow.v2.QueryParameters value) {
if (queryParamsBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& queryParams_ != null
&& queryParams_
!= com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance()) {
getQueryParamsBuilder().mergeFrom(value);
} else {
queryParams_ = value;
}
} else {
queryParamsBuilder_.mergeFrom(value);
}
if (queryParams_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
public Builder clearQueryParams() {
bitField0_ = (bitField0_ & ~0x00000080);
queryParams_ = null;
if (queryParamsBuilder_ != null) {
queryParamsBuilder_.dispose();
queryParamsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
public com.google.cloud.dialogflow.v2.QueryParameters.Builder getQueryParamsBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getQueryParamsFieldBuilder().getBuilder();
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
public com.google.cloud.dialogflow.v2.QueryParametersOrBuilder getQueryParamsOrBuilder() {
if (queryParamsBuilder_ != null) {
return queryParamsBuilder_.getMessageOrBuilder();
} else {
return queryParams_ == null
? com.google.cloud.dialogflow.v2.QueryParameters.getDefaultInstance()
: queryParams_;
}
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 7;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.QueryParameters,
com.google.cloud.dialogflow.v2.QueryParameters.Builder,
com.google.cloud.dialogflow.v2.QueryParametersOrBuilder>
getQueryParamsFieldBuilder() {
if (queryParamsBuilder_ == null) {
queryParamsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.QueryParameters,
com.google.cloud.dialogflow.v2.QueryParameters.Builder,
com.google.cloud.dialogflow.v2.QueryParametersOrBuilder>(
getQueryParams(), getParentForChildren(), isClean());
queryParams_ = null;
}
return queryParamsBuilder_;
}
private com.google.cloud.dialogflow.v2.AssistQueryParameters assistQueryParams_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.AssistQueryParameters,
com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder,
com.google.cloud.dialogflow.v2.AssistQueryParametersOrBuilder>
assistQueryParamsBuilder_;
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*
* @return Whether the assistQueryParams field is set.
*/
public boolean hasAssistQueryParams() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*
* @return The assistQueryParams.
*/
public com.google.cloud.dialogflow.v2.AssistQueryParameters getAssistQueryParams() {
if (assistQueryParamsBuilder_ == null) {
return assistQueryParams_ == null
? com.google.cloud.dialogflow.v2.AssistQueryParameters.getDefaultInstance()
: assistQueryParams_;
} else {
return assistQueryParamsBuilder_.getMessage();
}
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
public Builder setAssistQueryParams(
com.google.cloud.dialogflow.v2.AssistQueryParameters value) {
if (assistQueryParamsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
assistQueryParams_ = value;
} else {
assistQueryParamsBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
public Builder setAssistQueryParams(
com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder builderForValue) {
if (assistQueryParamsBuilder_ == null) {
assistQueryParams_ = builderForValue.build();
} else {
assistQueryParamsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
public Builder mergeAssistQueryParams(
com.google.cloud.dialogflow.v2.AssistQueryParameters value) {
if (assistQueryParamsBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)
&& assistQueryParams_ != null
&& assistQueryParams_
!= com.google.cloud.dialogflow.v2.AssistQueryParameters.getDefaultInstance()) {
getAssistQueryParamsBuilder().mergeFrom(value);
} else {
assistQueryParams_ = value;
}
} else {
assistQueryParamsBuilder_.mergeFrom(value);
}
if (assistQueryParams_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
public Builder clearAssistQueryParams() {
bitField0_ = (bitField0_ & ~0x00000100);
assistQueryParams_ = null;
if (assistQueryParamsBuilder_ != null) {
assistQueryParamsBuilder_.dispose();
assistQueryParamsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
public com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder
getAssistQueryParamsBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getAssistQueryParamsFieldBuilder().getBuilder();
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
public com.google.cloud.dialogflow.v2.AssistQueryParametersOrBuilder
getAssistQueryParamsOrBuilder() {
if (assistQueryParamsBuilder_ != null) {
return assistQueryParamsBuilder_.getMessageOrBuilder();
} else {
return assistQueryParams_ == null
? com.google.cloud.dialogflow.v2.AssistQueryParameters.getDefaultInstance()
: assistQueryParams_;
}
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.AssistQueryParameters,
com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder,
com.google.cloud.dialogflow.v2.AssistQueryParametersOrBuilder>
getAssistQueryParamsFieldBuilder() {
if (assistQueryParamsBuilder_ == null) {
assistQueryParamsBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.AssistQueryParameters,
com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder,
com.google.cloud.dialogflow.v2.AssistQueryParametersOrBuilder>(
getAssistQueryParams(), getParentForChildren(), isClean());
assistQueryParams_ = null;
}
return assistQueryParamsBuilder_;
}
private com.google.protobuf.Struct cxParameters_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
cxParametersBuilder_;
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*
* @return Whether the cxParameters field is set.
*/
public boolean hasCxParameters() {
return ((bitField0_ & 0x00000200) != 0);
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*
* @return The cxParameters.
*/
public com.google.protobuf.Struct getCxParameters() {
if (cxParametersBuilder_ == null) {
return cxParameters_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: cxParameters_;
} else {
return cxParametersBuilder_.getMessage();
}
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
public Builder setCxParameters(com.google.protobuf.Struct value) {
if (cxParametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cxParameters_ = value;
} else {
cxParametersBuilder_.setMessage(value);
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
public Builder setCxParameters(com.google.protobuf.Struct.Builder builderForValue) {
if (cxParametersBuilder_ == null) {
cxParameters_ = builderForValue.build();
} else {
cxParametersBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
public Builder mergeCxParameters(com.google.protobuf.Struct value) {
if (cxParametersBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)
&& cxParameters_ != null
&& cxParameters_ != com.google.protobuf.Struct.getDefaultInstance()) {
getCxParametersBuilder().mergeFrom(value);
} else {
cxParameters_ = value;
}
} else {
cxParametersBuilder_.mergeFrom(value);
}
if (cxParameters_ != null) {
bitField0_ |= 0x00000200;
onChanged();
}
return this;
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
public Builder clearCxParameters() {
bitField0_ = (bitField0_ & ~0x00000200);
cxParameters_ = null;
if (cxParametersBuilder_ != null) {
cxParametersBuilder_.dispose();
cxParametersBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
public com.google.protobuf.Struct.Builder getCxParametersBuilder() {
bitField0_ |= 0x00000200;
onChanged();
return getCxParametersFieldBuilder().getBuilder();
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() {
if (cxParametersBuilder_ != null) {
return cxParametersBuilder_.getMessageOrBuilder();
} else {
return cxParameters_ == null
? com.google.protobuf.Struct.getDefaultInstance()
: cxParameters_;
}
}
/**
*
*
*
* Additional parameters to be put into Dialogflow CX session parameters. To
* remove a parameter from the session, clients should explicitly set the
* parameter value to null.
*
* Note: this field should only be used if you are connecting to a Dialogflow
* CX agent.
*
*
* .google.protobuf.Struct cx_parameters = 13;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>
getCxParametersFieldBuilder() {
if (cxParametersBuilder_ == null) {
cxParametersBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Struct,
com.google.protobuf.Struct.Builder,
com.google.protobuf.StructOrBuilder>(
getCxParameters(), getParentForChildren(), isClean());
cxParameters_ = null;
}
return cxParametersBuilder_;
}
private boolean enableExtendedStreaming_;
/**
*
*
*
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
*
*
* bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @return The enableExtendedStreaming.
*/
@java.lang.Override
public boolean getEnableExtendedStreaming() {
return enableExtendedStreaming_;
}
/**
*
*
*
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
*
*
* bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @param value The enableExtendedStreaming to set.
* @return This builder for chaining.
*/
public Builder setEnableExtendedStreaming(boolean value) {
enableExtendedStreaming_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Optional. Enable full bidirectional streaming. You can keep streaming the
* audio until timeout, and there's no need to half close the stream to get
* the response.
*
* Restrictions:
*
* - Timeout: 3 mins.
* - Audio Encoding: only supports
* [AudioEncoding.AUDIO_ENCODING_LINEAR_16][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_LINEAR_16]
* and
* [AudioEncoding.AUDIO_ENCODING_MULAW][google.cloud.dialogflow.v2.AudioEncoding.AUDIO_ENCODING_MULAW]
* - Lifecycle: conversation should be in `Assist Stage`, go to
* [Conversation.CreateConversation][] for more information.
*
* InvalidArgument Error will be returned if the one of restriction checks
* failed.
*
* You can find more details in
* https://cloud.google.com/agent-assist/docs/extended-streaming
*
*
* bool enable_extended_streaming = 11 [(.google.api.field_behavior) = OPTIONAL];
*
* @return This builder for chaining.
*/
public Builder clearEnableExtendedStreaming() {
bitField0_ = (bitField0_ & ~0x00000400);
enableExtendedStreaming_ = false;
onChanged();
return this;
}
private boolean enablePartialAutomatedAgentReply_;
/**
*
*
*
* Enable partial virtual agent responses. If this flag is not enabled,
* response stream still contains only one final response even if some
* `Fulfillment`s in Dialogflow virtual agent have been configured to return
* partial responses.
*
*
* bool enable_partial_automated_agent_reply = 12;
*
* @return The enablePartialAutomatedAgentReply.
*/
@java.lang.Override
public boolean getEnablePartialAutomatedAgentReply() {
return enablePartialAutomatedAgentReply_;
}
/**
*
*
*
* Enable partial virtual agent responses. If this flag is not enabled,
* response stream still contains only one final response even if some
* `Fulfillment`s in Dialogflow virtual agent have been configured to return
* partial responses.
*
*
* bool enable_partial_automated_agent_reply = 12;
*
* @param value The enablePartialAutomatedAgentReply to set.
* @return This builder for chaining.
*/
public Builder setEnablePartialAutomatedAgentReply(boolean value) {
enablePartialAutomatedAgentReply_ = value;
bitField0_ |= 0x00000800;
onChanged();
return this;
}
/**
*
*
*
* Enable partial virtual agent responses. If this flag is not enabled,
* response stream still contains only one final response even if some
* `Fulfillment`s in Dialogflow virtual agent have been configured to return
* partial responses.
*
*
* bool enable_partial_automated_agent_reply = 12;
*
* @return This builder for chaining.
*/
public Builder clearEnablePartialAutomatedAgentReply() {
bitField0_ = (bitField0_ & ~0x00000800);
enablePartialAutomatedAgentReply_ = false;
onChanged();
return this;
}
private boolean enableDebuggingInfo_;
/**
*
*
*
* If true, `StreamingAnalyzeContentResponse.debugging_info` will get
* populated.
*
*
* bool enable_debugging_info = 19;
*
* @return The enableDebuggingInfo.
*/
@java.lang.Override
public boolean getEnableDebuggingInfo() {
return enableDebuggingInfo_;
}
/**
*
*
*
* If true, `StreamingAnalyzeContentResponse.debugging_info` will get
* populated.
*
*
* bool enable_debugging_info = 19;
*
* @param value The enableDebuggingInfo to set.
* @return This builder for chaining.
*/
public Builder setEnableDebuggingInfo(boolean value) {
enableDebuggingInfo_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* If true, `StreamingAnalyzeContentResponse.debugging_info` will get
* populated.
*
*
* bool enable_debugging_info = 19;
*
* @return This builder for chaining.
*/
public Builder clearEnableDebuggingInfo() {
bitField0_ = (bitField0_ & ~0x00001000);
enableDebuggingInfo_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest)
private static final com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest();
}
public static com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public StreamingAnalyzeContentRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}