All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest Maven / Gradle / Ivy

There is a newer version: 0.66.0
Show newest version
/*
 * Copyright 2020 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/cx/v3/session.proto

package com.google.cloud.dialogflow.cx.v3;

/**
 *
 *
 * 
 * The top-level message sent by the client to the
 * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent] method.
 * Multiple request messages should be sent in order:
 * 1.  The first message must contain
 * [session][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.session],
 *     [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] plus optionally
 *     [query_params][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_params]. If the client
 *     wants to receive an audio response, it should also contain
 *     [output_audio_config][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.output_audio_config].
 * 2.  If [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] was set to
 *     [query_input.audio.config][google.cloud.dialogflow.cx.v3.AudioInput.config], all subsequent messages
 *     must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3.AudioInput.audio] to continue with
 *     Speech recognition.
 *     If you decide to rather detect an intent from text
 *     input after you already started Speech recognition, please send a message
 *     with [query_input.text][google.cloud.dialogflow.cx.v3.QueryInput.text].
 *     However, note that:
 *     * Dialogflow will bill you for the audio duration so far.
 *     * Dialogflow discards all Speech recognition results in favor of the
 *       input text.
 *     * Dialogflow will use the language code from the first message.
 * After you sent all input, you must half-close or abort the request stream.
 * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} */ public final class StreamingDetectIntentRequest extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) StreamingDetectIntentRequestOrBuilder { private static final long serialVersionUID = 0L; // Use StreamingDetectIntentRequest.newBuilder() to construct. private StreamingDetectIntentRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private StreamingDetectIntentRequest() { session_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new StreamingDetectIntentRequest(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private StreamingDetectIntentRequest( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); session_ = s; break; } case 18: { com.google.cloud.dialogflow.cx.v3.QueryParameters.Builder subBuilder = null; if (queryParams_ != null) { subBuilder = queryParams_.toBuilder(); } queryParams_ = input.readMessage( com.google.cloud.dialogflow.cx.v3.QueryParameters.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(queryParams_); queryParams_ = subBuilder.buildPartial(); } break; } case 26: { com.google.cloud.dialogflow.cx.v3.QueryInput.Builder subBuilder = null; if (queryInput_ != null) { subBuilder = queryInput_.toBuilder(); } queryInput_ = input.readMessage( com.google.cloud.dialogflow.cx.v3.QueryInput.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(queryInput_); queryInput_ = subBuilder.buildPartial(); } break; } case 34: { com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.Builder subBuilder = null; if (outputAudioConfig_ != null) { subBuilder = outputAudioConfig_.toBuilder(); } outputAudioConfig_ = input.readMessage( com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(outputAudioConfig_); outputAudioConfig_ = subBuilder.buildPartial(); } break; } case 40: { enablePartialResponse_ = input.readBool(); break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.SessionProto .internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.SessionProto .internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.class, com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.Builder.class); } public static final int SESSION_FIELD_NUMBER = 1; private volatile java.lang.Object session_; /** * * *
   * The name of the session this query is sent to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
   * If `Environment ID` is not specified, we assume default 'draft'
   * environment.
   * It's up to the API caller to choose an appropriate `Session ID`. It can be
   * a random number or some type of session identifiers (preferably hashed).
   * The length of the `Session ID` must not exceed 36 characters.
   * Note: session must be set in the first request.
   * For more information, see the [sessions
   * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
   * Note: Always use agent versions for production traffic.
   * See [Versions and
   * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
   * 
* * string session = 1 [(.google.api.resource_reference) = { ... } * * @return The session. */ @java.lang.Override public java.lang.String getSession() { java.lang.Object ref = session_; 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(); session_ = s; return s; } } /** * * *
   * The name of the session this query is sent to.
   * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
   * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
   * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
   * If `Environment ID` is not specified, we assume default 'draft'
   * environment.
   * It's up to the API caller to choose an appropriate `Session ID`. It can be
   * a random number or some type of session identifiers (preferably hashed).
   * The length of the `Session ID` must not exceed 36 characters.
   * Note: session must be set in the first request.
   * For more information, see the [sessions
   * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
   * Note: Always use agent versions for production traffic.
   * See [Versions and
   * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
   * 
* * string session = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for session. */ @java.lang.Override public com.google.protobuf.ByteString getSessionBytes() { java.lang.Object ref = session_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); session_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int QUERY_PARAMS_FIELD_NUMBER = 2; private com.google.cloud.dialogflow.cx.v3.QueryParameters queryParams_; /** * * *
   * The parameters of this query.
   * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; * * @return Whether the queryParams field is set. */ @java.lang.Override public boolean hasQueryParams() { return queryParams_ != null; } /** * * *
   * The parameters of this query.
   * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; * * @return The queryParams. */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.QueryParameters getQueryParams() { return queryParams_ == null ? com.google.cloud.dialogflow.cx.v3.QueryParameters.getDefaultInstance() : queryParams_; } /** * * *
   * The parameters of this query.
   * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.QueryParametersOrBuilder getQueryParamsOrBuilder() { return getQueryParams(); } public static final int QUERY_INPUT_FIELD_NUMBER = 3; private com.google.cloud.dialogflow.cx.v3.QueryInput queryInput_; /** * * *
   * Required. The input specification.
   * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the queryInput field is set. */ @java.lang.Override public boolean hasQueryInput() { return queryInput_ != null; } /** * * *
   * Required. The input specification.
   * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The queryInput. */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.QueryInput getQueryInput() { return queryInput_ == null ? com.google.cloud.dialogflow.cx.v3.QueryInput.getDefaultInstance() : queryInput_; } /** * * *
   * Required. The input specification.
   * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder getQueryInputOrBuilder() { return getQueryInput(); } public static final int OUTPUT_AUDIO_CONFIG_FIELD_NUMBER = 4; private com.google.cloud.dialogflow.cx.v3.OutputAudioConfig outputAudioConfig_; /** * * *
   * Instructs the speech synthesizer how to generate the output audio.
   * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; * * @return Whether the outputAudioConfig field is set. */ @java.lang.Override public boolean hasOutputAudioConfig() { return outputAudioConfig_ != null; } /** * * *
   * Instructs the speech synthesizer how to generate the output audio.
   * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; * * @return The outputAudioConfig. */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.OutputAudioConfig getOutputAudioConfig() { return outputAudioConfig_ == null ? com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.getDefaultInstance() : outputAudioConfig_; } /** * * *
   * Instructs the speech synthesizer how to generate the output audio.
   * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ @java.lang.Override public com.google.cloud.dialogflow.cx.v3.OutputAudioConfigOrBuilder getOutputAudioConfigOrBuilder() { return getOutputAudioConfig(); } public static final int ENABLE_PARTIAL_RESPONSE_FIELD_NUMBER = 5; private boolean enablePartialResponse_; /** * * *
   * Enable partial detect intent response. If this flag is not enabled,
   * response stream still contains only one final `DetectIntentResponse` even
   * if some `Fulfillment`s in the agent have been configured to return partial
   * responses.
   * 
* * bool enable_partial_response = 5; * * @return The enablePartialResponse. */ @java.lang.Override public boolean getEnablePartialResponse() { return enablePartialResponse_; } 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 (!getSessionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, session_); } if (queryParams_ != null) { output.writeMessage(2, getQueryParams()); } if (queryInput_ != null) { output.writeMessage(3, getQueryInput()); } if (outputAudioConfig_ != null) { output.writeMessage(4, getOutputAudioConfig()); } if (enablePartialResponse_ != false) { output.writeBool(5, enablePartialResponse_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getSessionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, session_); } if (queryParams_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQueryParams()); } if (queryInput_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getQueryInput()); } if (outputAudioConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getOutputAudioConfig()); } if (enablePartialResponse_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, enablePartialResponse_); } size += unknownFields.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.cx.v3.StreamingDetectIntentRequest)) { return super.equals(obj); } com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest other = (com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) obj; if (!getSession().equals(other.getSession())) return false; if (hasQueryParams() != other.hasQueryParams()) return false; if (hasQueryParams()) { if (!getQueryParams().equals(other.getQueryParams())) return false; } if (hasQueryInput() != other.hasQueryInput()) return false; if (hasQueryInput()) { if (!getQueryInput().equals(other.getQueryInput())) return false; } if (hasOutputAudioConfig() != other.hasOutputAudioConfig()) return false; if (hasOutputAudioConfig()) { if (!getOutputAudioConfig().equals(other.getOutputAudioConfig())) return false; } if (getEnablePartialResponse() != other.getEnablePartialResponse()) return false; if (!unknownFields.equals(other.unknownFields)) 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) + SESSION_FIELD_NUMBER; hash = (53 * hash) + getSession().hashCode(); if (hasQueryParams()) { hash = (37 * hash) + QUERY_PARAMS_FIELD_NUMBER; hash = (53 * hash) + getQueryParams().hashCode(); } if (hasQueryInput()) { hash = (37 * hash) + QUERY_INPUT_FIELD_NUMBER; hash = (53 * hash) + getQueryInput().hashCode(); } if (hasOutputAudioConfig()) { hash = (37 * hash) + OUTPUT_AUDIO_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getOutputAudioConfig().hashCode(); } hash = (37 * hash) + ENABLE_PARTIAL_RESPONSE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnablePartialResponse()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest 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.cx.v3.StreamingDetectIntentRequest parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest 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.cx.v3.StreamingDetectIntentRequest parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest 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.cx.v3.StreamingDetectIntentRequest parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest 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.cx.v3.StreamingDetectIntentRequest parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest 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.cx.v3.StreamingDetectIntentRequest 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
   * [Sessions.StreamingDetectIntent][google.cloud.dialogflow.cx.v3.Sessions.StreamingDetectIntent] method.
   * Multiple request messages should be sent in order:
   * 1.  The first message must contain
   * [session][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.session],
   *     [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] plus optionally
   *     [query_params][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_params]. If the client
   *     wants to receive an audio response, it should also contain
   *     [output_audio_config][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.output_audio_config].
   * 2.  If [query_input][google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.query_input] was set to
   *     [query_input.audio.config][google.cloud.dialogflow.cx.v3.AudioInput.config], all subsequent messages
   *     must contain [query_input.audio.audio][google.cloud.dialogflow.cx.v3.AudioInput.audio] to continue with
   *     Speech recognition.
   *     If you decide to rather detect an intent from text
   *     input after you already started Speech recognition, please send a message
   *     with [query_input.text][google.cloud.dialogflow.cx.v3.QueryInput.text].
   *     However, note that:
   *     * Dialogflow will bill you for the audio duration so far.
   *     * Dialogflow discards all Speech recognition results in favor of the
   *       input text.
   *     * Dialogflow will use the language code from the first message.
   * After you sent all input, you must half-close or abort the request stream.
   * 
* * Protobuf type {@code google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequestOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.dialogflow.cx.v3.SessionProto .internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.dialogflow.cx.v3.SessionProto .internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.class, com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.Builder.class); } // Construct using com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); session_ = ""; if (queryParamsBuilder_ == null) { queryParams_ = null; } else { queryParams_ = null; queryParamsBuilder_ = null; } if (queryInputBuilder_ == null) { queryInput_ = null; } else { queryInput_ = null; queryInputBuilder_ = null; } if (outputAudioConfigBuilder_ == null) { outputAudioConfig_ = null; } else { outputAudioConfig_ = null; outputAudioConfigBuilder_ = null; } enablePartialResponse_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.dialogflow.cx.v3.SessionProto .internal_static_google_cloud_dialogflow_cx_v3_StreamingDetectIntentRequest_descriptor; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest getDefaultInstanceForType() { return com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.getDefaultInstance(); } @java.lang.Override public com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest build() { com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest buildPartial() { com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest result = new com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(this); result.session_ = session_; if (queryParamsBuilder_ == null) { result.queryParams_ = queryParams_; } else { result.queryParams_ = queryParamsBuilder_.build(); } if (queryInputBuilder_ == null) { result.queryInput_ = queryInput_; } else { result.queryInput_ = queryInputBuilder_.build(); } if (outputAudioConfigBuilder_ == null) { result.outputAudioConfig_ = outputAudioConfig_; } else { result.outputAudioConfig_ = outputAudioConfigBuilder_.build(); } result.enablePartialResponse_ = enablePartialResponse_; onBuilt(); return result; } @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.cx.v3.StreamingDetectIntentRequest) { return mergeFrom((com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest other) { if (other == com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest.getDefaultInstance()) return this; if (!other.getSession().isEmpty()) { session_ = other.session_; onChanged(); } if (other.hasQueryParams()) { mergeQueryParams(other.getQueryParams()); } if (other.hasQueryInput()) { mergeQueryInput(other.getQueryInput()); } if (other.hasOutputAudioConfig()) { mergeOutputAudioConfig(other.getOutputAudioConfig()); } if (other.getEnablePartialResponse() != false) { setEnablePartialResponse(other.getEnablePartialResponse()); } this.mergeUnknownFields(other.unknownFields); 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 { com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object session_ = ""; /** * * *
     * The name of the session this query is sent to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
     * If `Environment ID` is not specified, we assume default 'draft'
     * environment.
     * It's up to the API caller to choose an appropriate `Session ID`. It can be
     * a random number or some type of session identifiers (preferably hashed).
     * The length of the `Session ID` must not exceed 36 characters.
     * Note: session must be set in the first request.
     * For more information, see the [sessions
     * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
     * Note: Always use agent versions for production traffic.
     * See [Versions and
     * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
     * 
* * string session = 1 [(.google.api.resource_reference) = { ... } * * @return The session. */ public java.lang.String getSession() { java.lang.Object ref = session_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); session_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The name of the session this query is sent to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
     * If `Environment ID` is not specified, we assume default 'draft'
     * environment.
     * It's up to the API caller to choose an appropriate `Session ID`. It can be
     * a random number or some type of session identifiers (preferably hashed).
     * The length of the `Session ID` must not exceed 36 characters.
     * Note: session must be set in the first request.
     * For more information, see the [sessions
     * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
     * Note: Always use agent versions for production traffic.
     * See [Versions and
     * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
     * 
* * string session = 1 [(.google.api.resource_reference) = { ... } * * @return The bytes for session. */ public com.google.protobuf.ByteString getSessionBytes() { java.lang.Object ref = session_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); session_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * The name of the session this query is sent to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
     * If `Environment ID` is not specified, we assume default 'draft'
     * environment.
     * It's up to the API caller to choose an appropriate `Session ID`. It can be
     * a random number or some type of session identifiers (preferably hashed).
     * The length of the `Session ID` must not exceed 36 characters.
     * Note: session must be set in the first request.
     * For more information, see the [sessions
     * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
     * Note: Always use agent versions for production traffic.
     * See [Versions and
     * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
     * 
* * string session = 1 [(.google.api.resource_reference) = { ... } * * @param value The session to set. * @return This builder for chaining. */ public Builder setSession(java.lang.String value) { if (value == null) { throw new NullPointerException(); } session_ = value; onChanged(); return this; } /** * * *
     * The name of the session this query is sent to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
     * If `Environment ID` is not specified, we assume default 'draft'
     * environment.
     * It's up to the API caller to choose an appropriate `Session ID`. It can be
     * a random number or some type of session identifiers (preferably hashed).
     * The length of the `Session ID` must not exceed 36 characters.
     * Note: session must be set in the first request.
     * For more information, see the [sessions
     * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
     * Note: Always use agent versions for production traffic.
     * See [Versions and
     * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
     * 
* * string session = 1 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearSession() { session_ = getDefaultInstance().getSession(); onChanged(); return this; } /** * * *
     * The name of the session this query is sent to.
     * Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
     * ID>/sessions/<Session ID>` or `projects/<Project ID>/locations/<Location
     * ID>/agents/<Agent ID>/environments/<Environment ID>/sessions/<Session ID>`.
     * If `Environment ID` is not specified, we assume default 'draft'
     * environment.
     * It's up to the API caller to choose an appropriate `Session ID`. It can be
     * a random number or some type of session identifiers (preferably hashed).
     * The length of the `Session ID` must not exceed 36 characters.
     * Note: session must be set in the first request.
     * For more information, see the [sessions
     * guide](https://cloud.google.com/dialogflow/cx/docs/concept/session).
     * Note: Always use agent versions for production traffic.
     * See [Versions and
     * environments](https://cloud.google.com/dialogflow/cx/docs/concept/version).
     * 
* * string session = 1 [(.google.api.resource_reference) = { ... } * * @param value The bytes for session to set. * @return This builder for chaining. */ public Builder setSessionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); session_ = value; onChanged(); return this; } private com.google.cloud.dialogflow.cx.v3.QueryParameters queryParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.QueryParameters, com.google.cloud.dialogflow.cx.v3.QueryParameters.Builder, com.google.cloud.dialogflow.cx.v3.QueryParametersOrBuilder> queryParamsBuilder_; /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; * * @return Whether the queryParams field is set. */ public boolean hasQueryParams() { return queryParamsBuilder_ != null || queryParams_ != null; } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; * * @return The queryParams. */ public com.google.cloud.dialogflow.cx.v3.QueryParameters getQueryParams() { if (queryParamsBuilder_ == null) { return queryParams_ == null ? com.google.cloud.dialogflow.cx.v3.QueryParameters.getDefaultInstance() : queryParams_; } else { return queryParamsBuilder_.getMessage(); } } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ public Builder setQueryParams(com.google.cloud.dialogflow.cx.v3.QueryParameters value) { if (queryParamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } queryParams_ = value; onChanged(); } else { queryParamsBuilder_.setMessage(value); } return this; } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ public Builder setQueryParams( com.google.cloud.dialogflow.cx.v3.QueryParameters.Builder builderForValue) { if (queryParamsBuilder_ == null) { queryParams_ = builderForValue.build(); onChanged(); } else { queryParamsBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ public Builder mergeQueryParams(com.google.cloud.dialogflow.cx.v3.QueryParameters value) { if (queryParamsBuilder_ == null) { if (queryParams_ != null) { queryParams_ = com.google.cloud.dialogflow.cx.v3.QueryParameters.newBuilder(queryParams_) .mergeFrom(value) .buildPartial(); } else { queryParams_ = value; } onChanged(); } else { queryParamsBuilder_.mergeFrom(value); } return this; } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ public Builder clearQueryParams() { if (queryParamsBuilder_ == null) { queryParams_ = null; onChanged(); } else { queryParams_ = null; queryParamsBuilder_ = null; } return this; } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ public com.google.cloud.dialogflow.cx.v3.QueryParameters.Builder getQueryParamsBuilder() { onChanged(); return getQueryParamsFieldBuilder().getBuilder(); } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ public com.google.cloud.dialogflow.cx.v3.QueryParametersOrBuilder getQueryParamsOrBuilder() { if (queryParamsBuilder_ != null) { return queryParamsBuilder_.getMessageOrBuilder(); } else { return queryParams_ == null ? com.google.cloud.dialogflow.cx.v3.QueryParameters.getDefaultInstance() : queryParams_; } } /** * * *
     * The parameters of this query.
     * 
* * .google.cloud.dialogflow.cx.v3.QueryParameters query_params = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.QueryParameters, com.google.cloud.dialogflow.cx.v3.QueryParameters.Builder, com.google.cloud.dialogflow.cx.v3.QueryParametersOrBuilder> getQueryParamsFieldBuilder() { if (queryParamsBuilder_ == null) { queryParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.QueryParameters, com.google.cloud.dialogflow.cx.v3.QueryParameters.Builder, com.google.cloud.dialogflow.cx.v3.QueryParametersOrBuilder>( getQueryParams(), getParentForChildren(), isClean()); queryParams_ = null; } return queryParamsBuilder_; } private com.google.cloud.dialogflow.cx.v3.QueryInput queryInput_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.QueryInput, com.google.cloud.dialogflow.cx.v3.QueryInput.Builder, com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder> queryInputBuilder_; /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return Whether the queryInput field is set. */ public boolean hasQueryInput() { return queryInputBuilder_ != null || queryInput_ != null; } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * * * @return The queryInput. */ public com.google.cloud.dialogflow.cx.v3.QueryInput getQueryInput() { if (queryInputBuilder_ == null) { return queryInput_ == null ? com.google.cloud.dialogflow.cx.v3.QueryInput.getDefaultInstance() : queryInput_; } else { return queryInputBuilder_.getMessage(); } } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setQueryInput(com.google.cloud.dialogflow.cx.v3.QueryInput value) { if (queryInputBuilder_ == null) { if (value == null) { throw new NullPointerException(); } queryInput_ = value; onChanged(); } else { queryInputBuilder_.setMessage(value); } return this; } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder setQueryInput( com.google.cloud.dialogflow.cx.v3.QueryInput.Builder builderForValue) { if (queryInputBuilder_ == null) { queryInput_ = builderForValue.build(); onChanged(); } else { queryInputBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder mergeQueryInput(com.google.cloud.dialogflow.cx.v3.QueryInput value) { if (queryInputBuilder_ == null) { if (queryInput_ != null) { queryInput_ = com.google.cloud.dialogflow.cx.v3.QueryInput.newBuilder(queryInput_) .mergeFrom(value) .buildPartial(); } else { queryInput_ = value; } onChanged(); } else { queryInputBuilder_.mergeFrom(value); } return this; } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ public Builder clearQueryInput() { if (queryInputBuilder_ == null) { queryInput_ = null; onChanged(); } else { queryInput_ = null; queryInputBuilder_ = null; } return this; } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.dialogflow.cx.v3.QueryInput.Builder getQueryInputBuilder() { onChanged(); return getQueryInputFieldBuilder().getBuilder(); } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ public com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder getQueryInputOrBuilder() { if (queryInputBuilder_ != null) { return queryInputBuilder_.getMessageOrBuilder(); } else { return queryInput_ == null ? com.google.cloud.dialogflow.cx.v3.QueryInput.getDefaultInstance() : queryInput_; } } /** * * *
     * Required. The input specification.
     * 
* * * .google.cloud.dialogflow.cx.v3.QueryInput query_input = 3 [(.google.api.field_behavior) = REQUIRED]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.QueryInput, com.google.cloud.dialogflow.cx.v3.QueryInput.Builder, com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder> getQueryInputFieldBuilder() { if (queryInputBuilder_ == null) { queryInputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.QueryInput, com.google.cloud.dialogflow.cx.v3.QueryInput.Builder, com.google.cloud.dialogflow.cx.v3.QueryInputOrBuilder>( getQueryInput(), getParentForChildren(), isClean()); queryInput_ = null; } return queryInputBuilder_; } private com.google.cloud.dialogflow.cx.v3.OutputAudioConfig outputAudioConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.OutputAudioConfig, com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.Builder, com.google.cloud.dialogflow.cx.v3.OutputAudioConfigOrBuilder> outputAudioConfigBuilder_; /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; * * @return Whether the outputAudioConfig field is set. */ public boolean hasOutputAudioConfig() { return outputAudioConfigBuilder_ != null || outputAudioConfig_ != null; } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; * * @return The outputAudioConfig. */ public com.google.cloud.dialogflow.cx.v3.OutputAudioConfig getOutputAudioConfig() { if (outputAudioConfigBuilder_ == null) { return outputAudioConfig_ == null ? com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.getDefaultInstance() : outputAudioConfig_; } else { return outputAudioConfigBuilder_.getMessage(); } } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ public Builder setOutputAudioConfig(com.google.cloud.dialogflow.cx.v3.OutputAudioConfig value) { if (outputAudioConfigBuilder_ == null) { if (value == null) { throw new NullPointerException(); } outputAudioConfig_ = value; onChanged(); } else { outputAudioConfigBuilder_.setMessage(value); } return this; } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ public Builder setOutputAudioConfig( com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.Builder builderForValue) { if (outputAudioConfigBuilder_ == null) { outputAudioConfig_ = builderForValue.build(); onChanged(); } else { outputAudioConfigBuilder_.setMessage(builderForValue.build()); } return this; } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ public Builder mergeOutputAudioConfig( com.google.cloud.dialogflow.cx.v3.OutputAudioConfig value) { if (outputAudioConfigBuilder_ == null) { if (outputAudioConfig_ != null) { outputAudioConfig_ = com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.newBuilder(outputAudioConfig_) .mergeFrom(value) .buildPartial(); } else { outputAudioConfig_ = value; } onChanged(); } else { outputAudioConfigBuilder_.mergeFrom(value); } return this; } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ public Builder clearOutputAudioConfig() { if (outputAudioConfigBuilder_ == null) { outputAudioConfig_ = null; onChanged(); } else { outputAudioConfig_ = null; outputAudioConfigBuilder_ = null; } return this; } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ public com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.Builder getOutputAudioConfigBuilder() { onChanged(); return getOutputAudioConfigFieldBuilder().getBuilder(); } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ public com.google.cloud.dialogflow.cx.v3.OutputAudioConfigOrBuilder getOutputAudioConfigOrBuilder() { if (outputAudioConfigBuilder_ != null) { return outputAudioConfigBuilder_.getMessageOrBuilder(); } else { return outputAudioConfig_ == null ? com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.getDefaultInstance() : outputAudioConfig_; } } /** * * *
     * Instructs the speech synthesizer how to generate the output audio.
     * 
* * .google.cloud.dialogflow.cx.v3.OutputAudioConfig output_audio_config = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.OutputAudioConfig, com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.Builder, com.google.cloud.dialogflow.cx.v3.OutputAudioConfigOrBuilder> getOutputAudioConfigFieldBuilder() { if (outputAudioConfigBuilder_ == null) { outputAudioConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.dialogflow.cx.v3.OutputAudioConfig, com.google.cloud.dialogflow.cx.v3.OutputAudioConfig.Builder, com.google.cloud.dialogflow.cx.v3.OutputAudioConfigOrBuilder>( getOutputAudioConfig(), getParentForChildren(), isClean()); outputAudioConfig_ = null; } return outputAudioConfigBuilder_; } private boolean enablePartialResponse_; /** * * *
     * Enable partial detect intent response. If this flag is not enabled,
     * response stream still contains only one final `DetectIntentResponse` even
     * if some `Fulfillment`s in the agent have been configured to return partial
     * responses.
     * 
* * bool enable_partial_response = 5; * * @return The enablePartialResponse. */ @java.lang.Override public boolean getEnablePartialResponse() { return enablePartialResponse_; } /** * * *
     * Enable partial detect intent response. If this flag is not enabled,
     * response stream still contains only one final `DetectIntentResponse` even
     * if some `Fulfillment`s in the agent have been configured to return partial
     * responses.
     * 
* * bool enable_partial_response = 5; * * @param value The enablePartialResponse to set. * @return This builder for chaining. */ public Builder setEnablePartialResponse(boolean value) { enablePartialResponse_ = value; onChanged(); return this; } /** * * *
     * Enable partial detect intent response. If this flag is not enabled,
     * response stream still contains only one final `DetectIntentResponse` even
     * if some `Fulfillment`s in the agent have been configured to return partial
     * responses.
     * 
* * bool enable_partial_response = 5; * * @return This builder for chaining. */ public Builder clearEnablePartialResponse() { enablePartialResponse_ = 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.cx.v3.StreamingDetectIntentRequest) } // @@protoc_insertion_point(class_scope:google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest) private static final com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest(); } public static com.google.cloud.dialogflow.cx.v3.StreamingDetectIntentRequest getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public StreamingDetectIntentRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new StreamingDetectIntentRequest(input, extensionRegistry); } }; 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.cx.v3.StreamingDetectIntentRequest getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy