com.google.cloud.dialogflow.v2.AnalyzeContentRequest 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 request message for
* [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.AnalyzeContentRequest}
*/
public final class AnalyzeContentRequest extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.dialogflow.v2.AnalyzeContentRequest)
AnalyzeContentRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnalyzeContentRequest.newBuilder() to construct.
private AnalyzeContentRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AnalyzeContentRequest() {
participant_ = "";
requestId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new AnalyzeContentRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_AnalyzeContentRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_AnalyzeContentRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.AnalyzeContentRequest.class,
com.google.cloud.dialogflow.v2.AnalyzeContentRequest.Builder.class);
}
private int bitField0_;
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 {
TEXT_INPUT(6),
EVENT_INPUT(8),
SUGGESTION_INPUT(12),
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 6:
return TEXT_INPUT;
case 8:
return EVENT_INPUT;
case 12:
return SUGGESTION_INPUT;
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 TEXT_INPUT_FIELD_NUMBER = 6;
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*
* @return Whether the textInput field is set.
*/
@java.lang.Override
public boolean hasTextInput() {
return inputCase_ == 6;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*
* @return The textInput.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TextInput getTextInput() {
if (inputCase_ == 6) {
return (com.google.cloud.dialogflow.v2.TextInput) input_;
}
return com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance();
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TextInputOrBuilder getTextInputOrBuilder() {
if (inputCase_ == 6) {
return (com.google.cloud.dialogflow.v2.TextInput) input_;
}
return com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance();
}
public static final int EVENT_INPUT_FIELD_NUMBER = 8;
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*
* @return Whether the eventInput field is set.
*/
@java.lang.Override
public boolean hasEventInput() {
return inputCase_ == 8;
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*
* @return The eventInput.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.EventInput getEventInput() {
if (inputCase_ == 8) {
return (com.google.cloud.dialogflow.v2.EventInput) input_;
}
return com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance();
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.EventInputOrBuilder getEventInputOrBuilder() {
if (inputCase_ == 8) {
return (com.google.cloud.dialogflow.v2.EventInput) input_;
}
return com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance();
}
public static final int SUGGESTION_INPUT_FIELD_NUMBER = 12;
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*
* @return Whether the suggestionInput field is set.
*/
@java.lang.Override
public boolean hasSuggestionInput() {
return inputCase_ == 12;
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*
* @return The suggestionInput.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.SuggestionInput getSuggestionInput() {
if (inputCase_ == 12) {
return (com.google.cloud.dialogflow.v2.SuggestionInput) input_;
}
return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance();
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder getSuggestionInputOrBuilder() {
if (inputCase_ == 12) {
return (com.google.cloud.dialogflow.v2.SuggestionInput) input_;
}
return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance();
}
public static final int REPLY_AUDIO_CONFIG_FIELD_NUMBER = 5;
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*
* @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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*
* @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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
@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 QUERY_PARAMS_FIELD_NUMBER = 9;
private com.google.cloud.dialogflow.v2.QueryParameters queryParams_;
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 9;
*
* @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 = 9;
*
* @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 = 9;
*/
@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 = 14;
private com.google.cloud.dialogflow.v2.AssistQueryParameters assistQueryParams_;
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14;
*
* @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 = 14;
*
* @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 = 14;
*/
@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 = 18;
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 = 18;
*
* @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 = 18;
*
* @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 = 18;
*/
@java.lang.Override
public com.google.protobuf.StructOrBuilder getCxParametersOrBuilder() {
return cxParameters_ == null ? com.google.protobuf.Struct.getDefaultInstance() : cxParameters_;
}
public static final int REQUEST_ID_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object requestId_ = "";
/**
*
*
*
* A unique identifier for this request. Restricted to 36 ASCII characters.
* A random UUID is recommended.
* This request is only idempotent if a `request_id` is provided.
*
*
* string request_id = 11;
*
* @return The requestId.
*/
@java.lang.Override
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
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();
requestId_ = s;
return s;
}
}
/**
*
*
*
* A unique identifier for this request. Restricted to 36 ASCII characters.
* A random UUID is recommended.
* This request is only idempotent if a `request_id` is provided.
*
*
* string request_id = 11;
*
* @return The bytes for requestId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(5, getReplyAudioConfig());
}
if (inputCase_ == 6) {
output.writeMessage(6, (com.google.cloud.dialogflow.v2.TextInput) input_);
}
if (inputCase_ == 8) {
output.writeMessage(8, (com.google.cloud.dialogflow.v2.EventInput) input_);
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(9, getQueryParams());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, requestId_);
}
if (inputCase_ == 12) {
output.writeMessage(12, (com.google.cloud.dialogflow.v2.SuggestionInput) input_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(14, getAssistQueryParams());
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(18, getCxParameters());
}
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 (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReplyAudioConfig());
}
if (inputCase_ == 6) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
6, (com.google.cloud.dialogflow.v2.TextInput) input_);
}
if (inputCase_ == 8) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
8, (com.google.cloud.dialogflow.v2.EventInput) input_);
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getQueryParams());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(requestId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, requestId_);
}
if (inputCase_ == 12) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
12, (com.google.cloud.dialogflow.v2.SuggestionInput) input_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(14, getAssistQueryParams());
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(18, getCxParameters());
}
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.AnalyzeContentRequest)) {
return super.equals(obj);
}
com.google.cloud.dialogflow.v2.AnalyzeContentRequest other =
(com.google.cloud.dialogflow.v2.AnalyzeContentRequest) 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 (!getRequestId().equals(other.getRequestId())) return false;
if (!getInputCase().equals(other.getInputCase())) return false;
switch (inputCase_) {
case 6:
if (!getTextInput().equals(other.getTextInput())) return false;
break;
case 8:
if (!getEventInput().equals(other.getEventInput())) return false;
break;
case 12:
if (!getSuggestionInput().equals(other.getSuggestionInput())) 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) + REQUEST_ID_FIELD_NUMBER;
hash = (53 * hash) + getRequestId().hashCode();
switch (inputCase_) {
case 6:
hash = (37 * hash) + TEXT_INPUT_FIELD_NUMBER;
hash = (53 * hash) + getTextInput().hashCode();
break;
case 8:
hash = (37 * hash) + EVENT_INPUT_FIELD_NUMBER;
hash = (53 * hash) + getEventInput().hashCode();
break;
case 12:
hash = (37 * hash) + SUGGESTION_INPUT_FIELD_NUMBER;
hash = (53 * hash) + getSuggestionInput().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.dialogflow.v2.AnalyzeContentRequest parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.AnalyzeContentRequest 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.AnalyzeContentRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.AnalyzeContentRequest 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.AnalyzeContentRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.dialogflow.v2.AnalyzeContentRequest 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.AnalyzeContentRequest parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.AnalyzeContentRequest 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.AnalyzeContentRequest parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.dialogflow.v2.AnalyzeContentRequest 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.AnalyzeContentRequest 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.AnalyzeContentRequest 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.AnalyzeContentRequest 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 request message for
* [Participants.AnalyzeContent][google.cloud.dialogflow.v2.Participants.AnalyzeContent].
*
*
* Protobuf type {@code google.cloud.dialogflow.v2.AnalyzeContentRequest}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.dialogflow.v2.AnalyzeContentRequest)
com.google.cloud.dialogflow.v2.AnalyzeContentRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_AnalyzeContentRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.dialogflow.v2.ParticipantProto
.internal_static_google_cloud_dialogflow_v2_AnalyzeContentRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.dialogflow.v2.AnalyzeContentRequest.class,
com.google.cloud.dialogflow.v2.AnalyzeContentRequest.Builder.class);
}
// Construct using com.google.cloud.dialogflow.v2.AnalyzeContentRequest.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 (textInputBuilder_ != null) {
textInputBuilder_.clear();
}
if (eventInputBuilder_ != null) {
eventInputBuilder_.clear();
}
if (suggestionInputBuilder_ != null) {
suggestionInputBuilder_.clear();
}
replyAudioConfig_ = null;
if (replyAudioConfigBuilder_ != null) {
replyAudioConfigBuilder_.dispose();
replyAudioConfigBuilder_ = null;
}
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;
}
requestId_ = "";
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_AnalyzeContentRequest_descriptor;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.AnalyzeContentRequest getDefaultInstanceForType() {
return com.google.cloud.dialogflow.v2.AnalyzeContentRequest.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.AnalyzeContentRequest build() {
com.google.cloud.dialogflow.v2.AnalyzeContentRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.dialogflow.v2.AnalyzeContentRequest buildPartial() {
com.google.cloud.dialogflow.v2.AnalyzeContentRequest result =
new com.google.cloud.dialogflow.v2.AnalyzeContentRequest(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.google.cloud.dialogflow.v2.AnalyzeContentRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.participant_ = participant_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000010) != 0)) {
result.replyAudioConfig_ =
replyAudioConfigBuilder_ == null ? replyAudioConfig_ : replyAudioConfigBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.queryParams_ =
queryParamsBuilder_ == null ? queryParams_ : queryParamsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.assistQueryParams_ =
assistQueryParamsBuilder_ == null
? assistQueryParams_
: assistQueryParamsBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.cxParameters_ =
cxParametersBuilder_ == null ? cxParameters_ : cxParametersBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.requestId_ = requestId_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.google.cloud.dialogflow.v2.AnalyzeContentRequest result) {
result.inputCase_ = inputCase_;
result.input_ = this.input_;
if (inputCase_ == 6 && textInputBuilder_ != null) {
result.input_ = textInputBuilder_.build();
}
if (inputCase_ == 8 && eventInputBuilder_ != null) {
result.input_ = eventInputBuilder_.build();
}
if (inputCase_ == 12 && suggestionInputBuilder_ != null) {
result.input_ = suggestionInputBuilder_.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.AnalyzeContentRequest) {
return mergeFrom((com.google.cloud.dialogflow.v2.AnalyzeContentRequest) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.dialogflow.v2.AnalyzeContentRequest other) {
if (other == com.google.cloud.dialogflow.v2.AnalyzeContentRequest.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.getRequestId().isEmpty()) {
requestId_ = other.requestId_;
bitField0_ |= 0x00000100;
onChanged();
}
switch (other.getInputCase()) {
case TEXT_INPUT:
{
mergeTextInput(other.getTextInput());
break;
}
case EVENT_INPUT:
{
mergeEventInput(other.getEventInput());
break;
}
case SUGGESTION_INPUT:
{
mergeSuggestionInput(other.getSuggestionInput());
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 42:
{
input.readMessage(
getReplyAudioConfigFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
input.readMessage(getTextInputFieldBuilder().getBuilder(), extensionRegistry);
inputCase_ = 6;
break;
} // case 50
case 66:
{
input.readMessage(getEventInputFieldBuilder().getBuilder(), extensionRegistry);
inputCase_ = 8;
break;
} // case 66
case 74:
{
input.readMessage(getQueryParamsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 74
case 90:
{
requestId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 90
case 98:
{
input.readMessage(getSuggestionInputFieldBuilder().getBuilder(), extensionRegistry);
inputCase_ = 12;
break;
} // case 98
case 114:
{
input.readMessage(
getAssistQueryParamsFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 114
case 146:
{
input.readMessage(getCxParametersFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 146
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 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.TextInput,
com.google.cloud.dialogflow.v2.TextInput.Builder,
com.google.cloud.dialogflow.v2.TextInputOrBuilder>
textInputBuilder_;
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*
* @return Whether the textInput field is set.
*/
@java.lang.Override
public boolean hasTextInput() {
return inputCase_ == 6;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*
* @return The textInput.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TextInput getTextInput() {
if (textInputBuilder_ == null) {
if (inputCase_ == 6) {
return (com.google.cloud.dialogflow.v2.TextInput) input_;
}
return com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance();
} else {
if (inputCase_ == 6) {
return textInputBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance();
}
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
public Builder setTextInput(com.google.cloud.dialogflow.v2.TextInput value) {
if (textInputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
} else {
textInputBuilder_.setMessage(value);
}
inputCase_ = 6;
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
public Builder setTextInput(com.google.cloud.dialogflow.v2.TextInput.Builder builderForValue) {
if (textInputBuilder_ == null) {
input_ = builderForValue.build();
onChanged();
} else {
textInputBuilder_.setMessage(builderForValue.build());
}
inputCase_ = 6;
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
public Builder mergeTextInput(com.google.cloud.dialogflow.v2.TextInput value) {
if (textInputBuilder_ == null) {
if (inputCase_ == 6
&& input_ != com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance()) {
input_ =
com.google.cloud.dialogflow.v2.TextInput.newBuilder(
(com.google.cloud.dialogflow.v2.TextInput) input_)
.mergeFrom(value)
.buildPartial();
} else {
input_ = value;
}
onChanged();
} else {
if (inputCase_ == 6) {
textInputBuilder_.mergeFrom(value);
} else {
textInputBuilder_.setMessage(value);
}
}
inputCase_ = 6;
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
public Builder clearTextInput() {
if (textInputBuilder_ == null) {
if (inputCase_ == 6) {
inputCase_ = 0;
input_ = null;
onChanged();
}
} else {
if (inputCase_ == 6) {
inputCase_ = 0;
input_ = null;
}
textInputBuilder_.clear();
}
return this;
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
public com.google.cloud.dialogflow.v2.TextInput.Builder getTextInputBuilder() {
return getTextInputFieldBuilder().getBuilder();
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.TextInputOrBuilder getTextInputOrBuilder() {
if ((inputCase_ == 6) && (textInputBuilder_ != null)) {
return textInputBuilder_.getMessageOrBuilder();
} else {
if (inputCase_ == 6) {
return (com.google.cloud.dialogflow.v2.TextInput) input_;
}
return com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance();
}
}
/**
*
*
*
* The natural language text to be processed.
*
*
* .google.cloud.dialogflow.v2.TextInput text_input = 6;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.TextInput,
com.google.cloud.dialogflow.v2.TextInput.Builder,
com.google.cloud.dialogflow.v2.TextInputOrBuilder>
getTextInputFieldBuilder() {
if (textInputBuilder_ == null) {
if (!(inputCase_ == 6)) {
input_ = com.google.cloud.dialogflow.v2.TextInput.getDefaultInstance();
}
textInputBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.TextInput,
com.google.cloud.dialogflow.v2.TextInput.Builder,
com.google.cloud.dialogflow.v2.TextInputOrBuilder>(
(com.google.cloud.dialogflow.v2.TextInput) input_,
getParentForChildren(),
isClean());
input_ = null;
}
inputCase_ = 6;
onChanged();
return textInputBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.EventInput,
com.google.cloud.dialogflow.v2.EventInput.Builder,
com.google.cloud.dialogflow.v2.EventInputOrBuilder>
eventInputBuilder_;
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*
* @return Whether the eventInput field is set.
*/
@java.lang.Override
public boolean hasEventInput() {
return inputCase_ == 8;
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*
* @return The eventInput.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.EventInput getEventInput() {
if (eventInputBuilder_ == null) {
if (inputCase_ == 8) {
return (com.google.cloud.dialogflow.v2.EventInput) input_;
}
return com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance();
} else {
if (inputCase_ == 8) {
return eventInputBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance();
}
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
public Builder setEventInput(com.google.cloud.dialogflow.v2.EventInput value) {
if (eventInputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
} else {
eventInputBuilder_.setMessage(value);
}
inputCase_ = 8;
return this;
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
public Builder setEventInput(
com.google.cloud.dialogflow.v2.EventInput.Builder builderForValue) {
if (eventInputBuilder_ == null) {
input_ = builderForValue.build();
onChanged();
} else {
eventInputBuilder_.setMessage(builderForValue.build());
}
inputCase_ = 8;
return this;
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
public Builder mergeEventInput(com.google.cloud.dialogflow.v2.EventInput value) {
if (eventInputBuilder_ == null) {
if (inputCase_ == 8
&& input_ != com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance()) {
input_ =
com.google.cloud.dialogflow.v2.EventInput.newBuilder(
(com.google.cloud.dialogflow.v2.EventInput) input_)
.mergeFrom(value)
.buildPartial();
} else {
input_ = value;
}
onChanged();
} else {
if (inputCase_ == 8) {
eventInputBuilder_.mergeFrom(value);
} else {
eventInputBuilder_.setMessage(value);
}
}
inputCase_ = 8;
return this;
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
public Builder clearEventInput() {
if (eventInputBuilder_ == null) {
if (inputCase_ == 8) {
inputCase_ = 0;
input_ = null;
onChanged();
}
} else {
if (inputCase_ == 8) {
inputCase_ = 0;
input_ = null;
}
eventInputBuilder_.clear();
}
return this;
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
public com.google.cloud.dialogflow.v2.EventInput.Builder getEventInputBuilder() {
return getEventInputFieldBuilder().getBuilder();
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.EventInputOrBuilder getEventInputOrBuilder() {
if ((inputCase_ == 8) && (eventInputBuilder_ != null)) {
return eventInputBuilder_.getMessageOrBuilder();
} else {
if (inputCase_ == 8) {
return (com.google.cloud.dialogflow.v2.EventInput) input_;
}
return com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance();
}
}
/**
*
*
*
* An input event to send to Dialogflow.
*
*
* .google.cloud.dialogflow.v2.EventInput event_input = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.EventInput,
com.google.cloud.dialogflow.v2.EventInput.Builder,
com.google.cloud.dialogflow.v2.EventInputOrBuilder>
getEventInputFieldBuilder() {
if (eventInputBuilder_ == null) {
if (!(inputCase_ == 8)) {
input_ = com.google.cloud.dialogflow.v2.EventInput.getDefaultInstance();
}
eventInputBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.EventInput,
com.google.cloud.dialogflow.v2.EventInput.Builder,
com.google.cloud.dialogflow.v2.EventInputOrBuilder>(
(com.google.cloud.dialogflow.v2.EventInput) input_,
getParentForChildren(),
isClean());
input_ = null;
}
inputCase_ = 8;
onChanged();
return eventInputBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.SuggestionInput,
com.google.cloud.dialogflow.v2.SuggestionInput.Builder,
com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder>
suggestionInputBuilder_;
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*
* @return Whether the suggestionInput field is set.
*/
@java.lang.Override
public boolean hasSuggestionInput() {
return inputCase_ == 12;
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*
* @return The suggestionInput.
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.SuggestionInput getSuggestionInput() {
if (suggestionInputBuilder_ == null) {
if (inputCase_ == 12) {
return (com.google.cloud.dialogflow.v2.SuggestionInput) input_;
}
return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance();
} else {
if (inputCase_ == 12) {
return suggestionInputBuilder_.getMessage();
}
return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance();
}
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
public Builder setSuggestionInput(com.google.cloud.dialogflow.v2.SuggestionInput value) {
if (suggestionInputBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
input_ = value;
onChanged();
} else {
suggestionInputBuilder_.setMessage(value);
}
inputCase_ = 12;
return this;
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
public Builder setSuggestionInput(
com.google.cloud.dialogflow.v2.SuggestionInput.Builder builderForValue) {
if (suggestionInputBuilder_ == null) {
input_ = builderForValue.build();
onChanged();
} else {
suggestionInputBuilder_.setMessage(builderForValue.build());
}
inputCase_ = 12;
return this;
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
public Builder mergeSuggestionInput(com.google.cloud.dialogflow.v2.SuggestionInput value) {
if (suggestionInputBuilder_ == null) {
if (inputCase_ == 12
&& input_ != com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance()) {
input_ =
com.google.cloud.dialogflow.v2.SuggestionInput.newBuilder(
(com.google.cloud.dialogflow.v2.SuggestionInput) input_)
.mergeFrom(value)
.buildPartial();
} else {
input_ = value;
}
onChanged();
} else {
if (inputCase_ == 12) {
suggestionInputBuilder_.mergeFrom(value);
} else {
suggestionInputBuilder_.setMessage(value);
}
}
inputCase_ = 12;
return this;
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
public Builder clearSuggestionInput() {
if (suggestionInputBuilder_ == null) {
if (inputCase_ == 12) {
inputCase_ = 0;
input_ = null;
onChanged();
}
} else {
if (inputCase_ == 12) {
inputCase_ = 0;
input_ = null;
}
suggestionInputBuilder_.clear();
}
return this;
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
public com.google.cloud.dialogflow.v2.SuggestionInput.Builder getSuggestionInputBuilder() {
return getSuggestionInputFieldBuilder().getBuilder();
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
@java.lang.Override
public com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder getSuggestionInputOrBuilder() {
if ((inputCase_ == 12) && (suggestionInputBuilder_ != null)) {
return suggestionInputBuilder_.getMessageOrBuilder();
} else {
if (inputCase_ == 12) {
return (com.google.cloud.dialogflow.v2.SuggestionInput) input_;
}
return com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance();
}
}
/**
*
*
*
* An input representing the selection of a suggestion.
*
*
* .google.cloud.dialogflow.v2.SuggestionInput suggestion_input = 12;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.SuggestionInput,
com.google.cloud.dialogflow.v2.SuggestionInput.Builder,
com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder>
getSuggestionInputFieldBuilder() {
if (suggestionInputBuilder_ == null) {
if (!(inputCase_ == 12)) {
input_ = com.google.cloud.dialogflow.v2.SuggestionInput.getDefaultInstance();
}
suggestionInputBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.dialogflow.v2.SuggestionInput,
com.google.cloud.dialogflow.v2.SuggestionInput.Builder,
com.google.cloud.dialogflow.v2.SuggestionInputOrBuilder>(
(com.google.cloud.dialogflow.v2.SuggestionInput) input_,
getParentForChildren(),
isClean());
input_ = null;
}
inputCase_ = 12;
onChanged();
return suggestionInputBuilder_;
}
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*
* @return Whether the replyAudioConfig field is set.
*/
public boolean hasReplyAudioConfig() {
return ((bitField0_ & 0x00000010) != 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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*
* @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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
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_ |= 0x00000010;
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
public Builder setReplyAudioConfig(
com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder builderForValue) {
if (replyAudioConfigBuilder_ == null) {
replyAudioConfig_ = builderForValue.build();
} else {
replyAudioConfigBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
public Builder mergeReplyAudioConfig(com.google.cloud.dialogflow.v2.OutputAudioConfig value) {
if (replyAudioConfigBuilder_ == null) {
if (((bitField0_ & 0x00000010) != 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_ |= 0x00000010;
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
public Builder clearReplyAudioConfig() {
bitField0_ = (bitField0_ & ~0x00000010);
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
public com.google.cloud.dialogflow.v2.OutputAudioConfig.Builder getReplyAudioConfigBuilder() {
bitField0_ |= 0x00000010;
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
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
* AnalyzeContent. If this configuration is not supplied, speech synthesis
* is disabled.
*
*
* .google.cloud.dialogflow.v2.OutputAudioConfig reply_audio_config = 5;
*/
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_;
}
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 = 9;
*
* @return Whether the queryParams field is set.
*/
public boolean hasQueryParams() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 9;
*
* @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 = 9;
*/
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_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 9;
*/
public Builder setQueryParams(
com.google.cloud.dialogflow.v2.QueryParameters.Builder builderForValue) {
if (queryParamsBuilder_ == null) {
queryParams_ = builderForValue.build();
} else {
queryParamsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 9;
*/
public Builder mergeQueryParams(com.google.cloud.dialogflow.v2.QueryParameters value) {
if (queryParamsBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 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_ |= 0x00000020;
onChanged();
}
return this;
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 9;
*/
public Builder clearQueryParams() {
bitField0_ = (bitField0_ & ~0x00000020);
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 = 9;
*/
public com.google.cloud.dialogflow.v2.QueryParameters.Builder getQueryParamsBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getQueryParamsFieldBuilder().getBuilder();
}
/**
*
*
*
* Parameters for a Dialogflow virtual-agent query.
*
*
* .google.cloud.dialogflow.v2.QueryParameters query_params = 9;
*/
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 = 9;
*/
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 = 14;
*
* @return Whether the assistQueryParams field is set.
*/
public boolean hasAssistQueryParams() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14;
*
* @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 = 14;
*/
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_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14;
*/
public Builder setAssistQueryParams(
com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder builderForValue) {
if (assistQueryParamsBuilder_ == null) {
assistQueryParams_ = builderForValue.build();
} else {
assistQueryParamsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14;
*/
public Builder mergeAssistQueryParams(
com.google.cloud.dialogflow.v2.AssistQueryParameters value) {
if (assistQueryParamsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 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_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14;
*/
public Builder clearAssistQueryParams() {
bitField0_ = (bitField0_ & ~0x00000040);
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 = 14;
*/
public com.google.cloud.dialogflow.v2.AssistQueryParameters.Builder
getAssistQueryParamsBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getAssistQueryParamsFieldBuilder().getBuilder();
}
/**
*
*
*
* Parameters for a human assist query.
*
*
* .google.cloud.dialogflow.v2.AssistQueryParameters assist_query_params = 14;
*/
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 = 14;
*/
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 = 18;
*
* @return Whether the cxParameters field is set.
*/
public boolean hasCxParameters() {
return ((bitField0_ & 0x00000080) != 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 = 18;
*
* @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 = 18;
*/
public Builder setCxParameters(com.google.protobuf.Struct value) {
if (cxParametersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cxParameters_ = value;
} else {
cxParametersBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
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 = 18;
*/
public Builder setCxParameters(com.google.protobuf.Struct.Builder builderForValue) {
if (cxParametersBuilder_ == null) {
cxParameters_ = builderForValue.build();
} else {
cxParametersBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
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 = 18;
*/
public Builder mergeCxParameters(com.google.protobuf.Struct value) {
if (cxParametersBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& cxParameters_ != null
&& cxParameters_ != com.google.protobuf.Struct.getDefaultInstance()) {
getCxParametersBuilder().mergeFrom(value);
} else {
cxParameters_ = value;
}
} else {
cxParametersBuilder_.mergeFrom(value);
}
if (cxParameters_ != null) {
bitField0_ |= 0x00000080;
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 = 18;
*/
public Builder clearCxParameters() {
bitField0_ = (bitField0_ & ~0x00000080);
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 = 18;
*/
public com.google.protobuf.Struct.Builder getCxParametersBuilder() {
bitField0_ |= 0x00000080;
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 = 18;
*/
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 = 18;
*/
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 java.lang.Object requestId_ = "";
/**
*
*
*
* A unique identifier for this request. Restricted to 36 ASCII characters.
* A random UUID is recommended.
* This request is only idempotent if a `request_id` is provided.
*
*
* string request_id = 11;
*
* @return The requestId.
*/
public java.lang.String getRequestId() {
java.lang.Object ref = requestId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
requestId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* A unique identifier for this request. Restricted to 36 ASCII characters.
* A random UUID is recommended.
* This request is only idempotent if a `request_id` is provided.
*
*
* string request_id = 11;
*
* @return The bytes for requestId.
*/
public com.google.protobuf.ByteString getRequestIdBytes() {
java.lang.Object ref = requestId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
requestId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* A unique identifier for this request. Restricted to 36 ASCII characters.
* A random UUID is recommended.
* This request is only idempotent if a `request_id` is provided.
*
*
* string request_id = 11;
*
* @param value The requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
requestId_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* A unique identifier for this request. Restricted to 36 ASCII characters.
* A random UUID is recommended.
* This request is only idempotent if a `request_id` is provided.
*
*
* string request_id = 11;
*
* @return This builder for chaining.
*/
public Builder clearRequestId() {
requestId_ = getDefaultInstance().getRequestId();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*
*
* A unique identifier for this request. Restricted to 36 ASCII characters.
* A random UUID is recommended.
* This request is only idempotent if a `request_id` is provided.
*
*
* string request_id = 11;
*
* @param value The bytes for requestId to set.
* @return This builder for chaining.
*/
public Builder setRequestIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
requestId_ = value;
bitField0_ |= 0x00000100;
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.AnalyzeContentRequest)
}
// @@protoc_insertion_point(class_scope:google.cloud.dialogflow.v2.AnalyzeContentRequest)
private static final com.google.cloud.dialogflow.v2.AnalyzeContentRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.dialogflow.v2.AnalyzeContentRequest();
}
public static com.google.cloud.dialogflow.v2.AnalyzeContentRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AnalyzeContentRequest 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.AnalyzeContentRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}